diff --git a/CMakeLists.txt b/CMakeLists.txt index f07d2576..355d09be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,15 +29,25 @@ if(CCACHE_FOUND) message("-- Found ccache: ${CCACHE_FOUND}") endif(CCACHE_FOUND) +if(NOT APPLE) + if(NOT WIN32) + set(WHOLE_ARCHIVE "-Wl,--whole-archive") + set(NO_WHOLE_ARCHIVE "-Wl,--no-whole-archive") + endif() +endif() set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules) #### +include(Compression) include(DownloadProject) - include(LibreSSL) + +use_bundled_zlib(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/override/") +find_package(ZLIB REQUIRED) + use_libre_ssl(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/ssl") find_package (OpenSSL REQUIRED) ################# THRIFT @@ -48,13 +58,22 @@ find_package (OpenSSL REQUIRED) GIT_TAG "v0.12.0" BUILD_IN_SOURCE true SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/dependencies/thrift-src" - CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/thrift" + CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/thrift" "-DCMAKE_POSITION_INDEPENDENT_CODE=ON" "-DWITH_BOOST_STATIC=ON" "-DBUILD_TESTING=OFF" + "-DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH}" "-DWITH_JAVA=OFF" "-DWITH_LIBEVENT=ON" "-DWITH_PYTHON=OFF" + "-DLIBRESSL_BIN_DIR=${LIBRESSL_BIN_DIR}" + "-DLIBRESSL_SRC_DIR=${LIBRESSL_BIN_DIR}" + "-DBYPRODUCT_PREFIX=${BYPRODUCT_PREFIX}" + "-DBYPRODUCT_SUFFIX=${BYPRODUCT_SUFFIX}" + "-DZLIB_BYPRODUCT_INCLUDE=${ZLIB_BYPRODUCT_INCLUDE}" + "-DZLIB_BYPRODUCT=${ZLIB_BYPRODUCT}" + "-DZLIB_LIBRARY=${ZLIB_LIBRARY}" + "-DZLIB_LIBRARIES=${ZLIB_LIBRARIES}" "-DOPENSSL_ROOT_DIR=${LIBRESSL_BIN_DIR}" "-DWITH_HASKELL=OFF" "-DWITH_SHARED_LIB=OFF" @@ -62,7 +81,8 @@ find_package (OpenSSL REQUIRED) #CONFIGURE_COMMAND ./bootstrap.sh && ./configure --without-qt4 --with-openssl=${LIBRESSL_BIN_DIR} --without-c_glib --without-csharp --without-java --without-erlang --without-nodejs --without-lua --without-python --without-perl --without-php --without-php_extension --without-ruby --without-haskell --without-go --without-d --prefix=${CMAKE_CURRENT_BINARY_DIR}/dependencies/thrift UPDATE_COMMAND "" ) - + + add_dependencies(LibThrift zlib-external) add_dependencies(LibThrift libressl-portable) add_library(thrift STATIC IMPORTED) set_target_properties(thrift PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/libthrift.a") @@ -129,8 +149,8 @@ add_subdirectory(${pybind11_SOURCE_DIR}) include_directories("${pybind11_SOURCE_DIR}/include/") set(Boost_USE_MULTITHREADED ON) #find_package(GTest REQUIRED) -find_package(Boost 1.55 REQUIRED COMPONENTS system thread iostreams serialization) -find_package(ZLIB REQUIRED) +find_package(Boost 1.55 REQUIRED COMPONENTS system thread serialization) + find_package (Threads) @@ -155,7 +175,10 @@ file(GLOB_RECURSE STREAMING_SOURCES "src/data/streaming/*cpp") file(GLOB_RECURSE ZK_SOURCES "src/data/zookeeper/*cpp") file(GLOB_RECURSE CLIENT_SOURCES "src/data/client/*cpp") file(GLOB_RECURSE CAPI_SOURCES "src/extern/*cpp") -file(GLOB_RECURSE EXTERN_SOURCES "src/data/extern/*cpp") +file(GLOB_RECURSE UTIL_SOURCES "src/utils/*cpp") +file(GLOB_RECURSE LOGGING_SOURCES "src/logging/*cpp") +file(GLOB_RECURSE THRIFT_SOURCES "src/data/extern/thrift/*cpp") +file(GLOB_RECURSE THRIFTV2_SOURCES "src/data/extern/thriftv2/*cpp") file(GLOB_RECURSE CWRAPPER_SOURCES "src/extern/*cpp") file(GLOB_RECURSE CWRAPPER_SOURCES "src/extern/*cpp") file(GLOB_RECURSE PYBIND_SOURCES "src/python/*cpp") @@ -163,15 +186,16 @@ file(GLOB_RECURSE INTERCONNECT_SOURCES "src/interconnect/*cpp") file(GLOB_RECURSE SCANNER_SOURCES "src/scanner/*cpp") file(GLOB_RECURSE WRITER_SOURCES "src/writer/*cpp") +include_directories("thirdparty/spdlog-20170710/include/") +include_directories("thirdparty/gzip-hpp/") -add_library(sharkbite STATIC ${ZK_SOURCES} ${CONSTRUCT_SOURCES} ${STREAMING_SOURCES} ${CLIENT_SOURCES} ${EXCEPTION_SOURCES} ${EXTERN_SOURCES} ${INTERCONNECT_SOURCES} ${SCANNER_SOURCES} ${WRITER_SOURCES} ${CWRAPPER_SOURCES} ) +add_library(sharkbite STATIC ${UTIL_SOURCES} ${LOGGING_SOURCES} ${ZK_SOURCES} ${CONSTRUCT_SOURCES} ${STREAMING_SOURCES} ${CLIENT_SOURCES} ${EXCEPTION_SOURCES} ${THRIFT_SOURCES} ${THRIFTV2_SOURCES} ${INTERCONNECT_SOURCES} ${SCANNER_SOURCES} ${WRITER_SOURCES} ${CWRAPPER_SOURCES} ) -#target_link_libraries(sharkbite Python::Python) -add_library(sharkbite-shared SHARED ${ZK_SOURCES} ${CONSTRUCT_SOURCES} ${STREAMING_SOURCES} ${CLIENT_SOURCES} ${EXCEPTION_SOURCES} ${EXTERN_SOURCES} ${INTERCONNECT_SOURCES} ${SCANNER_SOURCES} ${WRITER_SOURCES} ${CWRAPPER_SOURCES} ) +add_library(sharkbite-shared SHARED ${UTIL_SOURCES} ${LOGGING_SOURCES} ${ZK_SOURCES} ${CONSTRUCT_SOURCES} ${STREAMING_SOURCES} ${CLIENT_SOURCES} ${EXCEPTION_SOURCES} ${THRIFT_SOURCES} ${THRIFTV2_SOURCES} ${INTERCONNECT_SOURCES} ${SCANNER_SOURCES} ${WRITER_SOURCES} ${CWRAPPER_SOURCES} ) -pybind11_add_module(pysharkbite ${PYBIND_SOURCES} ${ZK_SOURCES} ${CONSTRUCT_SOURCES} ${STREAMING_SOURCES} ${CLIENT_SOURCES} ${EXCEPTION_SOURCES} ${EXTERN_SOURCES} ${INTERCONNECT_SOURCES} ${SCANNER_SOURCES} ${WRITER_SOURCES} ${CWRAPPER_SOURCES}) +pybind11_add_module(pysharkbite ${PYBIND_SOURCES} ${LOGGING_SOURCES} ${UTIL_SOURCES} ${ZK_SOURCES} ${CONSTRUCT_SOURCES} ${STREAMING_SOURCES} ${CLIENT_SOURCES} ${EXCEPTION_SOURCES} ${THRIFT_SOURCES} ${THRIFTV2_SOURCES} ${INTERCONNECT_SOURCES} ${SCANNER_SOURCES} ${WRITER_SOURCES} ${CWRAPPER_SOURCES}) add_dependencies(sharkbite Protobuf) @@ -187,15 +211,31 @@ add_dependencies(sharkbite LibThrift) add_dependencies(pysharkbite LibThrift) add_dependencies(sharkbite-shared LibThrift) -target_link_libraries (sharkbite ${ZLIB_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${ZOOKEEPER_LIBRARIES} ${OPENSSL_LIBRARIES} ${THRIFT_LIBS} ${ZLIB_LIBRARIES} ${Boost_LIBRARIES}) +target_link_libraries (sharkbite ${CMAKE_THREAD_LIBS_INIT} ${ZOOKEEPER_LIBRARIES} ${OPENSSL_LIBRARIES} ${THRIFT_LIBS} ${Boost_LIBRARIES}) -target_link_libraries (pysharkbite PRIVATE ${ZLIB_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${ZOOKEEPER_LIBRARIES} ${OPENSSL_LIBRARIES} ${THRIFT_LIBS} ${ZLIB_LIBRARIES} ${Boost_LIBRARIES}) + +target_link_libraries(sharkbite + ${WHOLE_ARCHIVE} + ${ZLIB_LIBRARY} + ${NO_WHOLE_ARCHIVE} +) + +target_link_libraries (pysharkbite PRIVATE ${CMAKE_THREAD_LIBS_INIT} ${ZOOKEEPER_LIBRARIES} ${OPENSSL_LIBRARIES} ${THRIFT_LIBS} ${Boost_LIBRARIES}) target_compile_definitions( pysharkbite PRIVATE -DPYTHON=1) +target_link_libraries(pysharkbite PRIVATE + ${WHOLE_ARCHIVE} + ${ZLIB_LIBRARY} + ${NO_WHOLE_ARCHIVE} +) -target_link_libraries (sharkbite-shared ${ZLIB_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES} ${Boost_LIBRARIES}) +target_link_libraries (sharkbite-shared ${CMAKE_THREAD_LIBS_INIT} ${OPENSSL_LIBRARIES} ${Boost_LIBRARIES}) target_link_libraries (sharkbite-shared ${ZOOKEEPER_LIBRARIES}) +target_link_libraries(sharkbite-shared ${WHOLE_ARCHIVE} ${ZLIB_LIBRARY} ${NO_WHOLE_ARCHIVE} +) + + target_link_libraries (sharkbite-shared ${THRIFT_LIBS}) @@ -206,7 +246,7 @@ target_link_libraries(capi PRIVATE sharkbite-shared) #ClientExample add_executable(ClientExample "src/examples/ClientExample.cpp") target_link_libraries (ClientExample ${CMAKE_THREAD_LIBS_INIT}) -target_link_libraries (ClientExample ${ZLIB_LIBRARIES}) +#target_link_libraries (ClientExample ${WHOLE_ARCHIVE} ${ZLIB_LIBRARY} ${NO_WHOLE_ARCHIVE}) target_link_libraries( ClientExample ${Boost_LIBRARIES} ) target_link_libraries( ClientExample ${ZOOKEEPER_LIBRARIES} ${OPENSSL_LIBRARIES}) target_link_libraries( ClientExample ${THRIFT_LIBS} sharkbite) @@ -214,7 +254,7 @@ target_link_libraries( ClientExample ${THRIFT_LIBS} sharkbite) #ClientExample add_executable(InsertTest "src/examples/InsertTest.cpp") target_link_libraries (InsertTest ${CMAKE_THREAD_LIBS_INIT}) -target_link_libraries (InsertTest ${ZLIB_LIBRARIES}) +#target_link_libraries (InsertTest ${WHOLE_ARCHIVE} ${ZLIB_LIBRARY} ${NO_WHOLE_ARCHIVE}) target_link_libraries( InsertTest ${Boost_LIBRARIES} ) target_link_libraries( InsertTest ${ZOOKEEPER_LIBRARIES} ) target_link_libraries( InsertTest ${THRIFT_LIBS} ${OPENSSL_LIBRARIES}) @@ -224,7 +264,7 @@ target_link_libraries( InsertTest sharkbite) #ClientExample add_executable(ContinuousIngest "src/examples/ContinuousIngest.cpp") target_link_libraries (ContinuousIngest ${CMAKE_THREAD_LIBS_INIT}) -target_link_libraries (ContinuousIngest ${ZLIB_LIBRARIES}) +#target_link_libraries (ContinuousIngest ${WHOLE_ARCHIVE} ${ZLIB_LIBRARY} ${NO_WHOLE_ARCHIVE}) target_link_libraries( ContinuousIngest ${Boost_LIBRARIES} ) target_link_libraries( ContinuousIngest ${ZOOKEEPER_LIBRARIES} ${OPENSSL_LIBRARIES}) target_link_libraries( ContinuousIngest ${THRIFT_LIBS}) @@ -233,7 +273,7 @@ target_link_libraries( ContinuousIngest sharkbite) #TableOps add_executable(TableOps "src/examples/TableOps.cpp") target_link_libraries (TableOps ${CMAKE_THREAD_LIBS_INIT}) -target_link_libraries (TableOps ${ZLIB_LIBRARIES}) +#target_link_libraries (TableOps ${WHOLE_ARCHIVE} ${ZLIB_LIBRARY} ${NO_WHOLE_ARCHIVE}) target_link_libraries( TableOps ${Boost_LIBRARIES} ) target_link_libraries( TableOps ${ZOOKEEPER_LIBRARIES} ) target_link_libraries( TableOps ${THRIFT_LIBS} ${OPENSSL_LIBRARIES}) @@ -241,7 +281,7 @@ target_link_libraries( TableOps sharkbite) add_executable(RfileReadExample "src/examples/RfileReadExample.cpp") target_link_libraries (RfileReadExample ${CMAKE_THREAD_LIBS_INIT}) -target_link_libraries (RfileReadExample ${ZLIB_LIBRARIES}) +#target_link_libraries (RfileReadExample ${WHOLE_ARCHIVE} ${ZLIB_LIBRARY} ${NO_WHOLE_ARCHIVE}) target_link_libraries( RfileReadExample ${Boost_LIBRARIES} ) target_link_libraries( RfileReadExample ${ZOOKEEPER_LIBRARIES} ${OPENSSL_LIBRARIES} ) target_link_libraries( RfileReadExample ${THRIFT_LIBS}) @@ -249,7 +289,7 @@ target_link_libraries( RfileReadExample sharkbite) add_executable(PrintInfo "src/examples/PrintInfo.cpp") target_link_libraries (PrintInfo ${CMAKE_THREAD_LIBS_INIT}) -target_link_libraries (PrintInfo ${ZLIB_LIBRARIES}) +#target_link_libraries (PrintInfo ${WHOLE_ARCHIVE} ${ZLIB_LIBRARY} ${NO_WHOLE_ARCHIVE}) target_link_libraries( PrintInfo ${Boost_LIBRARIES} ) target_link_libraries( PrintInfo ${ZOOKEEPER_LIBRARIES} ${OPENSSL_LIBRARIES} ) target_link_libraries( PrintInfo ${THRIFT_LIBS}) @@ -266,7 +306,7 @@ enable_testing() file(GLOB_RECURSE RFILE_TEST "test/constructs/rfile_test.cpp") add_executable(testrfile ${RFILE_TEST}) - target_link_libraries(testrfile ${CMAKE_THREAD_LIBS_INIT} ${ZLIB_LIBRARIES} sharkbite) + target_link_libraries(testrfile ${CMAKE_THREAD_LIBS_INIT} sharkbite) add_test(NAME testrfile @@ -274,7 +314,7 @@ enable_testing() file(GLOB_RECURSE TEST_CONSTRUCTS "test/constructs/TestConstructs.cpp") add_executable(testconstructs ${TEST_CONSTRUCTS}) - target_link_libraries(testconstructs ${CMAKE_THREAD_LIBS_INIT} ${ZLIB_LIBRARIES} sharkbite) + target_link_libraries(testconstructs ${CMAKE_THREAD_LIBS_INIT} sharkbite) add_test(NAME testconstructs @@ -282,7 +322,7 @@ enable_testing() file(GLOB_RECURSE TEST_STREAMS "test/constructs/TestStreams.cpp") add_executable(teststreams ${TEST_STREAMS}) - target_link_libraries(teststreams ${CMAKE_THREAD_LIBS_INIT} ${ZLIB_LIBRARIES} sharkbite) + target_link_libraries(teststreams ${CMAKE_THREAD_LIBS_INIT} sharkbite) add_test(NAME teststreams COMMAND teststreams) @@ -291,7 +331,6 @@ enable_testing() file(GLOB_RECURSE TEST_ZK_INSTANCE "test/zookeeper/testInstance.cpp") add_executable(testzkInstance ${TEST_ZK_INSTANCE}) target_link_libraries (testzkInstance ${CMAKE_THREAD_LIBS_INIT}) - target_link_libraries (testzkInstance ${ZLIB_LIBRARIES}) target_link_libraries( testzkInstance ${Boost_LIBRARIES} ) target_link_libraries( testzkInstance ${ZOOKEEPER_LIBRARIES} ) target_link_libraries( testzkInstance ${OPENSSL_LIBRARIES} ${THRIFT_LIBS} sharkbite) @@ -301,7 +340,6 @@ enable_testing() file(GLOB_RECURSE VANDV "test/vandv/IntegrationTest.cpp") add_executable(integrationTest ${VANDV}) target_link_libraries (integrationTest ${CMAKE_THREAD_LIBS_INIT}) - target_link_libraries (integrationTest ${ZLIB_LIBRARIES}) target_link_libraries( integrationTest ${Boost_LIBRARIES} ) target_link_libraries( integrationTest ${ZOOKEEPER_LIBRARIES} ) target_link_libraries( integrationTest ${THRIFT_LIBS} ${OPENSSL_LIBRARIES}) diff --git a/LICENSE b/LICENSE index 5a12270d..db8830d0 100644 --- a/LICENSE +++ b/LICENSE @@ -206,4 +206,9 @@ This includes derived works from the Apache NiFi MiNiFi c++ (ALv2 Licensed ) pro Copyright 2019 The Apache Software Foundation The derived and original works are listed below: BackTrace.h - ThreadPool.h \ No newline at end of file + ThreadPool.h + Properties.h/Properties.cpp + Logger.h + LoggerConfiguration.h/LoggerConfiguration.cpp + StringUtils.h/StringUtils.cpp + ClassUtils.h/ClassUtils.cpp \ No newline at end of file diff --git a/cmake/modules/Compression.cmake b/cmake/modules/Compression.cmake new file mode 100644 index 00000000..2f86bedf --- /dev/null +++ b/cmake/modules/Compression.cmake @@ -0,0 +1,60 @@ +# 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. + +function(use_bundled_zlib SOURCE_DIR BINARY_DIR) + message("Using bundled zlib") +if (WIN32) + string(TOLOWER "${CMAKE_BUILD_TYPE}" build_type) + if (build_type MATCHES relwithdebinfo OR build_type MATCHES release) + set(BYPRODUCT "thirdparty/zlib-src/zlibstatic.lib") + else() + set(BYPRODUCT "thirdparty/zlib-src/zlibstaticd.lib") + endif() + else() + set(BYPRODUCT "thirdparty/zlib-src/libz.a") + endif() + ExternalProject_Add( + zlib-external + BUILD_IN_SOURCE true + GIT_REPOSITORY "https://github.com/madler/zlib.git" + GIT_TAG "cacf7f1d4e3d44d871b605da3b647f07d718623f" # Version 1.2.11 + SOURCE_DIR "${BINARY_DIR}/thirdparty/zlib-src" + CMAKE_ARGS "-DCMAKE_POSITION_INDEPENDENT_CODE=ON" + "-D_INSTALL_PREFIX=${BINARY_DIR}/thirdparty/zlib-install" + BUILD_BYPRODUCTS ${BYPRODUCT} + INSTALL_COMMAND "" + ) + + + add_library(z STATIC IMPORTED) + set_target_properties(z PROPERTIES IMPORTED_LOCATION "${BINARY_DIR}/${BYPRODUCT}") + + set(ZLIB_BYPRODUCT "${BINARY_DIR}/${BYPRODUCT}" CACHE STRING "" FORCE) + set(ZLIB_BYPRODUCT_INCLUDE "${BINARY_DIR}/thirdparty/zlib-src/" CACHE STRING "" FORCE) + set(ZLIB_BIN_DIR "${BINARY_DIR}/thirdparty/zlib-src/" CACHE STRING "" FORCE) + + add_dependencies(z zlib-external) + set(ZLIB_FOUND "YES" CACHE STRING "" FORCE) + set(ZLIB_INCLUDE_DIR "${ZLIB_BYPRODUCT_INCLUDE}" CACHE STRING "" FORCE) + set(ZLIB_INCLUDE_DIRS "${ZLIB_BYPRODUCT_INCLUDE}" CACHE STRING "" FORCE) + + set(ZLIB_LIBRARY "${BINARY_DIR}/${BYPRODUCT}" CACHE STRING "" FORCE) + set(ZLIB_LIBRARIES "${ZLIB_LIBRARY}" CACHE STRING "" FORCE) + set(ZLIB_LIBRARY_RELEASE "${ZLIB_LIBRARY}" CACHE STRING "" FORCE) + set(ZLIB_LIBRARY_DEBUG "${ZLIB_LIBRARY}" CACHE STRING "" FORCE) + +endfunction(use_bundled_zlib) \ No newline at end of file diff --git a/cmake/modules/LibreSSL.cmake b/cmake/modules/LibreSSL.cmake index 71b149c8..91136ea6 100644 --- a/cmake/modules/LibreSSL.cmake +++ b/cmake/modules/LibreSSL.cmake @@ -54,11 +54,11 @@ function(use_libre_ssl SOURCE_DIR BINARY_DIR) set_target_properties(tls PROPERTIES INTERFACE_LINK_LIBRARIES crypto) add_dependencies(tls libressl-portable) - set(LIBRESSL_SRC_DIR "${SOURCE_DIR}/dependencies/libressl/" CACHE STRING "" FORCE) - set(LIBRESSL_BIN_DIR "${BINARY_DIR}/dependencies/libressl-install/" CACHE STRING "" FORCE) + set(LIBRESSL_SRC_DIR "${SOURCE_DIR}/dependencies/libressl" CACHE STRING "" FORCE) + set(LIBRESSL_BIN_DIR "${BINARY_DIR}/dependencies/libressl-install" CACHE STRING "" FORCE) set(OPENSSL_FOUND "YES" CACHE STRING "" FORCE) - set(OPENSSL_INCLUDE_DIR "${SOURCE_DIR}/dependencies/libressl/include" CACHE STRING "" FORCE) + set(OPENSSL_INCLUDE_DIR "${LIBRESSL_BIN_DIR}/include" CACHE STRING "" FORCE) set(OPENSSL_LIBRARIES "${BINARY_DIR}/dependencies/libressl-install/lib/${BYPRODUCT_PREFIX}tls${BYPRODUCT_SUFFIX}" "${BINARY_DIR}/dependencies/libressl-install/lib/${BYPRODUCT_PREFIX}ssl${BYPRODUCT_SUFFIX}" "${BINARY_DIR}/dependencies/libressl-install/lib/${BYPRODUCT_PREFIX}crypto${BYPRODUCT_SUFFIX}" CACHE STRING "" FORCE) endfunction(use_libre_ssl) \ No newline at end of file diff --git a/cmake/override/FindOpenSSL.cmake b/cmake/override/FindOpenSSL.cmake new file mode 100644 index 00000000..7b0fd736 --- /dev/null +++ b/cmake/override/FindOpenSSL.cmake @@ -0,0 +1,47 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# Dummy OpenSSL find for when we use bundled version + +set(OPENSSL_FOUND "YES" CACHE STRING "" FORCE) +set(OPENSSL_INCLUDE_DIR "${LIBRESSL_BIN_DIR}/include" CACHE STRING "" FORCE) +set(OPENSSL_CRYPTO_LIBRARY "${LIBRESSL_BIN_DIR}/lib/${BYPRODUCT_PREFIX}crypto${BYPRODUCT_SUFFIX}" CACHE STRING "" FORCE) +set(OPENSSL_SSL_LIBRARY "${LIBRESSL_BIN_DIR}/lib/${BYPRODUCT_PREFIX}ssl${BYPRODUCT_SUFFIX}" CACHE STRING "" FORCE) +set(OPENSSL_LIBRARIES "${LIBRESSL_BIN_DIR}/lib/${BYPRODUCT_PREFIX}tls${BYPRODUCT_SUFFIX}" ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY} CACHE STRING "" FORCE) +set(OPENSSL_VERSION "1.0.2" CACHE STRING "" FORCE) + + if(NOT TARGET OpenSSL::Crypto ) + add_library(OpenSSL::Crypto UNKNOWN IMPORTED) + set_target_properties(OpenSSL::Crypto PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${OPENSSL_INCLUDE_DIR}") + + set_target_properties(OpenSSL::Crypto PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${OPENSSL_CRYPTO_LIBRARY}") + + endif() + + if(NOT TARGET OpenSSL::SSL + ) + add_library(OpenSSL::SSL UNKNOWN IMPORTED) + set_target_properties(OpenSSL::SSL PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${OPENSSL_INCLUDE_DIR}") + set_target_properties(OpenSSL::SSL PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${OPENSSL_SSL_LIBRARY}") + + endif() diff --git a/cmake/override/FindZLIB.cmake b/cmake/override/FindZLIB.cmake new file mode 100644 index 00000000..038dacd3 --- /dev/null +++ b/cmake/override/FindZLIB.cmake @@ -0,0 +1,39 @@ +# 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. + +# Dummy zlib find for when we use bundled version + set(ZLIB_FOUND "YES" CACHE STRING "" FORCE) + + set(ZLIB_INCLUDE_DIR "${ZLIB_BYPRODUCT_INCLUDE}" CACHE STRING "" FORCE) + set(ZLIB_INCLUDE_DIRS "${ZLIB_BYPRODUCT_INCLUDE}" CACHE STRING "" FORCE) + + set(ZLIB_LIBRARY "${ZLIB_BYPRODUCT}" CACHE STRING "" FORCE) + set(ZLIB_LIBRARIES "${ZLIB_LIBRARY}" CACHE STRING "" FORCE) + set(ZLIB_LIBRARY_RELEASE "${ZLIB_LIBRARY}" CACHE STRING "" FORCE) + set(ZLIB_LIBRARY_DEBUG "${ZLIB_LIBRARY}" CACHE STRING "" FORCE) + message("ZLIB LIB is located at is ${ZLIB_LIBRARIES}") + + if(NOT TARGET ZLIB::ZLIB + ) + add_library(ZLIB::ZLIB UNKNOWN IMPORTED) + set_target_properties(ZLIB::ZLIB PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${ZLIB_INCLUDE_DIR}") + set_target_properties(ZLIB::ZLIB PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${ZLIB_LIBRARY}") + + endif() \ No newline at end of file diff --git a/include/data/client/ExtentLocator.h b/include/data/client/ExtentLocator.h index 822336d6..bd2753a5 100644 --- a/include/data/client/ExtentLocator.h +++ b/include/data/client/ExtentLocator.h @@ -100,8 +100,7 @@ class TabletLocator { * @param retry retries locations if a failure occurs * @returns returns the tablet location or null **/ - virtual cclient::data::TabletLocation - locateTablet(cclient::data::security::AuthInfo *creds, std::string row, bool skipRow, bool retry) = 0; + virtual cclient::data::TabletLocation locateTablet(cclient::data::security::AuthInfo *creds, std::string row, bool skipRow, bool retry) = 0; /** * returns a list of locations diff --git a/include/data/client/MetaDataLocationObtainer.h b/include/data/client/MetaDataLocationObtainer.h index b2dcece1..78512a06 100644 --- a/include/data/client/MetaDataLocationObtainer.h +++ b/include/data/client/MetaDataLocationObtainer.h @@ -25,62 +25,66 @@ #include "../constructs/StructureDefinitions.h" #include "../constructs/client/Instance.h" #include "../constructs/security/AuthInfo.h" +#include "logging/Logger.h" +#include "logging/LoggerConfiguration.h" + namespace cclient { namespace impl { - /** * Location obtainer dedicated to retreiving metadata tablets **/ -class MetaDataLocationObtainer: public TabletLocationObtainer { +class MetaDataLocationObtainer : public TabletLocationObtainer { -public: - /** - * Constructor. - * @param instance instance - **/ - explicit MetaDataLocationObtainer(cclient::data::Instance *instance) : - instance(instance) { - columns = new std::vector(); - columns->push_back( - new cclient::data::Column(METADATA_CURRENT_LOCATION_COLUMN_FAMILY)); - columns->push_back(new cclient::data::Column(METADATA_TABLET_COLUMN_FAMILY, - METADATA_PREV_ROW_COLUMN_CQ)); - std::sort(columns->begin(),columns->end()); + public: + /** + * Constructor. + * @param instance instance + **/ + explicit MetaDataLocationObtainer(cclient::data::Instance *instance) + : instance(instance), + logger(logging::LoggerFactory::getLogger()) { + columns = new std::vector(); + columns->push_back(new cclient::data::Column(METADATA_CURRENT_LOCATION_COLUMN_FAMILY)); + columns->push_back(new cclient::data::Column(METADATA_TABLET_COLUMN_FAMILY, + METADATA_PREV_ROW_COLUMN_CQ)); + std::sort(columns->begin(), columns->end()); - } + } - virtual ~MetaDataLocationObtainer(); + virtual ~MetaDataLocationObtainer(); - /** - * Finds tablet - * @param credentials connecting user's credentials - * @param source source tablet location - * @param row row to locate - * @param stopRow end row - * @param parent parent location obtainer - * @returns a list of tablet locations for the range - **/ - std::vector findTablet(cclient::data::security::AuthInfo *credentials, cclient::data::TabletLocation *source, std::string row, - std::string stopRow, TabletLocator *parent); - /** - * Finds tablet - * @param credentials connecting user's credentials - * @param source source tablet location - * @param row row to locate - * @param stopRow end row - * @param parent parent location obtainer - * @returns a list of tablet locations for the range - **/ - std::vector findTablet(cclient::data::security::AuthInfo *credentials, std::string tabletserver, - std::map > *map, TabletLocator *parent) { - return std::vector(); - } -protected: - // columns to locate - std::vector *columns; - // instance - cclient::data::Instance *instance; + /** + * Finds tablet + * @param credentials connecting user's credentials + * @param source source tablet location + * @param row row to locate + * @param stopRow end row + * @param parent parent location obtainer + * @returns a list of tablet locations for the range + **/ + std::vector findTablet(cclient::data::security::AuthInfo *credentials, cclient::data::TabletLocation *source, std::string row, std::string stopRow, + TabletLocator *parent); + /** + * Finds tablet + * @param credentials connecting user's credentials + * @param source source tablet location + * @param row row to locate + * @param stopRow end row + * @param parent parent location obtainer + * @returns a list of tablet locations for the range + **/ + std::vector findTablet(cclient::data::security::AuthInfo *credentials, std::string tabletserver, + std::map > *map, TabletLocator *parent) { + return std::vector(); + } + protected: + // columns to locate + std::vector *columns; + // instance + cclient::data::Instance *instance; + private: + std::shared_ptr logger; }; } /* namespace impl */ diff --git a/include/data/client/TabletServerLocator.h b/include/data/client/TabletServerLocator.h index 30dd013a..dcf8d330 100644 --- a/include/data/client/TabletServerLocator.h +++ b/include/data/client/TabletServerLocator.h @@ -22,10 +22,22 @@ #include "../exceptions/ClientException.h" #include "../constructs/client/Instance.h" #include "TabletLocationObtainer.h" +#include "logging/Logger.h" +#include "logging/LoggerConfiguration.h" namespace cclient { namespace impl { +struct locationComparator +{ + bool operator()(const std::string &left, const std::string &right) const{ + if (left.empty()) + return false; + if (right.empty()) + return true; + return left < right; + } +}; /** * Mechanism to locate tablet servers. * Design: Implements tablet locator, which is a pure virtual class. @@ -84,16 +96,23 @@ class TabletServerLocator : public TabletLocator { std::vector locations = locator->findTablet(creds, &parentLocation, metadataRow.str(), lastTabletRow, parent); cclient::data::TabletLocation returnLocation; + logging::LOG_DEBUG(logger) << tableId << " Received " << locations.size() << " locations"; for (auto location : locations) { + logging::LOG_DEBUG(logger) << tableId << " Received " << location.getLocation() << " " << location.getExtent(); if (location.getExtent()->getPrevEndRow().length() == 0 || location.getExtent()->getPrevEndRow() < modifiedRow) { returnLocation = location; + logging::LOG_DEBUG(logger) << tableId << " Received " << returnLocation.getLocation() << " " << returnLocation.getExtent(); break; } } if (returnLocation != nullptr) { + auto cachedRow = returnLocation.getExtent()->getEndRow(); + std::lock_guard lock(locatorMutex); - cachedLocations.insert(std::pair(returnLocation.getExtent()->getEndRow(), returnLocation)); + logging::LOG_DEBUG(logger) << tableId << " : " << "Caching " << cachedRow << " in the cache "; + cachedLocations.insert(std::pair(cachedRow, returnLocation)); + return returnLocation; } else { if (retry) @@ -193,12 +212,14 @@ class TabletServerLocator : public TabletLocator { } void invalidateCache(cclient::data::KeyExtent failedExtent) { + logging::LOG_DEBUG(logger) << "Invalidating " << failedExtent.getEndRow(); std::lock_guard lock(locatorMutex); cachedLocations.erase(failedExtent.getEndRow()); } void invalidateCache() { std::lock_guard lock(locatorMutex); + logging::LOG_DEBUG(logger) << "Invalidating the cache"; cachedLocations.clear(); } @@ -210,7 +231,7 @@ class TabletServerLocator : public TabletLocator { std::string tableId; TabletLocator *parent; TabletLocationObtainer *locator; - std::map cachedLocations; + std::map cachedLocations; std::recursive_mutex locatorMutex; cclient::data::Instance *instance; @@ -223,8 +244,13 @@ class TabletServerLocator : public TabletLocator { if (loc.getExtent()->getPrevEndRow().length() > 0 || loc.getExtent()->getPrevEndRow() < startRow) return true; } + + logging::LOG_DEBUG(logger) << tableId << " : " << startRow << " is not cached out of " << cachedLocations.size(); return false; } + + private: + std::shared_ptr logger; }; } /* namespace data */ diff --git a/include/data/constructs/InstanceVersion.h b/include/data/constructs/InstanceVersion.h new file mode 100644 index 00000000..3d46e169 --- /dev/null +++ b/include/data/constructs/InstanceVersion.h @@ -0,0 +1,68 @@ +/* + * Licensed 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. + */ + +#pragma once + +#include +#include +#include + +namespace cclient { +namespace data { + +class InstanceVersion { + + public: + + static int getVersion(const std::string &instance) { + const InstanceVersion *mapper = getInstance(); + return mapper->getHostVersion(instance); + } + + static void setVersion(const std::string &instance, int version) { + InstanceVersion *mapper = getInstance(); + mapper->setHostVersion(instance, version); + } + + private: + + static InstanceVersion *getInstance() { + static InstanceVersion vers; + return &vers; + } + + InstanceVersion() { + } + + void setHostVersion(const std::string &instance, int version) { + std::lock_guard lock(mtx); + version_map_.insert(std::make_pair(instance, version)); + } + + int getHostVersion(const std::string &instance) const { + std::lock_guard lock(mtx); + auto vmap = version_map_.find(instance); + if (vmap != std::end(version_map_)) { + return vmap->second; + } else { + return 1; + } + } + + mutable std::mutex mtx; + std::map version_map_; +}; + +} /* namespace data */ +} /* namespace cclient */ diff --git a/include/data/constructs/KeyExtent.h b/include/data/constructs/KeyExtent.h index f03f8d70..e0da9bf1 100644 --- a/include/data/constructs/KeyExtent.h +++ b/include/data/constructs/KeyExtent.h @@ -153,7 +153,7 @@ class KeyExtent { friend inline std::ostream & operator <<(std::ostream &out, KeyExtent *rhs) { - out << "tableId:" << rhs->tableId << " end:" << rhs->endRow << " prev:" << rhs->prevEndRow << " " << std::endl; + out << "tableId:" << rhs->tableId << " end:" << ( IsEmpty(&rhs->endRow) ? "<" : rhs->endRow )<< " prev:" << ( IsEmpty(&rhs->prevEndRow) ? "<" : rhs->prevEndRow ) << " " << std::endl; return out; } void setTableId(std::string id) { diff --git a/include/data/constructs/inputvalidation.h b/include/data/constructs/inputvalidation.h index 019ccdfb..015a4da1 100644 --- a/include/data/constructs/inputvalidation.h +++ b/include/data/constructs/inputvalidation.h @@ -29,7 +29,7 @@ class has_size { typedef char one; typedef long two; - template static one test(decltype(&C::size)); + template static one test(decltype(&C::empty)); template static two test(...); public: @@ -41,7 +41,7 @@ class has_size { template static auto IsEmpty( T *t) -> typename std::enable_if::value ==1, bool>::type { - return (nullptr == t || t->size() == 0); + return (nullptr == t || t->empty()); } template diff --git a/include/data/constructs/security/Authorizations.h b/include/data/constructs/security/Authorizations.h index e6f4c263..7c6a278c 100644 --- a/include/data/constructs/security/Authorizations.h +++ b/include/data/constructs/security/Authorizations.h @@ -78,19 +78,19 @@ class Authorizations { } } static int buildDefaultAuths() { - for (uint8_t i = 0; i < 256; i++) { + for (int i = 0; i < 256; i++) { validAuthChars[i] = false; } - for (uint8_t i = 'a'; i <= 'z'; i++) { + for (int i = 'a'; i <= 'z'; i++) { validAuthChars[i] = true; } - for (uint8_t i = 'A'; i <= 'Z'; i++) { + for (int i = 'A'; i <= 'Z'; i++) { validAuthChars[i] = true; } - for (uint8_t i = '0'; i <= '9'; i++) { + for (int i = '0'; i <= '9'; i++) { validAuthChars[i] = true; } diff --git a/include/data/constructs/tables/rootTable.h b/include/data/constructs/tables/rootTable.h index 860decdc..e48c5cd7 100644 --- a/include/data/constructs/tables/rootTable.h +++ b/include/data/constructs/tables/rootTable.h @@ -15,8 +15,6 @@ #ifndef SRC_DATA_CONSTRUCTS_TABLES_ROOTTABLE_H_ #define SRC_DATA_CONSTRUCTS_TABLES_ROOTTABLE_H_ - #define ROOT_TABLE_ID "+r" - #endif /* SRC_DATA_CONSTRUCTS_TABLES_ROOTTABLE_H_ */ diff --git a/include/data/constructs/tables/tables.h b/include/data/constructs/tables/tables.h index 58431b83..90735c5e 100644 --- a/include/data/constructs/tables/tables.h +++ b/include/data/constructs/tables/tables.h @@ -15,9 +15,7 @@ #ifndef SRC_DATA_CONSTRUCTS_TABLES_TABLES_H_ #define SRC_DATA_CONSTRUCTS_TABLES_TABLES_H_ - #include "rootTable.h" #include "metadataTable.h" - #endif /* SRC_DATA_CONSTRUCTS_TABLES_TABLES_H_ */ diff --git a/include/data/extern/thrift/ThriftWrapper.h b/include/data/extern/thrift/ThriftWrapper.h index 16f9fd78..5bd7e04d 100644 --- a/include/data/extern/thrift/ThriftWrapper.h +++ b/include/data/extern/thrift/ThriftWrapper.h @@ -11,9 +11,12 @@ #include "../../constructs/Mutation.h" #include "../../constructs/KeyExtent.h" #include "../../constructs/column.h" -#include -#include +#include "gzip/compress.hpp" +#include "gzip/config.hpp" +#include "gzip/decompress.hpp" +#include "gzip/utils.hpp" +#include "gzip/version.hpp" #include "../../streaming/ByteOutputStream.h" #include "../../streaming/NetworkOrderStream.h" #include "../../streaming/input/NetworkOrderInputStream.h" @@ -24,16 +27,7 @@ namespace interconnect { class ThriftWrapper { protected: static std::string decompress(const char *compressed, uint32_t size) { - std::string decompressed; - - boost::iostreams::filtering_ostream os; - - os.push(boost::iostreams::gzip_decompressor()); - os.push(boost::iostreams::back_inserter(decompressed)); - - boost::iostreams::write(os, compressed, size); - - return decompressed; + return gzip::decompress(compressed, size); } public: @@ -74,11 +68,15 @@ class ThriftWrapper { std::string compressedString; { + auto uncompressedPassword = authInfo->getPassword(); + compressedString = gzip::compress(uncompressedPassword.data(), uncompressedPassword.size()); + /* boost::iostreams::filtering_ostream compressingStream; compressingStream.push(boost::iostreams::gzip_compressor(boost::iostreams::gzip_params(boost::iostreams::gzip::best_compression))); compressingStream.push(boost::iostreams::back_inserter(compressedString)); compressingStream << authInfo->getPassword(); boost::iostreams::close(compressingStream); + */ } cclient::data::streams::BigEndianByteStream writeStream(0); diff --git a/include/data/extern/thriftv2/ClientService.h b/include/data/extern/thriftv2/ClientService.h new file mode 100644 index 00000000..d18f3686 --- /dev/null +++ b/include/data/extern/thriftv2/ClientService.h @@ -0,0 +1,4612 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef ClientService_V2H +#define ClientService_V2H + +#include +#include +#include "client_types.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace clientImpl { namespace thrift { + +#ifdef _MSC_VER + #pragma warning( push ) + #pragma warning (disable : 4250 ) //inheriting methods via dominance +#endif + +class ClientServiceIf { + public: + virtual ~ClientServiceIf() {} + virtual void getRootTabletLocation(std::string& _return) = 0; + virtual void getInstanceId(std::string& _return) = 0; + virtual void getZooKeepers(std::string& _return) = 0; + virtual void bulkImportFiles(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const std::string& tableId, const std::vector & files, const std::string& errorDir, const bool setTime) = 0; + virtual bool isActive(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const int64_t tid) = 0; + virtual void ping(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) = 0; + virtual void getDiskUsage(std::vector & _return, const std::set & tables, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) = 0; + virtual void listLocalUsers(std::set & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) = 0; + virtual void createLocalUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& password) = 0; + virtual void dropLocalUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal) = 0; + virtual void changeLocalUserPassword(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& password) = 0; + virtual bool authenticate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) = 0; + virtual bool authenticateUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& toAuth) = 0; + virtual void changeAuthorizations(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::vector & authorizations) = 0; + virtual void getUserAuthorizations(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal) = 0; + virtual bool hasSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t sysPerm) = 0; + virtual bool hasTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t tblPerm) = 0; + virtual bool hasNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t tblNspcPerm) = 0; + virtual void grantSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t permission) = 0; + virtual void revokeSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t permission) = 0; + virtual void grantTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t permission) = 0; + virtual void revokeTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t permission) = 0; + virtual void grantNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t permission) = 0; + virtual void revokeNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t permission) = 0; + virtual void getConfiguration(std::map & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ConfigurationType::type type) = 0; + virtual void getTableConfiguration(std::map & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName) = 0; + virtual void getNamespaceConfiguration(std::map & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns) = 0; + virtual bool checkClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& className, const std::string& interfaceMatch) = 0; + virtual bool checkTableClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableId, const std::string& className, const std::string& interfaceMatch) = 0; + virtual bool checkNamespaceClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& namespaceId, const std::string& className, const std::string& interfaceMatch) = 0; +}; + +class ClientServiceIfFactory { + public: + typedef ClientServiceIf Handler; + + virtual ~ClientServiceIfFactory() {} + + virtual ClientServiceIf* getHandler(const ::apache::thrift::TConnectionInfo& connInfo) = 0; + virtual void releaseHandler(ClientServiceIf* /* handler */) = 0; +}; + +class ClientServiceIfSingletonFactory : virtual public ClientServiceIfFactory { + public: + ClientServiceIfSingletonFactory(const std::shared_ptr& iface) : iface_(iface) {} + virtual ~ClientServiceIfSingletonFactory() {} + + virtual ClientServiceIf* getHandler(const ::apache::thrift::TConnectionInfo&) { + return iface_.get(); + } + virtual void releaseHandler(ClientServiceIf* /* handler */) {} + + protected: + std::shared_ptr iface_; +}; + +class ClientServiceNull : virtual public ClientServiceIf { + public: + virtual ~ClientServiceNull() {} + void getRootTabletLocation(std::string& /* _return */) { + return; + } + void getInstanceId(std::string& /* _return */) { + return; + } + void getZooKeepers(std::string& /* _return */) { + return; + } + void bulkImportFiles(std::vector & /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const int64_t /* tid */, const std::string& /* tableId */, const std::vector & /* files */, const std::string& /* errorDir */, const bool /* setTime */) { + return; + } + bool isActive(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const int64_t /* tid */) { + bool _return = false; + return _return; + } + void ping(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */) { + return; + } + void getDiskUsage(std::vector & /* _return */, const std::set & /* tables */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */) { + return; + } + void listLocalUsers(std::set & /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */) { + return; + } + void createLocalUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* principal */, const std::string& /* password */) { + return; + } + void dropLocalUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* principal */) { + return; + } + void changeLocalUserPassword(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* principal */, const std::string& /* password */) { + return; + } + bool authenticate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */) { + bool _return = false; + return _return; + } + bool authenticateUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* toAuth */) { + bool _return = false; + return _return; + } + void changeAuthorizations(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* principal */, const std::vector & /* authorizations */) { + return; + } + void getUserAuthorizations(std::vector & /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* principal */) { + return; + } + bool hasSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* principal */, const int8_t /* sysPerm */) { + bool _return = false; + return _return; + } + bool hasTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* principal */, const std::string& /* tableName */, const int8_t /* tblPerm */) { + bool _return = false; + return _return; + } + bool hasNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* principal */, const std::string& /* ns */, const int8_t /* tblNspcPerm */) { + bool _return = false; + return _return; + } + void grantSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* principal */, const int8_t /* permission */) { + return; + } + void revokeSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* principal */, const int8_t /* permission */) { + return; + } + void grantTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* principal */, const std::string& /* tableName */, const int8_t /* permission */) { + return; + } + void revokeTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* principal */, const std::string& /* tableName */, const int8_t /* permission */) { + return; + } + void grantNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* principal */, const std::string& /* ns */, const int8_t /* permission */) { + return; + } + void revokeNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* principal */, const std::string& /* ns */, const int8_t /* permission */) { + return; + } + void getConfiguration(std::map & /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const ConfigurationType::type /* type */) { + return; + } + void getTableConfiguration(std::map & /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* tableName */) { + return; + } + void getNamespaceConfiguration(std::map & /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* ns */) { + return; + } + bool checkClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* className */, const std::string& /* interfaceMatch */) { + bool _return = false; + return _return; + } + bool checkTableClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* tableId */, const std::string& /* className */, const std::string& /* interfaceMatch */) { + bool _return = false; + return _return; + } + bool checkNamespaceClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* namespaceId */, const std::string& /* className */, const std::string& /* interfaceMatch */) { + bool _return = false; + return _return; + } +}; + + +class ClientService_getRootTabletLocation_args { + public: + + ClientService_getRootTabletLocation_args(const ClientService_getRootTabletLocation_args&); + ClientService_getRootTabletLocation_args& operator=(const ClientService_getRootTabletLocation_args&); + ClientService_getRootTabletLocation_args() { + } + + virtual ~ClientService_getRootTabletLocation_args() throw(); + + bool operator == (const ClientService_getRootTabletLocation_args & /* rhs */) const + { + return true; + } + bool operator != (const ClientService_getRootTabletLocation_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_getRootTabletLocation_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_getRootTabletLocation_pargs { + public: + + + virtual ~ClientService_getRootTabletLocation_pargs() throw(); + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_getRootTabletLocation_result__isset { + _ClientService_getRootTabletLocation_result__isset() : success(false) {} + bool success :1; +} _ClientService_getRootTabletLocation_result__isset; + +class ClientService_getRootTabletLocation_result { + public: + + ClientService_getRootTabletLocation_result(const ClientService_getRootTabletLocation_result&); + ClientService_getRootTabletLocation_result& operator=(const ClientService_getRootTabletLocation_result&); + ClientService_getRootTabletLocation_result() : success() { + } + + virtual ~ClientService_getRootTabletLocation_result() throw(); + std::string success; + + _ClientService_getRootTabletLocation_result__isset __isset; + + void __set_success(const std::string& val); + + bool operator == (const ClientService_getRootTabletLocation_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ClientService_getRootTabletLocation_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_getRootTabletLocation_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_getRootTabletLocation_presult__isset { + _ClientService_getRootTabletLocation_presult__isset() : success(false) {} + bool success :1; +} _ClientService_getRootTabletLocation_presult__isset; + +class ClientService_getRootTabletLocation_presult { + public: + + + virtual ~ClientService_getRootTabletLocation_presult() throw(); + std::string* success; + + _ClientService_getRootTabletLocation_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + + +class ClientService_getInstanceId_args { + public: + + ClientService_getInstanceId_args(const ClientService_getInstanceId_args&); + ClientService_getInstanceId_args& operator=(const ClientService_getInstanceId_args&); + ClientService_getInstanceId_args() { + } + + virtual ~ClientService_getInstanceId_args() throw(); + + bool operator == (const ClientService_getInstanceId_args & /* rhs */) const + { + return true; + } + bool operator != (const ClientService_getInstanceId_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_getInstanceId_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_getInstanceId_pargs { + public: + + + virtual ~ClientService_getInstanceId_pargs() throw(); + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_getInstanceId_result__isset { + _ClientService_getInstanceId_result__isset() : success(false) {} + bool success :1; +} _ClientService_getInstanceId_result__isset; + +class ClientService_getInstanceId_result { + public: + + ClientService_getInstanceId_result(const ClientService_getInstanceId_result&); + ClientService_getInstanceId_result& operator=(const ClientService_getInstanceId_result&); + ClientService_getInstanceId_result() : success() { + } + + virtual ~ClientService_getInstanceId_result() throw(); + std::string success; + + _ClientService_getInstanceId_result__isset __isset; + + void __set_success(const std::string& val); + + bool operator == (const ClientService_getInstanceId_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ClientService_getInstanceId_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_getInstanceId_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_getInstanceId_presult__isset { + _ClientService_getInstanceId_presult__isset() : success(false) {} + bool success :1; +} _ClientService_getInstanceId_presult__isset; + +class ClientService_getInstanceId_presult { + public: + + + virtual ~ClientService_getInstanceId_presult() throw(); + std::string* success; + + _ClientService_getInstanceId_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + + +class ClientService_getZooKeepers_args { + public: + + ClientService_getZooKeepers_args(const ClientService_getZooKeepers_args&); + ClientService_getZooKeepers_args& operator=(const ClientService_getZooKeepers_args&); + ClientService_getZooKeepers_args() { + } + + virtual ~ClientService_getZooKeepers_args() throw(); + + bool operator == (const ClientService_getZooKeepers_args & /* rhs */) const + { + return true; + } + bool operator != (const ClientService_getZooKeepers_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_getZooKeepers_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_getZooKeepers_pargs { + public: + + + virtual ~ClientService_getZooKeepers_pargs() throw(); + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_getZooKeepers_result__isset { + _ClientService_getZooKeepers_result__isset() : success(false) {} + bool success :1; +} _ClientService_getZooKeepers_result__isset; + +class ClientService_getZooKeepers_result { + public: + + ClientService_getZooKeepers_result(const ClientService_getZooKeepers_result&); + ClientService_getZooKeepers_result& operator=(const ClientService_getZooKeepers_result&); + ClientService_getZooKeepers_result() : success() { + } + + virtual ~ClientService_getZooKeepers_result() throw(); + std::string success; + + _ClientService_getZooKeepers_result__isset __isset; + + void __set_success(const std::string& val); + + bool operator == (const ClientService_getZooKeepers_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ClientService_getZooKeepers_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_getZooKeepers_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_getZooKeepers_presult__isset { + _ClientService_getZooKeepers_presult__isset() : success(false) {} + bool success :1; +} _ClientService_getZooKeepers_presult__isset; + +class ClientService_getZooKeepers_presult { + public: + + + virtual ~ClientService_getZooKeepers_presult() throw(); + std::string* success; + + _ClientService_getZooKeepers_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ClientService_bulkImportFiles_args__isset { + _ClientService_bulkImportFiles_args__isset() : tinfo(false), credentials(false), tid(false), tableId(false), files(false), errorDir(false), setTime(false) {} + bool tinfo :1; + bool credentials :1; + bool tid :1; + bool tableId :1; + bool files :1; + bool errorDir :1; + bool setTime :1; +} _ClientService_bulkImportFiles_args__isset; + +class ClientService_bulkImportFiles_args { + public: + + ClientService_bulkImportFiles_args(const ClientService_bulkImportFiles_args&); + ClientService_bulkImportFiles_args& operator=(const ClientService_bulkImportFiles_args&); + ClientService_bulkImportFiles_args() : tid(0), tableId(), errorDir(), setTime(0) { + } + + virtual ~ClientService_bulkImportFiles_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + int64_t tid; + std::string tableId; + std::vector files; + std::string errorDir; + bool setTime; + + _ClientService_bulkImportFiles_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_tid(const int64_t val); + + void __set_tableId(const std::string& val); + + void __set_files(const std::vector & val); + + void __set_errorDir(const std::string& val); + + void __set_setTime(const bool val); + + bool operator == (const ClientService_bulkImportFiles_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(tid == rhs.tid)) + return false; + if (!(tableId == rhs.tableId)) + return false; + if (!(files == rhs.files)) + return false; + if (!(errorDir == rhs.errorDir)) + return false; + if (!(setTime == rhs.setTime)) + return false; + return true; + } + bool operator != (const ClientService_bulkImportFiles_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_bulkImportFiles_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_bulkImportFiles_pargs { + public: + + + virtual ~ClientService_bulkImportFiles_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const int64_t* tid; + const std::string* tableId; + const std::vector * files; + const std::string* errorDir; + const bool* setTime; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_bulkImportFiles_result__isset { + _ClientService_bulkImportFiles_result__isset() : success(false), sec(false), tope(false) {} + bool success :1; + bool sec :1; + bool tope :1; +} _ClientService_bulkImportFiles_result__isset; + +class ClientService_bulkImportFiles_result { + public: + + ClientService_bulkImportFiles_result(const ClientService_bulkImportFiles_result&); + ClientService_bulkImportFiles_result& operator=(const ClientService_bulkImportFiles_result&); + ClientService_bulkImportFiles_result() { + } + + virtual ~ClientService_bulkImportFiles_result() throw(); + std::vector success; + ThriftSecurityException sec; + ThriftTableOperationException tope; + + _ClientService_bulkImportFiles_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_sec(const ThriftSecurityException& val); + + void __set_tope(const ThriftTableOperationException& val); + + bool operator == (const ClientService_bulkImportFiles_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + if (!(tope == rhs.tope)) + return false; + return true; + } + bool operator != (const ClientService_bulkImportFiles_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_bulkImportFiles_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_bulkImportFiles_presult__isset { + _ClientService_bulkImportFiles_presult__isset() : success(false), sec(false), tope(false) {} + bool success :1; + bool sec :1; + bool tope :1; +} _ClientService_bulkImportFiles_presult__isset; + +class ClientService_bulkImportFiles_presult { + public: + + + virtual ~ClientService_bulkImportFiles_presult() throw(); + std::vector * success; + ThriftSecurityException sec; + ThriftTableOperationException tope; + + _ClientService_bulkImportFiles_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ClientService_isActive_args__isset { + _ClientService_isActive_args__isset() : tinfo(false), tid(false) {} + bool tinfo :1; + bool tid :1; +} _ClientService_isActive_args__isset; + +class ClientService_isActive_args { + public: + + ClientService_isActive_args(const ClientService_isActive_args&); + ClientService_isActive_args& operator=(const ClientService_isActive_args&); + ClientService_isActive_args() : tid(0) { + } + + virtual ~ClientService_isActive_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + int64_t tid; + + _ClientService_isActive_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_tid(const int64_t val); + + bool operator == (const ClientService_isActive_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(tid == rhs.tid)) + return false; + return true; + } + bool operator != (const ClientService_isActive_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_isActive_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_isActive_pargs { + public: + + + virtual ~ClientService_isActive_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const int64_t* tid; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_isActive_result__isset { + _ClientService_isActive_result__isset() : success(false) {} + bool success :1; +} _ClientService_isActive_result__isset; + +class ClientService_isActive_result { + public: + + ClientService_isActive_result(const ClientService_isActive_result&); + ClientService_isActive_result& operator=(const ClientService_isActive_result&); + ClientService_isActive_result() : success(0) { + } + + virtual ~ClientService_isActive_result() throw(); + bool success; + + _ClientService_isActive_result__isset __isset; + + void __set_success(const bool val); + + bool operator == (const ClientService_isActive_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ClientService_isActive_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_isActive_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_isActive_presult__isset { + _ClientService_isActive_presult__isset() : success(false) {} + bool success :1; +} _ClientService_isActive_presult__isset; + +class ClientService_isActive_presult { + public: + + + virtual ~ClientService_isActive_presult() throw(); + bool* success; + + _ClientService_isActive_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ClientService_ping_args__isset { + _ClientService_ping_args__isset() : credentials(false) {} + bool credentials :1; +} _ClientService_ping_args__isset; + +class ClientService_ping_args { + public: + + ClientService_ping_args(const ClientService_ping_args&); + ClientService_ping_args& operator=(const ClientService_ping_args&); + ClientService_ping_args() { + } + + virtual ~ClientService_ping_args() throw(); + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + + _ClientService_ping_args__isset __isset; + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + bool operator == (const ClientService_ping_args & rhs) const + { + if (!(credentials == rhs.credentials)) + return false; + return true; + } + bool operator != (const ClientService_ping_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_ping_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_ping_pargs { + public: + + + virtual ~ClientService_ping_pargs() throw(); + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_ping_result__isset { + _ClientService_ping_result__isset() : sec(false) {} + bool sec :1; +} _ClientService_ping_result__isset; + +class ClientService_ping_result { + public: + + ClientService_ping_result(const ClientService_ping_result&); + ClientService_ping_result& operator=(const ClientService_ping_result&); + ClientService_ping_result() { + } + + virtual ~ClientService_ping_result() throw(); + ThriftSecurityException sec; + + _ClientService_ping_result__isset __isset; + + void __set_sec(const ThriftSecurityException& val); + + bool operator == (const ClientService_ping_result & rhs) const + { + if (!(sec == rhs.sec)) + return false; + return true; + } + bool operator != (const ClientService_ping_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_ping_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_ping_presult__isset { + _ClientService_ping_presult__isset() : sec(false) {} + bool sec :1; +} _ClientService_ping_presult__isset; + +class ClientService_ping_presult { + public: + + + virtual ~ClientService_ping_presult() throw(); + ThriftSecurityException sec; + + _ClientService_ping_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ClientService_getDiskUsage_args__isset { + _ClientService_getDiskUsage_args__isset() : tables(false), credentials(false) {} + bool tables :1; + bool credentials :1; +} _ClientService_getDiskUsage_args__isset; + +class ClientService_getDiskUsage_args { + public: + + ClientService_getDiskUsage_args(const ClientService_getDiskUsage_args&); + ClientService_getDiskUsage_args& operator=(const ClientService_getDiskUsage_args&); + ClientService_getDiskUsage_args() { + } + + virtual ~ClientService_getDiskUsage_args() throw(); + std::set tables; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + + _ClientService_getDiskUsage_args__isset __isset; + + void __set_tables(const std::set & val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + bool operator == (const ClientService_getDiskUsage_args & rhs) const + { + if (!(tables == rhs.tables)) + return false; + if (!(credentials == rhs.credentials)) + return false; + return true; + } + bool operator != (const ClientService_getDiskUsage_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_getDiskUsage_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_getDiskUsage_pargs { + public: + + + virtual ~ClientService_getDiskUsage_pargs() throw(); + const std::set * tables; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_getDiskUsage_result__isset { + _ClientService_getDiskUsage_result__isset() : success(false), sec(false), toe(false) {} + bool success :1; + bool sec :1; + bool toe :1; +} _ClientService_getDiskUsage_result__isset; + +class ClientService_getDiskUsage_result { + public: + + ClientService_getDiskUsage_result(const ClientService_getDiskUsage_result&); + ClientService_getDiskUsage_result& operator=(const ClientService_getDiskUsage_result&); + ClientService_getDiskUsage_result() { + } + + virtual ~ClientService_getDiskUsage_result() throw(); + std::vector success; + ThriftSecurityException sec; + ThriftTableOperationException toe; + + _ClientService_getDiskUsage_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_sec(const ThriftSecurityException& val); + + void __set_toe(const ThriftTableOperationException& val); + + bool operator == (const ClientService_getDiskUsage_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + if (!(toe == rhs.toe)) + return false; + return true; + } + bool operator != (const ClientService_getDiskUsage_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_getDiskUsage_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_getDiskUsage_presult__isset { + _ClientService_getDiskUsage_presult__isset() : success(false), sec(false), toe(false) {} + bool success :1; + bool sec :1; + bool toe :1; +} _ClientService_getDiskUsage_presult__isset; + +class ClientService_getDiskUsage_presult { + public: + + + virtual ~ClientService_getDiskUsage_presult() throw(); + std::vector * success; + ThriftSecurityException sec; + ThriftTableOperationException toe; + + _ClientService_getDiskUsage_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ClientService_listLocalUsers_args__isset { + _ClientService_listLocalUsers_args__isset() : tinfo(false), credentials(false) {} + bool tinfo :1; + bool credentials :1; +} _ClientService_listLocalUsers_args__isset; + +class ClientService_listLocalUsers_args { + public: + + ClientService_listLocalUsers_args(const ClientService_listLocalUsers_args&); + ClientService_listLocalUsers_args& operator=(const ClientService_listLocalUsers_args&); + ClientService_listLocalUsers_args() { + } + + virtual ~ClientService_listLocalUsers_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + + _ClientService_listLocalUsers_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + bool operator == (const ClientService_listLocalUsers_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + return true; + } + bool operator != (const ClientService_listLocalUsers_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_listLocalUsers_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_listLocalUsers_pargs { + public: + + + virtual ~ClientService_listLocalUsers_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_listLocalUsers_result__isset { + _ClientService_listLocalUsers_result__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _ClientService_listLocalUsers_result__isset; + +class ClientService_listLocalUsers_result { + public: + + ClientService_listLocalUsers_result(const ClientService_listLocalUsers_result&); + ClientService_listLocalUsers_result& operator=(const ClientService_listLocalUsers_result&); + ClientService_listLocalUsers_result() { + } + + virtual ~ClientService_listLocalUsers_result() throw(); + std::set success; + ThriftSecurityException sec; + + _ClientService_listLocalUsers_result__isset __isset; + + void __set_success(const std::set & val); + + void __set_sec(const ThriftSecurityException& val); + + bool operator == (const ClientService_listLocalUsers_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + return true; + } + bool operator != (const ClientService_listLocalUsers_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_listLocalUsers_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_listLocalUsers_presult__isset { + _ClientService_listLocalUsers_presult__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _ClientService_listLocalUsers_presult__isset; + +class ClientService_listLocalUsers_presult { + public: + + + virtual ~ClientService_listLocalUsers_presult() throw(); + std::set * success; + ThriftSecurityException sec; + + _ClientService_listLocalUsers_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ClientService_createLocalUser_args__isset { + _ClientService_createLocalUser_args__isset() : tinfo(false), credentials(false), principal(false), password(false) {} + bool tinfo :1; + bool credentials :1; + bool principal :1; + bool password :1; +} _ClientService_createLocalUser_args__isset; + +class ClientService_createLocalUser_args { + public: + + ClientService_createLocalUser_args(const ClientService_createLocalUser_args&); + ClientService_createLocalUser_args& operator=(const ClientService_createLocalUser_args&); + ClientService_createLocalUser_args() : principal(), password() { + } + + virtual ~ClientService_createLocalUser_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string principal; + std::string password; + + _ClientService_createLocalUser_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_principal(const std::string& val); + + void __set_password(const std::string& val); + + bool operator == (const ClientService_createLocalUser_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(principal == rhs.principal)) + return false; + if (!(password == rhs.password)) + return false; + return true; + } + bool operator != (const ClientService_createLocalUser_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_createLocalUser_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_createLocalUser_pargs { + public: + + + virtual ~ClientService_createLocalUser_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* principal; + const std::string* password; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_createLocalUser_result__isset { + _ClientService_createLocalUser_result__isset() : sec(false) {} + bool sec :1; +} _ClientService_createLocalUser_result__isset; + +class ClientService_createLocalUser_result { + public: + + ClientService_createLocalUser_result(const ClientService_createLocalUser_result&); + ClientService_createLocalUser_result& operator=(const ClientService_createLocalUser_result&); + ClientService_createLocalUser_result() { + } + + virtual ~ClientService_createLocalUser_result() throw(); + ThriftSecurityException sec; + + _ClientService_createLocalUser_result__isset __isset; + + void __set_sec(const ThriftSecurityException& val); + + bool operator == (const ClientService_createLocalUser_result & rhs) const + { + if (!(sec == rhs.sec)) + return false; + return true; + } + bool operator != (const ClientService_createLocalUser_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_createLocalUser_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_createLocalUser_presult__isset { + _ClientService_createLocalUser_presult__isset() : sec(false) {} + bool sec :1; +} _ClientService_createLocalUser_presult__isset; + +class ClientService_createLocalUser_presult { + public: + + + virtual ~ClientService_createLocalUser_presult() throw(); + ThriftSecurityException sec; + + _ClientService_createLocalUser_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ClientService_dropLocalUser_args__isset { + _ClientService_dropLocalUser_args__isset() : tinfo(false), credentials(false), principal(false) {} + bool tinfo :1; + bool credentials :1; + bool principal :1; +} _ClientService_dropLocalUser_args__isset; + +class ClientService_dropLocalUser_args { + public: + + ClientService_dropLocalUser_args(const ClientService_dropLocalUser_args&); + ClientService_dropLocalUser_args& operator=(const ClientService_dropLocalUser_args&); + ClientService_dropLocalUser_args() : principal() { + } + + virtual ~ClientService_dropLocalUser_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string principal; + + _ClientService_dropLocalUser_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_principal(const std::string& val); + + bool operator == (const ClientService_dropLocalUser_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(principal == rhs.principal)) + return false; + return true; + } + bool operator != (const ClientService_dropLocalUser_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_dropLocalUser_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_dropLocalUser_pargs { + public: + + + virtual ~ClientService_dropLocalUser_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* principal; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_dropLocalUser_result__isset { + _ClientService_dropLocalUser_result__isset() : sec(false) {} + bool sec :1; +} _ClientService_dropLocalUser_result__isset; + +class ClientService_dropLocalUser_result { + public: + + ClientService_dropLocalUser_result(const ClientService_dropLocalUser_result&); + ClientService_dropLocalUser_result& operator=(const ClientService_dropLocalUser_result&); + ClientService_dropLocalUser_result() { + } + + virtual ~ClientService_dropLocalUser_result() throw(); + ThriftSecurityException sec; + + _ClientService_dropLocalUser_result__isset __isset; + + void __set_sec(const ThriftSecurityException& val); + + bool operator == (const ClientService_dropLocalUser_result & rhs) const + { + if (!(sec == rhs.sec)) + return false; + return true; + } + bool operator != (const ClientService_dropLocalUser_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_dropLocalUser_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_dropLocalUser_presult__isset { + _ClientService_dropLocalUser_presult__isset() : sec(false) {} + bool sec :1; +} _ClientService_dropLocalUser_presult__isset; + +class ClientService_dropLocalUser_presult { + public: + + + virtual ~ClientService_dropLocalUser_presult() throw(); + ThriftSecurityException sec; + + _ClientService_dropLocalUser_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ClientService_changeLocalUserPassword_args__isset { + _ClientService_changeLocalUserPassword_args__isset() : tinfo(false), credentials(false), principal(false), password(false) {} + bool tinfo :1; + bool credentials :1; + bool principal :1; + bool password :1; +} _ClientService_changeLocalUserPassword_args__isset; + +class ClientService_changeLocalUserPassword_args { + public: + + ClientService_changeLocalUserPassword_args(const ClientService_changeLocalUserPassword_args&); + ClientService_changeLocalUserPassword_args& operator=(const ClientService_changeLocalUserPassword_args&); + ClientService_changeLocalUserPassword_args() : principal(), password() { + } + + virtual ~ClientService_changeLocalUserPassword_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string principal; + std::string password; + + _ClientService_changeLocalUserPassword_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_principal(const std::string& val); + + void __set_password(const std::string& val); + + bool operator == (const ClientService_changeLocalUserPassword_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(principal == rhs.principal)) + return false; + if (!(password == rhs.password)) + return false; + return true; + } + bool operator != (const ClientService_changeLocalUserPassword_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_changeLocalUserPassword_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_changeLocalUserPassword_pargs { + public: + + + virtual ~ClientService_changeLocalUserPassword_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* principal; + const std::string* password; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_changeLocalUserPassword_result__isset { + _ClientService_changeLocalUserPassword_result__isset() : sec(false) {} + bool sec :1; +} _ClientService_changeLocalUserPassword_result__isset; + +class ClientService_changeLocalUserPassword_result { + public: + + ClientService_changeLocalUserPassword_result(const ClientService_changeLocalUserPassword_result&); + ClientService_changeLocalUserPassword_result& operator=(const ClientService_changeLocalUserPassword_result&); + ClientService_changeLocalUserPassword_result() { + } + + virtual ~ClientService_changeLocalUserPassword_result() throw(); + ThriftSecurityException sec; + + _ClientService_changeLocalUserPassword_result__isset __isset; + + void __set_sec(const ThriftSecurityException& val); + + bool operator == (const ClientService_changeLocalUserPassword_result & rhs) const + { + if (!(sec == rhs.sec)) + return false; + return true; + } + bool operator != (const ClientService_changeLocalUserPassword_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_changeLocalUserPassword_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_changeLocalUserPassword_presult__isset { + _ClientService_changeLocalUserPassword_presult__isset() : sec(false) {} + bool sec :1; +} _ClientService_changeLocalUserPassword_presult__isset; + +class ClientService_changeLocalUserPassword_presult { + public: + + + virtual ~ClientService_changeLocalUserPassword_presult() throw(); + ThriftSecurityException sec; + + _ClientService_changeLocalUserPassword_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ClientService_authenticate_args__isset { + _ClientService_authenticate_args__isset() : tinfo(false), credentials(false) {} + bool tinfo :1; + bool credentials :1; +} _ClientService_authenticate_args__isset; + +class ClientService_authenticate_args { + public: + + ClientService_authenticate_args(const ClientService_authenticate_args&); + ClientService_authenticate_args& operator=(const ClientService_authenticate_args&); + ClientService_authenticate_args() { + } + + virtual ~ClientService_authenticate_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + + _ClientService_authenticate_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + bool operator == (const ClientService_authenticate_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + return true; + } + bool operator != (const ClientService_authenticate_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_authenticate_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_authenticate_pargs { + public: + + + virtual ~ClientService_authenticate_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_authenticate_result__isset { + _ClientService_authenticate_result__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _ClientService_authenticate_result__isset; + +class ClientService_authenticate_result { + public: + + ClientService_authenticate_result(const ClientService_authenticate_result&); + ClientService_authenticate_result& operator=(const ClientService_authenticate_result&); + ClientService_authenticate_result() : success(0) { + } + + virtual ~ClientService_authenticate_result() throw(); + bool success; + ThriftSecurityException sec; + + _ClientService_authenticate_result__isset __isset; + + void __set_success(const bool val); + + void __set_sec(const ThriftSecurityException& val); + + bool operator == (const ClientService_authenticate_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + return true; + } + bool operator != (const ClientService_authenticate_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_authenticate_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_authenticate_presult__isset { + _ClientService_authenticate_presult__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _ClientService_authenticate_presult__isset; + +class ClientService_authenticate_presult { + public: + + + virtual ~ClientService_authenticate_presult() throw(); + bool* success; + ThriftSecurityException sec; + + _ClientService_authenticate_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ClientService_authenticateUser_args__isset { + _ClientService_authenticateUser_args__isset() : tinfo(false), credentials(false), toAuth(false) {} + bool tinfo :1; + bool credentials :1; + bool toAuth :1; +} _ClientService_authenticateUser_args__isset; + +class ClientService_authenticateUser_args { + public: + + ClientService_authenticateUser_args(const ClientService_authenticateUser_args&); + ClientService_authenticateUser_args& operator=(const ClientService_authenticateUser_args&); + ClientService_authenticateUser_args() { + } + + virtual ~ClientService_authenticateUser_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials toAuth; + + _ClientService_authenticateUser_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_toAuth(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + bool operator == (const ClientService_authenticateUser_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(toAuth == rhs.toAuth)) + return false; + return true; + } + bool operator != (const ClientService_authenticateUser_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_authenticateUser_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_authenticateUser_pargs { + public: + + + virtual ~ClientService_authenticateUser_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* toAuth; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_authenticateUser_result__isset { + _ClientService_authenticateUser_result__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _ClientService_authenticateUser_result__isset; + +class ClientService_authenticateUser_result { + public: + + ClientService_authenticateUser_result(const ClientService_authenticateUser_result&); + ClientService_authenticateUser_result& operator=(const ClientService_authenticateUser_result&); + ClientService_authenticateUser_result() : success(0) { + } + + virtual ~ClientService_authenticateUser_result() throw(); + bool success; + ThriftSecurityException sec; + + _ClientService_authenticateUser_result__isset __isset; + + void __set_success(const bool val); + + void __set_sec(const ThriftSecurityException& val); + + bool operator == (const ClientService_authenticateUser_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + return true; + } + bool operator != (const ClientService_authenticateUser_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_authenticateUser_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_authenticateUser_presult__isset { + _ClientService_authenticateUser_presult__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _ClientService_authenticateUser_presult__isset; + +class ClientService_authenticateUser_presult { + public: + + + virtual ~ClientService_authenticateUser_presult() throw(); + bool* success; + ThriftSecurityException sec; + + _ClientService_authenticateUser_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ClientService_changeAuthorizations_args__isset { + _ClientService_changeAuthorizations_args__isset() : tinfo(false), credentials(false), principal(false), authorizations(false) {} + bool tinfo :1; + bool credentials :1; + bool principal :1; + bool authorizations :1; +} _ClientService_changeAuthorizations_args__isset; + +class ClientService_changeAuthorizations_args { + public: + + ClientService_changeAuthorizations_args(const ClientService_changeAuthorizations_args&); + ClientService_changeAuthorizations_args& operator=(const ClientService_changeAuthorizations_args&); + ClientService_changeAuthorizations_args() : principal() { + } + + virtual ~ClientService_changeAuthorizations_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string principal; + std::vector authorizations; + + _ClientService_changeAuthorizations_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_principal(const std::string& val); + + void __set_authorizations(const std::vector & val); + + bool operator == (const ClientService_changeAuthorizations_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(principal == rhs.principal)) + return false; + if (!(authorizations == rhs.authorizations)) + return false; + return true; + } + bool operator != (const ClientService_changeAuthorizations_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_changeAuthorizations_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_changeAuthorizations_pargs { + public: + + + virtual ~ClientService_changeAuthorizations_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* principal; + const std::vector * authorizations; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_changeAuthorizations_result__isset { + _ClientService_changeAuthorizations_result__isset() : sec(false) {} + bool sec :1; +} _ClientService_changeAuthorizations_result__isset; + +class ClientService_changeAuthorizations_result { + public: + + ClientService_changeAuthorizations_result(const ClientService_changeAuthorizations_result&); + ClientService_changeAuthorizations_result& operator=(const ClientService_changeAuthorizations_result&); + ClientService_changeAuthorizations_result() { + } + + virtual ~ClientService_changeAuthorizations_result() throw(); + ThriftSecurityException sec; + + _ClientService_changeAuthorizations_result__isset __isset; + + void __set_sec(const ThriftSecurityException& val); + + bool operator == (const ClientService_changeAuthorizations_result & rhs) const + { + if (!(sec == rhs.sec)) + return false; + return true; + } + bool operator != (const ClientService_changeAuthorizations_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_changeAuthorizations_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_changeAuthorizations_presult__isset { + _ClientService_changeAuthorizations_presult__isset() : sec(false) {} + bool sec :1; +} _ClientService_changeAuthorizations_presult__isset; + +class ClientService_changeAuthorizations_presult { + public: + + + virtual ~ClientService_changeAuthorizations_presult() throw(); + ThriftSecurityException sec; + + _ClientService_changeAuthorizations_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ClientService_getUserAuthorizations_args__isset { + _ClientService_getUserAuthorizations_args__isset() : tinfo(false), credentials(false), principal(false) {} + bool tinfo :1; + bool credentials :1; + bool principal :1; +} _ClientService_getUserAuthorizations_args__isset; + +class ClientService_getUserAuthorizations_args { + public: + + ClientService_getUserAuthorizations_args(const ClientService_getUserAuthorizations_args&); + ClientService_getUserAuthorizations_args& operator=(const ClientService_getUserAuthorizations_args&); + ClientService_getUserAuthorizations_args() : principal() { + } + + virtual ~ClientService_getUserAuthorizations_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string principal; + + _ClientService_getUserAuthorizations_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_principal(const std::string& val); + + bool operator == (const ClientService_getUserAuthorizations_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(principal == rhs.principal)) + return false; + return true; + } + bool operator != (const ClientService_getUserAuthorizations_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_getUserAuthorizations_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_getUserAuthorizations_pargs { + public: + + + virtual ~ClientService_getUserAuthorizations_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* principal; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_getUserAuthorizations_result__isset { + _ClientService_getUserAuthorizations_result__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _ClientService_getUserAuthorizations_result__isset; + +class ClientService_getUserAuthorizations_result { + public: + + ClientService_getUserAuthorizations_result(const ClientService_getUserAuthorizations_result&); + ClientService_getUserAuthorizations_result& operator=(const ClientService_getUserAuthorizations_result&); + ClientService_getUserAuthorizations_result() { + } + + virtual ~ClientService_getUserAuthorizations_result() throw(); + std::vector success; + ThriftSecurityException sec; + + _ClientService_getUserAuthorizations_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_sec(const ThriftSecurityException& val); + + bool operator == (const ClientService_getUserAuthorizations_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + return true; + } + bool operator != (const ClientService_getUserAuthorizations_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_getUserAuthorizations_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_getUserAuthorizations_presult__isset { + _ClientService_getUserAuthorizations_presult__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _ClientService_getUserAuthorizations_presult__isset; + +class ClientService_getUserAuthorizations_presult { + public: + + + virtual ~ClientService_getUserAuthorizations_presult() throw(); + std::vector * success; + ThriftSecurityException sec; + + _ClientService_getUserAuthorizations_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ClientService_hasSystemPermission_args__isset { + _ClientService_hasSystemPermission_args__isset() : tinfo(false), credentials(false), principal(false), sysPerm(false) {} + bool tinfo :1; + bool credentials :1; + bool principal :1; + bool sysPerm :1; +} _ClientService_hasSystemPermission_args__isset; + +class ClientService_hasSystemPermission_args { + public: + + ClientService_hasSystemPermission_args(const ClientService_hasSystemPermission_args&); + ClientService_hasSystemPermission_args& operator=(const ClientService_hasSystemPermission_args&); + ClientService_hasSystemPermission_args() : principal(), sysPerm(0) { + } + + virtual ~ClientService_hasSystemPermission_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string principal; + int8_t sysPerm; + + _ClientService_hasSystemPermission_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_principal(const std::string& val); + + void __set_sysPerm(const int8_t val); + + bool operator == (const ClientService_hasSystemPermission_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(principal == rhs.principal)) + return false; + if (!(sysPerm == rhs.sysPerm)) + return false; + return true; + } + bool operator != (const ClientService_hasSystemPermission_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_hasSystemPermission_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_hasSystemPermission_pargs { + public: + + + virtual ~ClientService_hasSystemPermission_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* principal; + const int8_t* sysPerm; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_hasSystemPermission_result__isset { + _ClientService_hasSystemPermission_result__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _ClientService_hasSystemPermission_result__isset; + +class ClientService_hasSystemPermission_result { + public: + + ClientService_hasSystemPermission_result(const ClientService_hasSystemPermission_result&); + ClientService_hasSystemPermission_result& operator=(const ClientService_hasSystemPermission_result&); + ClientService_hasSystemPermission_result() : success(0) { + } + + virtual ~ClientService_hasSystemPermission_result() throw(); + bool success; + ThriftSecurityException sec; + + _ClientService_hasSystemPermission_result__isset __isset; + + void __set_success(const bool val); + + void __set_sec(const ThriftSecurityException& val); + + bool operator == (const ClientService_hasSystemPermission_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + return true; + } + bool operator != (const ClientService_hasSystemPermission_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_hasSystemPermission_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_hasSystemPermission_presult__isset { + _ClientService_hasSystemPermission_presult__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _ClientService_hasSystemPermission_presult__isset; + +class ClientService_hasSystemPermission_presult { + public: + + + virtual ~ClientService_hasSystemPermission_presult() throw(); + bool* success; + ThriftSecurityException sec; + + _ClientService_hasSystemPermission_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ClientService_hasTablePermission_args__isset { + _ClientService_hasTablePermission_args__isset() : tinfo(false), credentials(false), principal(false), tableName(false), tblPerm(false) {} + bool tinfo :1; + bool credentials :1; + bool principal :1; + bool tableName :1; + bool tblPerm :1; +} _ClientService_hasTablePermission_args__isset; + +class ClientService_hasTablePermission_args { + public: + + ClientService_hasTablePermission_args(const ClientService_hasTablePermission_args&); + ClientService_hasTablePermission_args& operator=(const ClientService_hasTablePermission_args&); + ClientService_hasTablePermission_args() : principal(), tableName(), tblPerm(0) { + } + + virtual ~ClientService_hasTablePermission_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string principal; + std::string tableName; + int8_t tblPerm; + + _ClientService_hasTablePermission_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_principal(const std::string& val); + + void __set_tableName(const std::string& val); + + void __set_tblPerm(const int8_t val); + + bool operator == (const ClientService_hasTablePermission_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(principal == rhs.principal)) + return false; + if (!(tableName == rhs.tableName)) + return false; + if (!(tblPerm == rhs.tblPerm)) + return false; + return true; + } + bool operator != (const ClientService_hasTablePermission_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_hasTablePermission_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_hasTablePermission_pargs { + public: + + + virtual ~ClientService_hasTablePermission_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* principal; + const std::string* tableName; + const int8_t* tblPerm; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_hasTablePermission_result__isset { + _ClientService_hasTablePermission_result__isset() : success(false), sec(false), tope(false) {} + bool success :1; + bool sec :1; + bool tope :1; +} _ClientService_hasTablePermission_result__isset; + +class ClientService_hasTablePermission_result { + public: + + ClientService_hasTablePermission_result(const ClientService_hasTablePermission_result&); + ClientService_hasTablePermission_result& operator=(const ClientService_hasTablePermission_result&); + ClientService_hasTablePermission_result() : success(0) { + } + + virtual ~ClientService_hasTablePermission_result() throw(); + bool success; + ThriftSecurityException sec; + ThriftTableOperationException tope; + + _ClientService_hasTablePermission_result__isset __isset; + + void __set_success(const bool val); + + void __set_sec(const ThriftSecurityException& val); + + void __set_tope(const ThriftTableOperationException& val); + + bool operator == (const ClientService_hasTablePermission_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + if (!(tope == rhs.tope)) + return false; + return true; + } + bool operator != (const ClientService_hasTablePermission_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_hasTablePermission_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_hasTablePermission_presult__isset { + _ClientService_hasTablePermission_presult__isset() : success(false), sec(false), tope(false) {} + bool success :1; + bool sec :1; + bool tope :1; +} _ClientService_hasTablePermission_presult__isset; + +class ClientService_hasTablePermission_presult { + public: + + + virtual ~ClientService_hasTablePermission_presult() throw(); + bool* success; + ThriftSecurityException sec; + ThriftTableOperationException tope; + + _ClientService_hasTablePermission_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ClientService_hasNamespacePermission_args__isset { + _ClientService_hasNamespacePermission_args__isset() : tinfo(false), credentials(false), principal(false), ns(false), tblNspcPerm(false) {} + bool tinfo :1; + bool credentials :1; + bool principal :1; + bool ns :1; + bool tblNspcPerm :1; +} _ClientService_hasNamespacePermission_args__isset; + +class ClientService_hasNamespacePermission_args { + public: + + ClientService_hasNamespacePermission_args(const ClientService_hasNamespacePermission_args&); + ClientService_hasNamespacePermission_args& operator=(const ClientService_hasNamespacePermission_args&); + ClientService_hasNamespacePermission_args() : principal(), ns(), tblNspcPerm(0) { + } + + virtual ~ClientService_hasNamespacePermission_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string principal; + std::string ns; + int8_t tblNspcPerm; + + _ClientService_hasNamespacePermission_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_principal(const std::string& val); + + void __set_ns(const std::string& val); + + void __set_tblNspcPerm(const int8_t val); + + bool operator == (const ClientService_hasNamespacePermission_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(principal == rhs.principal)) + return false; + if (!(ns == rhs.ns)) + return false; + if (!(tblNspcPerm == rhs.tblNspcPerm)) + return false; + return true; + } + bool operator != (const ClientService_hasNamespacePermission_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_hasNamespacePermission_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_hasNamespacePermission_pargs { + public: + + + virtual ~ClientService_hasNamespacePermission_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* principal; + const std::string* ns; + const int8_t* tblNspcPerm; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_hasNamespacePermission_result__isset { + _ClientService_hasNamespacePermission_result__isset() : success(false), sec(false), tope(false) {} + bool success :1; + bool sec :1; + bool tope :1; +} _ClientService_hasNamespacePermission_result__isset; + +class ClientService_hasNamespacePermission_result { + public: + + ClientService_hasNamespacePermission_result(const ClientService_hasNamespacePermission_result&); + ClientService_hasNamespacePermission_result& operator=(const ClientService_hasNamespacePermission_result&); + ClientService_hasNamespacePermission_result() : success(0) { + } + + virtual ~ClientService_hasNamespacePermission_result() throw(); + bool success; + ThriftSecurityException sec; + ThriftTableOperationException tope; + + _ClientService_hasNamespacePermission_result__isset __isset; + + void __set_success(const bool val); + + void __set_sec(const ThriftSecurityException& val); + + void __set_tope(const ThriftTableOperationException& val); + + bool operator == (const ClientService_hasNamespacePermission_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + if (!(tope == rhs.tope)) + return false; + return true; + } + bool operator != (const ClientService_hasNamespacePermission_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_hasNamespacePermission_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_hasNamespacePermission_presult__isset { + _ClientService_hasNamespacePermission_presult__isset() : success(false), sec(false), tope(false) {} + bool success :1; + bool sec :1; + bool tope :1; +} _ClientService_hasNamespacePermission_presult__isset; + +class ClientService_hasNamespacePermission_presult { + public: + + + virtual ~ClientService_hasNamespacePermission_presult() throw(); + bool* success; + ThriftSecurityException sec; + ThriftTableOperationException tope; + + _ClientService_hasNamespacePermission_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ClientService_grantSystemPermission_args__isset { + _ClientService_grantSystemPermission_args__isset() : tinfo(false), credentials(false), principal(false), permission(false) {} + bool tinfo :1; + bool credentials :1; + bool principal :1; + bool permission :1; +} _ClientService_grantSystemPermission_args__isset; + +class ClientService_grantSystemPermission_args { + public: + + ClientService_grantSystemPermission_args(const ClientService_grantSystemPermission_args&); + ClientService_grantSystemPermission_args& operator=(const ClientService_grantSystemPermission_args&); + ClientService_grantSystemPermission_args() : principal(), permission(0) { + } + + virtual ~ClientService_grantSystemPermission_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string principal; + int8_t permission; + + _ClientService_grantSystemPermission_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_principal(const std::string& val); + + void __set_permission(const int8_t val); + + bool operator == (const ClientService_grantSystemPermission_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(principal == rhs.principal)) + return false; + if (!(permission == rhs.permission)) + return false; + return true; + } + bool operator != (const ClientService_grantSystemPermission_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_grantSystemPermission_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_grantSystemPermission_pargs { + public: + + + virtual ~ClientService_grantSystemPermission_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* principal; + const int8_t* permission; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_grantSystemPermission_result__isset { + _ClientService_grantSystemPermission_result__isset() : sec(false) {} + bool sec :1; +} _ClientService_grantSystemPermission_result__isset; + +class ClientService_grantSystemPermission_result { + public: + + ClientService_grantSystemPermission_result(const ClientService_grantSystemPermission_result&); + ClientService_grantSystemPermission_result& operator=(const ClientService_grantSystemPermission_result&); + ClientService_grantSystemPermission_result() { + } + + virtual ~ClientService_grantSystemPermission_result() throw(); + ThriftSecurityException sec; + + _ClientService_grantSystemPermission_result__isset __isset; + + void __set_sec(const ThriftSecurityException& val); + + bool operator == (const ClientService_grantSystemPermission_result & rhs) const + { + if (!(sec == rhs.sec)) + return false; + return true; + } + bool operator != (const ClientService_grantSystemPermission_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_grantSystemPermission_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_grantSystemPermission_presult__isset { + _ClientService_grantSystemPermission_presult__isset() : sec(false) {} + bool sec :1; +} _ClientService_grantSystemPermission_presult__isset; + +class ClientService_grantSystemPermission_presult { + public: + + + virtual ~ClientService_grantSystemPermission_presult() throw(); + ThriftSecurityException sec; + + _ClientService_grantSystemPermission_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ClientService_revokeSystemPermission_args__isset { + _ClientService_revokeSystemPermission_args__isset() : tinfo(false), credentials(false), principal(false), permission(false) {} + bool tinfo :1; + bool credentials :1; + bool principal :1; + bool permission :1; +} _ClientService_revokeSystemPermission_args__isset; + +class ClientService_revokeSystemPermission_args { + public: + + ClientService_revokeSystemPermission_args(const ClientService_revokeSystemPermission_args&); + ClientService_revokeSystemPermission_args& operator=(const ClientService_revokeSystemPermission_args&); + ClientService_revokeSystemPermission_args() : principal(), permission(0) { + } + + virtual ~ClientService_revokeSystemPermission_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string principal; + int8_t permission; + + _ClientService_revokeSystemPermission_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_principal(const std::string& val); + + void __set_permission(const int8_t val); + + bool operator == (const ClientService_revokeSystemPermission_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(principal == rhs.principal)) + return false; + if (!(permission == rhs.permission)) + return false; + return true; + } + bool operator != (const ClientService_revokeSystemPermission_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_revokeSystemPermission_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_revokeSystemPermission_pargs { + public: + + + virtual ~ClientService_revokeSystemPermission_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* principal; + const int8_t* permission; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_revokeSystemPermission_result__isset { + _ClientService_revokeSystemPermission_result__isset() : sec(false) {} + bool sec :1; +} _ClientService_revokeSystemPermission_result__isset; + +class ClientService_revokeSystemPermission_result { + public: + + ClientService_revokeSystemPermission_result(const ClientService_revokeSystemPermission_result&); + ClientService_revokeSystemPermission_result& operator=(const ClientService_revokeSystemPermission_result&); + ClientService_revokeSystemPermission_result() { + } + + virtual ~ClientService_revokeSystemPermission_result() throw(); + ThriftSecurityException sec; + + _ClientService_revokeSystemPermission_result__isset __isset; + + void __set_sec(const ThriftSecurityException& val); + + bool operator == (const ClientService_revokeSystemPermission_result & rhs) const + { + if (!(sec == rhs.sec)) + return false; + return true; + } + bool operator != (const ClientService_revokeSystemPermission_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_revokeSystemPermission_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_revokeSystemPermission_presult__isset { + _ClientService_revokeSystemPermission_presult__isset() : sec(false) {} + bool sec :1; +} _ClientService_revokeSystemPermission_presult__isset; + +class ClientService_revokeSystemPermission_presult { + public: + + + virtual ~ClientService_revokeSystemPermission_presult() throw(); + ThriftSecurityException sec; + + _ClientService_revokeSystemPermission_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ClientService_grantTablePermission_args__isset { + _ClientService_grantTablePermission_args__isset() : tinfo(false), credentials(false), principal(false), tableName(false), permission(false) {} + bool tinfo :1; + bool credentials :1; + bool principal :1; + bool tableName :1; + bool permission :1; +} _ClientService_grantTablePermission_args__isset; + +class ClientService_grantTablePermission_args { + public: + + ClientService_grantTablePermission_args(const ClientService_grantTablePermission_args&); + ClientService_grantTablePermission_args& operator=(const ClientService_grantTablePermission_args&); + ClientService_grantTablePermission_args() : principal(), tableName(), permission(0) { + } + + virtual ~ClientService_grantTablePermission_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string principal; + std::string tableName; + int8_t permission; + + _ClientService_grantTablePermission_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_principal(const std::string& val); + + void __set_tableName(const std::string& val); + + void __set_permission(const int8_t val); + + bool operator == (const ClientService_grantTablePermission_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(principal == rhs.principal)) + return false; + if (!(tableName == rhs.tableName)) + return false; + if (!(permission == rhs.permission)) + return false; + return true; + } + bool operator != (const ClientService_grantTablePermission_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_grantTablePermission_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_grantTablePermission_pargs { + public: + + + virtual ~ClientService_grantTablePermission_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* principal; + const std::string* tableName; + const int8_t* permission; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_grantTablePermission_result__isset { + _ClientService_grantTablePermission_result__isset() : sec(false), tope(false) {} + bool sec :1; + bool tope :1; +} _ClientService_grantTablePermission_result__isset; + +class ClientService_grantTablePermission_result { + public: + + ClientService_grantTablePermission_result(const ClientService_grantTablePermission_result&); + ClientService_grantTablePermission_result& operator=(const ClientService_grantTablePermission_result&); + ClientService_grantTablePermission_result() { + } + + virtual ~ClientService_grantTablePermission_result() throw(); + ThriftSecurityException sec; + ThriftTableOperationException tope; + + _ClientService_grantTablePermission_result__isset __isset; + + void __set_sec(const ThriftSecurityException& val); + + void __set_tope(const ThriftTableOperationException& val); + + bool operator == (const ClientService_grantTablePermission_result & rhs) const + { + if (!(sec == rhs.sec)) + return false; + if (!(tope == rhs.tope)) + return false; + return true; + } + bool operator != (const ClientService_grantTablePermission_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_grantTablePermission_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_grantTablePermission_presult__isset { + _ClientService_grantTablePermission_presult__isset() : sec(false), tope(false) {} + bool sec :1; + bool tope :1; +} _ClientService_grantTablePermission_presult__isset; + +class ClientService_grantTablePermission_presult { + public: + + + virtual ~ClientService_grantTablePermission_presult() throw(); + ThriftSecurityException sec; + ThriftTableOperationException tope; + + _ClientService_grantTablePermission_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ClientService_revokeTablePermission_args__isset { + _ClientService_revokeTablePermission_args__isset() : tinfo(false), credentials(false), principal(false), tableName(false), permission(false) {} + bool tinfo :1; + bool credentials :1; + bool principal :1; + bool tableName :1; + bool permission :1; +} _ClientService_revokeTablePermission_args__isset; + +class ClientService_revokeTablePermission_args { + public: + + ClientService_revokeTablePermission_args(const ClientService_revokeTablePermission_args&); + ClientService_revokeTablePermission_args& operator=(const ClientService_revokeTablePermission_args&); + ClientService_revokeTablePermission_args() : principal(), tableName(), permission(0) { + } + + virtual ~ClientService_revokeTablePermission_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string principal; + std::string tableName; + int8_t permission; + + _ClientService_revokeTablePermission_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_principal(const std::string& val); + + void __set_tableName(const std::string& val); + + void __set_permission(const int8_t val); + + bool operator == (const ClientService_revokeTablePermission_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(principal == rhs.principal)) + return false; + if (!(tableName == rhs.tableName)) + return false; + if (!(permission == rhs.permission)) + return false; + return true; + } + bool operator != (const ClientService_revokeTablePermission_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_revokeTablePermission_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_revokeTablePermission_pargs { + public: + + + virtual ~ClientService_revokeTablePermission_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* principal; + const std::string* tableName; + const int8_t* permission; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_revokeTablePermission_result__isset { + _ClientService_revokeTablePermission_result__isset() : sec(false), tope(false) {} + bool sec :1; + bool tope :1; +} _ClientService_revokeTablePermission_result__isset; + +class ClientService_revokeTablePermission_result { + public: + + ClientService_revokeTablePermission_result(const ClientService_revokeTablePermission_result&); + ClientService_revokeTablePermission_result& operator=(const ClientService_revokeTablePermission_result&); + ClientService_revokeTablePermission_result() { + } + + virtual ~ClientService_revokeTablePermission_result() throw(); + ThriftSecurityException sec; + ThriftTableOperationException tope; + + _ClientService_revokeTablePermission_result__isset __isset; + + void __set_sec(const ThriftSecurityException& val); + + void __set_tope(const ThriftTableOperationException& val); + + bool operator == (const ClientService_revokeTablePermission_result & rhs) const + { + if (!(sec == rhs.sec)) + return false; + if (!(tope == rhs.tope)) + return false; + return true; + } + bool operator != (const ClientService_revokeTablePermission_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_revokeTablePermission_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_revokeTablePermission_presult__isset { + _ClientService_revokeTablePermission_presult__isset() : sec(false), tope(false) {} + bool sec :1; + bool tope :1; +} _ClientService_revokeTablePermission_presult__isset; + +class ClientService_revokeTablePermission_presult { + public: + + + virtual ~ClientService_revokeTablePermission_presult() throw(); + ThriftSecurityException sec; + ThriftTableOperationException tope; + + _ClientService_revokeTablePermission_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ClientService_grantNamespacePermission_args__isset { + _ClientService_grantNamespacePermission_args__isset() : tinfo(false), credentials(false), principal(false), ns(false), permission(false) {} + bool tinfo :1; + bool credentials :1; + bool principal :1; + bool ns :1; + bool permission :1; +} _ClientService_grantNamespacePermission_args__isset; + +class ClientService_grantNamespacePermission_args { + public: + + ClientService_grantNamespacePermission_args(const ClientService_grantNamespacePermission_args&); + ClientService_grantNamespacePermission_args& operator=(const ClientService_grantNamespacePermission_args&); + ClientService_grantNamespacePermission_args() : principal(), ns(), permission(0) { + } + + virtual ~ClientService_grantNamespacePermission_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string principal; + std::string ns; + int8_t permission; + + _ClientService_grantNamespacePermission_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_principal(const std::string& val); + + void __set_ns(const std::string& val); + + void __set_permission(const int8_t val); + + bool operator == (const ClientService_grantNamespacePermission_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(principal == rhs.principal)) + return false; + if (!(ns == rhs.ns)) + return false; + if (!(permission == rhs.permission)) + return false; + return true; + } + bool operator != (const ClientService_grantNamespacePermission_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_grantNamespacePermission_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_grantNamespacePermission_pargs { + public: + + + virtual ~ClientService_grantNamespacePermission_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* principal; + const std::string* ns; + const int8_t* permission; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_grantNamespacePermission_result__isset { + _ClientService_grantNamespacePermission_result__isset() : sec(false), tope(false) {} + bool sec :1; + bool tope :1; +} _ClientService_grantNamespacePermission_result__isset; + +class ClientService_grantNamespacePermission_result { + public: + + ClientService_grantNamespacePermission_result(const ClientService_grantNamespacePermission_result&); + ClientService_grantNamespacePermission_result& operator=(const ClientService_grantNamespacePermission_result&); + ClientService_grantNamespacePermission_result() { + } + + virtual ~ClientService_grantNamespacePermission_result() throw(); + ThriftSecurityException sec; + ThriftTableOperationException tope; + + _ClientService_grantNamespacePermission_result__isset __isset; + + void __set_sec(const ThriftSecurityException& val); + + void __set_tope(const ThriftTableOperationException& val); + + bool operator == (const ClientService_grantNamespacePermission_result & rhs) const + { + if (!(sec == rhs.sec)) + return false; + if (!(tope == rhs.tope)) + return false; + return true; + } + bool operator != (const ClientService_grantNamespacePermission_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_grantNamespacePermission_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_grantNamespacePermission_presult__isset { + _ClientService_grantNamespacePermission_presult__isset() : sec(false), tope(false) {} + bool sec :1; + bool tope :1; +} _ClientService_grantNamespacePermission_presult__isset; + +class ClientService_grantNamespacePermission_presult { + public: + + + virtual ~ClientService_grantNamespacePermission_presult() throw(); + ThriftSecurityException sec; + ThriftTableOperationException tope; + + _ClientService_grantNamespacePermission_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ClientService_revokeNamespacePermission_args__isset { + _ClientService_revokeNamespacePermission_args__isset() : tinfo(false), credentials(false), principal(false), ns(false), permission(false) {} + bool tinfo :1; + bool credentials :1; + bool principal :1; + bool ns :1; + bool permission :1; +} _ClientService_revokeNamespacePermission_args__isset; + +class ClientService_revokeNamespacePermission_args { + public: + + ClientService_revokeNamespacePermission_args(const ClientService_revokeNamespacePermission_args&); + ClientService_revokeNamespacePermission_args& operator=(const ClientService_revokeNamespacePermission_args&); + ClientService_revokeNamespacePermission_args() : principal(), ns(), permission(0) { + } + + virtual ~ClientService_revokeNamespacePermission_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string principal; + std::string ns; + int8_t permission; + + _ClientService_revokeNamespacePermission_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_principal(const std::string& val); + + void __set_ns(const std::string& val); + + void __set_permission(const int8_t val); + + bool operator == (const ClientService_revokeNamespacePermission_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(principal == rhs.principal)) + return false; + if (!(ns == rhs.ns)) + return false; + if (!(permission == rhs.permission)) + return false; + return true; + } + bool operator != (const ClientService_revokeNamespacePermission_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_revokeNamespacePermission_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_revokeNamespacePermission_pargs { + public: + + + virtual ~ClientService_revokeNamespacePermission_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* principal; + const std::string* ns; + const int8_t* permission; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_revokeNamespacePermission_result__isset { + _ClientService_revokeNamespacePermission_result__isset() : sec(false), tope(false) {} + bool sec :1; + bool tope :1; +} _ClientService_revokeNamespacePermission_result__isset; + +class ClientService_revokeNamespacePermission_result { + public: + + ClientService_revokeNamespacePermission_result(const ClientService_revokeNamespacePermission_result&); + ClientService_revokeNamespacePermission_result& operator=(const ClientService_revokeNamespacePermission_result&); + ClientService_revokeNamespacePermission_result() { + } + + virtual ~ClientService_revokeNamespacePermission_result() throw(); + ThriftSecurityException sec; + ThriftTableOperationException tope; + + _ClientService_revokeNamespacePermission_result__isset __isset; + + void __set_sec(const ThriftSecurityException& val); + + void __set_tope(const ThriftTableOperationException& val); + + bool operator == (const ClientService_revokeNamespacePermission_result & rhs) const + { + if (!(sec == rhs.sec)) + return false; + if (!(tope == rhs.tope)) + return false; + return true; + } + bool operator != (const ClientService_revokeNamespacePermission_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_revokeNamespacePermission_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_revokeNamespacePermission_presult__isset { + _ClientService_revokeNamespacePermission_presult__isset() : sec(false), tope(false) {} + bool sec :1; + bool tope :1; +} _ClientService_revokeNamespacePermission_presult__isset; + +class ClientService_revokeNamespacePermission_presult { + public: + + + virtual ~ClientService_revokeNamespacePermission_presult() throw(); + ThriftSecurityException sec; + ThriftTableOperationException tope; + + _ClientService_revokeNamespacePermission_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ClientService_getConfiguration_args__isset { + _ClientService_getConfiguration_args__isset() : tinfo(false), credentials(false), type(false) {} + bool tinfo :1; + bool credentials :1; + bool type :1; +} _ClientService_getConfiguration_args__isset; + +class ClientService_getConfiguration_args { + public: + + ClientService_getConfiguration_args(const ClientService_getConfiguration_args&); + ClientService_getConfiguration_args& operator=(const ClientService_getConfiguration_args&); + ClientService_getConfiguration_args() : type((ConfigurationType::type)0) { + } + + virtual ~ClientService_getConfiguration_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + ConfigurationType::type type; + + _ClientService_getConfiguration_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_type(const ConfigurationType::type val); + + bool operator == (const ClientService_getConfiguration_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(type == rhs.type)) + return false; + return true; + } + bool operator != (const ClientService_getConfiguration_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_getConfiguration_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_getConfiguration_pargs { + public: + + + virtual ~ClientService_getConfiguration_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const ConfigurationType::type* type; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_getConfiguration_result__isset { + _ClientService_getConfiguration_result__isset() : success(false) {} + bool success :1; +} _ClientService_getConfiguration_result__isset; + +class ClientService_getConfiguration_result { + public: + + ClientService_getConfiguration_result(const ClientService_getConfiguration_result&); + ClientService_getConfiguration_result& operator=(const ClientService_getConfiguration_result&); + ClientService_getConfiguration_result() { + } + + virtual ~ClientService_getConfiguration_result() throw(); + std::map success; + + _ClientService_getConfiguration_result__isset __isset; + + void __set_success(const std::map & val); + + bool operator == (const ClientService_getConfiguration_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ClientService_getConfiguration_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_getConfiguration_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_getConfiguration_presult__isset { + _ClientService_getConfiguration_presult__isset() : success(false) {} + bool success :1; +} _ClientService_getConfiguration_presult__isset; + +class ClientService_getConfiguration_presult { + public: + + + virtual ~ClientService_getConfiguration_presult() throw(); + std::map * success; + + _ClientService_getConfiguration_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ClientService_getTableConfiguration_args__isset { + _ClientService_getTableConfiguration_args__isset() : tinfo(false), credentials(false), tableName(false) {} + bool tinfo :1; + bool credentials :1; + bool tableName :1; +} _ClientService_getTableConfiguration_args__isset; + +class ClientService_getTableConfiguration_args { + public: + + ClientService_getTableConfiguration_args(const ClientService_getTableConfiguration_args&); + ClientService_getTableConfiguration_args& operator=(const ClientService_getTableConfiguration_args&); + ClientService_getTableConfiguration_args() : tableName() { + } + + virtual ~ClientService_getTableConfiguration_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string tableName; + + _ClientService_getTableConfiguration_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_tableName(const std::string& val); + + bool operator == (const ClientService_getTableConfiguration_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(tableName == rhs.tableName)) + return false; + return true; + } + bool operator != (const ClientService_getTableConfiguration_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_getTableConfiguration_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_getTableConfiguration_pargs { + public: + + + virtual ~ClientService_getTableConfiguration_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* tableName; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_getTableConfiguration_result__isset { + _ClientService_getTableConfiguration_result__isset() : success(false), tope(false) {} + bool success :1; + bool tope :1; +} _ClientService_getTableConfiguration_result__isset; + +class ClientService_getTableConfiguration_result { + public: + + ClientService_getTableConfiguration_result(const ClientService_getTableConfiguration_result&); + ClientService_getTableConfiguration_result& operator=(const ClientService_getTableConfiguration_result&); + ClientService_getTableConfiguration_result() { + } + + virtual ~ClientService_getTableConfiguration_result() throw(); + std::map success; + ThriftTableOperationException tope; + + _ClientService_getTableConfiguration_result__isset __isset; + + void __set_success(const std::map & val); + + void __set_tope(const ThriftTableOperationException& val); + + bool operator == (const ClientService_getTableConfiguration_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(tope == rhs.tope)) + return false; + return true; + } + bool operator != (const ClientService_getTableConfiguration_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_getTableConfiguration_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_getTableConfiguration_presult__isset { + _ClientService_getTableConfiguration_presult__isset() : success(false), tope(false) {} + bool success :1; + bool tope :1; +} _ClientService_getTableConfiguration_presult__isset; + +class ClientService_getTableConfiguration_presult { + public: + + + virtual ~ClientService_getTableConfiguration_presult() throw(); + std::map * success; + ThriftTableOperationException tope; + + _ClientService_getTableConfiguration_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ClientService_getNamespaceConfiguration_args__isset { + _ClientService_getNamespaceConfiguration_args__isset() : tinfo(false), credentials(false), ns(false) {} + bool tinfo :1; + bool credentials :1; + bool ns :1; +} _ClientService_getNamespaceConfiguration_args__isset; + +class ClientService_getNamespaceConfiguration_args { + public: + + ClientService_getNamespaceConfiguration_args(const ClientService_getNamespaceConfiguration_args&); + ClientService_getNamespaceConfiguration_args& operator=(const ClientService_getNamespaceConfiguration_args&); + ClientService_getNamespaceConfiguration_args() : ns() { + } + + virtual ~ClientService_getNamespaceConfiguration_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string ns; + + _ClientService_getNamespaceConfiguration_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_ns(const std::string& val); + + bool operator == (const ClientService_getNamespaceConfiguration_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(ns == rhs.ns)) + return false; + return true; + } + bool operator != (const ClientService_getNamespaceConfiguration_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_getNamespaceConfiguration_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_getNamespaceConfiguration_pargs { + public: + + + virtual ~ClientService_getNamespaceConfiguration_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* ns; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_getNamespaceConfiguration_result__isset { + _ClientService_getNamespaceConfiguration_result__isset() : success(false), tope(false) {} + bool success :1; + bool tope :1; +} _ClientService_getNamespaceConfiguration_result__isset; + +class ClientService_getNamespaceConfiguration_result { + public: + + ClientService_getNamespaceConfiguration_result(const ClientService_getNamespaceConfiguration_result&); + ClientService_getNamespaceConfiguration_result& operator=(const ClientService_getNamespaceConfiguration_result&); + ClientService_getNamespaceConfiguration_result() { + } + + virtual ~ClientService_getNamespaceConfiguration_result() throw(); + std::map success; + ThriftTableOperationException tope; + + _ClientService_getNamespaceConfiguration_result__isset __isset; + + void __set_success(const std::map & val); + + void __set_tope(const ThriftTableOperationException& val); + + bool operator == (const ClientService_getNamespaceConfiguration_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(tope == rhs.tope)) + return false; + return true; + } + bool operator != (const ClientService_getNamespaceConfiguration_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_getNamespaceConfiguration_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_getNamespaceConfiguration_presult__isset { + _ClientService_getNamespaceConfiguration_presult__isset() : success(false), tope(false) {} + bool success :1; + bool tope :1; +} _ClientService_getNamespaceConfiguration_presult__isset; + +class ClientService_getNamespaceConfiguration_presult { + public: + + + virtual ~ClientService_getNamespaceConfiguration_presult() throw(); + std::map * success; + ThriftTableOperationException tope; + + _ClientService_getNamespaceConfiguration_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ClientService_checkClass_args__isset { + _ClientService_checkClass_args__isset() : tinfo(false), credentials(false), className(false), interfaceMatch(false) {} + bool tinfo :1; + bool credentials :1; + bool className :1; + bool interfaceMatch :1; +} _ClientService_checkClass_args__isset; + +class ClientService_checkClass_args { + public: + + ClientService_checkClass_args(const ClientService_checkClass_args&); + ClientService_checkClass_args& operator=(const ClientService_checkClass_args&); + ClientService_checkClass_args() : className(), interfaceMatch() { + } + + virtual ~ClientService_checkClass_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string className; + std::string interfaceMatch; + + _ClientService_checkClass_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_className(const std::string& val); + + void __set_interfaceMatch(const std::string& val); + + bool operator == (const ClientService_checkClass_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(className == rhs.className)) + return false; + if (!(interfaceMatch == rhs.interfaceMatch)) + return false; + return true; + } + bool operator != (const ClientService_checkClass_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_checkClass_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_checkClass_pargs { + public: + + + virtual ~ClientService_checkClass_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* className; + const std::string* interfaceMatch; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_checkClass_result__isset { + _ClientService_checkClass_result__isset() : success(false) {} + bool success :1; +} _ClientService_checkClass_result__isset; + +class ClientService_checkClass_result { + public: + + ClientService_checkClass_result(const ClientService_checkClass_result&); + ClientService_checkClass_result& operator=(const ClientService_checkClass_result&); + ClientService_checkClass_result() : success(0) { + } + + virtual ~ClientService_checkClass_result() throw(); + bool success; + + _ClientService_checkClass_result__isset __isset; + + void __set_success(const bool val); + + bool operator == (const ClientService_checkClass_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ClientService_checkClass_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_checkClass_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_checkClass_presult__isset { + _ClientService_checkClass_presult__isset() : success(false) {} + bool success :1; +} _ClientService_checkClass_presult__isset; + +class ClientService_checkClass_presult { + public: + + + virtual ~ClientService_checkClass_presult() throw(); + bool* success; + + _ClientService_checkClass_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ClientService_checkTableClass_args__isset { + _ClientService_checkTableClass_args__isset() : tinfo(false), credentials(false), tableId(false), className(false), interfaceMatch(false) {} + bool tinfo :1; + bool credentials :1; + bool tableId :1; + bool className :1; + bool interfaceMatch :1; +} _ClientService_checkTableClass_args__isset; + +class ClientService_checkTableClass_args { + public: + + ClientService_checkTableClass_args(const ClientService_checkTableClass_args&); + ClientService_checkTableClass_args& operator=(const ClientService_checkTableClass_args&); + ClientService_checkTableClass_args() : tableId(), className(), interfaceMatch() { + } + + virtual ~ClientService_checkTableClass_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string tableId; + std::string className; + std::string interfaceMatch; + + _ClientService_checkTableClass_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_tableId(const std::string& val); + + void __set_className(const std::string& val); + + void __set_interfaceMatch(const std::string& val); + + bool operator == (const ClientService_checkTableClass_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(tableId == rhs.tableId)) + return false; + if (!(className == rhs.className)) + return false; + if (!(interfaceMatch == rhs.interfaceMatch)) + return false; + return true; + } + bool operator != (const ClientService_checkTableClass_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_checkTableClass_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_checkTableClass_pargs { + public: + + + virtual ~ClientService_checkTableClass_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* tableId; + const std::string* className; + const std::string* interfaceMatch; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_checkTableClass_result__isset { + _ClientService_checkTableClass_result__isset() : success(false), sec(false), tope(false) {} + bool success :1; + bool sec :1; + bool tope :1; +} _ClientService_checkTableClass_result__isset; + +class ClientService_checkTableClass_result { + public: + + ClientService_checkTableClass_result(const ClientService_checkTableClass_result&); + ClientService_checkTableClass_result& operator=(const ClientService_checkTableClass_result&); + ClientService_checkTableClass_result() : success(0) { + } + + virtual ~ClientService_checkTableClass_result() throw(); + bool success; + ThriftSecurityException sec; + ThriftTableOperationException tope; + + _ClientService_checkTableClass_result__isset __isset; + + void __set_success(const bool val); + + void __set_sec(const ThriftSecurityException& val); + + void __set_tope(const ThriftTableOperationException& val); + + bool operator == (const ClientService_checkTableClass_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + if (!(tope == rhs.tope)) + return false; + return true; + } + bool operator != (const ClientService_checkTableClass_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_checkTableClass_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_checkTableClass_presult__isset { + _ClientService_checkTableClass_presult__isset() : success(false), sec(false), tope(false) {} + bool success :1; + bool sec :1; + bool tope :1; +} _ClientService_checkTableClass_presult__isset; + +class ClientService_checkTableClass_presult { + public: + + + virtual ~ClientService_checkTableClass_presult() throw(); + bool* success; + ThriftSecurityException sec; + ThriftTableOperationException tope; + + _ClientService_checkTableClass_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ClientService_checkNamespaceClass_args__isset { + _ClientService_checkNamespaceClass_args__isset() : tinfo(false), credentials(false), namespaceId(false), className(false), interfaceMatch(false) {} + bool tinfo :1; + bool credentials :1; + bool namespaceId :1; + bool className :1; + bool interfaceMatch :1; +} _ClientService_checkNamespaceClass_args__isset; + +class ClientService_checkNamespaceClass_args { + public: + + ClientService_checkNamespaceClass_args(const ClientService_checkNamespaceClass_args&); + ClientService_checkNamespaceClass_args& operator=(const ClientService_checkNamespaceClass_args&); + ClientService_checkNamespaceClass_args() : namespaceId(), className(), interfaceMatch() { + } + + virtual ~ClientService_checkNamespaceClass_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string namespaceId; + std::string className; + std::string interfaceMatch; + + _ClientService_checkNamespaceClass_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_namespaceId(const std::string& val); + + void __set_className(const std::string& val); + + void __set_interfaceMatch(const std::string& val); + + bool operator == (const ClientService_checkNamespaceClass_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(namespaceId == rhs.namespaceId)) + return false; + if (!(className == rhs.className)) + return false; + if (!(interfaceMatch == rhs.interfaceMatch)) + return false; + return true; + } + bool operator != (const ClientService_checkNamespaceClass_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_checkNamespaceClass_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ClientService_checkNamespaceClass_pargs { + public: + + + virtual ~ClientService_checkNamespaceClass_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* namespaceId; + const std::string* className; + const std::string* interfaceMatch; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_checkNamespaceClass_result__isset { + _ClientService_checkNamespaceClass_result__isset() : success(false), sec(false), tope(false) {} + bool success :1; + bool sec :1; + bool tope :1; +} _ClientService_checkNamespaceClass_result__isset; + +class ClientService_checkNamespaceClass_result { + public: + + ClientService_checkNamespaceClass_result(const ClientService_checkNamespaceClass_result&); + ClientService_checkNamespaceClass_result& operator=(const ClientService_checkNamespaceClass_result&); + ClientService_checkNamespaceClass_result() : success(0) { + } + + virtual ~ClientService_checkNamespaceClass_result() throw(); + bool success; + ThriftSecurityException sec; + ThriftTableOperationException tope; + + _ClientService_checkNamespaceClass_result__isset __isset; + + void __set_success(const bool val); + + void __set_sec(const ThriftSecurityException& val); + + void __set_tope(const ThriftTableOperationException& val); + + bool operator == (const ClientService_checkNamespaceClass_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + if (!(tope == rhs.tope)) + return false; + return true; + } + bool operator != (const ClientService_checkNamespaceClass_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientService_checkNamespaceClass_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ClientService_checkNamespaceClass_presult__isset { + _ClientService_checkNamespaceClass_presult__isset() : success(false), sec(false), tope(false) {} + bool success :1; + bool sec :1; + bool tope :1; +} _ClientService_checkNamespaceClass_presult__isset; + +class ClientService_checkNamespaceClass_presult { + public: + + + virtual ~ClientService_checkNamespaceClass_presult() throw(); + bool* success; + ThriftSecurityException sec; + ThriftTableOperationException tope; + + _ClientService_checkNamespaceClass_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +class ClientServiceClient : virtual public ClientServiceIf { + public: + ClientServiceClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot); + } + ClientServiceClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + setProtocol(iprot,oprot); + } + private: + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot,prot); + } + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + piprot_=iprot; + poprot_=oprot; + iprot_ = iprot.get(); + oprot_ = oprot.get(); + } + public: + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + return piprot_; + } + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { + return poprot_; + } + void getRootTabletLocation(std::string& _return); + void send_getRootTabletLocation(); + void recv_getRootTabletLocation(std::string& _return); + void getInstanceId(std::string& _return); + void send_getInstanceId(); + void recv_getInstanceId(std::string& _return); + void getZooKeepers(std::string& _return); + void send_getZooKeepers(); + void recv_getZooKeepers(std::string& _return); + void bulkImportFiles(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const std::string& tableId, const std::vector & files, const std::string& errorDir, const bool setTime); + void send_bulkImportFiles(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const std::string& tableId, const std::vector & files, const std::string& errorDir, const bool setTime); + void recv_bulkImportFiles(std::vector & _return); + bool isActive(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const int64_t tid); + void send_isActive(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const int64_t tid); + bool recv_isActive(); + void ping(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void send_ping(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void recv_ping(); + void getDiskUsage(std::vector & _return, const std::set & tables, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void send_getDiskUsage(const std::set & tables, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void recv_getDiskUsage(std::vector & _return); + void listLocalUsers(std::set & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void send_listLocalUsers(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void recv_listLocalUsers(std::set & _return); + void createLocalUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& password); + void send_createLocalUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& password); + void recv_createLocalUser(); + void dropLocalUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal); + void send_dropLocalUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal); + void recv_dropLocalUser(); + void changeLocalUserPassword(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& password); + void send_changeLocalUserPassword(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& password); + void recv_changeLocalUserPassword(); + bool authenticate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void send_authenticate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + bool recv_authenticate(); + bool authenticateUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& toAuth); + void send_authenticateUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& toAuth); + bool recv_authenticateUser(); + void changeAuthorizations(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::vector & authorizations); + void send_changeAuthorizations(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::vector & authorizations); + void recv_changeAuthorizations(); + void getUserAuthorizations(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal); + void send_getUserAuthorizations(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal); + void recv_getUserAuthorizations(std::vector & _return); + bool hasSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t sysPerm); + void send_hasSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t sysPerm); + bool recv_hasSystemPermission(); + bool hasTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t tblPerm); + void send_hasTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t tblPerm); + bool recv_hasTablePermission(); + bool hasNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t tblNspcPerm); + void send_hasNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t tblNspcPerm); + bool recv_hasNamespacePermission(); + void grantSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t permission); + void send_grantSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t permission); + void recv_grantSystemPermission(); + void revokeSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t permission); + void send_revokeSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t permission); + void recv_revokeSystemPermission(); + void grantTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t permission); + void send_grantTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t permission); + void recv_grantTablePermission(); + void revokeTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t permission); + void send_revokeTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t permission); + void recv_revokeTablePermission(); + void grantNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t permission); + void send_grantNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t permission); + void recv_grantNamespacePermission(); + void revokeNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t permission); + void send_revokeNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t permission); + void recv_revokeNamespacePermission(); + void getConfiguration(std::map & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ConfigurationType::type type); + void send_getConfiguration(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ConfigurationType::type type); + void recv_getConfiguration(std::map & _return); + void getTableConfiguration(std::map & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName); + void send_getTableConfiguration(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName); + void recv_getTableConfiguration(std::map & _return); + void getNamespaceConfiguration(std::map & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns); + void send_getNamespaceConfiguration(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns); + void recv_getNamespaceConfiguration(std::map & _return); + bool checkClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& className, const std::string& interfaceMatch); + void send_checkClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& className, const std::string& interfaceMatch); + bool recv_checkClass(); + bool checkTableClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableId, const std::string& className, const std::string& interfaceMatch); + void send_checkTableClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableId, const std::string& className, const std::string& interfaceMatch); + bool recv_checkTableClass(); + bool checkNamespaceClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& namespaceId, const std::string& className, const std::string& interfaceMatch); + void send_checkNamespaceClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& namespaceId, const std::string& className, const std::string& interfaceMatch); + bool recv_checkNamespaceClass(); + protected: + std::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_; + std::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_; + ::apache::thrift::protocol::TProtocol* iprot_; + ::apache::thrift::protocol::TProtocol* oprot_; +}; + +class ClientServiceProcessor : public ::apache::thrift::TDispatchProcessor { + protected: + std::shared_ptr iface_; + virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext); + private: + typedef void (ClientServiceProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*); + typedef std::map ProcessMap; + ProcessMap processMap_; + void process_getRootTabletLocation(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getInstanceId(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getZooKeepers(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_bulkImportFiles(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_isActive(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_ping(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getDiskUsage(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_listLocalUsers(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_createLocalUser(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_dropLocalUser(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_changeLocalUserPassword(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_authenticate(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_authenticateUser(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_changeAuthorizations(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getUserAuthorizations(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_hasSystemPermission(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_hasTablePermission(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_hasNamespacePermission(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_grantSystemPermission(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_revokeSystemPermission(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_grantTablePermission(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_revokeTablePermission(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_grantNamespacePermission(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_revokeNamespacePermission(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getConfiguration(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getTableConfiguration(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getNamespaceConfiguration(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_checkClass(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_checkTableClass(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_checkNamespaceClass(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + public: + ClientServiceProcessor(std::shared_ptr iface) : + iface_(iface) { + processMap_["getRootTabletLocation"] = &ClientServiceProcessor::process_getRootTabletLocation; + processMap_["getInstanceId"] = &ClientServiceProcessor::process_getInstanceId; + processMap_["getZooKeepers"] = &ClientServiceProcessor::process_getZooKeepers; + processMap_["bulkImportFiles"] = &ClientServiceProcessor::process_bulkImportFiles; + processMap_["isActive"] = &ClientServiceProcessor::process_isActive; + processMap_["ping"] = &ClientServiceProcessor::process_ping; + processMap_["getDiskUsage"] = &ClientServiceProcessor::process_getDiskUsage; + processMap_["listLocalUsers"] = &ClientServiceProcessor::process_listLocalUsers; + processMap_["createLocalUser"] = &ClientServiceProcessor::process_createLocalUser; + processMap_["dropLocalUser"] = &ClientServiceProcessor::process_dropLocalUser; + processMap_["changeLocalUserPassword"] = &ClientServiceProcessor::process_changeLocalUserPassword; + processMap_["authenticate"] = &ClientServiceProcessor::process_authenticate; + processMap_["authenticateUser"] = &ClientServiceProcessor::process_authenticateUser; + processMap_["changeAuthorizations"] = &ClientServiceProcessor::process_changeAuthorizations; + processMap_["getUserAuthorizations"] = &ClientServiceProcessor::process_getUserAuthorizations; + processMap_["hasSystemPermission"] = &ClientServiceProcessor::process_hasSystemPermission; + processMap_["hasTablePermission"] = &ClientServiceProcessor::process_hasTablePermission; + processMap_["hasNamespacePermission"] = &ClientServiceProcessor::process_hasNamespacePermission; + processMap_["grantSystemPermission"] = &ClientServiceProcessor::process_grantSystemPermission; + processMap_["revokeSystemPermission"] = &ClientServiceProcessor::process_revokeSystemPermission; + processMap_["grantTablePermission"] = &ClientServiceProcessor::process_grantTablePermission; + processMap_["revokeTablePermission"] = &ClientServiceProcessor::process_revokeTablePermission; + processMap_["grantNamespacePermission"] = &ClientServiceProcessor::process_grantNamespacePermission; + processMap_["revokeNamespacePermission"] = &ClientServiceProcessor::process_revokeNamespacePermission; + processMap_["getConfiguration"] = &ClientServiceProcessor::process_getConfiguration; + processMap_["getTableConfiguration"] = &ClientServiceProcessor::process_getTableConfiguration; + processMap_["getNamespaceConfiguration"] = &ClientServiceProcessor::process_getNamespaceConfiguration; + processMap_["checkClass"] = &ClientServiceProcessor::process_checkClass; + processMap_["checkTableClass"] = &ClientServiceProcessor::process_checkTableClass; + processMap_["checkNamespaceClass"] = &ClientServiceProcessor::process_checkNamespaceClass; + } + + virtual ~ClientServiceProcessor() {} +}; + +class ClientServiceProcessorFactory : public ::apache::thrift::TProcessorFactory { + public: + ClientServiceProcessorFactory(const std::shared_ptr< ClientServiceIfFactory >& handlerFactory) : + handlerFactory_(handlerFactory) {} + + std::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo& connInfo); + + protected: + std::shared_ptr< ClientServiceIfFactory > handlerFactory_; +}; + +class ClientServiceMultiface : virtual public ClientServiceIf { + public: + ClientServiceMultiface(std::vector >& ifaces) : ifaces_(ifaces) { + } + virtual ~ClientServiceMultiface() {} + protected: + std::vector > ifaces_; + ClientServiceMultiface() {} + void add(std::shared_ptr iface) { + ifaces_.push_back(iface); + } + public: + void getRootTabletLocation(std::string& _return) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getRootTabletLocation(_return); + } + ifaces_[i]->getRootTabletLocation(_return); + return; + } + + void getInstanceId(std::string& _return) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getInstanceId(_return); + } + ifaces_[i]->getInstanceId(_return); + return; + } + + void getZooKeepers(std::string& _return) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getZooKeepers(_return); + } + ifaces_[i]->getZooKeepers(_return); + return; + } + + void bulkImportFiles(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const std::string& tableId, const std::vector & files, const std::string& errorDir, const bool setTime) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->bulkImportFiles(_return, tinfo, credentials, tid, tableId, files, errorDir, setTime); + } + ifaces_[i]->bulkImportFiles(_return, tinfo, credentials, tid, tableId, files, errorDir, setTime); + return; + } + + bool isActive(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const int64_t tid) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->isActive(tinfo, tid); + } + return ifaces_[i]->isActive(tinfo, tid); + } + + void ping(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->ping(credentials); + } + ifaces_[i]->ping(credentials); + } + + void getDiskUsage(std::vector & _return, const std::set & tables, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getDiskUsage(_return, tables, credentials); + } + ifaces_[i]->getDiskUsage(_return, tables, credentials); + return; + } + + void listLocalUsers(std::set & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->listLocalUsers(_return, tinfo, credentials); + } + ifaces_[i]->listLocalUsers(_return, tinfo, credentials); + return; + } + + void createLocalUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& password) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->createLocalUser(tinfo, credentials, principal, password); + } + ifaces_[i]->createLocalUser(tinfo, credentials, principal, password); + } + + void dropLocalUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->dropLocalUser(tinfo, credentials, principal); + } + ifaces_[i]->dropLocalUser(tinfo, credentials, principal); + } + + void changeLocalUserPassword(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& password) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->changeLocalUserPassword(tinfo, credentials, principal, password); + } + ifaces_[i]->changeLocalUserPassword(tinfo, credentials, principal, password); + } + + bool authenticate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->authenticate(tinfo, credentials); + } + return ifaces_[i]->authenticate(tinfo, credentials); + } + + bool authenticateUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& toAuth) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->authenticateUser(tinfo, credentials, toAuth); + } + return ifaces_[i]->authenticateUser(tinfo, credentials, toAuth); + } + + void changeAuthorizations(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::vector & authorizations) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->changeAuthorizations(tinfo, credentials, principal, authorizations); + } + ifaces_[i]->changeAuthorizations(tinfo, credentials, principal, authorizations); + } + + void getUserAuthorizations(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getUserAuthorizations(_return, tinfo, credentials, principal); + } + ifaces_[i]->getUserAuthorizations(_return, tinfo, credentials, principal); + return; + } + + bool hasSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t sysPerm) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->hasSystemPermission(tinfo, credentials, principal, sysPerm); + } + return ifaces_[i]->hasSystemPermission(tinfo, credentials, principal, sysPerm); + } + + bool hasTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t tblPerm) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->hasTablePermission(tinfo, credentials, principal, tableName, tblPerm); + } + return ifaces_[i]->hasTablePermission(tinfo, credentials, principal, tableName, tblPerm); + } + + bool hasNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t tblNspcPerm) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->hasNamespacePermission(tinfo, credentials, principal, ns, tblNspcPerm); + } + return ifaces_[i]->hasNamespacePermission(tinfo, credentials, principal, ns, tblNspcPerm); + } + + void grantSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t permission) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->grantSystemPermission(tinfo, credentials, principal, permission); + } + ifaces_[i]->grantSystemPermission(tinfo, credentials, principal, permission); + } + + void revokeSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t permission) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->revokeSystemPermission(tinfo, credentials, principal, permission); + } + ifaces_[i]->revokeSystemPermission(tinfo, credentials, principal, permission); + } + + void grantTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t permission) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->grantTablePermission(tinfo, credentials, principal, tableName, permission); + } + ifaces_[i]->grantTablePermission(tinfo, credentials, principal, tableName, permission); + } + + void revokeTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t permission) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->revokeTablePermission(tinfo, credentials, principal, tableName, permission); + } + ifaces_[i]->revokeTablePermission(tinfo, credentials, principal, tableName, permission); + } + + void grantNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t permission) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->grantNamespacePermission(tinfo, credentials, principal, ns, permission); + } + ifaces_[i]->grantNamespacePermission(tinfo, credentials, principal, ns, permission); + } + + void revokeNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t permission) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->revokeNamespacePermission(tinfo, credentials, principal, ns, permission); + } + ifaces_[i]->revokeNamespacePermission(tinfo, credentials, principal, ns, permission); + } + + void getConfiguration(std::map & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ConfigurationType::type type) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getConfiguration(_return, tinfo, credentials, type); + } + ifaces_[i]->getConfiguration(_return, tinfo, credentials, type); + return; + } + + void getTableConfiguration(std::map & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getTableConfiguration(_return, tinfo, credentials, tableName); + } + ifaces_[i]->getTableConfiguration(_return, tinfo, credentials, tableName); + return; + } + + void getNamespaceConfiguration(std::map & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getNamespaceConfiguration(_return, tinfo, credentials, ns); + } + ifaces_[i]->getNamespaceConfiguration(_return, tinfo, credentials, ns); + return; + } + + bool checkClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& className, const std::string& interfaceMatch) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->checkClass(tinfo, credentials, className, interfaceMatch); + } + return ifaces_[i]->checkClass(tinfo, credentials, className, interfaceMatch); + } + + bool checkTableClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableId, const std::string& className, const std::string& interfaceMatch) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->checkTableClass(tinfo, credentials, tableId, className, interfaceMatch); + } + return ifaces_[i]->checkTableClass(tinfo, credentials, tableId, className, interfaceMatch); + } + + bool checkNamespaceClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& namespaceId, const std::string& className, const std::string& interfaceMatch) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->checkNamespaceClass(tinfo, credentials, namespaceId, className, interfaceMatch); + } + return ifaces_[i]->checkNamespaceClass(tinfo, credentials, namespaceId, className, interfaceMatch); + } + +}; + +// The 'concurrent' client is a thread safe client that correctly handles +// out of order responses. It is slower than the regular client, so should +// only be used when you need to share a connection among multiple threads +class ClientServiceConcurrentClient : virtual public ClientServiceIf { + public: + ClientServiceConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot); + } + ClientServiceConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + setProtocol(iprot,oprot); + } + private: + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot,prot); + } + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + piprot_=iprot; + poprot_=oprot; + iprot_ = iprot.get(); + oprot_ = oprot.get(); + } + public: + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + return piprot_; + } + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { + return poprot_; + } + void getRootTabletLocation(std::string& _return); + int32_t send_getRootTabletLocation(); + void recv_getRootTabletLocation(std::string& _return, const int32_t seqid); + void getInstanceId(std::string& _return); + int32_t send_getInstanceId(); + void recv_getInstanceId(std::string& _return, const int32_t seqid); + void getZooKeepers(std::string& _return); + int32_t send_getZooKeepers(); + void recv_getZooKeepers(std::string& _return, const int32_t seqid); + void bulkImportFiles(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const std::string& tableId, const std::vector & files, const std::string& errorDir, const bool setTime); + int32_t send_bulkImportFiles(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const std::string& tableId, const std::vector & files, const std::string& errorDir, const bool setTime); + void recv_bulkImportFiles(std::vector & _return, const int32_t seqid); + bool isActive(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const int64_t tid); + int32_t send_isActive(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const int64_t tid); + bool recv_isActive(const int32_t seqid); + void ping(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + int32_t send_ping(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void recv_ping(const int32_t seqid); + void getDiskUsage(std::vector & _return, const std::set & tables, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + int32_t send_getDiskUsage(const std::set & tables, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void recv_getDiskUsage(std::vector & _return, const int32_t seqid); + void listLocalUsers(std::set & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + int32_t send_listLocalUsers(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void recv_listLocalUsers(std::set & _return, const int32_t seqid); + void createLocalUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& password); + int32_t send_createLocalUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& password); + void recv_createLocalUser(const int32_t seqid); + void dropLocalUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal); + int32_t send_dropLocalUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal); + void recv_dropLocalUser(const int32_t seqid); + void changeLocalUserPassword(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& password); + int32_t send_changeLocalUserPassword(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& password); + void recv_changeLocalUserPassword(const int32_t seqid); + bool authenticate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + int32_t send_authenticate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + bool recv_authenticate(const int32_t seqid); + bool authenticateUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& toAuth); + int32_t send_authenticateUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& toAuth); + bool recv_authenticateUser(const int32_t seqid); + void changeAuthorizations(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::vector & authorizations); + int32_t send_changeAuthorizations(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::vector & authorizations); + void recv_changeAuthorizations(const int32_t seqid); + void getUserAuthorizations(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal); + int32_t send_getUserAuthorizations(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal); + void recv_getUserAuthorizations(std::vector & _return, const int32_t seqid); + bool hasSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t sysPerm); + int32_t send_hasSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t sysPerm); + bool recv_hasSystemPermission(const int32_t seqid); + bool hasTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t tblPerm); + int32_t send_hasTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t tblPerm); + bool recv_hasTablePermission(const int32_t seqid); + bool hasNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t tblNspcPerm); + int32_t send_hasNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t tblNspcPerm); + bool recv_hasNamespacePermission(const int32_t seqid); + void grantSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t permission); + int32_t send_grantSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t permission); + void recv_grantSystemPermission(const int32_t seqid); + void revokeSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t permission); + int32_t send_revokeSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t permission); + void recv_revokeSystemPermission(const int32_t seqid); + void grantTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t permission); + int32_t send_grantTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t permission); + void recv_grantTablePermission(const int32_t seqid); + void revokeTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t permission); + int32_t send_revokeTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t permission); + void recv_revokeTablePermission(const int32_t seqid); + void grantNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t permission); + int32_t send_grantNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t permission); + void recv_grantNamespacePermission(const int32_t seqid); + void revokeNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t permission); + int32_t send_revokeNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t permission); + void recv_revokeNamespacePermission(const int32_t seqid); + void getConfiguration(std::map & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ConfigurationType::type type); + int32_t send_getConfiguration(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ConfigurationType::type type); + void recv_getConfiguration(std::map & _return, const int32_t seqid); + void getTableConfiguration(std::map & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName); + int32_t send_getTableConfiguration(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName); + void recv_getTableConfiguration(std::map & _return, const int32_t seqid); + void getNamespaceConfiguration(std::map & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns); + int32_t send_getNamespaceConfiguration(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns); + void recv_getNamespaceConfiguration(std::map & _return, const int32_t seqid); + bool checkClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& className, const std::string& interfaceMatch); + int32_t send_checkClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& className, const std::string& interfaceMatch); + bool recv_checkClass(const int32_t seqid); + bool checkTableClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableId, const std::string& className, const std::string& interfaceMatch); + int32_t send_checkTableClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableId, const std::string& className, const std::string& interfaceMatch); + bool recv_checkTableClass(const int32_t seqid); + bool checkNamespaceClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& namespaceId, const std::string& className, const std::string& interfaceMatch); + int32_t send_checkNamespaceClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& namespaceId, const std::string& className, const std::string& interfaceMatch); + bool recv_checkNamespaceClass(const int32_t seqid); + protected: + std::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_; + std::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_; + ::apache::thrift::protocol::TProtocol* iprot_; + ::apache::thrift::protocol::TProtocol* oprot_; + ::apache::thrift::async::TConcurrentClientSyncInfo sync_; +}; + +#ifdef _MSC_VER + #pragma warning( pop ) +#endif + +}}}}}} // namespace + +#endif diff --git a/include/data/extern/thriftv2/FateService.h b/include/data/extern/thriftv2/FateService.h new file mode 100644 index 00000000..6881e4cf --- /dev/null +++ b/include/data/extern/thriftv2/FateService.h @@ -0,0 +1,813 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef FateService_V2H +#define FateService_V2H + +#include +#include +#include "master_types.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace master { namespace thrift { + +#ifdef _MSC_VER + #pragma warning( push ) + #pragma warning (disable : 4250 ) //inheriting methods via dominance +#endif + +class FateServiceIf { + public: + virtual ~FateServiceIf() {} + virtual int64_t beginFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) = 0; + virtual void executeFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid, const FateOperation::type op, const std::vector & arguments, const std::map & options, const bool autoClean) = 0; + virtual void waitForFateOperation(std::string& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid) = 0; + virtual void finishFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid) = 0; +}; + +class FateServiceIfFactory { + public: + typedef FateServiceIf Handler; + + virtual ~FateServiceIfFactory() {} + + virtual FateServiceIf* getHandler(const ::apache::thrift::TConnectionInfo& connInfo) = 0; + virtual void releaseHandler(FateServiceIf* /* handler */) = 0; +}; + +class FateServiceIfSingletonFactory : virtual public FateServiceIfFactory { + public: + FateServiceIfSingletonFactory(const std::shared_ptr& iface) : iface_(iface) {} + virtual ~FateServiceIfSingletonFactory() {} + + virtual FateServiceIf* getHandler(const ::apache::thrift::TConnectionInfo&) { + return iface_.get(); + } + virtual void releaseHandler(FateServiceIf* /* handler */) {} + + protected: + std::shared_ptr iface_; +}; + +class FateServiceNull : virtual public FateServiceIf { + public: + virtual ~FateServiceNull() {} + int64_t beginFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */) { + int64_t _return = 0; + return _return; + } + void executeFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const int64_t /* opid */, const FateOperation::type /* op */, const std::vector & /* arguments */, const std::map & /* options */, const bool /* autoClean */) { + return; + } + void waitForFateOperation(std::string& /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const int64_t /* opid */) { + return; + } + void finishFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const int64_t /* opid */) { + return; + } +}; + +typedef struct _FateService_beginFateOperation_args__isset { + _FateService_beginFateOperation_args__isset() : tinfo(false), credentials(false) {} + bool tinfo :1; + bool credentials :1; +} _FateService_beginFateOperation_args__isset; + +class FateService_beginFateOperation_args { + public: + + FateService_beginFateOperation_args(const FateService_beginFateOperation_args&); + FateService_beginFateOperation_args& operator=(const FateService_beginFateOperation_args&); + FateService_beginFateOperation_args() { + } + + virtual ~FateService_beginFateOperation_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + + _FateService_beginFateOperation_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + bool operator == (const FateService_beginFateOperation_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + return true; + } + bool operator != (const FateService_beginFateOperation_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FateService_beginFateOperation_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class FateService_beginFateOperation_pargs { + public: + + + virtual ~FateService_beginFateOperation_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FateService_beginFateOperation_result__isset { + _FateService_beginFateOperation_result__isset() : success(false), sec(false), tnase(false) {} + bool success :1; + bool sec :1; + bool tnase :1; +} _FateService_beginFateOperation_result__isset; + +class FateService_beginFateOperation_result { + public: + + FateService_beginFateOperation_result(const FateService_beginFateOperation_result&); + FateService_beginFateOperation_result& operator=(const FateService_beginFateOperation_result&); + FateService_beginFateOperation_result() : success(0) { + } + + virtual ~FateService_beginFateOperation_result() throw(); + int64_t success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _FateService_beginFateOperation_result__isset __isset; + + void __set_success(const int64_t val); + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + void __set_tnase(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException& val); + + bool operator == (const FateService_beginFateOperation_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + if (!(tnase == rhs.tnase)) + return false; + return true; + } + bool operator != (const FateService_beginFateOperation_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FateService_beginFateOperation_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FateService_beginFateOperation_presult__isset { + _FateService_beginFateOperation_presult__isset() : success(false), sec(false), tnase(false) {} + bool success :1; + bool sec :1; + bool tnase :1; +} _FateService_beginFateOperation_presult__isset; + +class FateService_beginFateOperation_presult { + public: + + + virtual ~FateService_beginFateOperation_presult() throw(); + int64_t* success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _FateService_beginFateOperation_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _FateService_executeFateOperation_args__isset { + _FateService_executeFateOperation_args__isset() : tinfo(false), credentials(false), opid(false), op(false), arguments(false), options(false), autoClean(false) {} + bool tinfo :1; + bool credentials :1; + bool opid :1; + bool op :1; + bool arguments :1; + bool options :1; + bool autoClean :1; +} _FateService_executeFateOperation_args__isset; + +class FateService_executeFateOperation_args { + public: + + FateService_executeFateOperation_args(const FateService_executeFateOperation_args&); + FateService_executeFateOperation_args& operator=(const FateService_executeFateOperation_args&); + FateService_executeFateOperation_args() : opid(0), op((FateOperation::type)0), autoClean(0) { + } + + virtual ~FateService_executeFateOperation_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + int64_t opid; + FateOperation::type op; + std::vector arguments; + std::map options; + bool autoClean; + + _FateService_executeFateOperation_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_opid(const int64_t val); + + void __set_op(const FateOperation::type val); + + void __set_arguments(const std::vector & val); + + void __set_options(const std::map & val); + + void __set_autoClean(const bool val); + + bool operator == (const FateService_executeFateOperation_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(opid == rhs.opid)) + return false; + if (!(op == rhs.op)) + return false; + if (!(arguments == rhs.arguments)) + return false; + if (!(options == rhs.options)) + return false; + if (!(autoClean == rhs.autoClean)) + return false; + return true; + } + bool operator != (const FateService_executeFateOperation_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FateService_executeFateOperation_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class FateService_executeFateOperation_pargs { + public: + + + virtual ~FateService_executeFateOperation_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const int64_t* opid; + const FateOperation::type* op; + const std::vector * arguments; + const std::map * options; + const bool* autoClean; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FateService_executeFateOperation_result__isset { + _FateService_executeFateOperation_result__isset() : sec(false), tope(false), tnase(false) {} + bool sec :1; + bool tope :1; + bool tnase :1; +} _FateService_executeFateOperation_result__isset; + +class FateService_executeFateOperation_result { + public: + + FateService_executeFateOperation_result(const FateService_executeFateOperation_result&); + FateService_executeFateOperation_result& operator=(const FateService_executeFateOperation_result&); + FateService_executeFateOperation_result() { + } + + virtual ~FateService_executeFateOperation_result() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException tope; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _FateService_executeFateOperation_result__isset __isset; + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + void __set_tope(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException& val); + + void __set_tnase(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException& val); + + bool operator == (const FateService_executeFateOperation_result & rhs) const + { + if (!(sec == rhs.sec)) + return false; + if (!(tope == rhs.tope)) + return false; + if (!(tnase == rhs.tnase)) + return false; + return true; + } + bool operator != (const FateService_executeFateOperation_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FateService_executeFateOperation_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FateService_executeFateOperation_presult__isset { + _FateService_executeFateOperation_presult__isset() : sec(false), tope(false), tnase(false) {} + bool sec :1; + bool tope :1; + bool tnase :1; +} _FateService_executeFateOperation_presult__isset; + +class FateService_executeFateOperation_presult { + public: + + + virtual ~FateService_executeFateOperation_presult() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException tope; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _FateService_executeFateOperation_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _FateService_waitForFateOperation_args__isset { + _FateService_waitForFateOperation_args__isset() : tinfo(false), credentials(false), opid(false) {} + bool tinfo :1; + bool credentials :1; + bool opid :1; +} _FateService_waitForFateOperation_args__isset; + +class FateService_waitForFateOperation_args { + public: + + FateService_waitForFateOperation_args(const FateService_waitForFateOperation_args&); + FateService_waitForFateOperation_args& operator=(const FateService_waitForFateOperation_args&); + FateService_waitForFateOperation_args() : opid(0) { + } + + virtual ~FateService_waitForFateOperation_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + int64_t opid; + + _FateService_waitForFateOperation_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_opid(const int64_t val); + + bool operator == (const FateService_waitForFateOperation_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(opid == rhs.opid)) + return false; + return true; + } + bool operator != (const FateService_waitForFateOperation_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FateService_waitForFateOperation_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class FateService_waitForFateOperation_pargs { + public: + + + virtual ~FateService_waitForFateOperation_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const int64_t* opid; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FateService_waitForFateOperation_result__isset { + _FateService_waitForFateOperation_result__isset() : success(false), sec(false), tope(false), tnase(false) {} + bool success :1; + bool sec :1; + bool tope :1; + bool tnase :1; +} _FateService_waitForFateOperation_result__isset; + +class FateService_waitForFateOperation_result { + public: + + FateService_waitForFateOperation_result(const FateService_waitForFateOperation_result&); + FateService_waitForFateOperation_result& operator=(const FateService_waitForFateOperation_result&); + FateService_waitForFateOperation_result() : success() { + } + + virtual ~FateService_waitForFateOperation_result() throw(); + std::string success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException tope; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _FateService_waitForFateOperation_result__isset __isset; + + void __set_success(const std::string& val); + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + void __set_tope(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException& val); + + void __set_tnase(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException& val); + + bool operator == (const FateService_waitForFateOperation_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + if (!(tope == rhs.tope)) + return false; + if (!(tnase == rhs.tnase)) + return false; + return true; + } + bool operator != (const FateService_waitForFateOperation_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FateService_waitForFateOperation_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FateService_waitForFateOperation_presult__isset { + _FateService_waitForFateOperation_presult__isset() : success(false), sec(false), tope(false), tnase(false) {} + bool success :1; + bool sec :1; + bool tope :1; + bool tnase :1; +} _FateService_waitForFateOperation_presult__isset; + +class FateService_waitForFateOperation_presult { + public: + + + virtual ~FateService_waitForFateOperation_presult() throw(); + std::string* success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException tope; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _FateService_waitForFateOperation_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _FateService_finishFateOperation_args__isset { + _FateService_finishFateOperation_args__isset() : tinfo(false), credentials(false), opid(false) {} + bool tinfo :1; + bool credentials :1; + bool opid :1; +} _FateService_finishFateOperation_args__isset; + +class FateService_finishFateOperation_args { + public: + + FateService_finishFateOperation_args(const FateService_finishFateOperation_args&); + FateService_finishFateOperation_args& operator=(const FateService_finishFateOperation_args&); + FateService_finishFateOperation_args() : opid(0) { + } + + virtual ~FateService_finishFateOperation_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + int64_t opid; + + _FateService_finishFateOperation_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_opid(const int64_t val); + + bool operator == (const FateService_finishFateOperation_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(opid == rhs.opid)) + return false; + return true; + } + bool operator != (const FateService_finishFateOperation_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FateService_finishFateOperation_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class FateService_finishFateOperation_pargs { + public: + + + virtual ~FateService_finishFateOperation_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const int64_t* opid; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FateService_finishFateOperation_result__isset { + _FateService_finishFateOperation_result__isset() : sec(false), tnase(false) {} + bool sec :1; + bool tnase :1; +} _FateService_finishFateOperation_result__isset; + +class FateService_finishFateOperation_result { + public: + + FateService_finishFateOperation_result(const FateService_finishFateOperation_result&); + FateService_finishFateOperation_result& operator=(const FateService_finishFateOperation_result&); + FateService_finishFateOperation_result() { + } + + virtual ~FateService_finishFateOperation_result() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _FateService_finishFateOperation_result__isset __isset; + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + void __set_tnase(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException& val); + + bool operator == (const FateService_finishFateOperation_result & rhs) const + { + if (!(sec == rhs.sec)) + return false; + if (!(tnase == rhs.tnase)) + return false; + return true; + } + bool operator != (const FateService_finishFateOperation_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FateService_finishFateOperation_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _FateService_finishFateOperation_presult__isset { + _FateService_finishFateOperation_presult__isset() : sec(false), tnase(false) {} + bool sec :1; + bool tnase :1; +} _FateService_finishFateOperation_presult__isset; + +class FateService_finishFateOperation_presult { + public: + + + virtual ~FateService_finishFateOperation_presult() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _FateService_finishFateOperation_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +class FateServiceClient : virtual public FateServiceIf { + public: + FateServiceClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot); + } + FateServiceClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + setProtocol(iprot,oprot); + } + private: + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot,prot); + } + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + piprot_=iprot; + poprot_=oprot; + iprot_ = iprot.get(); + oprot_ = oprot.get(); + } + public: + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + return piprot_; + } + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { + return poprot_; + } + int64_t beginFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void send_beginFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + int64_t recv_beginFateOperation(); + void executeFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid, const FateOperation::type op, const std::vector & arguments, const std::map & options, const bool autoClean); + void send_executeFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid, const FateOperation::type op, const std::vector & arguments, const std::map & options, const bool autoClean); + void recv_executeFateOperation(); + void waitForFateOperation(std::string& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid); + void send_waitForFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid); + void recv_waitForFateOperation(std::string& _return); + void finishFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid); + void send_finishFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid); + void recv_finishFateOperation(); + protected: + std::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_; + std::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_; + ::apache::thrift::protocol::TProtocol* iprot_; + ::apache::thrift::protocol::TProtocol* oprot_; +}; + +class FateServiceProcessor : public ::apache::thrift::TDispatchProcessor { + protected: + std::shared_ptr iface_; + virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext); + private: + typedef void (FateServiceProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*); + typedef std::map ProcessMap; + ProcessMap processMap_; + void process_beginFateOperation(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_executeFateOperation(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_waitForFateOperation(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_finishFateOperation(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + public: + FateServiceProcessor(std::shared_ptr iface) : + iface_(iface) { + processMap_["beginFateOperation"] = &FateServiceProcessor::process_beginFateOperation; + processMap_["executeFateOperation"] = &FateServiceProcessor::process_executeFateOperation; + processMap_["waitForFateOperation"] = &FateServiceProcessor::process_waitForFateOperation; + processMap_["finishFateOperation"] = &FateServiceProcessor::process_finishFateOperation; + } + + virtual ~FateServiceProcessor() {} +}; + +class FateServiceProcessorFactory : public ::apache::thrift::TProcessorFactory { + public: + FateServiceProcessorFactory(const std::shared_ptr< FateServiceIfFactory >& handlerFactory) : + handlerFactory_(handlerFactory) {} + + std::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo& connInfo); + + protected: + std::shared_ptr< FateServiceIfFactory > handlerFactory_; +}; + +class FateServiceMultiface : virtual public FateServiceIf { + public: + FateServiceMultiface(std::vector >& ifaces) : ifaces_(ifaces) { + } + virtual ~FateServiceMultiface() {} + protected: + std::vector > ifaces_; + FateServiceMultiface() {} + void add(std::shared_ptr iface) { + ifaces_.push_back(iface); + } + public: + int64_t beginFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->beginFateOperation(tinfo, credentials); + } + return ifaces_[i]->beginFateOperation(tinfo, credentials); + } + + void executeFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid, const FateOperation::type op, const std::vector & arguments, const std::map & options, const bool autoClean) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->executeFateOperation(tinfo, credentials, opid, op, arguments, options, autoClean); + } + ifaces_[i]->executeFateOperation(tinfo, credentials, opid, op, arguments, options, autoClean); + } + + void waitForFateOperation(std::string& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->waitForFateOperation(_return, tinfo, credentials, opid); + } + ifaces_[i]->waitForFateOperation(_return, tinfo, credentials, opid); + return; + } + + void finishFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->finishFateOperation(tinfo, credentials, opid); + } + ifaces_[i]->finishFateOperation(tinfo, credentials, opid); + } + +}; + +// The 'concurrent' client is a thread safe client that correctly handles +// out of order responses. It is slower than the regular client, so should +// only be used when you need to share a connection among multiple threads +class FateServiceConcurrentClient : virtual public FateServiceIf { + public: + FateServiceConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot); + } + FateServiceConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + setProtocol(iprot,oprot); + } + private: + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot,prot); + } + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + piprot_=iprot; + poprot_=oprot; + iprot_ = iprot.get(); + oprot_ = oprot.get(); + } + public: + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + return piprot_; + } + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { + return poprot_; + } + int64_t beginFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + int32_t send_beginFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + int64_t recv_beginFateOperation(const int32_t seqid); + void executeFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid, const FateOperation::type op, const std::vector & arguments, const std::map & options, const bool autoClean); + int32_t send_executeFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid, const FateOperation::type op, const std::vector & arguments, const std::map & options, const bool autoClean); + void recv_executeFateOperation(const int32_t seqid); + void waitForFateOperation(std::string& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid); + int32_t send_waitForFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid); + void recv_waitForFateOperation(std::string& _return, const int32_t seqid); + void finishFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid); + int32_t send_finishFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid); + void recv_finishFateOperation(const int32_t seqid); + protected: + std::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_; + std::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_; + ::apache::thrift::protocol::TProtocol* iprot_; + ::apache::thrift::protocol::TProtocol* oprot_; + ::apache::thrift::async::TConcurrentClientSyncInfo sync_; +}; + +#ifdef _MSC_VER + #pragma warning( pop ) +#endif + +}}}}}} // namespace + +#endif diff --git a/include/data/extern/thriftv2/GCMonitorService.h b/include/data/extern/thriftv2/GCMonitorService.h new file mode 100644 index 00000000..eb002bb9 --- /dev/null +++ b/include/data/extern/thriftv2/GCMonitorService.h @@ -0,0 +1,311 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef GCMonitorService_V2H +#define GCMonitorService_V2H + +#include +#include +#include "gc_types.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace gc { namespace thrift { + +#ifdef _MSC_VER + #pragma warning( push ) + #pragma warning (disable : 4250 ) //inheriting methods via dominance +#endif + +class GCMonitorServiceIf { + public: + virtual ~GCMonitorServiceIf() {} + virtual void getStatus(GCStatus& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) = 0; +}; + +class GCMonitorServiceIfFactory { + public: + typedef GCMonitorServiceIf Handler; + + virtual ~GCMonitorServiceIfFactory() {} + + virtual GCMonitorServiceIf* getHandler(const ::apache::thrift::TConnectionInfo& connInfo) = 0; + virtual void releaseHandler(GCMonitorServiceIf* /* handler */) = 0; +}; + +class GCMonitorServiceIfSingletonFactory : virtual public GCMonitorServiceIfFactory { + public: + GCMonitorServiceIfSingletonFactory(const std::shared_ptr& iface) : iface_(iface) {} + virtual ~GCMonitorServiceIfSingletonFactory() {} + + virtual GCMonitorServiceIf* getHandler(const ::apache::thrift::TConnectionInfo&) { + return iface_.get(); + } + virtual void releaseHandler(GCMonitorServiceIf* /* handler */) {} + + protected: + std::shared_ptr iface_; +}; + +class GCMonitorServiceNull : virtual public GCMonitorServiceIf { + public: + virtual ~GCMonitorServiceNull() {} + void getStatus(GCStatus& /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */) { + return; + } +}; + +typedef struct _GCMonitorService_getStatus_args__isset { + _GCMonitorService_getStatus_args__isset() : tinfo(false), credentials(false) {} + bool tinfo :1; + bool credentials :1; +} _GCMonitorService_getStatus_args__isset; + +class GCMonitorService_getStatus_args { + public: + + GCMonitorService_getStatus_args(const GCMonitorService_getStatus_args&); + GCMonitorService_getStatus_args& operator=(const GCMonitorService_getStatus_args&); + GCMonitorService_getStatus_args() { + } + + virtual ~GCMonitorService_getStatus_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + + _GCMonitorService_getStatus_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + bool operator == (const GCMonitorService_getStatus_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + return true; + } + bool operator != (const GCMonitorService_getStatus_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const GCMonitorService_getStatus_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class GCMonitorService_getStatus_pargs { + public: + + + virtual ~GCMonitorService_getStatus_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _GCMonitorService_getStatus_result__isset { + _GCMonitorService_getStatus_result__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _GCMonitorService_getStatus_result__isset; + +class GCMonitorService_getStatus_result { + public: + + GCMonitorService_getStatus_result(const GCMonitorService_getStatus_result&); + GCMonitorService_getStatus_result& operator=(const GCMonitorService_getStatus_result&); + GCMonitorService_getStatus_result() { + } + + virtual ~GCMonitorService_getStatus_result() throw(); + GCStatus success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + + _GCMonitorService_getStatus_result__isset __isset; + + void __set_success(const GCStatus& val); + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + bool operator == (const GCMonitorService_getStatus_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + return true; + } + bool operator != (const GCMonitorService_getStatus_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const GCMonitorService_getStatus_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _GCMonitorService_getStatus_presult__isset { + _GCMonitorService_getStatus_presult__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _GCMonitorService_getStatus_presult__isset; + +class GCMonitorService_getStatus_presult { + public: + + + virtual ~GCMonitorService_getStatus_presult() throw(); + GCStatus* success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + + _GCMonitorService_getStatus_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +class GCMonitorServiceClient : virtual public GCMonitorServiceIf { + public: + GCMonitorServiceClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot); + } + GCMonitorServiceClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + setProtocol(iprot,oprot); + } + private: + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot,prot); + } + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + piprot_=iprot; + poprot_=oprot; + iprot_ = iprot.get(); + oprot_ = oprot.get(); + } + public: + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + return piprot_; + } + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { + return poprot_; + } + void getStatus(GCStatus& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void send_getStatus(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void recv_getStatus(GCStatus& _return); + protected: + std::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_; + std::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_; + ::apache::thrift::protocol::TProtocol* iprot_; + ::apache::thrift::protocol::TProtocol* oprot_; +}; + +class GCMonitorServiceProcessor : public ::apache::thrift::TDispatchProcessor { + protected: + std::shared_ptr iface_; + virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext); + private: + typedef void (GCMonitorServiceProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*); + typedef std::map ProcessMap; + ProcessMap processMap_; + void process_getStatus(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + public: + GCMonitorServiceProcessor(std::shared_ptr iface) : + iface_(iface) { + processMap_["getStatus"] = &GCMonitorServiceProcessor::process_getStatus; + } + + virtual ~GCMonitorServiceProcessor() {} +}; + +class GCMonitorServiceProcessorFactory : public ::apache::thrift::TProcessorFactory { + public: + GCMonitorServiceProcessorFactory(const std::shared_ptr< GCMonitorServiceIfFactory >& handlerFactory) : + handlerFactory_(handlerFactory) {} + + std::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo& connInfo); + + protected: + std::shared_ptr< GCMonitorServiceIfFactory > handlerFactory_; +}; + +class GCMonitorServiceMultiface : virtual public GCMonitorServiceIf { + public: + GCMonitorServiceMultiface(std::vector >& ifaces) : ifaces_(ifaces) { + } + virtual ~GCMonitorServiceMultiface() {} + protected: + std::vector > ifaces_; + GCMonitorServiceMultiface() {} + void add(std::shared_ptr iface) { + ifaces_.push_back(iface); + } + public: + void getStatus(GCStatus& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getStatus(_return, tinfo, credentials); + } + ifaces_[i]->getStatus(_return, tinfo, credentials); + return; + } + +}; + +// The 'concurrent' client is a thread safe client that correctly handles +// out of order responses. It is slower than the regular client, so should +// only be used when you need to share a connection among multiple threads +class GCMonitorServiceConcurrentClient : virtual public GCMonitorServiceIf { + public: + GCMonitorServiceConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot); + } + GCMonitorServiceConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + setProtocol(iprot,oprot); + } + private: + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot,prot); + } + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + piprot_=iprot; + poprot_=oprot; + iprot_ = iprot.get(); + oprot_ = oprot.get(); + } + public: + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + return piprot_; + } + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { + return poprot_; + } + void getStatus(GCStatus& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + int32_t send_getStatus(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void recv_getStatus(GCStatus& _return, const int32_t seqid); + protected: + std::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_; + std::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_; + ::apache::thrift::protocol::TProtocol* iprot_; + ::apache::thrift::protocol::TProtocol* oprot_; + ::apache::thrift::async::TConcurrentClientSyncInfo sync_; +}; + +#ifdef _MSC_VER + #pragma warning( pop ) +#endif + +}}}}}} // namespace + +#endif diff --git a/include/data/extern/thriftv2/MasterClientService.h b/include/data/extern/thriftv2/MasterClientService.h new file mode 100644 index 00000000..19b9669a --- /dev/null +++ b/include/data/extern/thriftv2/MasterClientService.h @@ -0,0 +1,2815 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef MasterClientService_V2H +#define MasterClientService_V2H + +#include +#include +#include "master_types.h" +#include "FateService.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace master { namespace thrift { + +#ifdef _MSC_VER + #pragma warning( push ) + #pragma warning (disable : 4250 ) //inheriting methods via dominance +#endif + +class MasterClientServiceIf : virtual public FateServiceIf { + public: + virtual ~MasterClientServiceIf() {} + virtual int64_t initiateFlush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName) = 0; + virtual void waitForFlush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& startRow, const std::string& endRow, const int64_t flushID, const int64_t maxLoops) = 0; + virtual void setTableProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& property, const std::string& value) = 0; + virtual void removeTableProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& property) = 0; + virtual void setNamespaceProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns, const std::string& property, const std::string& value) = 0; + virtual void removeNamespaceProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns, const std::string& property) = 0; + virtual void setMasterGoalState(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const MasterGoalState::type state) = 0; + virtual void shutdown(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const bool stopTabletServers) = 0; + virtual void shutdownTabletServer(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tabletServer, const bool force) = 0; + virtual void setSystemProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& property, const std::string& value) = 0; + virtual void removeSystemProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& property) = 0; + virtual void getMasterStats(MasterMonitorInfo& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) = 0; + virtual void waitForBalance(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo) = 0; + virtual void reportSplitExtent(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& serverName, const TabletSplit& split) = 0; + virtual void reportTabletStatus(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& serverName, const TabletLoadState::type status, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& tablet) = 0; + virtual void getActiveTservers(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) = 0; + virtual void getDelegationToken( ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationToken& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationTokenConfig& cfg) = 0; + virtual bool drainReplicationTable(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tfino, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::set & logsToWatch) = 0; +}; + +class MasterClientServiceIfFactory : virtual public FateServiceIfFactory { + public: + typedef MasterClientServiceIf Handler; + + virtual ~MasterClientServiceIfFactory() {} + + virtual MasterClientServiceIf* getHandler(const ::apache::thrift::TConnectionInfo& connInfo) = 0; + virtual void releaseHandler(FateServiceIf* /* handler */) = 0; +}; + +class MasterClientServiceIfSingletonFactory : virtual public MasterClientServiceIfFactory { + public: + MasterClientServiceIfSingletonFactory(const std::shared_ptr& iface) : iface_(iface) {} + virtual ~MasterClientServiceIfSingletonFactory() {} + + virtual MasterClientServiceIf* getHandler(const ::apache::thrift::TConnectionInfo&) { + return iface_.get(); + } + virtual void releaseHandler(FateServiceIf* /* handler */) {} + + protected: + std::shared_ptr iface_; +}; + +class MasterClientServiceNull : virtual public MasterClientServiceIf , virtual public FateServiceNull { + public: + virtual ~MasterClientServiceNull() {} + int64_t initiateFlush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* tableName */) { + int64_t _return = 0; + return _return; + } + void waitForFlush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* tableName */, const std::string& /* startRow */, const std::string& /* endRow */, const int64_t /* flushID */, const int64_t /* maxLoops */) { + return; + } + void setTableProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* tableName */, const std::string& /* property */, const std::string& /* value */) { + return; + } + void removeTableProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* tableName */, const std::string& /* property */) { + return; + } + void setNamespaceProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* ns */, const std::string& /* property */, const std::string& /* value */) { + return; + } + void removeNamespaceProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* ns */, const std::string& /* property */) { + return; + } + void setMasterGoalState(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const MasterGoalState::type /* state */) { + return; + } + void shutdown(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const bool /* stopTabletServers */) { + return; + } + void shutdownTabletServer(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* tabletServer */, const bool /* force */) { + return; + } + void setSystemProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* property */, const std::string& /* value */) { + return; + } + void removeSystemProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* property */) { + return; + } + void getMasterStats(MasterMonitorInfo& /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */) { + return; + } + void waitForBalance(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */) { + return; + } + void reportSplitExtent(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* serverName */, const TabletSplit& /* split */) { + return; + } + void reportTabletStatus(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* serverName */, const TabletLoadState::type /* status */, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& /* tablet */) { + return; + } + void getActiveTservers(std::vector & /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */) { + return; + } + void getDelegationToken( ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationToken& /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationTokenConfig& /* cfg */) { + return; + } + bool drainReplicationTable(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tfino */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* tableName */, const std::set & /* logsToWatch */) { + bool _return = false; + return _return; + } +}; + +typedef struct _MasterClientService_initiateFlush_args__isset { + _MasterClientService_initiateFlush_args__isset() : tinfo(false), credentials(false), tableName(false) {} + bool tinfo :1; + bool credentials :1; + bool tableName :1; +} _MasterClientService_initiateFlush_args__isset; + +class MasterClientService_initiateFlush_args { + public: + + MasterClientService_initiateFlush_args(const MasterClientService_initiateFlush_args&); + MasterClientService_initiateFlush_args& operator=(const MasterClientService_initiateFlush_args&); + MasterClientService_initiateFlush_args() : tableName() { + } + + virtual ~MasterClientService_initiateFlush_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string tableName; + + _MasterClientService_initiateFlush_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_tableName(const std::string& val); + + bool operator == (const MasterClientService_initiateFlush_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(tableName == rhs.tableName)) + return false; + return true; + } + bool operator != (const MasterClientService_initiateFlush_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_initiateFlush_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class MasterClientService_initiateFlush_pargs { + public: + + + virtual ~MasterClientService_initiateFlush_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* tableName; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_initiateFlush_result__isset { + _MasterClientService_initiateFlush_result__isset() : success(false), sec(false), tope(false), tnase(false) {} + bool success :1; + bool sec :1; + bool tope :1; + bool tnase :1; +} _MasterClientService_initiateFlush_result__isset; + +class MasterClientService_initiateFlush_result { + public: + + MasterClientService_initiateFlush_result(const MasterClientService_initiateFlush_result&); + MasterClientService_initiateFlush_result& operator=(const MasterClientService_initiateFlush_result&); + MasterClientService_initiateFlush_result() : success(0) { + } + + virtual ~MasterClientService_initiateFlush_result() throw(); + int64_t success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException tope; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_initiateFlush_result__isset __isset; + + void __set_success(const int64_t val); + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + void __set_tope(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException& val); + + void __set_tnase(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException& val); + + bool operator == (const MasterClientService_initiateFlush_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + if (!(tope == rhs.tope)) + return false; + if (!(tnase == rhs.tnase)) + return false; + return true; + } + bool operator != (const MasterClientService_initiateFlush_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_initiateFlush_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_initiateFlush_presult__isset { + _MasterClientService_initiateFlush_presult__isset() : success(false), sec(false), tope(false), tnase(false) {} + bool success :1; + bool sec :1; + bool tope :1; + bool tnase :1; +} _MasterClientService_initiateFlush_presult__isset; + +class MasterClientService_initiateFlush_presult { + public: + + + virtual ~MasterClientService_initiateFlush_presult() throw(); + int64_t* success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException tope; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_initiateFlush_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _MasterClientService_waitForFlush_args__isset { + _MasterClientService_waitForFlush_args__isset() : tinfo(false), credentials(false), tableName(false), startRow(false), endRow(false), flushID(false), maxLoops(false) {} + bool tinfo :1; + bool credentials :1; + bool tableName :1; + bool startRow :1; + bool endRow :1; + bool flushID :1; + bool maxLoops :1; +} _MasterClientService_waitForFlush_args__isset; + +class MasterClientService_waitForFlush_args { + public: + + MasterClientService_waitForFlush_args(const MasterClientService_waitForFlush_args&); + MasterClientService_waitForFlush_args& operator=(const MasterClientService_waitForFlush_args&); + MasterClientService_waitForFlush_args() : tableName(), startRow(), endRow(), flushID(0), maxLoops(0) { + } + + virtual ~MasterClientService_waitForFlush_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string tableName; + std::string startRow; + std::string endRow; + int64_t flushID; + int64_t maxLoops; + + _MasterClientService_waitForFlush_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_tableName(const std::string& val); + + void __set_startRow(const std::string& val); + + void __set_endRow(const std::string& val); + + void __set_flushID(const int64_t val); + + void __set_maxLoops(const int64_t val); + + bool operator == (const MasterClientService_waitForFlush_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(tableName == rhs.tableName)) + return false; + if (!(startRow == rhs.startRow)) + return false; + if (!(endRow == rhs.endRow)) + return false; + if (!(flushID == rhs.flushID)) + return false; + if (!(maxLoops == rhs.maxLoops)) + return false; + return true; + } + bool operator != (const MasterClientService_waitForFlush_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_waitForFlush_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class MasterClientService_waitForFlush_pargs { + public: + + + virtual ~MasterClientService_waitForFlush_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* tableName; + const std::string* startRow; + const std::string* endRow; + const int64_t* flushID; + const int64_t* maxLoops; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_waitForFlush_result__isset { + _MasterClientService_waitForFlush_result__isset() : sec(false), tope(false), tnase(false) {} + bool sec :1; + bool tope :1; + bool tnase :1; +} _MasterClientService_waitForFlush_result__isset; + +class MasterClientService_waitForFlush_result { + public: + + MasterClientService_waitForFlush_result(const MasterClientService_waitForFlush_result&); + MasterClientService_waitForFlush_result& operator=(const MasterClientService_waitForFlush_result&); + MasterClientService_waitForFlush_result() { + } + + virtual ~MasterClientService_waitForFlush_result() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException tope; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_waitForFlush_result__isset __isset; + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + void __set_tope(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException& val); + + void __set_tnase(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException& val); + + bool operator == (const MasterClientService_waitForFlush_result & rhs) const + { + if (!(sec == rhs.sec)) + return false; + if (!(tope == rhs.tope)) + return false; + if (!(tnase == rhs.tnase)) + return false; + return true; + } + bool operator != (const MasterClientService_waitForFlush_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_waitForFlush_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_waitForFlush_presult__isset { + _MasterClientService_waitForFlush_presult__isset() : sec(false), tope(false), tnase(false) {} + bool sec :1; + bool tope :1; + bool tnase :1; +} _MasterClientService_waitForFlush_presult__isset; + +class MasterClientService_waitForFlush_presult { + public: + + + virtual ~MasterClientService_waitForFlush_presult() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException tope; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_waitForFlush_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _MasterClientService_setTableProperty_args__isset { + _MasterClientService_setTableProperty_args__isset() : tinfo(false), credentials(false), tableName(false), property(false), value(false) {} + bool tinfo :1; + bool credentials :1; + bool tableName :1; + bool property :1; + bool value :1; +} _MasterClientService_setTableProperty_args__isset; + +class MasterClientService_setTableProperty_args { + public: + + MasterClientService_setTableProperty_args(const MasterClientService_setTableProperty_args&); + MasterClientService_setTableProperty_args& operator=(const MasterClientService_setTableProperty_args&); + MasterClientService_setTableProperty_args() : tableName(), property(), value() { + } + + virtual ~MasterClientService_setTableProperty_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string tableName; + std::string property; + std::string value; + + _MasterClientService_setTableProperty_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_tableName(const std::string& val); + + void __set_property(const std::string& val); + + void __set_value(const std::string& val); + + bool operator == (const MasterClientService_setTableProperty_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(tableName == rhs.tableName)) + return false; + if (!(property == rhs.property)) + return false; + if (!(value == rhs.value)) + return false; + return true; + } + bool operator != (const MasterClientService_setTableProperty_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_setTableProperty_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class MasterClientService_setTableProperty_pargs { + public: + + + virtual ~MasterClientService_setTableProperty_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* tableName; + const std::string* property; + const std::string* value; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_setTableProperty_result__isset { + _MasterClientService_setTableProperty_result__isset() : sec(false), tope(false), tnase(false) {} + bool sec :1; + bool tope :1; + bool tnase :1; +} _MasterClientService_setTableProperty_result__isset; + +class MasterClientService_setTableProperty_result { + public: + + MasterClientService_setTableProperty_result(const MasterClientService_setTableProperty_result&); + MasterClientService_setTableProperty_result& operator=(const MasterClientService_setTableProperty_result&); + MasterClientService_setTableProperty_result() { + } + + virtual ~MasterClientService_setTableProperty_result() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException tope; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_setTableProperty_result__isset __isset; + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + void __set_tope(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException& val); + + void __set_tnase(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException& val); + + bool operator == (const MasterClientService_setTableProperty_result & rhs) const + { + if (!(sec == rhs.sec)) + return false; + if (!(tope == rhs.tope)) + return false; + if (!(tnase == rhs.tnase)) + return false; + return true; + } + bool operator != (const MasterClientService_setTableProperty_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_setTableProperty_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_setTableProperty_presult__isset { + _MasterClientService_setTableProperty_presult__isset() : sec(false), tope(false), tnase(false) {} + bool sec :1; + bool tope :1; + bool tnase :1; +} _MasterClientService_setTableProperty_presult__isset; + +class MasterClientService_setTableProperty_presult { + public: + + + virtual ~MasterClientService_setTableProperty_presult() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException tope; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_setTableProperty_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _MasterClientService_removeTableProperty_args__isset { + _MasterClientService_removeTableProperty_args__isset() : tinfo(false), credentials(false), tableName(false), property(false) {} + bool tinfo :1; + bool credentials :1; + bool tableName :1; + bool property :1; +} _MasterClientService_removeTableProperty_args__isset; + +class MasterClientService_removeTableProperty_args { + public: + + MasterClientService_removeTableProperty_args(const MasterClientService_removeTableProperty_args&); + MasterClientService_removeTableProperty_args& operator=(const MasterClientService_removeTableProperty_args&); + MasterClientService_removeTableProperty_args() : tableName(), property() { + } + + virtual ~MasterClientService_removeTableProperty_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string tableName; + std::string property; + + _MasterClientService_removeTableProperty_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_tableName(const std::string& val); + + void __set_property(const std::string& val); + + bool operator == (const MasterClientService_removeTableProperty_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(tableName == rhs.tableName)) + return false; + if (!(property == rhs.property)) + return false; + return true; + } + bool operator != (const MasterClientService_removeTableProperty_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_removeTableProperty_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class MasterClientService_removeTableProperty_pargs { + public: + + + virtual ~MasterClientService_removeTableProperty_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* tableName; + const std::string* property; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_removeTableProperty_result__isset { + _MasterClientService_removeTableProperty_result__isset() : sec(false), tope(false), tnase(false) {} + bool sec :1; + bool tope :1; + bool tnase :1; +} _MasterClientService_removeTableProperty_result__isset; + +class MasterClientService_removeTableProperty_result { + public: + + MasterClientService_removeTableProperty_result(const MasterClientService_removeTableProperty_result&); + MasterClientService_removeTableProperty_result& operator=(const MasterClientService_removeTableProperty_result&); + MasterClientService_removeTableProperty_result() { + } + + virtual ~MasterClientService_removeTableProperty_result() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException tope; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_removeTableProperty_result__isset __isset; + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + void __set_tope(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException& val); + + void __set_tnase(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException& val); + + bool operator == (const MasterClientService_removeTableProperty_result & rhs) const + { + if (!(sec == rhs.sec)) + return false; + if (!(tope == rhs.tope)) + return false; + if (!(tnase == rhs.tnase)) + return false; + return true; + } + bool operator != (const MasterClientService_removeTableProperty_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_removeTableProperty_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_removeTableProperty_presult__isset { + _MasterClientService_removeTableProperty_presult__isset() : sec(false), tope(false), tnase(false) {} + bool sec :1; + bool tope :1; + bool tnase :1; +} _MasterClientService_removeTableProperty_presult__isset; + +class MasterClientService_removeTableProperty_presult { + public: + + + virtual ~MasterClientService_removeTableProperty_presult() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException tope; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_removeTableProperty_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _MasterClientService_setNamespaceProperty_args__isset { + _MasterClientService_setNamespaceProperty_args__isset() : tinfo(false), credentials(false), ns(false), property(false), value(false) {} + bool tinfo :1; + bool credentials :1; + bool ns :1; + bool property :1; + bool value :1; +} _MasterClientService_setNamespaceProperty_args__isset; + +class MasterClientService_setNamespaceProperty_args { + public: + + MasterClientService_setNamespaceProperty_args(const MasterClientService_setNamespaceProperty_args&); + MasterClientService_setNamespaceProperty_args& operator=(const MasterClientService_setNamespaceProperty_args&); + MasterClientService_setNamespaceProperty_args() : ns(), property(), value() { + } + + virtual ~MasterClientService_setNamespaceProperty_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string ns; + std::string property; + std::string value; + + _MasterClientService_setNamespaceProperty_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_ns(const std::string& val); + + void __set_property(const std::string& val); + + void __set_value(const std::string& val); + + bool operator == (const MasterClientService_setNamespaceProperty_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(ns == rhs.ns)) + return false; + if (!(property == rhs.property)) + return false; + if (!(value == rhs.value)) + return false; + return true; + } + bool operator != (const MasterClientService_setNamespaceProperty_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_setNamespaceProperty_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class MasterClientService_setNamespaceProperty_pargs { + public: + + + virtual ~MasterClientService_setNamespaceProperty_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* ns; + const std::string* property; + const std::string* value; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_setNamespaceProperty_result__isset { + _MasterClientService_setNamespaceProperty_result__isset() : sec(false), tope(false), tnase(false) {} + bool sec :1; + bool tope :1; + bool tnase :1; +} _MasterClientService_setNamespaceProperty_result__isset; + +class MasterClientService_setNamespaceProperty_result { + public: + + MasterClientService_setNamespaceProperty_result(const MasterClientService_setNamespaceProperty_result&); + MasterClientService_setNamespaceProperty_result& operator=(const MasterClientService_setNamespaceProperty_result&); + MasterClientService_setNamespaceProperty_result() { + } + + virtual ~MasterClientService_setNamespaceProperty_result() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException tope; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_setNamespaceProperty_result__isset __isset; + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + void __set_tope(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException& val); + + void __set_tnase(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException& val); + + bool operator == (const MasterClientService_setNamespaceProperty_result & rhs) const + { + if (!(sec == rhs.sec)) + return false; + if (!(tope == rhs.tope)) + return false; + if (!(tnase == rhs.tnase)) + return false; + return true; + } + bool operator != (const MasterClientService_setNamespaceProperty_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_setNamespaceProperty_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_setNamespaceProperty_presult__isset { + _MasterClientService_setNamespaceProperty_presult__isset() : sec(false), tope(false), tnase(false) {} + bool sec :1; + bool tope :1; + bool tnase :1; +} _MasterClientService_setNamespaceProperty_presult__isset; + +class MasterClientService_setNamespaceProperty_presult { + public: + + + virtual ~MasterClientService_setNamespaceProperty_presult() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException tope; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_setNamespaceProperty_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _MasterClientService_removeNamespaceProperty_args__isset { + _MasterClientService_removeNamespaceProperty_args__isset() : tinfo(false), credentials(false), ns(false), property(false) {} + bool tinfo :1; + bool credentials :1; + bool ns :1; + bool property :1; +} _MasterClientService_removeNamespaceProperty_args__isset; + +class MasterClientService_removeNamespaceProperty_args { + public: + + MasterClientService_removeNamespaceProperty_args(const MasterClientService_removeNamespaceProperty_args&); + MasterClientService_removeNamespaceProperty_args& operator=(const MasterClientService_removeNamespaceProperty_args&); + MasterClientService_removeNamespaceProperty_args() : ns(), property() { + } + + virtual ~MasterClientService_removeNamespaceProperty_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string ns; + std::string property; + + _MasterClientService_removeNamespaceProperty_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_ns(const std::string& val); + + void __set_property(const std::string& val); + + bool operator == (const MasterClientService_removeNamespaceProperty_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(ns == rhs.ns)) + return false; + if (!(property == rhs.property)) + return false; + return true; + } + bool operator != (const MasterClientService_removeNamespaceProperty_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_removeNamespaceProperty_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class MasterClientService_removeNamespaceProperty_pargs { + public: + + + virtual ~MasterClientService_removeNamespaceProperty_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* ns; + const std::string* property; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_removeNamespaceProperty_result__isset { + _MasterClientService_removeNamespaceProperty_result__isset() : sec(false), tope(false), tnase(false) {} + bool sec :1; + bool tope :1; + bool tnase :1; +} _MasterClientService_removeNamespaceProperty_result__isset; + +class MasterClientService_removeNamespaceProperty_result { + public: + + MasterClientService_removeNamespaceProperty_result(const MasterClientService_removeNamespaceProperty_result&); + MasterClientService_removeNamespaceProperty_result& operator=(const MasterClientService_removeNamespaceProperty_result&); + MasterClientService_removeNamespaceProperty_result() { + } + + virtual ~MasterClientService_removeNamespaceProperty_result() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException tope; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_removeNamespaceProperty_result__isset __isset; + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + void __set_tope(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException& val); + + void __set_tnase(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException& val); + + bool operator == (const MasterClientService_removeNamespaceProperty_result & rhs) const + { + if (!(sec == rhs.sec)) + return false; + if (!(tope == rhs.tope)) + return false; + if (!(tnase == rhs.tnase)) + return false; + return true; + } + bool operator != (const MasterClientService_removeNamespaceProperty_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_removeNamespaceProperty_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_removeNamespaceProperty_presult__isset { + _MasterClientService_removeNamespaceProperty_presult__isset() : sec(false), tope(false), tnase(false) {} + bool sec :1; + bool tope :1; + bool tnase :1; +} _MasterClientService_removeNamespaceProperty_presult__isset; + +class MasterClientService_removeNamespaceProperty_presult { + public: + + + virtual ~MasterClientService_removeNamespaceProperty_presult() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException tope; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_removeNamespaceProperty_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _MasterClientService_setMasterGoalState_args__isset { + _MasterClientService_setMasterGoalState_args__isset() : tinfo(false), credentials(false), state(false) {} + bool tinfo :1; + bool credentials :1; + bool state :1; +} _MasterClientService_setMasterGoalState_args__isset; + +class MasterClientService_setMasterGoalState_args { + public: + + MasterClientService_setMasterGoalState_args(const MasterClientService_setMasterGoalState_args&); + MasterClientService_setMasterGoalState_args& operator=(const MasterClientService_setMasterGoalState_args&); + MasterClientService_setMasterGoalState_args() : state((MasterGoalState::type)0) { + } + + virtual ~MasterClientService_setMasterGoalState_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + MasterGoalState::type state; + + _MasterClientService_setMasterGoalState_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_state(const MasterGoalState::type val); + + bool operator == (const MasterClientService_setMasterGoalState_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(state == rhs.state)) + return false; + return true; + } + bool operator != (const MasterClientService_setMasterGoalState_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_setMasterGoalState_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class MasterClientService_setMasterGoalState_pargs { + public: + + + virtual ~MasterClientService_setMasterGoalState_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const MasterGoalState::type* state; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_setMasterGoalState_result__isset { + _MasterClientService_setMasterGoalState_result__isset() : sec(false), tnase(false) {} + bool sec :1; + bool tnase :1; +} _MasterClientService_setMasterGoalState_result__isset; + +class MasterClientService_setMasterGoalState_result { + public: + + MasterClientService_setMasterGoalState_result(const MasterClientService_setMasterGoalState_result&); + MasterClientService_setMasterGoalState_result& operator=(const MasterClientService_setMasterGoalState_result&); + MasterClientService_setMasterGoalState_result() { + } + + virtual ~MasterClientService_setMasterGoalState_result() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_setMasterGoalState_result__isset __isset; + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + void __set_tnase(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException& val); + + bool operator == (const MasterClientService_setMasterGoalState_result & rhs) const + { + if (!(sec == rhs.sec)) + return false; + if (!(tnase == rhs.tnase)) + return false; + return true; + } + bool operator != (const MasterClientService_setMasterGoalState_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_setMasterGoalState_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_setMasterGoalState_presult__isset { + _MasterClientService_setMasterGoalState_presult__isset() : sec(false), tnase(false) {} + bool sec :1; + bool tnase :1; +} _MasterClientService_setMasterGoalState_presult__isset; + +class MasterClientService_setMasterGoalState_presult { + public: + + + virtual ~MasterClientService_setMasterGoalState_presult() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_setMasterGoalState_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _MasterClientService_shutdown_args__isset { + _MasterClientService_shutdown_args__isset() : tinfo(false), credentials(false), stopTabletServers(false) {} + bool tinfo :1; + bool credentials :1; + bool stopTabletServers :1; +} _MasterClientService_shutdown_args__isset; + +class MasterClientService_shutdown_args { + public: + + MasterClientService_shutdown_args(const MasterClientService_shutdown_args&); + MasterClientService_shutdown_args& operator=(const MasterClientService_shutdown_args&); + MasterClientService_shutdown_args() : stopTabletServers(0) { + } + + virtual ~MasterClientService_shutdown_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + bool stopTabletServers; + + _MasterClientService_shutdown_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_stopTabletServers(const bool val); + + bool operator == (const MasterClientService_shutdown_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(stopTabletServers == rhs.stopTabletServers)) + return false; + return true; + } + bool operator != (const MasterClientService_shutdown_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_shutdown_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class MasterClientService_shutdown_pargs { + public: + + + virtual ~MasterClientService_shutdown_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const bool* stopTabletServers; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_shutdown_result__isset { + _MasterClientService_shutdown_result__isset() : sec(false), tnase(false) {} + bool sec :1; + bool tnase :1; +} _MasterClientService_shutdown_result__isset; + +class MasterClientService_shutdown_result { + public: + + MasterClientService_shutdown_result(const MasterClientService_shutdown_result&); + MasterClientService_shutdown_result& operator=(const MasterClientService_shutdown_result&); + MasterClientService_shutdown_result() { + } + + virtual ~MasterClientService_shutdown_result() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_shutdown_result__isset __isset; + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + void __set_tnase(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException& val); + + bool operator == (const MasterClientService_shutdown_result & rhs) const + { + if (!(sec == rhs.sec)) + return false; + if (!(tnase == rhs.tnase)) + return false; + return true; + } + bool operator != (const MasterClientService_shutdown_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_shutdown_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_shutdown_presult__isset { + _MasterClientService_shutdown_presult__isset() : sec(false), tnase(false) {} + bool sec :1; + bool tnase :1; +} _MasterClientService_shutdown_presult__isset; + +class MasterClientService_shutdown_presult { + public: + + + virtual ~MasterClientService_shutdown_presult() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_shutdown_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _MasterClientService_shutdownTabletServer_args__isset { + _MasterClientService_shutdownTabletServer_args__isset() : tinfo(false), credentials(false), tabletServer(false), force(false) {} + bool tinfo :1; + bool credentials :1; + bool tabletServer :1; + bool force :1; +} _MasterClientService_shutdownTabletServer_args__isset; + +class MasterClientService_shutdownTabletServer_args { + public: + + MasterClientService_shutdownTabletServer_args(const MasterClientService_shutdownTabletServer_args&); + MasterClientService_shutdownTabletServer_args& operator=(const MasterClientService_shutdownTabletServer_args&); + MasterClientService_shutdownTabletServer_args() : tabletServer(), force(0) { + } + + virtual ~MasterClientService_shutdownTabletServer_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string tabletServer; + bool force; + + _MasterClientService_shutdownTabletServer_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_tabletServer(const std::string& val); + + void __set_force(const bool val); + + bool operator == (const MasterClientService_shutdownTabletServer_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(tabletServer == rhs.tabletServer)) + return false; + if (!(force == rhs.force)) + return false; + return true; + } + bool operator != (const MasterClientService_shutdownTabletServer_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_shutdownTabletServer_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class MasterClientService_shutdownTabletServer_pargs { + public: + + + virtual ~MasterClientService_shutdownTabletServer_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* tabletServer; + const bool* force; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_shutdownTabletServer_result__isset { + _MasterClientService_shutdownTabletServer_result__isset() : sec(false), tnase(false) {} + bool sec :1; + bool tnase :1; +} _MasterClientService_shutdownTabletServer_result__isset; + +class MasterClientService_shutdownTabletServer_result { + public: + + MasterClientService_shutdownTabletServer_result(const MasterClientService_shutdownTabletServer_result&); + MasterClientService_shutdownTabletServer_result& operator=(const MasterClientService_shutdownTabletServer_result&); + MasterClientService_shutdownTabletServer_result() { + } + + virtual ~MasterClientService_shutdownTabletServer_result() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_shutdownTabletServer_result__isset __isset; + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + void __set_tnase(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException& val); + + bool operator == (const MasterClientService_shutdownTabletServer_result & rhs) const + { + if (!(sec == rhs.sec)) + return false; + if (!(tnase == rhs.tnase)) + return false; + return true; + } + bool operator != (const MasterClientService_shutdownTabletServer_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_shutdownTabletServer_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_shutdownTabletServer_presult__isset { + _MasterClientService_shutdownTabletServer_presult__isset() : sec(false), tnase(false) {} + bool sec :1; + bool tnase :1; +} _MasterClientService_shutdownTabletServer_presult__isset; + +class MasterClientService_shutdownTabletServer_presult { + public: + + + virtual ~MasterClientService_shutdownTabletServer_presult() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_shutdownTabletServer_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _MasterClientService_setSystemProperty_args__isset { + _MasterClientService_setSystemProperty_args__isset() : tinfo(false), credentials(false), property(false), value(false) {} + bool tinfo :1; + bool credentials :1; + bool property :1; + bool value :1; +} _MasterClientService_setSystemProperty_args__isset; + +class MasterClientService_setSystemProperty_args { + public: + + MasterClientService_setSystemProperty_args(const MasterClientService_setSystemProperty_args&); + MasterClientService_setSystemProperty_args& operator=(const MasterClientService_setSystemProperty_args&); + MasterClientService_setSystemProperty_args() : property(), value() { + } + + virtual ~MasterClientService_setSystemProperty_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string property; + std::string value; + + _MasterClientService_setSystemProperty_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_property(const std::string& val); + + void __set_value(const std::string& val); + + bool operator == (const MasterClientService_setSystemProperty_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(property == rhs.property)) + return false; + if (!(value == rhs.value)) + return false; + return true; + } + bool operator != (const MasterClientService_setSystemProperty_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_setSystemProperty_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class MasterClientService_setSystemProperty_pargs { + public: + + + virtual ~MasterClientService_setSystemProperty_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* property; + const std::string* value; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_setSystemProperty_result__isset { + _MasterClientService_setSystemProperty_result__isset() : sec(false), tnase(false) {} + bool sec :1; + bool tnase :1; +} _MasterClientService_setSystemProperty_result__isset; + +class MasterClientService_setSystemProperty_result { + public: + + MasterClientService_setSystemProperty_result(const MasterClientService_setSystemProperty_result&); + MasterClientService_setSystemProperty_result& operator=(const MasterClientService_setSystemProperty_result&); + MasterClientService_setSystemProperty_result() { + } + + virtual ~MasterClientService_setSystemProperty_result() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_setSystemProperty_result__isset __isset; + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + void __set_tnase(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException& val); + + bool operator == (const MasterClientService_setSystemProperty_result & rhs) const + { + if (!(sec == rhs.sec)) + return false; + if (!(tnase == rhs.tnase)) + return false; + return true; + } + bool operator != (const MasterClientService_setSystemProperty_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_setSystemProperty_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_setSystemProperty_presult__isset { + _MasterClientService_setSystemProperty_presult__isset() : sec(false), tnase(false) {} + bool sec :1; + bool tnase :1; +} _MasterClientService_setSystemProperty_presult__isset; + +class MasterClientService_setSystemProperty_presult { + public: + + + virtual ~MasterClientService_setSystemProperty_presult() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_setSystemProperty_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _MasterClientService_removeSystemProperty_args__isset { + _MasterClientService_removeSystemProperty_args__isset() : tinfo(false), credentials(false), property(false) {} + bool tinfo :1; + bool credentials :1; + bool property :1; +} _MasterClientService_removeSystemProperty_args__isset; + +class MasterClientService_removeSystemProperty_args { + public: + + MasterClientService_removeSystemProperty_args(const MasterClientService_removeSystemProperty_args&); + MasterClientService_removeSystemProperty_args& operator=(const MasterClientService_removeSystemProperty_args&); + MasterClientService_removeSystemProperty_args() : property() { + } + + virtual ~MasterClientService_removeSystemProperty_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string property; + + _MasterClientService_removeSystemProperty_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_property(const std::string& val); + + bool operator == (const MasterClientService_removeSystemProperty_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(property == rhs.property)) + return false; + return true; + } + bool operator != (const MasterClientService_removeSystemProperty_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_removeSystemProperty_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class MasterClientService_removeSystemProperty_pargs { + public: + + + virtual ~MasterClientService_removeSystemProperty_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* property; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_removeSystemProperty_result__isset { + _MasterClientService_removeSystemProperty_result__isset() : sec(false), tnase(false) {} + bool sec :1; + bool tnase :1; +} _MasterClientService_removeSystemProperty_result__isset; + +class MasterClientService_removeSystemProperty_result { + public: + + MasterClientService_removeSystemProperty_result(const MasterClientService_removeSystemProperty_result&); + MasterClientService_removeSystemProperty_result& operator=(const MasterClientService_removeSystemProperty_result&); + MasterClientService_removeSystemProperty_result() { + } + + virtual ~MasterClientService_removeSystemProperty_result() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_removeSystemProperty_result__isset __isset; + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + void __set_tnase(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException& val); + + bool operator == (const MasterClientService_removeSystemProperty_result & rhs) const + { + if (!(sec == rhs.sec)) + return false; + if (!(tnase == rhs.tnase)) + return false; + return true; + } + bool operator != (const MasterClientService_removeSystemProperty_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_removeSystemProperty_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_removeSystemProperty_presult__isset { + _MasterClientService_removeSystemProperty_presult__isset() : sec(false), tnase(false) {} + bool sec :1; + bool tnase :1; +} _MasterClientService_removeSystemProperty_presult__isset; + +class MasterClientService_removeSystemProperty_presult { + public: + + + virtual ~MasterClientService_removeSystemProperty_presult() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_removeSystemProperty_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _MasterClientService_getMasterStats_args__isset { + _MasterClientService_getMasterStats_args__isset() : tinfo(false), credentials(false) {} + bool tinfo :1; + bool credentials :1; +} _MasterClientService_getMasterStats_args__isset; + +class MasterClientService_getMasterStats_args { + public: + + MasterClientService_getMasterStats_args(const MasterClientService_getMasterStats_args&); + MasterClientService_getMasterStats_args& operator=(const MasterClientService_getMasterStats_args&); + MasterClientService_getMasterStats_args() { + } + + virtual ~MasterClientService_getMasterStats_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + + _MasterClientService_getMasterStats_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + bool operator == (const MasterClientService_getMasterStats_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + return true; + } + bool operator != (const MasterClientService_getMasterStats_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_getMasterStats_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class MasterClientService_getMasterStats_pargs { + public: + + + virtual ~MasterClientService_getMasterStats_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_getMasterStats_result__isset { + _MasterClientService_getMasterStats_result__isset() : success(false), sec(false), tnase(false) {} + bool success :1; + bool sec :1; + bool tnase :1; +} _MasterClientService_getMasterStats_result__isset; + +class MasterClientService_getMasterStats_result { + public: + + MasterClientService_getMasterStats_result(const MasterClientService_getMasterStats_result&); + MasterClientService_getMasterStats_result& operator=(const MasterClientService_getMasterStats_result&); + MasterClientService_getMasterStats_result() { + } + + virtual ~MasterClientService_getMasterStats_result() throw(); + MasterMonitorInfo success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_getMasterStats_result__isset __isset; + + void __set_success(const MasterMonitorInfo& val); + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + void __set_tnase(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException& val); + + bool operator == (const MasterClientService_getMasterStats_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + if (!(tnase == rhs.tnase)) + return false; + return true; + } + bool operator != (const MasterClientService_getMasterStats_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_getMasterStats_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_getMasterStats_presult__isset { + _MasterClientService_getMasterStats_presult__isset() : success(false), sec(false), tnase(false) {} + bool success :1; + bool sec :1; + bool tnase :1; +} _MasterClientService_getMasterStats_presult__isset; + +class MasterClientService_getMasterStats_presult { + public: + + + virtual ~MasterClientService_getMasterStats_presult() throw(); + MasterMonitorInfo* success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_getMasterStats_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _MasterClientService_waitForBalance_args__isset { + _MasterClientService_waitForBalance_args__isset() : tinfo(false) {} + bool tinfo :1; +} _MasterClientService_waitForBalance_args__isset; + +class MasterClientService_waitForBalance_args { + public: + + MasterClientService_waitForBalance_args(const MasterClientService_waitForBalance_args&); + MasterClientService_waitForBalance_args& operator=(const MasterClientService_waitForBalance_args&); + MasterClientService_waitForBalance_args() { + } + + virtual ~MasterClientService_waitForBalance_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + + _MasterClientService_waitForBalance_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + bool operator == (const MasterClientService_waitForBalance_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + return true; + } + bool operator != (const MasterClientService_waitForBalance_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_waitForBalance_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class MasterClientService_waitForBalance_pargs { + public: + + + virtual ~MasterClientService_waitForBalance_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_waitForBalance_result__isset { + _MasterClientService_waitForBalance_result__isset() : tnase(false) {} + bool tnase :1; +} _MasterClientService_waitForBalance_result__isset; + +class MasterClientService_waitForBalance_result { + public: + + MasterClientService_waitForBalance_result(const MasterClientService_waitForBalance_result&); + MasterClientService_waitForBalance_result& operator=(const MasterClientService_waitForBalance_result&); + MasterClientService_waitForBalance_result() { + } + + virtual ~MasterClientService_waitForBalance_result() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_waitForBalance_result__isset __isset; + + void __set_tnase(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException& val); + + bool operator == (const MasterClientService_waitForBalance_result & rhs) const + { + if (!(tnase == rhs.tnase)) + return false; + return true; + } + bool operator != (const MasterClientService_waitForBalance_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_waitForBalance_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_waitForBalance_presult__isset { + _MasterClientService_waitForBalance_presult__isset() : tnase(false) {} + bool tnase :1; +} _MasterClientService_waitForBalance_presult__isset; + +class MasterClientService_waitForBalance_presult { + public: + + + virtual ~MasterClientService_waitForBalance_presult() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_waitForBalance_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _MasterClientService_reportSplitExtent_args__isset { + _MasterClientService_reportSplitExtent_args__isset() : tinfo(false), credentials(false), serverName(false), split(false) {} + bool tinfo :1; + bool credentials :1; + bool serverName :1; + bool split :1; +} _MasterClientService_reportSplitExtent_args__isset; + +class MasterClientService_reportSplitExtent_args { + public: + + MasterClientService_reportSplitExtent_args(const MasterClientService_reportSplitExtent_args&); + MasterClientService_reportSplitExtent_args& operator=(const MasterClientService_reportSplitExtent_args&); + MasterClientService_reportSplitExtent_args() : serverName() { + } + + virtual ~MasterClientService_reportSplitExtent_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string serverName; + TabletSplit split; + + _MasterClientService_reportSplitExtent_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_serverName(const std::string& val); + + void __set_split(const TabletSplit& val); + + bool operator == (const MasterClientService_reportSplitExtent_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(serverName == rhs.serverName)) + return false; + if (!(split == rhs.split)) + return false; + return true; + } + bool operator != (const MasterClientService_reportSplitExtent_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_reportSplitExtent_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class MasterClientService_reportSplitExtent_pargs { + public: + + + virtual ~MasterClientService_reportSplitExtent_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* serverName; + const TabletSplit* split; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_reportTabletStatus_args__isset { + _MasterClientService_reportTabletStatus_args__isset() : tinfo(false), credentials(false), serverName(false), status(false), tablet(false) {} + bool tinfo :1; + bool credentials :1; + bool serverName :1; + bool status :1; + bool tablet :1; +} _MasterClientService_reportTabletStatus_args__isset; + +class MasterClientService_reportTabletStatus_args { + public: + + MasterClientService_reportTabletStatus_args(const MasterClientService_reportTabletStatus_args&); + MasterClientService_reportTabletStatus_args& operator=(const MasterClientService_reportTabletStatus_args&); + MasterClientService_reportTabletStatus_args() : serverName(), status((TabletLoadState::type)0) { + } + + virtual ~MasterClientService_reportTabletStatus_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string serverName; + TabletLoadState::type status; + ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent tablet; + + _MasterClientService_reportTabletStatus_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_serverName(const std::string& val); + + void __set_status(const TabletLoadState::type val); + + void __set_tablet(const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& val); + + bool operator == (const MasterClientService_reportTabletStatus_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(serverName == rhs.serverName)) + return false; + if (!(status == rhs.status)) + return false; + if (!(tablet == rhs.tablet)) + return false; + return true; + } + bool operator != (const MasterClientService_reportTabletStatus_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_reportTabletStatus_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class MasterClientService_reportTabletStatus_pargs { + public: + + + virtual ~MasterClientService_reportTabletStatus_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* serverName; + const TabletLoadState::type* status; + const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent* tablet; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_getActiveTservers_args__isset { + _MasterClientService_getActiveTservers_args__isset() : tinfo(false), credentials(false) {} + bool tinfo :1; + bool credentials :1; +} _MasterClientService_getActiveTservers_args__isset; + +class MasterClientService_getActiveTservers_args { + public: + + MasterClientService_getActiveTservers_args(const MasterClientService_getActiveTservers_args&); + MasterClientService_getActiveTservers_args& operator=(const MasterClientService_getActiveTservers_args&); + MasterClientService_getActiveTservers_args() { + } + + virtual ~MasterClientService_getActiveTservers_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + + _MasterClientService_getActiveTservers_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + bool operator == (const MasterClientService_getActiveTservers_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + return true; + } + bool operator != (const MasterClientService_getActiveTservers_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_getActiveTservers_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class MasterClientService_getActiveTservers_pargs { + public: + + + virtual ~MasterClientService_getActiveTservers_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_getActiveTservers_result__isset { + _MasterClientService_getActiveTservers_result__isset() : success(false), sec(false), tnase(false) {} + bool success :1; + bool sec :1; + bool tnase :1; +} _MasterClientService_getActiveTservers_result__isset; + +class MasterClientService_getActiveTservers_result { + public: + + MasterClientService_getActiveTservers_result(const MasterClientService_getActiveTservers_result&); + MasterClientService_getActiveTservers_result& operator=(const MasterClientService_getActiveTservers_result&); + MasterClientService_getActiveTservers_result() { + } + + virtual ~MasterClientService_getActiveTservers_result() throw(); + std::vector success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_getActiveTservers_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + void __set_tnase(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException& val); + + bool operator == (const MasterClientService_getActiveTservers_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + if (!(tnase == rhs.tnase)) + return false; + return true; + } + bool operator != (const MasterClientService_getActiveTservers_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_getActiveTservers_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_getActiveTservers_presult__isset { + _MasterClientService_getActiveTservers_presult__isset() : success(false), sec(false), tnase(false) {} + bool success :1; + bool sec :1; + bool tnase :1; +} _MasterClientService_getActiveTservers_presult__isset; + +class MasterClientService_getActiveTservers_presult { + public: + + + virtual ~MasterClientService_getActiveTservers_presult() throw(); + std::vector * success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_getActiveTservers_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _MasterClientService_getDelegationToken_args__isset { + _MasterClientService_getDelegationToken_args__isset() : tinfo(false), credentials(false), cfg(false) {} + bool tinfo :1; + bool credentials :1; + bool cfg :1; +} _MasterClientService_getDelegationToken_args__isset; + +class MasterClientService_getDelegationToken_args { + public: + + MasterClientService_getDelegationToken_args(const MasterClientService_getDelegationToken_args&); + MasterClientService_getDelegationToken_args& operator=(const MasterClientService_getDelegationToken_args&); + MasterClientService_getDelegationToken_args() { + } + + virtual ~MasterClientService_getDelegationToken_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationTokenConfig cfg; + + _MasterClientService_getDelegationToken_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_cfg(const ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationTokenConfig& val); + + bool operator == (const MasterClientService_getDelegationToken_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(cfg == rhs.cfg)) + return false; + return true; + } + bool operator != (const MasterClientService_getDelegationToken_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_getDelegationToken_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class MasterClientService_getDelegationToken_pargs { + public: + + + virtual ~MasterClientService_getDelegationToken_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationTokenConfig* cfg; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_getDelegationToken_result__isset { + _MasterClientService_getDelegationToken_result__isset() : success(false), sec(false), tnase(false) {} + bool success :1; + bool sec :1; + bool tnase :1; +} _MasterClientService_getDelegationToken_result__isset; + +class MasterClientService_getDelegationToken_result { + public: + + MasterClientService_getDelegationToken_result(const MasterClientService_getDelegationToken_result&); + MasterClientService_getDelegationToken_result& operator=(const MasterClientService_getDelegationToken_result&); + MasterClientService_getDelegationToken_result() { + } + + virtual ~MasterClientService_getDelegationToken_result() throw(); + ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationToken success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_getDelegationToken_result__isset __isset; + + void __set_success(const ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationToken& val); + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + void __set_tnase(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException& val); + + bool operator == (const MasterClientService_getDelegationToken_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + if (!(tnase == rhs.tnase)) + return false; + return true; + } + bool operator != (const MasterClientService_getDelegationToken_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_getDelegationToken_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_getDelegationToken_presult__isset { + _MasterClientService_getDelegationToken_presult__isset() : success(false), sec(false), tnase(false) {} + bool success :1; + bool sec :1; + bool tnase :1; +} _MasterClientService_getDelegationToken_presult__isset; + +class MasterClientService_getDelegationToken_presult { + public: + + + virtual ~MasterClientService_getDelegationToken_presult() throw(); + ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationToken* success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_getDelegationToken_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _MasterClientService_drainReplicationTable_args__isset { + _MasterClientService_drainReplicationTable_args__isset() : tfino(false), credentials(false), tableName(false), logsToWatch(false) {} + bool tfino :1; + bool credentials :1; + bool tableName :1; + bool logsToWatch :1; +} _MasterClientService_drainReplicationTable_args__isset; + +class MasterClientService_drainReplicationTable_args { + public: + + MasterClientService_drainReplicationTable_args(const MasterClientService_drainReplicationTable_args&); + MasterClientService_drainReplicationTable_args& operator=(const MasterClientService_drainReplicationTable_args&); + MasterClientService_drainReplicationTable_args() : tableName() { + } + + virtual ~MasterClientService_drainReplicationTable_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tfino; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string tableName; + std::set logsToWatch; + + _MasterClientService_drainReplicationTable_args__isset __isset; + + void __set_tfino(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_tableName(const std::string& val); + + void __set_logsToWatch(const std::set & val); + + bool operator == (const MasterClientService_drainReplicationTable_args & rhs) const + { + if (!(tfino == rhs.tfino)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(tableName == rhs.tableName)) + return false; + if (!(logsToWatch == rhs.logsToWatch)) + return false; + return true; + } + bool operator != (const MasterClientService_drainReplicationTable_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_drainReplicationTable_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class MasterClientService_drainReplicationTable_pargs { + public: + + + virtual ~MasterClientService_drainReplicationTable_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tfino; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* tableName; + const std::set * logsToWatch; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_drainReplicationTable_result__isset { + _MasterClientService_drainReplicationTable_result__isset() : success(false), tnase(false) {} + bool success :1; + bool tnase :1; +} _MasterClientService_drainReplicationTable_result__isset; + +class MasterClientService_drainReplicationTable_result { + public: + + MasterClientService_drainReplicationTable_result(const MasterClientService_drainReplicationTable_result&); + MasterClientService_drainReplicationTable_result& operator=(const MasterClientService_drainReplicationTable_result&); + MasterClientService_drainReplicationTable_result() : success(0) { + } + + virtual ~MasterClientService_drainReplicationTable_result() throw(); + bool success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_drainReplicationTable_result__isset __isset; + + void __set_success(const bool val); + + void __set_tnase(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException& val); + + bool operator == (const MasterClientService_drainReplicationTable_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(tnase == rhs.tnase)) + return false; + return true; + } + bool operator != (const MasterClientService_drainReplicationTable_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterClientService_drainReplicationTable_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _MasterClientService_drainReplicationTable_presult__isset { + _MasterClientService_drainReplicationTable_presult__isset() : success(false), tnase(false) {} + bool success :1; + bool tnase :1; +} _MasterClientService_drainReplicationTable_presult__isset; + +class MasterClientService_drainReplicationTable_presult { + public: + + + virtual ~MasterClientService_drainReplicationTable_presult() throw(); + bool* success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException tnase; + + _MasterClientService_drainReplicationTable_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +class MasterClientServiceClient : virtual public MasterClientServiceIf, public FateServiceClient { + public: + MasterClientServiceClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) : + FateServiceClient(prot, prot) {} + MasterClientServiceClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) : FateServiceClient(iprot, oprot) {} + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + return piprot_; + } + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { + return poprot_; + } + int64_t initiateFlush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName); + void send_initiateFlush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName); + int64_t recv_initiateFlush(); + void waitForFlush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& startRow, const std::string& endRow, const int64_t flushID, const int64_t maxLoops); + void send_waitForFlush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& startRow, const std::string& endRow, const int64_t flushID, const int64_t maxLoops); + void recv_waitForFlush(); + void setTableProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& property, const std::string& value); + void send_setTableProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& property, const std::string& value); + void recv_setTableProperty(); + void removeTableProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& property); + void send_removeTableProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& property); + void recv_removeTableProperty(); + void setNamespaceProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns, const std::string& property, const std::string& value); + void send_setNamespaceProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns, const std::string& property, const std::string& value); + void recv_setNamespaceProperty(); + void removeNamespaceProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns, const std::string& property); + void send_removeNamespaceProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns, const std::string& property); + void recv_removeNamespaceProperty(); + void setMasterGoalState(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const MasterGoalState::type state); + void send_setMasterGoalState(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const MasterGoalState::type state); + void recv_setMasterGoalState(); + void shutdown(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const bool stopTabletServers); + void send_shutdown(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const bool stopTabletServers); + void recv_shutdown(); + void shutdownTabletServer(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tabletServer, const bool force); + void send_shutdownTabletServer(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tabletServer, const bool force); + void recv_shutdownTabletServer(); + void setSystemProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& property, const std::string& value); + void send_setSystemProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& property, const std::string& value); + void recv_setSystemProperty(); + void removeSystemProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& property); + void send_removeSystemProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& property); + void recv_removeSystemProperty(); + void getMasterStats(MasterMonitorInfo& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void send_getMasterStats(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void recv_getMasterStats(MasterMonitorInfo& _return); + void waitForBalance(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo); + void send_waitForBalance(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo); + void recv_waitForBalance(); + void reportSplitExtent(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& serverName, const TabletSplit& split); + void send_reportSplitExtent(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& serverName, const TabletSplit& split); + void reportTabletStatus(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& serverName, const TabletLoadState::type status, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& tablet); + void send_reportTabletStatus(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& serverName, const TabletLoadState::type status, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& tablet); + void getActiveTservers(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void send_getActiveTservers(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void recv_getActiveTservers(std::vector & _return); + void getDelegationToken( ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationToken& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationTokenConfig& cfg); + void send_getDelegationToken(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationTokenConfig& cfg); + void recv_getDelegationToken( ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationToken& _return); + bool drainReplicationTable(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tfino, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::set & logsToWatch); + void send_drainReplicationTable(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tfino, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::set & logsToWatch); + bool recv_drainReplicationTable(); +}; + +class MasterClientServiceProcessor : public FateServiceProcessor { + protected: + std::shared_ptr iface_; + virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext); + private: + typedef void (MasterClientServiceProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*); + typedef std::map ProcessMap; + ProcessMap processMap_; + void process_initiateFlush(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_waitForFlush(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_setTableProperty(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_removeTableProperty(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_setNamespaceProperty(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_removeNamespaceProperty(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_setMasterGoalState(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_shutdown(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_shutdownTabletServer(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_setSystemProperty(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_removeSystemProperty(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getMasterStats(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_waitForBalance(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_reportSplitExtent(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_reportTabletStatus(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getActiveTservers(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getDelegationToken(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_drainReplicationTable(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + public: + MasterClientServiceProcessor(std::shared_ptr iface) : + FateServiceProcessor(iface), + iface_(iface) { + processMap_["initiateFlush"] = &MasterClientServiceProcessor::process_initiateFlush; + processMap_["waitForFlush"] = &MasterClientServiceProcessor::process_waitForFlush; + processMap_["setTableProperty"] = &MasterClientServiceProcessor::process_setTableProperty; + processMap_["removeTableProperty"] = &MasterClientServiceProcessor::process_removeTableProperty; + processMap_["setNamespaceProperty"] = &MasterClientServiceProcessor::process_setNamespaceProperty; + processMap_["removeNamespaceProperty"] = &MasterClientServiceProcessor::process_removeNamespaceProperty; + processMap_["setMasterGoalState"] = &MasterClientServiceProcessor::process_setMasterGoalState; + processMap_["shutdown"] = &MasterClientServiceProcessor::process_shutdown; + processMap_["shutdownTabletServer"] = &MasterClientServiceProcessor::process_shutdownTabletServer; + processMap_["setSystemProperty"] = &MasterClientServiceProcessor::process_setSystemProperty; + processMap_["removeSystemProperty"] = &MasterClientServiceProcessor::process_removeSystemProperty; + processMap_["getMasterStats"] = &MasterClientServiceProcessor::process_getMasterStats; + processMap_["waitForBalance"] = &MasterClientServiceProcessor::process_waitForBalance; + processMap_["reportSplitExtent"] = &MasterClientServiceProcessor::process_reportSplitExtent; + processMap_["reportTabletStatus"] = &MasterClientServiceProcessor::process_reportTabletStatus; + processMap_["getActiveTservers"] = &MasterClientServiceProcessor::process_getActiveTservers; + processMap_["getDelegationToken"] = &MasterClientServiceProcessor::process_getDelegationToken; + processMap_["drainReplicationTable"] = &MasterClientServiceProcessor::process_drainReplicationTable; + } + + virtual ~MasterClientServiceProcessor() {} +}; + +class MasterClientServiceProcessorFactory : public ::apache::thrift::TProcessorFactory { + public: + MasterClientServiceProcessorFactory(const std::shared_ptr< MasterClientServiceIfFactory >& handlerFactory) : + handlerFactory_(handlerFactory) {} + + std::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo& connInfo); + + protected: + std::shared_ptr< MasterClientServiceIfFactory > handlerFactory_; +}; + +class MasterClientServiceMultiface : virtual public MasterClientServiceIf, public FateServiceMultiface { + public: + MasterClientServiceMultiface(std::vector >& ifaces) : ifaces_(ifaces) { + std::vector >::iterator iter; + for (iter = ifaces.begin(); iter != ifaces.end(); ++iter) { + FateServiceMultiface::add(*iter); + } + } + virtual ~MasterClientServiceMultiface() {} + protected: + std::vector > ifaces_; + MasterClientServiceMultiface() {} + void add(std::shared_ptr iface) { + FateServiceMultiface::add(iface); + ifaces_.push_back(iface); + } + public: + int64_t initiateFlush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->initiateFlush(tinfo, credentials, tableName); + } + return ifaces_[i]->initiateFlush(tinfo, credentials, tableName); + } + + void waitForFlush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& startRow, const std::string& endRow, const int64_t flushID, const int64_t maxLoops) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->waitForFlush(tinfo, credentials, tableName, startRow, endRow, flushID, maxLoops); + } + ifaces_[i]->waitForFlush(tinfo, credentials, tableName, startRow, endRow, flushID, maxLoops); + } + + void setTableProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& property, const std::string& value) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->setTableProperty(tinfo, credentials, tableName, property, value); + } + ifaces_[i]->setTableProperty(tinfo, credentials, tableName, property, value); + } + + void removeTableProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& property) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->removeTableProperty(tinfo, credentials, tableName, property); + } + ifaces_[i]->removeTableProperty(tinfo, credentials, tableName, property); + } + + void setNamespaceProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns, const std::string& property, const std::string& value) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->setNamespaceProperty(tinfo, credentials, ns, property, value); + } + ifaces_[i]->setNamespaceProperty(tinfo, credentials, ns, property, value); + } + + void removeNamespaceProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns, const std::string& property) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->removeNamespaceProperty(tinfo, credentials, ns, property); + } + ifaces_[i]->removeNamespaceProperty(tinfo, credentials, ns, property); + } + + void setMasterGoalState(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const MasterGoalState::type state) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->setMasterGoalState(tinfo, credentials, state); + } + ifaces_[i]->setMasterGoalState(tinfo, credentials, state); + } + + void shutdown(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const bool stopTabletServers) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->shutdown(tinfo, credentials, stopTabletServers); + } + ifaces_[i]->shutdown(tinfo, credentials, stopTabletServers); + } + + void shutdownTabletServer(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tabletServer, const bool force) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->shutdownTabletServer(tinfo, credentials, tabletServer, force); + } + ifaces_[i]->shutdownTabletServer(tinfo, credentials, tabletServer, force); + } + + void setSystemProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& property, const std::string& value) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->setSystemProperty(tinfo, credentials, property, value); + } + ifaces_[i]->setSystemProperty(tinfo, credentials, property, value); + } + + void removeSystemProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& property) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->removeSystemProperty(tinfo, credentials, property); + } + ifaces_[i]->removeSystemProperty(tinfo, credentials, property); + } + + void getMasterStats(MasterMonitorInfo& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getMasterStats(_return, tinfo, credentials); + } + ifaces_[i]->getMasterStats(_return, tinfo, credentials); + return; + } + + void waitForBalance(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->waitForBalance(tinfo); + } + ifaces_[i]->waitForBalance(tinfo); + } + + void reportSplitExtent(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& serverName, const TabletSplit& split) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->reportSplitExtent(tinfo, credentials, serverName, split); + } + ifaces_[i]->reportSplitExtent(tinfo, credentials, serverName, split); + } + + void reportTabletStatus(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& serverName, const TabletLoadState::type status, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& tablet) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->reportTabletStatus(tinfo, credentials, serverName, status, tablet); + } + ifaces_[i]->reportTabletStatus(tinfo, credentials, serverName, status, tablet); + } + + void getActiveTservers(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getActiveTservers(_return, tinfo, credentials); + } + ifaces_[i]->getActiveTservers(_return, tinfo, credentials); + return; + } + + void getDelegationToken( ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationToken& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationTokenConfig& cfg) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getDelegationToken(_return, tinfo, credentials, cfg); + } + ifaces_[i]->getDelegationToken(_return, tinfo, credentials, cfg); + return; + } + + bool drainReplicationTable(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tfino, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::set & logsToWatch) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->drainReplicationTable(tfino, credentials, tableName, logsToWatch); + } + return ifaces_[i]->drainReplicationTable(tfino, credentials, tableName, logsToWatch); + } + +}; + +// The 'concurrent' client is a thread safe client that correctly handles +// out of order responses. It is slower than the regular client, so should +// only be used when you need to share a connection among multiple threads +class MasterClientServiceConcurrentClient : virtual public MasterClientServiceIf, public FateServiceConcurrentClient { + public: + MasterClientServiceConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) : + FateServiceConcurrentClient(prot, prot) {} + MasterClientServiceConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) : FateServiceConcurrentClient(iprot, oprot) {} + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + return piprot_; + } + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { + return poprot_; + } + int64_t initiateFlush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName); + int32_t send_initiateFlush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName); + int64_t recv_initiateFlush(const int32_t seqid); + void waitForFlush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& startRow, const std::string& endRow, const int64_t flushID, const int64_t maxLoops); + int32_t send_waitForFlush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& startRow, const std::string& endRow, const int64_t flushID, const int64_t maxLoops); + void recv_waitForFlush(const int32_t seqid); + void setTableProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& property, const std::string& value); + int32_t send_setTableProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& property, const std::string& value); + void recv_setTableProperty(const int32_t seqid); + void removeTableProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& property); + int32_t send_removeTableProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& property); + void recv_removeTableProperty(const int32_t seqid); + void setNamespaceProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns, const std::string& property, const std::string& value); + int32_t send_setNamespaceProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns, const std::string& property, const std::string& value); + void recv_setNamespaceProperty(const int32_t seqid); + void removeNamespaceProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns, const std::string& property); + int32_t send_removeNamespaceProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns, const std::string& property); + void recv_removeNamespaceProperty(const int32_t seqid); + void setMasterGoalState(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const MasterGoalState::type state); + int32_t send_setMasterGoalState(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const MasterGoalState::type state); + void recv_setMasterGoalState(const int32_t seqid); + void shutdown(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const bool stopTabletServers); + int32_t send_shutdown(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const bool stopTabletServers); + void recv_shutdown(const int32_t seqid); + void shutdownTabletServer(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tabletServer, const bool force); + int32_t send_shutdownTabletServer(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tabletServer, const bool force); + void recv_shutdownTabletServer(const int32_t seqid); + void setSystemProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& property, const std::string& value); + int32_t send_setSystemProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& property, const std::string& value); + void recv_setSystemProperty(const int32_t seqid); + void removeSystemProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& property); + int32_t send_removeSystemProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& property); + void recv_removeSystemProperty(const int32_t seqid); + void getMasterStats(MasterMonitorInfo& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + int32_t send_getMasterStats(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void recv_getMasterStats(MasterMonitorInfo& _return, const int32_t seqid); + void waitForBalance(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo); + int32_t send_waitForBalance(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo); + void recv_waitForBalance(const int32_t seqid); + void reportSplitExtent(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& serverName, const TabletSplit& split); + void send_reportSplitExtent(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& serverName, const TabletSplit& split); + void reportTabletStatus(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& serverName, const TabletLoadState::type status, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& tablet); + void send_reportTabletStatus(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& serverName, const TabletLoadState::type status, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& tablet); + void getActiveTservers(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + int32_t send_getActiveTservers(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void recv_getActiveTservers(std::vector & _return, const int32_t seqid); + void getDelegationToken( ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationToken& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationTokenConfig& cfg); + int32_t send_getDelegationToken(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationTokenConfig& cfg); + void recv_getDelegationToken( ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationToken& _return, const int32_t seqid); + bool drainReplicationTable(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tfino, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::set & logsToWatch); + int32_t send_drainReplicationTable(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tfino, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::set & logsToWatch); + bool recv_drainReplicationTable(const int32_t seqid); +}; + +#ifdef _MSC_VER + #pragma warning( pop ) +#endif + +}}}}}} // namespace + +#endif diff --git a/include/data/extern/thriftv2/ReplicationCoordinator.h b/include/data/extern/thriftv2/ReplicationCoordinator.h new file mode 100644 index 00000000..339f60df --- /dev/null +++ b/include/data/extern/thriftv2/ReplicationCoordinator.h @@ -0,0 +1,311 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef ReplicationCoordinator_V2H +#define ReplicationCoordinator_V2H + +#include +#include +#include "replication_types.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace replication { namespace thrift { + +#ifdef _MSC_VER + #pragma warning( push ) + #pragma warning (disable : 4250 ) //inheriting methods via dominance +#endif + +class ReplicationCoordinatorIf { + public: + virtual ~ReplicationCoordinatorIf() {} + virtual void getServicerAddress(std::string& _return, const std::string& remoteTableId, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) = 0; +}; + +class ReplicationCoordinatorIfFactory { + public: + typedef ReplicationCoordinatorIf Handler; + + virtual ~ReplicationCoordinatorIfFactory() {} + + virtual ReplicationCoordinatorIf* getHandler(const ::apache::thrift::TConnectionInfo& connInfo) = 0; + virtual void releaseHandler(ReplicationCoordinatorIf* /* handler */) = 0; +}; + +class ReplicationCoordinatorIfSingletonFactory : virtual public ReplicationCoordinatorIfFactory { + public: + ReplicationCoordinatorIfSingletonFactory(const std::shared_ptr& iface) : iface_(iface) {} + virtual ~ReplicationCoordinatorIfSingletonFactory() {} + + virtual ReplicationCoordinatorIf* getHandler(const ::apache::thrift::TConnectionInfo&) { + return iface_.get(); + } + virtual void releaseHandler(ReplicationCoordinatorIf* /* handler */) {} + + protected: + std::shared_ptr iface_; +}; + +class ReplicationCoordinatorNull : virtual public ReplicationCoordinatorIf { + public: + virtual ~ReplicationCoordinatorNull() {} + void getServicerAddress(std::string& /* _return */, const std::string& /* remoteTableId */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */) { + return; + } +}; + +typedef struct _ReplicationCoordinator_getServicerAddress_args__isset { + _ReplicationCoordinator_getServicerAddress_args__isset() : remoteTableId(false), credentials(false) {} + bool remoteTableId :1; + bool credentials :1; +} _ReplicationCoordinator_getServicerAddress_args__isset; + +class ReplicationCoordinator_getServicerAddress_args { + public: + + ReplicationCoordinator_getServicerAddress_args(const ReplicationCoordinator_getServicerAddress_args&); + ReplicationCoordinator_getServicerAddress_args& operator=(const ReplicationCoordinator_getServicerAddress_args&); + ReplicationCoordinator_getServicerAddress_args() : remoteTableId() { + } + + virtual ~ReplicationCoordinator_getServicerAddress_args() throw(); + std::string remoteTableId; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + + _ReplicationCoordinator_getServicerAddress_args__isset __isset; + + void __set_remoteTableId(const std::string& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + bool operator == (const ReplicationCoordinator_getServicerAddress_args & rhs) const + { + if (!(remoteTableId == rhs.remoteTableId)) + return false; + if (!(credentials == rhs.credentials)) + return false; + return true; + } + bool operator != (const ReplicationCoordinator_getServicerAddress_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ReplicationCoordinator_getServicerAddress_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ReplicationCoordinator_getServicerAddress_pargs { + public: + + + virtual ~ReplicationCoordinator_getServicerAddress_pargs() throw(); + const std::string* remoteTableId; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ReplicationCoordinator_getServicerAddress_result__isset { + _ReplicationCoordinator_getServicerAddress_result__isset() : success(false), e(false) {} + bool success :1; + bool e :1; +} _ReplicationCoordinator_getServicerAddress_result__isset; + +class ReplicationCoordinator_getServicerAddress_result { + public: + + ReplicationCoordinator_getServicerAddress_result(const ReplicationCoordinator_getServicerAddress_result&); + ReplicationCoordinator_getServicerAddress_result& operator=(const ReplicationCoordinator_getServicerAddress_result&); + ReplicationCoordinator_getServicerAddress_result() : success() { + } + + virtual ~ReplicationCoordinator_getServicerAddress_result() throw(); + std::string success; + ReplicationCoordinatorException e; + + _ReplicationCoordinator_getServicerAddress_result__isset __isset; + + void __set_success(const std::string& val); + + void __set_e(const ReplicationCoordinatorException& val); + + bool operator == (const ReplicationCoordinator_getServicerAddress_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(e == rhs.e)) + return false; + return true; + } + bool operator != (const ReplicationCoordinator_getServicerAddress_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ReplicationCoordinator_getServicerAddress_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ReplicationCoordinator_getServicerAddress_presult__isset { + _ReplicationCoordinator_getServicerAddress_presult__isset() : success(false), e(false) {} + bool success :1; + bool e :1; +} _ReplicationCoordinator_getServicerAddress_presult__isset; + +class ReplicationCoordinator_getServicerAddress_presult { + public: + + + virtual ~ReplicationCoordinator_getServicerAddress_presult() throw(); + std::string* success; + ReplicationCoordinatorException e; + + _ReplicationCoordinator_getServicerAddress_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +class ReplicationCoordinatorClient : virtual public ReplicationCoordinatorIf { + public: + ReplicationCoordinatorClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot); + } + ReplicationCoordinatorClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + setProtocol(iprot,oprot); + } + private: + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot,prot); + } + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + piprot_=iprot; + poprot_=oprot; + iprot_ = iprot.get(); + oprot_ = oprot.get(); + } + public: + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + return piprot_; + } + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { + return poprot_; + } + void getServicerAddress(std::string& _return, const std::string& remoteTableId, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void send_getServicerAddress(const std::string& remoteTableId, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void recv_getServicerAddress(std::string& _return); + protected: + std::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_; + std::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_; + ::apache::thrift::protocol::TProtocol* iprot_; + ::apache::thrift::protocol::TProtocol* oprot_; +}; + +class ReplicationCoordinatorProcessor : public ::apache::thrift::TDispatchProcessor { + protected: + std::shared_ptr iface_; + virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext); + private: + typedef void (ReplicationCoordinatorProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*); + typedef std::map ProcessMap; + ProcessMap processMap_; + void process_getServicerAddress(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + public: + ReplicationCoordinatorProcessor(std::shared_ptr iface) : + iface_(iface) { + processMap_["getServicerAddress"] = &ReplicationCoordinatorProcessor::process_getServicerAddress; + } + + virtual ~ReplicationCoordinatorProcessor() {} +}; + +class ReplicationCoordinatorProcessorFactory : public ::apache::thrift::TProcessorFactory { + public: + ReplicationCoordinatorProcessorFactory(const std::shared_ptr< ReplicationCoordinatorIfFactory >& handlerFactory) : + handlerFactory_(handlerFactory) {} + + std::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo& connInfo); + + protected: + std::shared_ptr< ReplicationCoordinatorIfFactory > handlerFactory_; +}; + +class ReplicationCoordinatorMultiface : virtual public ReplicationCoordinatorIf { + public: + ReplicationCoordinatorMultiface(std::vector >& ifaces) : ifaces_(ifaces) { + } + virtual ~ReplicationCoordinatorMultiface() {} + protected: + std::vector > ifaces_; + ReplicationCoordinatorMultiface() {} + void add(std::shared_ptr iface) { + ifaces_.push_back(iface); + } + public: + void getServicerAddress(std::string& _return, const std::string& remoteTableId, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getServicerAddress(_return, remoteTableId, credentials); + } + ifaces_[i]->getServicerAddress(_return, remoteTableId, credentials); + return; + } + +}; + +// The 'concurrent' client is a thread safe client that correctly handles +// out of order responses. It is slower than the regular client, so should +// only be used when you need to share a connection among multiple threads +class ReplicationCoordinatorConcurrentClient : virtual public ReplicationCoordinatorIf { + public: + ReplicationCoordinatorConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot); + } + ReplicationCoordinatorConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + setProtocol(iprot,oprot); + } + private: + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot,prot); + } + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + piprot_=iprot; + poprot_=oprot; + iprot_ = iprot.get(); + oprot_ = oprot.get(); + } + public: + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + return piprot_; + } + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { + return poprot_; + } + void getServicerAddress(std::string& _return, const std::string& remoteTableId, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + int32_t send_getServicerAddress(const std::string& remoteTableId, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void recv_getServicerAddress(std::string& _return, const int32_t seqid); + protected: + std::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_; + std::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_; + ::apache::thrift::protocol::TProtocol* iprot_; + ::apache::thrift::protocol::TProtocol* oprot_; + ::apache::thrift::async::TConcurrentClientSyncInfo sync_; +}; + +#ifdef _MSC_VER + #pragma warning( pop ) +#endif + +}}}}}} // namespace + +#endif diff --git a/include/data/extern/thriftv2/ReplicationServicer.h b/include/data/extern/thriftv2/ReplicationServicer.h new file mode 100644 index 00000000..06873523 --- /dev/null +++ b/include/data/extern/thriftv2/ReplicationServicer.h @@ -0,0 +1,466 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef ReplicationServicer_V2H +#define ReplicationServicer_V2H + +#include +#include +#include "replication_types.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace replication { namespace thrift { + +#ifdef _MSC_VER + #pragma warning( push ) + #pragma warning (disable : 4250 ) //inheriting methods via dominance +#endif + +class ReplicationServicerIf { + public: + virtual ~ReplicationServicerIf() {} + virtual int64_t replicateLog(const std::string& remoteTableId, const WalEdits& data, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) = 0; + virtual int64_t replicateKeyValues(const std::string& remoteTableId, const KeyValues& data, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) = 0; +}; + +class ReplicationServicerIfFactory { + public: + typedef ReplicationServicerIf Handler; + + virtual ~ReplicationServicerIfFactory() {} + + virtual ReplicationServicerIf* getHandler(const ::apache::thrift::TConnectionInfo& connInfo) = 0; + virtual void releaseHandler(ReplicationServicerIf* /* handler */) = 0; +}; + +class ReplicationServicerIfSingletonFactory : virtual public ReplicationServicerIfFactory { + public: + ReplicationServicerIfSingletonFactory(const std::shared_ptr& iface) : iface_(iface) {} + virtual ~ReplicationServicerIfSingletonFactory() {} + + virtual ReplicationServicerIf* getHandler(const ::apache::thrift::TConnectionInfo&) { + return iface_.get(); + } + virtual void releaseHandler(ReplicationServicerIf* /* handler */) {} + + protected: + std::shared_ptr iface_; +}; + +class ReplicationServicerNull : virtual public ReplicationServicerIf { + public: + virtual ~ReplicationServicerNull() {} + int64_t replicateLog(const std::string& /* remoteTableId */, const WalEdits& /* data */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */) { + int64_t _return = 0; + return _return; + } + int64_t replicateKeyValues(const std::string& /* remoteTableId */, const KeyValues& /* data */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */) { + int64_t _return = 0; + return _return; + } +}; + +typedef struct _ReplicationServicer_replicateLog_args__isset { + _ReplicationServicer_replicateLog_args__isset() : remoteTableId(false), data(false), credentials(false) {} + bool remoteTableId :1; + bool data :1; + bool credentials :1; +} _ReplicationServicer_replicateLog_args__isset; + +class ReplicationServicer_replicateLog_args { + public: + + ReplicationServicer_replicateLog_args(const ReplicationServicer_replicateLog_args&); + ReplicationServicer_replicateLog_args& operator=(const ReplicationServicer_replicateLog_args&); + ReplicationServicer_replicateLog_args() : remoteTableId() { + } + + virtual ~ReplicationServicer_replicateLog_args() throw(); + std::string remoteTableId; + WalEdits data; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + + _ReplicationServicer_replicateLog_args__isset __isset; + + void __set_remoteTableId(const std::string& val); + + void __set_data(const WalEdits& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + bool operator == (const ReplicationServicer_replicateLog_args & rhs) const + { + if (!(remoteTableId == rhs.remoteTableId)) + return false; + if (!(data == rhs.data)) + return false; + if (!(credentials == rhs.credentials)) + return false; + return true; + } + bool operator != (const ReplicationServicer_replicateLog_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ReplicationServicer_replicateLog_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ReplicationServicer_replicateLog_pargs { + public: + + + virtual ~ReplicationServicer_replicateLog_pargs() throw(); + const std::string* remoteTableId; + const WalEdits* data; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ReplicationServicer_replicateLog_result__isset { + _ReplicationServicer_replicateLog_result__isset() : success(false), e(false) {} + bool success :1; + bool e :1; +} _ReplicationServicer_replicateLog_result__isset; + +class ReplicationServicer_replicateLog_result { + public: + + ReplicationServicer_replicateLog_result(const ReplicationServicer_replicateLog_result&); + ReplicationServicer_replicateLog_result& operator=(const ReplicationServicer_replicateLog_result&); + ReplicationServicer_replicateLog_result() : success(0) { + } + + virtual ~ReplicationServicer_replicateLog_result() throw(); + int64_t success; + RemoteReplicationException e; + + _ReplicationServicer_replicateLog_result__isset __isset; + + void __set_success(const int64_t val); + + void __set_e(const RemoteReplicationException& val); + + bool operator == (const ReplicationServicer_replicateLog_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(e == rhs.e)) + return false; + return true; + } + bool operator != (const ReplicationServicer_replicateLog_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ReplicationServicer_replicateLog_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ReplicationServicer_replicateLog_presult__isset { + _ReplicationServicer_replicateLog_presult__isset() : success(false), e(false) {} + bool success :1; + bool e :1; +} _ReplicationServicer_replicateLog_presult__isset; + +class ReplicationServicer_replicateLog_presult { + public: + + + virtual ~ReplicationServicer_replicateLog_presult() throw(); + int64_t* success; + RemoteReplicationException e; + + _ReplicationServicer_replicateLog_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ReplicationServicer_replicateKeyValues_args__isset { + _ReplicationServicer_replicateKeyValues_args__isset() : remoteTableId(false), data(false), credentials(false) {} + bool remoteTableId :1; + bool data :1; + bool credentials :1; +} _ReplicationServicer_replicateKeyValues_args__isset; + +class ReplicationServicer_replicateKeyValues_args { + public: + + ReplicationServicer_replicateKeyValues_args(const ReplicationServicer_replicateKeyValues_args&); + ReplicationServicer_replicateKeyValues_args& operator=(const ReplicationServicer_replicateKeyValues_args&); + ReplicationServicer_replicateKeyValues_args() : remoteTableId() { + } + + virtual ~ReplicationServicer_replicateKeyValues_args() throw(); + std::string remoteTableId; + KeyValues data; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + + _ReplicationServicer_replicateKeyValues_args__isset __isset; + + void __set_remoteTableId(const std::string& val); + + void __set_data(const KeyValues& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + bool operator == (const ReplicationServicer_replicateKeyValues_args & rhs) const + { + if (!(remoteTableId == rhs.remoteTableId)) + return false; + if (!(data == rhs.data)) + return false; + if (!(credentials == rhs.credentials)) + return false; + return true; + } + bool operator != (const ReplicationServicer_replicateKeyValues_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ReplicationServicer_replicateKeyValues_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ReplicationServicer_replicateKeyValues_pargs { + public: + + + virtual ~ReplicationServicer_replicateKeyValues_pargs() throw(); + const std::string* remoteTableId; + const KeyValues* data; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ReplicationServicer_replicateKeyValues_result__isset { + _ReplicationServicer_replicateKeyValues_result__isset() : success(false), e(false) {} + bool success :1; + bool e :1; +} _ReplicationServicer_replicateKeyValues_result__isset; + +class ReplicationServicer_replicateKeyValues_result { + public: + + ReplicationServicer_replicateKeyValues_result(const ReplicationServicer_replicateKeyValues_result&); + ReplicationServicer_replicateKeyValues_result& operator=(const ReplicationServicer_replicateKeyValues_result&); + ReplicationServicer_replicateKeyValues_result() : success(0) { + } + + virtual ~ReplicationServicer_replicateKeyValues_result() throw(); + int64_t success; + RemoteReplicationException e; + + _ReplicationServicer_replicateKeyValues_result__isset __isset; + + void __set_success(const int64_t val); + + void __set_e(const RemoteReplicationException& val); + + bool operator == (const ReplicationServicer_replicateKeyValues_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(e == rhs.e)) + return false; + return true; + } + bool operator != (const ReplicationServicer_replicateKeyValues_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ReplicationServicer_replicateKeyValues_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ReplicationServicer_replicateKeyValues_presult__isset { + _ReplicationServicer_replicateKeyValues_presult__isset() : success(false), e(false) {} + bool success :1; + bool e :1; +} _ReplicationServicer_replicateKeyValues_presult__isset; + +class ReplicationServicer_replicateKeyValues_presult { + public: + + + virtual ~ReplicationServicer_replicateKeyValues_presult() throw(); + int64_t* success; + RemoteReplicationException e; + + _ReplicationServicer_replicateKeyValues_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +class ReplicationServicerClient : virtual public ReplicationServicerIf { + public: + ReplicationServicerClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot); + } + ReplicationServicerClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + setProtocol(iprot,oprot); + } + private: + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot,prot); + } + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + piprot_=iprot; + poprot_=oprot; + iprot_ = iprot.get(); + oprot_ = oprot.get(); + } + public: + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + return piprot_; + } + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { + return poprot_; + } + int64_t replicateLog(const std::string& remoteTableId, const WalEdits& data, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void send_replicateLog(const std::string& remoteTableId, const WalEdits& data, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + int64_t recv_replicateLog(); + int64_t replicateKeyValues(const std::string& remoteTableId, const KeyValues& data, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void send_replicateKeyValues(const std::string& remoteTableId, const KeyValues& data, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + int64_t recv_replicateKeyValues(); + protected: + std::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_; + std::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_; + ::apache::thrift::protocol::TProtocol* iprot_; + ::apache::thrift::protocol::TProtocol* oprot_; +}; + +class ReplicationServicerProcessor : public ::apache::thrift::TDispatchProcessor { + protected: + std::shared_ptr iface_; + virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext); + private: + typedef void (ReplicationServicerProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*); + typedef std::map ProcessMap; + ProcessMap processMap_; + void process_replicateLog(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_replicateKeyValues(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + public: + ReplicationServicerProcessor(std::shared_ptr iface) : + iface_(iface) { + processMap_["replicateLog"] = &ReplicationServicerProcessor::process_replicateLog; + processMap_["replicateKeyValues"] = &ReplicationServicerProcessor::process_replicateKeyValues; + } + + virtual ~ReplicationServicerProcessor() {} +}; + +class ReplicationServicerProcessorFactory : public ::apache::thrift::TProcessorFactory { + public: + ReplicationServicerProcessorFactory(const std::shared_ptr< ReplicationServicerIfFactory >& handlerFactory) : + handlerFactory_(handlerFactory) {} + + std::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo& connInfo); + + protected: + std::shared_ptr< ReplicationServicerIfFactory > handlerFactory_; +}; + +class ReplicationServicerMultiface : virtual public ReplicationServicerIf { + public: + ReplicationServicerMultiface(std::vector >& ifaces) : ifaces_(ifaces) { + } + virtual ~ReplicationServicerMultiface() {} + protected: + std::vector > ifaces_; + ReplicationServicerMultiface() {} + void add(std::shared_ptr iface) { + ifaces_.push_back(iface); + } + public: + int64_t replicateLog(const std::string& remoteTableId, const WalEdits& data, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->replicateLog(remoteTableId, data, credentials); + } + return ifaces_[i]->replicateLog(remoteTableId, data, credentials); + } + + int64_t replicateKeyValues(const std::string& remoteTableId, const KeyValues& data, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->replicateKeyValues(remoteTableId, data, credentials); + } + return ifaces_[i]->replicateKeyValues(remoteTableId, data, credentials); + } + +}; + +// The 'concurrent' client is a thread safe client that correctly handles +// out of order responses. It is slower than the regular client, so should +// only be used when you need to share a connection among multiple threads +class ReplicationServicerConcurrentClient : virtual public ReplicationServicerIf { + public: + ReplicationServicerConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot); + } + ReplicationServicerConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + setProtocol(iprot,oprot); + } + private: + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot,prot); + } + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + piprot_=iprot; + poprot_=oprot; + iprot_ = iprot.get(); + oprot_ = oprot.get(); + } + public: + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + return piprot_; + } + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { + return poprot_; + } + int64_t replicateLog(const std::string& remoteTableId, const WalEdits& data, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + int32_t send_replicateLog(const std::string& remoteTableId, const WalEdits& data, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + int64_t recv_replicateLog(const int32_t seqid); + int64_t replicateKeyValues(const std::string& remoteTableId, const KeyValues& data, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + int32_t send_replicateKeyValues(const std::string& remoteTableId, const KeyValues& data, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + int64_t recv_replicateKeyValues(const int32_t seqid); + protected: + std::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_; + std::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_; + ::apache::thrift::protocol::TProtocol* iprot_; + ::apache::thrift::protocol::TProtocol* oprot_; + ::apache::thrift::async::TConcurrentClientSyncInfo sync_; +}; + +#ifdef _MSC_VER + #pragma warning( pop ) +#endif + +}}}}}} // namespace + +#endif diff --git a/include/data/extern/thriftv2/TabletClientService.h b/include/data/extern/thriftv2/TabletClientService.h new file mode 100644 index 00000000..53223c01 --- /dev/null +++ b/include/data/extern/thriftv2/TabletClientService.h @@ -0,0 +1,4958 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef TabletClientService_V2H +#define TabletClientService_V2H + +#include +#include +#include "tabletserver_types.h" +#include "ClientService.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace tabletserver { namespace thrift { + +#ifdef _MSC_VER + #pragma warning( push ) + #pragma warning (disable : 4250 ) //inheriting methods via dominance +#endif + +class TabletClientServiceIf : virtual public ::org::apache::accumulov2::core::clientImpl::thrift::ClientServiceIf { + public: + virtual ~TabletClientServiceIf() {} + virtual void startScan( ::org::apache::accumulov2::core::dataImpl::thrift::InitialScan& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const ::org::apache::accumulov2::core::dataImpl::thrift::TRange& range, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & columns, const int32_t batchSize, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & ssiList, const std::map > & ssio, const std::vector & authorizations, const bool waitForWrites, const bool isolated, const int64_t readaheadThreshold, const TSamplerConfiguration& samplerConfig, const int64_t batchTimeOut, const std::string& classLoaderContext, const std::map & executionHints) = 0; + virtual void continueScan( ::org::apache::accumulov2::core::dataImpl::thrift::ScanResult& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID) = 0; + virtual void closeScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID) = 0; + virtual void startMultiScan( ::org::apache::accumulov2::core::dataImpl::thrift::InitialMultiScan& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanBatch& batch, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & columns, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & ssiList, const std::map > & ssio, const std::vector & authorizations, const bool waitForWrites, const TSamplerConfiguration& samplerConfig, const int64_t batchTimeOut, const std::string& classLoaderContext, const std::map & executionHints) = 0; + virtual void continueMultiScan( ::org::apache::accumulov2::core::dataImpl::thrift::MultiScanResult& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID) = 0; + virtual void closeMultiScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID) = 0; + virtual ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID startUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const TDurability::type durability) = 0; + virtual void applyUpdates(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID updateID, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& keyExtent, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TMutation> & mutations) = 0; + virtual void closeUpdate( ::org::apache::accumulov2::core::dataImpl::thrift::UpdateErrors& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID updateID) = 0; + virtual void update(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& keyExtent, const ::org::apache::accumulov2::core::dataImpl::thrift::TMutation& mutation, const TDurability::type durability) = 0; + virtual void startConditionalUpdate( ::org::apache::accumulov2::core::dataImpl::thrift::TConditionalSession& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::vector & authorizations, const std::string& tableID, const TDurability::type durability, const std::string& classLoaderContext) = 0; + virtual void conditionalUpdate(std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TCMResult> & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID, const ::org::apache::accumulov2::core::dataImpl::thrift::CMBatch& mutations, const std::vector & symbols) = 0; + virtual void invalidateConditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID) = 0; + virtual void closeConditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID) = 0; + virtual void bulkImport(std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent> & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const ::org::apache::accumulov2::core::dataImpl::thrift::TabletFiles& files, const bool setTime) = 0; + virtual void loadFiles(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const std::string& dir, const std::map< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent, std::map > & files, const bool setTime) = 0; + virtual void splitTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const std::string& splitPoint) = 0; + virtual void loadTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent) = 0; + virtual void unloadTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const TUnloadTabletGoal::type goal, const int64_t requestTime) = 0; + virtual void flush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const std::string& tableId, const std::string& startRow, const std::string& endRow) = 0; + virtual void flushTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent) = 0; + virtual void chop(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent) = 0; + virtual void compact(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const std::string& tableId, const std::string& startRow, const std::string& endRow) = 0; + virtual void getTabletServerStatus( ::org::apache::accumulov2::core::master::thrift::TabletServerStatus& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) = 0; + virtual void getTabletStats(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableId) = 0; + virtual void getHistoricalStats(TabletStats& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) = 0; + virtual void halt(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock) = 0; + virtual void fastHalt(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock) = 0; + virtual void getActiveScans(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) = 0; + virtual void getActiveCompactions(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) = 0; + virtual void removeLogs(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::vector & filenames) = 0; + virtual void getActiveLogs(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) = 0; + virtual void startGetSummaries( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request) = 0; + virtual void startGetSummariesForPartition( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request, const int32_t modulus, const int32_t remainder) = 0; + virtual void startGetSummariesFromFiles( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request, const std::map > & files) = 0; + virtual void contiuneGetSummaries( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const int64_t sessionId) = 0; +}; + +class TabletClientServiceIfFactory : virtual public ::org::apache::accumulov2::core::clientImpl::thrift::ClientServiceIfFactory { + public: + typedef TabletClientServiceIf Handler; + + virtual ~TabletClientServiceIfFactory() {} + + virtual TabletClientServiceIf* getHandler(const ::apache::thrift::TConnectionInfo& connInfo) = 0; + virtual void releaseHandler( ::org::apache::accumulov2::core::clientImpl::thrift::ClientServiceIf* /* handler */) = 0; +}; + +class TabletClientServiceIfSingletonFactory : virtual public TabletClientServiceIfFactory { + public: + TabletClientServiceIfSingletonFactory(const std::shared_ptr& iface) : iface_(iface) {} + virtual ~TabletClientServiceIfSingletonFactory() {} + + virtual TabletClientServiceIf* getHandler(const ::apache::thrift::TConnectionInfo&) { + return iface_.get(); + } + virtual void releaseHandler( ::org::apache::accumulov2::core::clientImpl::thrift::ClientServiceIf* /* handler */) {} + + protected: + std::shared_ptr iface_; +}; + +class TabletClientServiceNull : virtual public TabletClientServiceIf , virtual public ::org::apache::accumulov2::core::clientImpl::thrift::ClientServiceNull { + public: + virtual ~TabletClientServiceNull() {} + void startScan( ::org::apache::accumulov2::core::dataImpl::thrift::InitialScan& /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& /* extent */, const ::org::apache::accumulov2::core::dataImpl::thrift::TRange& /* range */, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & /* columns */, const int32_t /* batchSize */, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & /* ssiList */, const std::map > & /* ssio */, const std::vector & /* authorizations */, const bool /* waitForWrites */, const bool /* isolated */, const int64_t /* readaheadThreshold */, const TSamplerConfiguration& /* samplerConfig */, const int64_t /* batchTimeOut */, const std::string& /* classLoaderContext */, const std::map & /* executionHints */) { + return; + } + void continueScan( ::org::apache::accumulov2::core::dataImpl::thrift::ScanResult& /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID /* scanID */) { + return; + } + void closeScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID /* scanID */) { + return; + } + void startMultiScan( ::org::apache::accumulov2::core::dataImpl::thrift::InitialMultiScan& /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanBatch& /* batch */, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & /* columns */, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & /* ssiList */, const std::map > & /* ssio */, const std::vector & /* authorizations */, const bool /* waitForWrites */, const TSamplerConfiguration& /* samplerConfig */, const int64_t /* batchTimeOut */, const std::string& /* classLoaderContext */, const std::map & /* executionHints */) { + return; + } + void continueMultiScan( ::org::apache::accumulov2::core::dataImpl::thrift::MultiScanResult& /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID /* scanID */) { + return; + } + void closeMultiScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID /* scanID */) { + return; + } + ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID startUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const TDurability::type /* durability */) { + ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID _return = 0; + return _return; + } + void applyUpdates(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID /* updateID */, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& /* keyExtent */, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TMutation> & /* mutations */) { + return; + } + void closeUpdate( ::org::apache::accumulov2::core::dataImpl::thrift::UpdateErrors& /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID /* updateID */) { + return; + } + void update(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& /* keyExtent */, const ::org::apache::accumulov2::core::dataImpl::thrift::TMutation& /* mutation */, const TDurability::type /* durability */) { + return; + } + void startConditionalUpdate( ::org::apache::accumulov2::core::dataImpl::thrift::TConditionalSession& /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::vector & /* authorizations */, const std::string& /* tableID */, const TDurability::type /* durability */, const std::string& /* classLoaderContext */) { + return; + } + void conditionalUpdate(std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TCMResult> & /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID /* sessID */, const ::org::apache::accumulov2::core::dataImpl::thrift::CMBatch& /* mutations */, const std::vector & /* symbols */) { + return; + } + void invalidateConditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID /* sessID */) { + return; + } + void closeConditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID /* sessID */) { + return; + } + void bulkImport(std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent> & /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const int64_t /* tid */, const ::org::apache::accumulov2::core::dataImpl::thrift::TabletFiles& /* files */, const bool /* setTime */) { + return; + } + void loadFiles(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const int64_t /* tid */, const std::string& /* dir */, const std::map< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent, std::map > & /* files */, const bool /* setTime */) { + return; + } + void splitTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& /* extent */, const std::string& /* splitPoint */) { + return; + } + void loadTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* lock */, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& /* extent */) { + return; + } + void unloadTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* lock */, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& /* extent */, const TUnloadTabletGoal::type /* goal */, const int64_t /* requestTime */) { + return; + } + void flush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* lock */, const std::string& /* tableId */, const std::string& /* startRow */, const std::string& /* endRow */) { + return; + } + void flushTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* lock */, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& /* extent */) { + return; + } + void chop(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* lock */, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& /* extent */) { + return; + } + void compact(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* lock */, const std::string& /* tableId */, const std::string& /* startRow */, const std::string& /* endRow */) { + return; + } + void getTabletServerStatus( ::org::apache::accumulov2::core::master::thrift::TabletServerStatus& /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */) { + return; + } + void getTabletStats(std::vector & /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* tableId */) { + return; + } + void getHistoricalStats(TabletStats& /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */) { + return; + } + void halt(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* lock */) { + return; + } + void fastHalt(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::string& /* lock */) { + return; + } + void getActiveScans(std::vector & /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */) { + return; + } + void getActiveCompactions(std::vector & /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */) { + return; + } + void removeLogs(const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const std::vector & /* filenames */) { + return; + } + void getActiveLogs(std::vector & /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */) { + return; + } + void startGetSummaries( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& /* request */) { + return; + } + void startGetSummariesForPartition( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& /* request */, const int32_t /* modulus */, const int32_t /* remainder */) { + return; + } + void startGetSummariesFromFiles( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& /* credentials */, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& /* request */, const std::map > & /* files */) { + return; + } + void contiuneGetSummaries( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& /* _return */, const ::org::apache::accumulov2::core::trace::thrift::TInfo& /* tinfo */, const int64_t /* sessionId */) { + return; + } +}; + +typedef struct _TabletClientService_startScan_args__isset { + _TabletClientService_startScan_args__isset() : tinfo(false), credentials(false), extent(false), range(false), columns(false), batchSize(false), ssiList(false), ssio(false), authorizations(false), waitForWrites(false), isolated(false), readaheadThreshold(false), samplerConfig(false), batchTimeOut(false), classLoaderContext(false), executionHints(false) {} + bool tinfo :1; + bool credentials :1; + bool extent :1; + bool range :1; + bool columns :1; + bool batchSize :1; + bool ssiList :1; + bool ssio :1; + bool authorizations :1; + bool waitForWrites :1; + bool isolated :1; + bool readaheadThreshold :1; + bool samplerConfig :1; + bool batchTimeOut :1; + bool classLoaderContext :1; + bool executionHints :1; +} _TabletClientService_startScan_args__isset; + +class TabletClientService_startScan_args { + public: + + TabletClientService_startScan_args(const TabletClientService_startScan_args&); + TabletClientService_startScan_args& operator=(const TabletClientService_startScan_args&); + TabletClientService_startScan_args() : batchSize(0), waitForWrites(0), isolated(0), readaheadThreshold(0), batchTimeOut(0), classLoaderContext() { + } + + virtual ~TabletClientService_startScan_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent extent; + ::org::apache::accumulov2::core::dataImpl::thrift::TRange range; + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> columns; + int32_t batchSize; + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> ssiList; + std::map > ssio; + std::vector authorizations; + bool waitForWrites; + bool isolated; + int64_t readaheadThreshold; + TSamplerConfiguration samplerConfig; + int64_t batchTimeOut; + std::string classLoaderContext; + std::map executionHints; + + _TabletClientService_startScan_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_extent(const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& val); + + void __set_range(const ::org::apache::accumulov2::core::dataImpl::thrift::TRange& val); + + void __set_columns(const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & val); + + void __set_batchSize(const int32_t val); + + void __set_ssiList(const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & val); + + void __set_ssio(const std::map > & val); + + void __set_authorizations(const std::vector & val); + + void __set_waitForWrites(const bool val); + + void __set_isolated(const bool val); + + void __set_readaheadThreshold(const int64_t val); + + void __set_samplerConfig(const TSamplerConfiguration& val); + + void __set_batchTimeOut(const int64_t val); + + void __set_classLoaderContext(const std::string& val); + + void __set_executionHints(const std::map & val); + + bool operator == (const TabletClientService_startScan_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(extent == rhs.extent)) + return false; + if (!(range == rhs.range)) + return false; + if (!(columns == rhs.columns)) + return false; + if (!(batchSize == rhs.batchSize)) + return false; + if (!(ssiList == rhs.ssiList)) + return false; + if (!(ssio == rhs.ssio)) + return false; + if (!(authorizations == rhs.authorizations)) + return false; + if (!(waitForWrites == rhs.waitForWrites)) + return false; + if (!(isolated == rhs.isolated)) + return false; + if (!(readaheadThreshold == rhs.readaheadThreshold)) + return false; + if (!(samplerConfig == rhs.samplerConfig)) + return false; + if (!(batchTimeOut == rhs.batchTimeOut)) + return false; + if (!(classLoaderContext == rhs.classLoaderContext)) + return false; + if (!(executionHints == rhs.executionHints)) + return false; + return true; + } + bool operator != (const TabletClientService_startScan_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_startScan_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_startScan_pargs { + public: + + + virtual ~TabletClientService_startScan_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent* extent; + const ::org::apache::accumulov2::core::dataImpl::thrift::TRange* range; + const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> * columns; + const int32_t* batchSize; + const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> * ssiList; + const std::map > * ssio; + const std::vector * authorizations; + const bool* waitForWrites; + const bool* isolated; + const int64_t* readaheadThreshold; + const TSamplerConfiguration* samplerConfig; + const int64_t* batchTimeOut; + const std::string* classLoaderContext; + const std::map * executionHints; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_startScan_result__isset { + _TabletClientService_startScan_result__isset() : success(false), sec(false), nste(false), tmfe(false), tsnpe(false) {} + bool success :1; + bool sec :1; + bool nste :1; + bool tmfe :1; + bool tsnpe :1; +} _TabletClientService_startScan_result__isset; + +class TabletClientService_startScan_result { + public: + + TabletClientService_startScan_result(const TabletClientService_startScan_result&); + TabletClientService_startScan_result& operator=(const TabletClientService_startScan_result&); + TabletClientService_startScan_result() { + } + + virtual ~TabletClientService_startScan_result() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::InitialScan success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + NotServingTabletException nste; + TooManyFilesException tmfe; + TSampleNotPresentException tsnpe; + + _TabletClientService_startScan_result__isset __isset; + + void __set_success(const ::org::apache::accumulov2::core::dataImpl::thrift::InitialScan& val); + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + void __set_nste(const NotServingTabletException& val); + + void __set_tmfe(const TooManyFilesException& val); + + void __set_tsnpe(const TSampleNotPresentException& val); + + bool operator == (const TabletClientService_startScan_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + if (!(nste == rhs.nste)) + return false; + if (!(tmfe == rhs.tmfe)) + return false; + if (!(tsnpe == rhs.tsnpe)) + return false; + return true; + } + bool operator != (const TabletClientService_startScan_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_startScan_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_startScan_presult__isset { + _TabletClientService_startScan_presult__isset() : success(false), sec(false), nste(false), tmfe(false), tsnpe(false) {} + bool success :1; + bool sec :1; + bool nste :1; + bool tmfe :1; + bool tsnpe :1; +} _TabletClientService_startScan_presult__isset; + +class TabletClientService_startScan_presult { + public: + + + virtual ~TabletClientService_startScan_presult() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::InitialScan* success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + NotServingTabletException nste; + TooManyFilesException tmfe; + TSampleNotPresentException tsnpe; + + _TabletClientService_startScan_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _TabletClientService_continueScan_args__isset { + _TabletClientService_continueScan_args__isset() : tinfo(false), scanID(false) {} + bool tinfo :1; + bool scanID :1; +} _TabletClientService_continueScan_args__isset; + +class TabletClientService_continueScan_args { + public: + + TabletClientService_continueScan_args(const TabletClientService_continueScan_args&); + TabletClientService_continueScan_args& operator=(const TabletClientService_continueScan_args&); + TabletClientService_continueScan_args() : scanID(0) { + } + + virtual ~TabletClientService_continueScan_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID; + + _TabletClientService_continueScan_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_scanID(const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID val); + + bool operator == (const TabletClientService_continueScan_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(scanID == rhs.scanID)) + return false; + return true; + } + bool operator != (const TabletClientService_continueScan_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_continueScan_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_continueScan_pargs { + public: + + + virtual ~TabletClientService_continueScan_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID* scanID; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_continueScan_result__isset { + _TabletClientService_continueScan_result__isset() : success(false), nssi(false), nste(false), tmfe(false), tsnpe(false) {} + bool success :1; + bool nssi :1; + bool nste :1; + bool tmfe :1; + bool tsnpe :1; +} _TabletClientService_continueScan_result__isset; + +class TabletClientService_continueScan_result { + public: + + TabletClientService_continueScan_result(const TabletClientService_continueScan_result&); + TabletClientService_continueScan_result& operator=(const TabletClientService_continueScan_result&); + TabletClientService_continueScan_result() { + } + + virtual ~TabletClientService_continueScan_result() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::ScanResult success; + NoSuchScanIDException nssi; + NotServingTabletException nste; + TooManyFilesException tmfe; + TSampleNotPresentException tsnpe; + + _TabletClientService_continueScan_result__isset __isset; + + void __set_success(const ::org::apache::accumulov2::core::dataImpl::thrift::ScanResult& val); + + void __set_nssi(const NoSuchScanIDException& val); + + void __set_nste(const NotServingTabletException& val); + + void __set_tmfe(const TooManyFilesException& val); + + void __set_tsnpe(const TSampleNotPresentException& val); + + bool operator == (const TabletClientService_continueScan_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(nssi == rhs.nssi)) + return false; + if (!(nste == rhs.nste)) + return false; + if (!(tmfe == rhs.tmfe)) + return false; + if (!(tsnpe == rhs.tsnpe)) + return false; + return true; + } + bool operator != (const TabletClientService_continueScan_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_continueScan_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_continueScan_presult__isset { + _TabletClientService_continueScan_presult__isset() : success(false), nssi(false), nste(false), tmfe(false), tsnpe(false) {} + bool success :1; + bool nssi :1; + bool nste :1; + bool tmfe :1; + bool tsnpe :1; +} _TabletClientService_continueScan_presult__isset; + +class TabletClientService_continueScan_presult { + public: + + + virtual ~TabletClientService_continueScan_presult() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::ScanResult* success; + NoSuchScanIDException nssi; + NotServingTabletException nste; + TooManyFilesException tmfe; + TSampleNotPresentException tsnpe; + + _TabletClientService_continueScan_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _TabletClientService_closeScan_args__isset { + _TabletClientService_closeScan_args__isset() : tinfo(false), scanID(false) {} + bool tinfo :1; + bool scanID :1; +} _TabletClientService_closeScan_args__isset; + +class TabletClientService_closeScan_args { + public: + + TabletClientService_closeScan_args(const TabletClientService_closeScan_args&); + TabletClientService_closeScan_args& operator=(const TabletClientService_closeScan_args&); + TabletClientService_closeScan_args() : scanID(0) { + } + + virtual ~TabletClientService_closeScan_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID; + + _TabletClientService_closeScan_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_scanID(const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID val); + + bool operator == (const TabletClientService_closeScan_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(scanID == rhs.scanID)) + return false; + return true; + } + bool operator != (const TabletClientService_closeScan_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_closeScan_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_closeScan_pargs { + public: + + + virtual ~TabletClientService_closeScan_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID* scanID; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_startMultiScan_args__isset { + _TabletClientService_startMultiScan_args__isset() : tinfo(false), credentials(false), batch(false), columns(false), ssiList(false), ssio(false), authorizations(false), waitForWrites(false), samplerConfig(false), batchTimeOut(false), classLoaderContext(false), executionHints(false) {} + bool tinfo :1; + bool credentials :1; + bool batch :1; + bool columns :1; + bool ssiList :1; + bool ssio :1; + bool authorizations :1; + bool waitForWrites :1; + bool samplerConfig :1; + bool batchTimeOut :1; + bool classLoaderContext :1; + bool executionHints :1; +} _TabletClientService_startMultiScan_args__isset; + +class TabletClientService_startMultiScan_args { + public: + + TabletClientService_startMultiScan_args(const TabletClientService_startMultiScan_args&); + TabletClientService_startMultiScan_args& operator=(const TabletClientService_startMultiScan_args&); + TabletClientService_startMultiScan_args() : waitForWrites(0), batchTimeOut(0), classLoaderContext() { + } + + virtual ~TabletClientService_startMultiScan_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + ::org::apache::accumulov2::core::dataImpl::thrift::ScanBatch batch; + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> columns; + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> ssiList; + std::map > ssio; + std::vector authorizations; + bool waitForWrites; + TSamplerConfiguration samplerConfig; + int64_t batchTimeOut; + std::string classLoaderContext; + std::map executionHints; + + _TabletClientService_startMultiScan_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_batch(const ::org::apache::accumulov2::core::dataImpl::thrift::ScanBatch& val); + + void __set_columns(const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & val); + + void __set_ssiList(const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & val); + + void __set_ssio(const std::map > & val); + + void __set_authorizations(const std::vector & val); + + void __set_waitForWrites(const bool val); + + void __set_samplerConfig(const TSamplerConfiguration& val); + + void __set_batchTimeOut(const int64_t val); + + void __set_classLoaderContext(const std::string& val); + + void __set_executionHints(const std::map & val); + + bool operator == (const TabletClientService_startMultiScan_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(batch == rhs.batch)) + return false; + if (!(columns == rhs.columns)) + return false; + if (!(ssiList == rhs.ssiList)) + return false; + if (!(ssio == rhs.ssio)) + return false; + if (!(authorizations == rhs.authorizations)) + return false; + if (!(waitForWrites == rhs.waitForWrites)) + return false; + if (!(samplerConfig == rhs.samplerConfig)) + return false; + if (!(batchTimeOut == rhs.batchTimeOut)) + return false; + if (!(classLoaderContext == rhs.classLoaderContext)) + return false; + if (!(executionHints == rhs.executionHints)) + return false; + return true; + } + bool operator != (const TabletClientService_startMultiScan_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_startMultiScan_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_startMultiScan_pargs { + public: + + + virtual ~TabletClientService_startMultiScan_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const ::org::apache::accumulov2::core::dataImpl::thrift::ScanBatch* batch; + const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> * columns; + const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> * ssiList; + const std::map > * ssio; + const std::vector * authorizations; + const bool* waitForWrites; + const TSamplerConfiguration* samplerConfig; + const int64_t* batchTimeOut; + const std::string* classLoaderContext; + const std::map * executionHints; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_startMultiScan_result__isset { + _TabletClientService_startMultiScan_result__isset() : success(false), sec(false), tsnpe(false) {} + bool success :1; + bool sec :1; + bool tsnpe :1; +} _TabletClientService_startMultiScan_result__isset; + +class TabletClientService_startMultiScan_result { + public: + + TabletClientService_startMultiScan_result(const TabletClientService_startMultiScan_result&); + TabletClientService_startMultiScan_result& operator=(const TabletClientService_startMultiScan_result&); + TabletClientService_startMultiScan_result() { + } + + virtual ~TabletClientService_startMultiScan_result() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::InitialMultiScan success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + TSampleNotPresentException tsnpe; + + _TabletClientService_startMultiScan_result__isset __isset; + + void __set_success(const ::org::apache::accumulov2::core::dataImpl::thrift::InitialMultiScan& val); + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + void __set_tsnpe(const TSampleNotPresentException& val); + + bool operator == (const TabletClientService_startMultiScan_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + if (!(tsnpe == rhs.tsnpe)) + return false; + return true; + } + bool operator != (const TabletClientService_startMultiScan_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_startMultiScan_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_startMultiScan_presult__isset { + _TabletClientService_startMultiScan_presult__isset() : success(false), sec(false), tsnpe(false) {} + bool success :1; + bool sec :1; + bool tsnpe :1; +} _TabletClientService_startMultiScan_presult__isset; + +class TabletClientService_startMultiScan_presult { + public: + + + virtual ~TabletClientService_startMultiScan_presult() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::InitialMultiScan* success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + TSampleNotPresentException tsnpe; + + _TabletClientService_startMultiScan_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _TabletClientService_continueMultiScan_args__isset { + _TabletClientService_continueMultiScan_args__isset() : tinfo(false), scanID(false) {} + bool tinfo :1; + bool scanID :1; +} _TabletClientService_continueMultiScan_args__isset; + +class TabletClientService_continueMultiScan_args { + public: + + TabletClientService_continueMultiScan_args(const TabletClientService_continueMultiScan_args&); + TabletClientService_continueMultiScan_args& operator=(const TabletClientService_continueMultiScan_args&); + TabletClientService_continueMultiScan_args() : scanID(0) { + } + + virtual ~TabletClientService_continueMultiScan_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID; + + _TabletClientService_continueMultiScan_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_scanID(const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID val); + + bool operator == (const TabletClientService_continueMultiScan_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(scanID == rhs.scanID)) + return false; + return true; + } + bool operator != (const TabletClientService_continueMultiScan_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_continueMultiScan_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_continueMultiScan_pargs { + public: + + + virtual ~TabletClientService_continueMultiScan_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID* scanID; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_continueMultiScan_result__isset { + _TabletClientService_continueMultiScan_result__isset() : success(false), nssi(false), tsnpe(false) {} + bool success :1; + bool nssi :1; + bool tsnpe :1; +} _TabletClientService_continueMultiScan_result__isset; + +class TabletClientService_continueMultiScan_result { + public: + + TabletClientService_continueMultiScan_result(const TabletClientService_continueMultiScan_result&); + TabletClientService_continueMultiScan_result& operator=(const TabletClientService_continueMultiScan_result&); + TabletClientService_continueMultiScan_result() { + } + + virtual ~TabletClientService_continueMultiScan_result() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::MultiScanResult success; + NoSuchScanIDException nssi; + TSampleNotPresentException tsnpe; + + _TabletClientService_continueMultiScan_result__isset __isset; + + void __set_success(const ::org::apache::accumulov2::core::dataImpl::thrift::MultiScanResult& val); + + void __set_nssi(const NoSuchScanIDException& val); + + void __set_tsnpe(const TSampleNotPresentException& val); + + bool operator == (const TabletClientService_continueMultiScan_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(nssi == rhs.nssi)) + return false; + if (!(tsnpe == rhs.tsnpe)) + return false; + return true; + } + bool operator != (const TabletClientService_continueMultiScan_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_continueMultiScan_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_continueMultiScan_presult__isset { + _TabletClientService_continueMultiScan_presult__isset() : success(false), nssi(false), tsnpe(false) {} + bool success :1; + bool nssi :1; + bool tsnpe :1; +} _TabletClientService_continueMultiScan_presult__isset; + +class TabletClientService_continueMultiScan_presult { + public: + + + virtual ~TabletClientService_continueMultiScan_presult() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::MultiScanResult* success; + NoSuchScanIDException nssi; + TSampleNotPresentException tsnpe; + + _TabletClientService_continueMultiScan_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _TabletClientService_closeMultiScan_args__isset { + _TabletClientService_closeMultiScan_args__isset() : tinfo(false), scanID(false) {} + bool tinfo :1; + bool scanID :1; +} _TabletClientService_closeMultiScan_args__isset; + +class TabletClientService_closeMultiScan_args { + public: + + TabletClientService_closeMultiScan_args(const TabletClientService_closeMultiScan_args&); + TabletClientService_closeMultiScan_args& operator=(const TabletClientService_closeMultiScan_args&); + TabletClientService_closeMultiScan_args() : scanID(0) { + } + + virtual ~TabletClientService_closeMultiScan_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID; + + _TabletClientService_closeMultiScan_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_scanID(const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID val); + + bool operator == (const TabletClientService_closeMultiScan_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(scanID == rhs.scanID)) + return false; + return true; + } + bool operator != (const TabletClientService_closeMultiScan_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_closeMultiScan_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_closeMultiScan_pargs { + public: + + + virtual ~TabletClientService_closeMultiScan_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID* scanID; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_closeMultiScan_result__isset { + _TabletClientService_closeMultiScan_result__isset() : nssi(false) {} + bool nssi :1; +} _TabletClientService_closeMultiScan_result__isset; + +class TabletClientService_closeMultiScan_result { + public: + + TabletClientService_closeMultiScan_result(const TabletClientService_closeMultiScan_result&); + TabletClientService_closeMultiScan_result& operator=(const TabletClientService_closeMultiScan_result&); + TabletClientService_closeMultiScan_result() { + } + + virtual ~TabletClientService_closeMultiScan_result() throw(); + NoSuchScanIDException nssi; + + _TabletClientService_closeMultiScan_result__isset __isset; + + void __set_nssi(const NoSuchScanIDException& val); + + bool operator == (const TabletClientService_closeMultiScan_result & rhs) const + { + if (!(nssi == rhs.nssi)) + return false; + return true; + } + bool operator != (const TabletClientService_closeMultiScan_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_closeMultiScan_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_closeMultiScan_presult__isset { + _TabletClientService_closeMultiScan_presult__isset() : nssi(false) {} + bool nssi :1; +} _TabletClientService_closeMultiScan_presult__isset; + +class TabletClientService_closeMultiScan_presult { + public: + + + virtual ~TabletClientService_closeMultiScan_presult() throw(); + NoSuchScanIDException nssi; + + _TabletClientService_closeMultiScan_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _TabletClientService_startUpdate_args__isset { + _TabletClientService_startUpdate_args__isset() : tinfo(false), credentials(false), durability(false) {} + bool tinfo :1; + bool credentials :1; + bool durability :1; +} _TabletClientService_startUpdate_args__isset; + +class TabletClientService_startUpdate_args { + public: + + TabletClientService_startUpdate_args(const TabletClientService_startUpdate_args&); + TabletClientService_startUpdate_args& operator=(const TabletClientService_startUpdate_args&); + TabletClientService_startUpdate_args() : durability((TDurability::type)0) { + } + + virtual ~TabletClientService_startUpdate_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + TDurability::type durability; + + _TabletClientService_startUpdate_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_durability(const TDurability::type val); + + bool operator == (const TabletClientService_startUpdate_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(durability == rhs.durability)) + return false; + return true; + } + bool operator != (const TabletClientService_startUpdate_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_startUpdate_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_startUpdate_pargs { + public: + + + virtual ~TabletClientService_startUpdate_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const TDurability::type* durability; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_startUpdate_result__isset { + _TabletClientService_startUpdate_result__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _TabletClientService_startUpdate_result__isset; + +class TabletClientService_startUpdate_result { + public: + + TabletClientService_startUpdate_result(const TabletClientService_startUpdate_result&); + TabletClientService_startUpdate_result& operator=(const TabletClientService_startUpdate_result&); + TabletClientService_startUpdate_result() : success(0) { + } + + virtual ~TabletClientService_startUpdate_result() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + + _TabletClientService_startUpdate_result__isset __isset; + + void __set_success(const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID val); + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + bool operator == (const TabletClientService_startUpdate_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + return true; + } + bool operator != (const TabletClientService_startUpdate_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_startUpdate_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_startUpdate_presult__isset { + _TabletClientService_startUpdate_presult__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _TabletClientService_startUpdate_presult__isset; + +class TabletClientService_startUpdate_presult { + public: + + + virtual ~TabletClientService_startUpdate_presult() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID* success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + + _TabletClientService_startUpdate_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _TabletClientService_applyUpdates_args__isset { + _TabletClientService_applyUpdates_args__isset() : tinfo(false), updateID(false), keyExtent(false), mutations(false) {} + bool tinfo :1; + bool updateID :1; + bool keyExtent :1; + bool mutations :1; +} _TabletClientService_applyUpdates_args__isset; + +class TabletClientService_applyUpdates_args { + public: + + TabletClientService_applyUpdates_args(const TabletClientService_applyUpdates_args&); + TabletClientService_applyUpdates_args& operator=(const TabletClientService_applyUpdates_args&); + TabletClientService_applyUpdates_args() : updateID(0) { + } + + virtual ~TabletClientService_applyUpdates_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID updateID; + ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent keyExtent; + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TMutation> mutations; + + _TabletClientService_applyUpdates_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_updateID(const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID val); + + void __set_keyExtent(const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& val); + + void __set_mutations(const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TMutation> & val); + + bool operator == (const TabletClientService_applyUpdates_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(updateID == rhs.updateID)) + return false; + if (!(keyExtent == rhs.keyExtent)) + return false; + if (!(mutations == rhs.mutations)) + return false; + return true; + } + bool operator != (const TabletClientService_applyUpdates_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_applyUpdates_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_applyUpdates_pargs { + public: + + + virtual ~TabletClientService_applyUpdates_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID* updateID; + const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent* keyExtent; + const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TMutation> * mutations; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_closeUpdate_args__isset { + _TabletClientService_closeUpdate_args__isset() : tinfo(false), updateID(false) {} + bool tinfo :1; + bool updateID :1; +} _TabletClientService_closeUpdate_args__isset; + +class TabletClientService_closeUpdate_args { + public: + + TabletClientService_closeUpdate_args(const TabletClientService_closeUpdate_args&); + TabletClientService_closeUpdate_args& operator=(const TabletClientService_closeUpdate_args&); + TabletClientService_closeUpdate_args() : updateID(0) { + } + + virtual ~TabletClientService_closeUpdate_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID updateID; + + _TabletClientService_closeUpdate_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_updateID(const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID val); + + bool operator == (const TabletClientService_closeUpdate_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(updateID == rhs.updateID)) + return false; + return true; + } + bool operator != (const TabletClientService_closeUpdate_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_closeUpdate_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_closeUpdate_pargs { + public: + + + virtual ~TabletClientService_closeUpdate_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID* updateID; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_closeUpdate_result__isset { + _TabletClientService_closeUpdate_result__isset() : success(false), nssi(false) {} + bool success :1; + bool nssi :1; +} _TabletClientService_closeUpdate_result__isset; + +class TabletClientService_closeUpdate_result { + public: + + TabletClientService_closeUpdate_result(const TabletClientService_closeUpdate_result&); + TabletClientService_closeUpdate_result& operator=(const TabletClientService_closeUpdate_result&); + TabletClientService_closeUpdate_result() { + } + + virtual ~TabletClientService_closeUpdate_result() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::UpdateErrors success; + NoSuchScanIDException nssi; + + _TabletClientService_closeUpdate_result__isset __isset; + + void __set_success(const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateErrors& val); + + void __set_nssi(const NoSuchScanIDException& val); + + bool operator == (const TabletClientService_closeUpdate_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(nssi == rhs.nssi)) + return false; + return true; + } + bool operator != (const TabletClientService_closeUpdate_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_closeUpdate_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_closeUpdate_presult__isset { + _TabletClientService_closeUpdate_presult__isset() : success(false), nssi(false) {} + bool success :1; + bool nssi :1; +} _TabletClientService_closeUpdate_presult__isset; + +class TabletClientService_closeUpdate_presult { + public: + + + virtual ~TabletClientService_closeUpdate_presult() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::UpdateErrors* success; + NoSuchScanIDException nssi; + + _TabletClientService_closeUpdate_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _TabletClientService_update_args__isset { + _TabletClientService_update_args__isset() : tinfo(false), credentials(false), keyExtent(false), mutation(false), durability(false) {} + bool tinfo :1; + bool credentials :1; + bool keyExtent :1; + bool mutation :1; + bool durability :1; +} _TabletClientService_update_args__isset; + +class TabletClientService_update_args { + public: + + TabletClientService_update_args(const TabletClientService_update_args&); + TabletClientService_update_args& operator=(const TabletClientService_update_args&); + TabletClientService_update_args() : durability((TDurability::type)0) { + } + + virtual ~TabletClientService_update_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent keyExtent; + ::org::apache::accumulov2::core::dataImpl::thrift::TMutation mutation; + TDurability::type durability; + + _TabletClientService_update_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_keyExtent(const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& val); + + void __set_mutation(const ::org::apache::accumulov2::core::dataImpl::thrift::TMutation& val); + + void __set_durability(const TDurability::type val); + + bool operator == (const TabletClientService_update_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(keyExtent == rhs.keyExtent)) + return false; + if (!(mutation == rhs.mutation)) + return false; + if (!(durability == rhs.durability)) + return false; + return true; + } + bool operator != (const TabletClientService_update_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_update_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_update_pargs { + public: + + + virtual ~TabletClientService_update_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent* keyExtent; + const ::org::apache::accumulov2::core::dataImpl::thrift::TMutation* mutation; + const TDurability::type* durability; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_update_result__isset { + _TabletClientService_update_result__isset() : sec(false), nste(false), cve(false) {} + bool sec :1; + bool nste :1; + bool cve :1; +} _TabletClientService_update_result__isset; + +class TabletClientService_update_result { + public: + + TabletClientService_update_result(const TabletClientService_update_result&); + TabletClientService_update_result& operator=(const TabletClientService_update_result&); + TabletClientService_update_result() { + } + + virtual ~TabletClientService_update_result() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + NotServingTabletException nste; + ConstraintViolationException cve; + + _TabletClientService_update_result__isset __isset; + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + void __set_nste(const NotServingTabletException& val); + + void __set_cve(const ConstraintViolationException& val); + + bool operator == (const TabletClientService_update_result & rhs) const + { + if (!(sec == rhs.sec)) + return false; + if (!(nste == rhs.nste)) + return false; + if (!(cve == rhs.cve)) + return false; + return true; + } + bool operator != (const TabletClientService_update_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_update_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_update_presult__isset { + _TabletClientService_update_presult__isset() : sec(false), nste(false), cve(false) {} + bool sec :1; + bool nste :1; + bool cve :1; +} _TabletClientService_update_presult__isset; + +class TabletClientService_update_presult { + public: + + + virtual ~TabletClientService_update_presult() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + NotServingTabletException nste; + ConstraintViolationException cve; + + _TabletClientService_update_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _TabletClientService_startConditionalUpdate_args__isset { + _TabletClientService_startConditionalUpdate_args__isset() : tinfo(false), credentials(false), authorizations(false), tableID(false), durability(false), classLoaderContext(false) {} + bool tinfo :1; + bool credentials :1; + bool authorizations :1; + bool tableID :1; + bool durability :1; + bool classLoaderContext :1; +} _TabletClientService_startConditionalUpdate_args__isset; + +class TabletClientService_startConditionalUpdate_args { + public: + + TabletClientService_startConditionalUpdate_args(const TabletClientService_startConditionalUpdate_args&); + TabletClientService_startConditionalUpdate_args& operator=(const TabletClientService_startConditionalUpdate_args&); + TabletClientService_startConditionalUpdate_args() : tableID(), durability((TDurability::type)0), classLoaderContext() { + } + + virtual ~TabletClientService_startConditionalUpdate_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::vector authorizations; + std::string tableID; + TDurability::type durability; + std::string classLoaderContext; + + _TabletClientService_startConditionalUpdate_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_authorizations(const std::vector & val); + + void __set_tableID(const std::string& val); + + void __set_durability(const TDurability::type val); + + void __set_classLoaderContext(const std::string& val); + + bool operator == (const TabletClientService_startConditionalUpdate_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(authorizations == rhs.authorizations)) + return false; + if (!(tableID == rhs.tableID)) + return false; + if (!(durability == rhs.durability)) + return false; + if (!(classLoaderContext == rhs.classLoaderContext)) + return false; + return true; + } + bool operator != (const TabletClientService_startConditionalUpdate_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_startConditionalUpdate_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_startConditionalUpdate_pargs { + public: + + + virtual ~TabletClientService_startConditionalUpdate_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::vector * authorizations; + const std::string* tableID; + const TDurability::type* durability; + const std::string* classLoaderContext; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_startConditionalUpdate_result__isset { + _TabletClientService_startConditionalUpdate_result__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _TabletClientService_startConditionalUpdate_result__isset; + +class TabletClientService_startConditionalUpdate_result { + public: + + TabletClientService_startConditionalUpdate_result(const TabletClientService_startConditionalUpdate_result&); + TabletClientService_startConditionalUpdate_result& operator=(const TabletClientService_startConditionalUpdate_result&); + TabletClientService_startConditionalUpdate_result() { + } + + virtual ~TabletClientService_startConditionalUpdate_result() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::TConditionalSession success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + + _TabletClientService_startConditionalUpdate_result__isset __isset; + + void __set_success(const ::org::apache::accumulov2::core::dataImpl::thrift::TConditionalSession& val); + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + bool operator == (const TabletClientService_startConditionalUpdate_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + return true; + } + bool operator != (const TabletClientService_startConditionalUpdate_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_startConditionalUpdate_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_startConditionalUpdate_presult__isset { + _TabletClientService_startConditionalUpdate_presult__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _TabletClientService_startConditionalUpdate_presult__isset; + +class TabletClientService_startConditionalUpdate_presult { + public: + + + virtual ~TabletClientService_startConditionalUpdate_presult() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::TConditionalSession* success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + + _TabletClientService_startConditionalUpdate_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _TabletClientService_conditionalUpdate_args__isset { + _TabletClientService_conditionalUpdate_args__isset() : tinfo(false), sessID(false), mutations(false), symbols(false) {} + bool tinfo :1; + bool sessID :1; + bool mutations :1; + bool symbols :1; +} _TabletClientService_conditionalUpdate_args__isset; + +class TabletClientService_conditionalUpdate_args { + public: + + TabletClientService_conditionalUpdate_args(const TabletClientService_conditionalUpdate_args&); + TabletClientService_conditionalUpdate_args& operator=(const TabletClientService_conditionalUpdate_args&); + TabletClientService_conditionalUpdate_args() : sessID(0) { + } + + virtual ~TabletClientService_conditionalUpdate_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID; + ::org::apache::accumulov2::core::dataImpl::thrift::CMBatch mutations; + std::vector symbols; + + _TabletClientService_conditionalUpdate_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_sessID(const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID val); + + void __set_mutations(const ::org::apache::accumulov2::core::dataImpl::thrift::CMBatch& val); + + void __set_symbols(const std::vector & val); + + bool operator == (const TabletClientService_conditionalUpdate_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(sessID == rhs.sessID)) + return false; + if (!(mutations == rhs.mutations)) + return false; + if (!(symbols == rhs.symbols)) + return false; + return true; + } + bool operator != (const TabletClientService_conditionalUpdate_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_conditionalUpdate_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_conditionalUpdate_pargs { + public: + + + virtual ~TabletClientService_conditionalUpdate_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID* sessID; + const ::org::apache::accumulov2::core::dataImpl::thrift::CMBatch* mutations; + const std::vector * symbols; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_conditionalUpdate_result__isset { + _TabletClientService_conditionalUpdate_result__isset() : success(false), nssi(false) {} + bool success :1; + bool nssi :1; +} _TabletClientService_conditionalUpdate_result__isset; + +class TabletClientService_conditionalUpdate_result { + public: + + TabletClientService_conditionalUpdate_result(const TabletClientService_conditionalUpdate_result&); + TabletClientService_conditionalUpdate_result& operator=(const TabletClientService_conditionalUpdate_result&); + TabletClientService_conditionalUpdate_result() { + } + + virtual ~TabletClientService_conditionalUpdate_result() throw(); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TCMResult> success; + NoSuchScanIDException nssi; + + _TabletClientService_conditionalUpdate_result__isset __isset; + + void __set_success(const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TCMResult> & val); + + void __set_nssi(const NoSuchScanIDException& val); + + bool operator == (const TabletClientService_conditionalUpdate_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(nssi == rhs.nssi)) + return false; + return true; + } + bool operator != (const TabletClientService_conditionalUpdate_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_conditionalUpdate_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_conditionalUpdate_presult__isset { + _TabletClientService_conditionalUpdate_presult__isset() : success(false), nssi(false) {} + bool success :1; + bool nssi :1; +} _TabletClientService_conditionalUpdate_presult__isset; + +class TabletClientService_conditionalUpdate_presult { + public: + + + virtual ~TabletClientService_conditionalUpdate_presult() throw(); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TCMResult> * success; + NoSuchScanIDException nssi; + + _TabletClientService_conditionalUpdate_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _TabletClientService_invalidateConditionalUpdate_args__isset { + _TabletClientService_invalidateConditionalUpdate_args__isset() : tinfo(false), sessID(false) {} + bool tinfo :1; + bool sessID :1; +} _TabletClientService_invalidateConditionalUpdate_args__isset; + +class TabletClientService_invalidateConditionalUpdate_args { + public: + + TabletClientService_invalidateConditionalUpdate_args(const TabletClientService_invalidateConditionalUpdate_args&); + TabletClientService_invalidateConditionalUpdate_args& operator=(const TabletClientService_invalidateConditionalUpdate_args&); + TabletClientService_invalidateConditionalUpdate_args() : sessID(0) { + } + + virtual ~TabletClientService_invalidateConditionalUpdate_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID; + + _TabletClientService_invalidateConditionalUpdate_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_sessID(const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID val); + + bool operator == (const TabletClientService_invalidateConditionalUpdate_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(sessID == rhs.sessID)) + return false; + return true; + } + bool operator != (const TabletClientService_invalidateConditionalUpdate_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_invalidateConditionalUpdate_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_invalidateConditionalUpdate_pargs { + public: + + + virtual ~TabletClientService_invalidateConditionalUpdate_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID* sessID; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_invalidateConditionalUpdate_result { + public: + + TabletClientService_invalidateConditionalUpdate_result(const TabletClientService_invalidateConditionalUpdate_result&); + TabletClientService_invalidateConditionalUpdate_result& operator=(const TabletClientService_invalidateConditionalUpdate_result&); + TabletClientService_invalidateConditionalUpdate_result() { + } + + virtual ~TabletClientService_invalidateConditionalUpdate_result() throw(); + + bool operator == (const TabletClientService_invalidateConditionalUpdate_result & /* rhs */) const + { + return true; + } + bool operator != (const TabletClientService_invalidateConditionalUpdate_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_invalidateConditionalUpdate_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_invalidateConditionalUpdate_presult { + public: + + + virtual ~TabletClientService_invalidateConditionalUpdate_presult() throw(); + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _TabletClientService_closeConditionalUpdate_args__isset { + _TabletClientService_closeConditionalUpdate_args__isset() : tinfo(false), sessID(false) {} + bool tinfo :1; + bool sessID :1; +} _TabletClientService_closeConditionalUpdate_args__isset; + +class TabletClientService_closeConditionalUpdate_args { + public: + + TabletClientService_closeConditionalUpdate_args(const TabletClientService_closeConditionalUpdate_args&); + TabletClientService_closeConditionalUpdate_args& operator=(const TabletClientService_closeConditionalUpdate_args&); + TabletClientService_closeConditionalUpdate_args() : sessID(0) { + } + + virtual ~TabletClientService_closeConditionalUpdate_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID; + + _TabletClientService_closeConditionalUpdate_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_sessID(const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID val); + + bool operator == (const TabletClientService_closeConditionalUpdate_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(sessID == rhs.sessID)) + return false; + return true; + } + bool operator != (const TabletClientService_closeConditionalUpdate_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_closeConditionalUpdate_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_closeConditionalUpdate_pargs { + public: + + + virtual ~TabletClientService_closeConditionalUpdate_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID* sessID; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_bulkImport_args__isset { + _TabletClientService_bulkImport_args__isset() : tinfo(false), credentials(false), tid(false), files(false), setTime(false) {} + bool tinfo :1; + bool credentials :1; + bool tid :1; + bool files :1; + bool setTime :1; +} _TabletClientService_bulkImport_args__isset; + +class TabletClientService_bulkImport_args { + public: + + TabletClientService_bulkImport_args(const TabletClientService_bulkImport_args&); + TabletClientService_bulkImport_args& operator=(const TabletClientService_bulkImport_args&); + TabletClientService_bulkImport_args() : tid(0), setTime(0) { + } + + virtual ~TabletClientService_bulkImport_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + int64_t tid; + ::org::apache::accumulov2::core::dataImpl::thrift::TabletFiles files; + bool setTime; + + _TabletClientService_bulkImport_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_tid(const int64_t val); + + void __set_files(const ::org::apache::accumulov2::core::dataImpl::thrift::TabletFiles& val); + + void __set_setTime(const bool val); + + bool operator == (const TabletClientService_bulkImport_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(tid == rhs.tid)) + return false; + if (!(files == rhs.files)) + return false; + if (!(setTime == rhs.setTime)) + return false; + return true; + } + bool operator != (const TabletClientService_bulkImport_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_bulkImport_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_bulkImport_pargs { + public: + + + virtual ~TabletClientService_bulkImport_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const int64_t* tid; + const ::org::apache::accumulov2::core::dataImpl::thrift::TabletFiles* files; + const bool* setTime; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_bulkImport_result__isset { + _TabletClientService_bulkImport_result__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _TabletClientService_bulkImport_result__isset; + +class TabletClientService_bulkImport_result { + public: + + TabletClientService_bulkImport_result(const TabletClientService_bulkImport_result&); + TabletClientService_bulkImport_result& operator=(const TabletClientService_bulkImport_result&); + TabletClientService_bulkImport_result() { + } + + virtual ~TabletClientService_bulkImport_result() throw(); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent> success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + + _TabletClientService_bulkImport_result__isset __isset; + + void __set_success(const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent> & val); + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + bool operator == (const TabletClientService_bulkImport_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + return true; + } + bool operator != (const TabletClientService_bulkImport_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_bulkImport_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_bulkImport_presult__isset { + _TabletClientService_bulkImport_presult__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _TabletClientService_bulkImport_presult__isset; + +class TabletClientService_bulkImport_presult { + public: + + + virtual ~TabletClientService_bulkImport_presult() throw(); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent> * success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + + _TabletClientService_bulkImport_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _TabletClientService_loadFiles_args__isset { + _TabletClientService_loadFiles_args__isset() : tinfo(false), credentials(false), tid(false), dir(false), files(false), setTime(false) {} + bool tinfo :1; + bool credentials :1; + bool tid :1; + bool dir :1; + bool files :1; + bool setTime :1; +} _TabletClientService_loadFiles_args__isset; + +class TabletClientService_loadFiles_args { + public: + + TabletClientService_loadFiles_args(const TabletClientService_loadFiles_args&); + TabletClientService_loadFiles_args& operator=(const TabletClientService_loadFiles_args&); + TabletClientService_loadFiles_args() : tid(0), dir(), setTime(0) { + } + + virtual ~TabletClientService_loadFiles_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + int64_t tid; + std::string dir; + std::map< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent, std::map > files; + bool setTime; + + _TabletClientService_loadFiles_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_tid(const int64_t val); + + void __set_dir(const std::string& val); + + void __set_files(const std::map< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent, std::map > & val); + + void __set_setTime(const bool val); + + bool operator == (const TabletClientService_loadFiles_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(tid == rhs.tid)) + return false; + if (!(dir == rhs.dir)) + return false; + if (!(files == rhs.files)) + return false; + if (!(setTime == rhs.setTime)) + return false; + return true; + } + bool operator != (const TabletClientService_loadFiles_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_loadFiles_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_loadFiles_pargs { + public: + + + virtual ~TabletClientService_loadFiles_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const int64_t* tid; + const std::string* dir; + const std::map< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent, std::map > * files; + const bool* setTime; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_splitTablet_args__isset { + _TabletClientService_splitTablet_args__isset() : tinfo(false), credentials(false), extent(false), splitPoint(false) {} + bool tinfo :1; + bool credentials :1; + bool extent :1; + bool splitPoint :1; +} _TabletClientService_splitTablet_args__isset; + +class TabletClientService_splitTablet_args { + public: + + TabletClientService_splitTablet_args(const TabletClientService_splitTablet_args&); + TabletClientService_splitTablet_args& operator=(const TabletClientService_splitTablet_args&); + TabletClientService_splitTablet_args() : splitPoint() { + } + + virtual ~TabletClientService_splitTablet_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent extent; + std::string splitPoint; + + _TabletClientService_splitTablet_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_extent(const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& val); + + void __set_splitPoint(const std::string& val); + + bool operator == (const TabletClientService_splitTablet_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(extent == rhs.extent)) + return false; + if (!(splitPoint == rhs.splitPoint)) + return false; + return true; + } + bool operator != (const TabletClientService_splitTablet_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_splitTablet_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_splitTablet_pargs { + public: + + + virtual ~TabletClientService_splitTablet_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent* extent; + const std::string* splitPoint; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_splitTablet_result__isset { + _TabletClientService_splitTablet_result__isset() : sec(false), nste(false) {} + bool sec :1; + bool nste :1; +} _TabletClientService_splitTablet_result__isset; + +class TabletClientService_splitTablet_result { + public: + + TabletClientService_splitTablet_result(const TabletClientService_splitTablet_result&); + TabletClientService_splitTablet_result& operator=(const TabletClientService_splitTablet_result&); + TabletClientService_splitTablet_result() { + } + + virtual ~TabletClientService_splitTablet_result() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + NotServingTabletException nste; + + _TabletClientService_splitTablet_result__isset __isset; + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + void __set_nste(const NotServingTabletException& val); + + bool operator == (const TabletClientService_splitTablet_result & rhs) const + { + if (!(sec == rhs.sec)) + return false; + if (!(nste == rhs.nste)) + return false; + return true; + } + bool operator != (const TabletClientService_splitTablet_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_splitTablet_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_splitTablet_presult__isset { + _TabletClientService_splitTablet_presult__isset() : sec(false), nste(false) {} + bool sec :1; + bool nste :1; +} _TabletClientService_splitTablet_presult__isset; + +class TabletClientService_splitTablet_presult { + public: + + + virtual ~TabletClientService_splitTablet_presult() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + NotServingTabletException nste; + + _TabletClientService_splitTablet_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _TabletClientService_loadTablet_args__isset { + _TabletClientService_loadTablet_args__isset() : tinfo(false), credentials(false), lock(false), extent(false) {} + bool tinfo :1; + bool credentials :1; + bool lock :1; + bool extent :1; +} _TabletClientService_loadTablet_args__isset; + +class TabletClientService_loadTablet_args { + public: + + TabletClientService_loadTablet_args(const TabletClientService_loadTablet_args&); + TabletClientService_loadTablet_args& operator=(const TabletClientService_loadTablet_args&); + TabletClientService_loadTablet_args() : lock() { + } + + virtual ~TabletClientService_loadTablet_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string lock; + ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent extent; + + _TabletClientService_loadTablet_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_lock(const std::string& val); + + void __set_extent(const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& val); + + bool operator == (const TabletClientService_loadTablet_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(lock == rhs.lock)) + return false; + if (!(extent == rhs.extent)) + return false; + return true; + } + bool operator != (const TabletClientService_loadTablet_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_loadTablet_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_loadTablet_pargs { + public: + + + virtual ~TabletClientService_loadTablet_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* lock; + const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent* extent; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_unloadTablet_args__isset { + _TabletClientService_unloadTablet_args__isset() : tinfo(false), credentials(false), lock(false), extent(false), goal(false), requestTime(false) {} + bool tinfo :1; + bool credentials :1; + bool lock :1; + bool extent :1; + bool goal :1; + bool requestTime :1; +} _TabletClientService_unloadTablet_args__isset; + +class TabletClientService_unloadTablet_args { + public: + + TabletClientService_unloadTablet_args(const TabletClientService_unloadTablet_args&); + TabletClientService_unloadTablet_args& operator=(const TabletClientService_unloadTablet_args&); + TabletClientService_unloadTablet_args() : lock(), goal((TUnloadTabletGoal::type)0), requestTime(0) { + } + + virtual ~TabletClientService_unloadTablet_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string lock; + ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent extent; + TUnloadTabletGoal::type goal; + int64_t requestTime; + + _TabletClientService_unloadTablet_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_lock(const std::string& val); + + void __set_extent(const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& val); + + void __set_goal(const TUnloadTabletGoal::type val); + + void __set_requestTime(const int64_t val); + + bool operator == (const TabletClientService_unloadTablet_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(lock == rhs.lock)) + return false; + if (!(extent == rhs.extent)) + return false; + if (!(goal == rhs.goal)) + return false; + if (!(requestTime == rhs.requestTime)) + return false; + return true; + } + bool operator != (const TabletClientService_unloadTablet_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_unloadTablet_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_unloadTablet_pargs { + public: + + + virtual ~TabletClientService_unloadTablet_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* lock; + const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent* extent; + const TUnloadTabletGoal::type* goal; + const int64_t* requestTime; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_flush_args__isset { + _TabletClientService_flush_args__isset() : tinfo(false), credentials(false), lock(false), tableId(false), startRow(false), endRow(false) {} + bool tinfo :1; + bool credentials :1; + bool lock :1; + bool tableId :1; + bool startRow :1; + bool endRow :1; +} _TabletClientService_flush_args__isset; + +class TabletClientService_flush_args { + public: + + TabletClientService_flush_args(const TabletClientService_flush_args&); + TabletClientService_flush_args& operator=(const TabletClientService_flush_args&); + TabletClientService_flush_args() : lock(), tableId(), startRow(), endRow() { + } + + virtual ~TabletClientService_flush_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string lock; + std::string tableId; + std::string startRow; + std::string endRow; + + _TabletClientService_flush_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_lock(const std::string& val); + + void __set_tableId(const std::string& val); + + void __set_startRow(const std::string& val); + + void __set_endRow(const std::string& val); + + bool operator == (const TabletClientService_flush_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(lock == rhs.lock)) + return false; + if (!(tableId == rhs.tableId)) + return false; + if (!(startRow == rhs.startRow)) + return false; + if (!(endRow == rhs.endRow)) + return false; + return true; + } + bool operator != (const TabletClientService_flush_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_flush_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_flush_pargs { + public: + + + virtual ~TabletClientService_flush_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* lock; + const std::string* tableId; + const std::string* startRow; + const std::string* endRow; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_flushTablet_args__isset { + _TabletClientService_flushTablet_args__isset() : tinfo(false), credentials(false), lock(false), extent(false) {} + bool tinfo :1; + bool credentials :1; + bool lock :1; + bool extent :1; +} _TabletClientService_flushTablet_args__isset; + +class TabletClientService_flushTablet_args { + public: + + TabletClientService_flushTablet_args(const TabletClientService_flushTablet_args&); + TabletClientService_flushTablet_args& operator=(const TabletClientService_flushTablet_args&); + TabletClientService_flushTablet_args() : lock() { + } + + virtual ~TabletClientService_flushTablet_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string lock; + ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent extent; + + _TabletClientService_flushTablet_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_lock(const std::string& val); + + void __set_extent(const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& val); + + bool operator == (const TabletClientService_flushTablet_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(lock == rhs.lock)) + return false; + if (!(extent == rhs.extent)) + return false; + return true; + } + bool operator != (const TabletClientService_flushTablet_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_flushTablet_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_flushTablet_pargs { + public: + + + virtual ~TabletClientService_flushTablet_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* lock; + const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent* extent; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_chop_args__isset { + _TabletClientService_chop_args__isset() : tinfo(false), credentials(false), lock(false), extent(false) {} + bool tinfo :1; + bool credentials :1; + bool lock :1; + bool extent :1; +} _TabletClientService_chop_args__isset; + +class TabletClientService_chop_args { + public: + + TabletClientService_chop_args(const TabletClientService_chop_args&); + TabletClientService_chop_args& operator=(const TabletClientService_chop_args&); + TabletClientService_chop_args() : lock() { + } + + virtual ~TabletClientService_chop_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string lock; + ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent extent; + + _TabletClientService_chop_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_lock(const std::string& val); + + void __set_extent(const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& val); + + bool operator == (const TabletClientService_chop_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(lock == rhs.lock)) + return false; + if (!(extent == rhs.extent)) + return false; + return true; + } + bool operator != (const TabletClientService_chop_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_chop_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_chop_pargs { + public: + + + virtual ~TabletClientService_chop_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* lock; + const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent* extent; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_compact_args__isset { + _TabletClientService_compact_args__isset() : tinfo(false), credentials(false), lock(false), tableId(false), startRow(false), endRow(false) {} + bool tinfo :1; + bool credentials :1; + bool lock :1; + bool tableId :1; + bool startRow :1; + bool endRow :1; +} _TabletClientService_compact_args__isset; + +class TabletClientService_compact_args { + public: + + TabletClientService_compact_args(const TabletClientService_compact_args&); + TabletClientService_compact_args& operator=(const TabletClientService_compact_args&); + TabletClientService_compact_args() : lock(), tableId(), startRow(), endRow() { + } + + virtual ~TabletClientService_compact_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string lock; + std::string tableId; + std::string startRow; + std::string endRow; + + _TabletClientService_compact_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_lock(const std::string& val); + + void __set_tableId(const std::string& val); + + void __set_startRow(const std::string& val); + + void __set_endRow(const std::string& val); + + bool operator == (const TabletClientService_compact_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(lock == rhs.lock)) + return false; + if (!(tableId == rhs.tableId)) + return false; + if (!(startRow == rhs.startRow)) + return false; + if (!(endRow == rhs.endRow)) + return false; + return true; + } + bool operator != (const TabletClientService_compact_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_compact_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_compact_pargs { + public: + + + virtual ~TabletClientService_compact_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* lock; + const std::string* tableId; + const std::string* startRow; + const std::string* endRow; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_getTabletServerStatus_args__isset { + _TabletClientService_getTabletServerStatus_args__isset() : tinfo(false), credentials(false) {} + bool tinfo :1; + bool credentials :1; +} _TabletClientService_getTabletServerStatus_args__isset; + +class TabletClientService_getTabletServerStatus_args { + public: + + TabletClientService_getTabletServerStatus_args(const TabletClientService_getTabletServerStatus_args&); + TabletClientService_getTabletServerStatus_args& operator=(const TabletClientService_getTabletServerStatus_args&); + TabletClientService_getTabletServerStatus_args() { + } + + virtual ~TabletClientService_getTabletServerStatus_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + + _TabletClientService_getTabletServerStatus_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + bool operator == (const TabletClientService_getTabletServerStatus_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + return true; + } + bool operator != (const TabletClientService_getTabletServerStatus_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_getTabletServerStatus_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_getTabletServerStatus_pargs { + public: + + + virtual ~TabletClientService_getTabletServerStatus_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_getTabletServerStatus_result__isset { + _TabletClientService_getTabletServerStatus_result__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _TabletClientService_getTabletServerStatus_result__isset; + +class TabletClientService_getTabletServerStatus_result { + public: + + TabletClientService_getTabletServerStatus_result(const TabletClientService_getTabletServerStatus_result&); + TabletClientService_getTabletServerStatus_result& operator=(const TabletClientService_getTabletServerStatus_result&); + TabletClientService_getTabletServerStatus_result() { + } + + virtual ~TabletClientService_getTabletServerStatus_result() throw(); + ::org::apache::accumulov2::core::master::thrift::TabletServerStatus success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + + _TabletClientService_getTabletServerStatus_result__isset __isset; + + void __set_success(const ::org::apache::accumulov2::core::master::thrift::TabletServerStatus& val); + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + bool operator == (const TabletClientService_getTabletServerStatus_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + return true; + } + bool operator != (const TabletClientService_getTabletServerStatus_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_getTabletServerStatus_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_getTabletServerStatus_presult__isset { + _TabletClientService_getTabletServerStatus_presult__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _TabletClientService_getTabletServerStatus_presult__isset; + +class TabletClientService_getTabletServerStatus_presult { + public: + + + virtual ~TabletClientService_getTabletServerStatus_presult() throw(); + ::org::apache::accumulov2::core::master::thrift::TabletServerStatus* success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + + _TabletClientService_getTabletServerStatus_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _TabletClientService_getTabletStats_args__isset { + _TabletClientService_getTabletStats_args__isset() : tinfo(false), credentials(false), tableId(false) {} + bool tinfo :1; + bool credentials :1; + bool tableId :1; +} _TabletClientService_getTabletStats_args__isset; + +class TabletClientService_getTabletStats_args { + public: + + TabletClientService_getTabletStats_args(const TabletClientService_getTabletStats_args&); + TabletClientService_getTabletStats_args& operator=(const TabletClientService_getTabletStats_args&); + TabletClientService_getTabletStats_args() : tableId() { + } + + virtual ~TabletClientService_getTabletStats_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string tableId; + + _TabletClientService_getTabletStats_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_tableId(const std::string& val); + + bool operator == (const TabletClientService_getTabletStats_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(tableId == rhs.tableId)) + return false; + return true; + } + bool operator != (const TabletClientService_getTabletStats_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_getTabletStats_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_getTabletStats_pargs { + public: + + + virtual ~TabletClientService_getTabletStats_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* tableId; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_getTabletStats_result__isset { + _TabletClientService_getTabletStats_result__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _TabletClientService_getTabletStats_result__isset; + +class TabletClientService_getTabletStats_result { + public: + + TabletClientService_getTabletStats_result(const TabletClientService_getTabletStats_result&); + TabletClientService_getTabletStats_result& operator=(const TabletClientService_getTabletStats_result&); + TabletClientService_getTabletStats_result() { + } + + virtual ~TabletClientService_getTabletStats_result() throw(); + std::vector success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + + _TabletClientService_getTabletStats_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + bool operator == (const TabletClientService_getTabletStats_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + return true; + } + bool operator != (const TabletClientService_getTabletStats_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_getTabletStats_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_getTabletStats_presult__isset { + _TabletClientService_getTabletStats_presult__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _TabletClientService_getTabletStats_presult__isset; + +class TabletClientService_getTabletStats_presult { + public: + + + virtual ~TabletClientService_getTabletStats_presult() throw(); + std::vector * success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + + _TabletClientService_getTabletStats_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _TabletClientService_getHistoricalStats_args__isset { + _TabletClientService_getHistoricalStats_args__isset() : tinfo(false), credentials(false) {} + bool tinfo :1; + bool credentials :1; +} _TabletClientService_getHistoricalStats_args__isset; + +class TabletClientService_getHistoricalStats_args { + public: + + TabletClientService_getHistoricalStats_args(const TabletClientService_getHistoricalStats_args&); + TabletClientService_getHistoricalStats_args& operator=(const TabletClientService_getHistoricalStats_args&); + TabletClientService_getHistoricalStats_args() { + } + + virtual ~TabletClientService_getHistoricalStats_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + + _TabletClientService_getHistoricalStats_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + bool operator == (const TabletClientService_getHistoricalStats_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + return true; + } + bool operator != (const TabletClientService_getHistoricalStats_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_getHistoricalStats_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_getHistoricalStats_pargs { + public: + + + virtual ~TabletClientService_getHistoricalStats_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_getHistoricalStats_result__isset { + _TabletClientService_getHistoricalStats_result__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _TabletClientService_getHistoricalStats_result__isset; + +class TabletClientService_getHistoricalStats_result { + public: + + TabletClientService_getHistoricalStats_result(const TabletClientService_getHistoricalStats_result&); + TabletClientService_getHistoricalStats_result& operator=(const TabletClientService_getHistoricalStats_result&); + TabletClientService_getHistoricalStats_result() { + } + + virtual ~TabletClientService_getHistoricalStats_result() throw(); + TabletStats success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + + _TabletClientService_getHistoricalStats_result__isset __isset; + + void __set_success(const TabletStats& val); + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + bool operator == (const TabletClientService_getHistoricalStats_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + return true; + } + bool operator != (const TabletClientService_getHistoricalStats_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_getHistoricalStats_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_getHistoricalStats_presult__isset { + _TabletClientService_getHistoricalStats_presult__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _TabletClientService_getHistoricalStats_presult__isset; + +class TabletClientService_getHistoricalStats_presult { + public: + + + virtual ~TabletClientService_getHistoricalStats_presult() throw(); + TabletStats* success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + + _TabletClientService_getHistoricalStats_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _TabletClientService_halt_args__isset { + _TabletClientService_halt_args__isset() : tinfo(false), credentials(false), lock(false) {} + bool tinfo :1; + bool credentials :1; + bool lock :1; +} _TabletClientService_halt_args__isset; + +class TabletClientService_halt_args { + public: + + TabletClientService_halt_args(const TabletClientService_halt_args&); + TabletClientService_halt_args& operator=(const TabletClientService_halt_args&); + TabletClientService_halt_args() : lock() { + } + + virtual ~TabletClientService_halt_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string lock; + + _TabletClientService_halt_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_lock(const std::string& val); + + bool operator == (const TabletClientService_halt_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(lock == rhs.lock)) + return false; + return true; + } + bool operator != (const TabletClientService_halt_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_halt_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_halt_pargs { + public: + + + virtual ~TabletClientService_halt_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* lock; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_halt_result__isset { + _TabletClientService_halt_result__isset() : sec(false) {} + bool sec :1; +} _TabletClientService_halt_result__isset; + +class TabletClientService_halt_result { + public: + + TabletClientService_halt_result(const TabletClientService_halt_result&); + TabletClientService_halt_result& operator=(const TabletClientService_halt_result&); + TabletClientService_halt_result() { + } + + virtual ~TabletClientService_halt_result() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + + _TabletClientService_halt_result__isset __isset; + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + bool operator == (const TabletClientService_halt_result & rhs) const + { + if (!(sec == rhs.sec)) + return false; + return true; + } + bool operator != (const TabletClientService_halt_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_halt_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_halt_presult__isset { + _TabletClientService_halt_presult__isset() : sec(false) {} + bool sec :1; +} _TabletClientService_halt_presult__isset; + +class TabletClientService_halt_presult { + public: + + + virtual ~TabletClientService_halt_presult() throw(); + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + + _TabletClientService_halt_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _TabletClientService_fastHalt_args__isset { + _TabletClientService_fastHalt_args__isset() : tinfo(false), credentials(false), lock(false) {} + bool tinfo :1; + bool credentials :1; + bool lock :1; +} _TabletClientService_fastHalt_args__isset; + +class TabletClientService_fastHalt_args { + public: + + TabletClientService_fastHalt_args(const TabletClientService_fastHalt_args&); + TabletClientService_fastHalt_args& operator=(const TabletClientService_fastHalt_args&); + TabletClientService_fastHalt_args() : lock() { + } + + virtual ~TabletClientService_fastHalt_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::string lock; + + _TabletClientService_fastHalt_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_lock(const std::string& val); + + bool operator == (const TabletClientService_fastHalt_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(lock == rhs.lock)) + return false; + return true; + } + bool operator != (const TabletClientService_fastHalt_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_fastHalt_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_fastHalt_pargs { + public: + + + virtual ~TabletClientService_fastHalt_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::string* lock; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_getActiveScans_args__isset { + _TabletClientService_getActiveScans_args__isset() : tinfo(false), credentials(false) {} + bool tinfo :1; + bool credentials :1; +} _TabletClientService_getActiveScans_args__isset; + +class TabletClientService_getActiveScans_args { + public: + + TabletClientService_getActiveScans_args(const TabletClientService_getActiveScans_args&); + TabletClientService_getActiveScans_args& operator=(const TabletClientService_getActiveScans_args&); + TabletClientService_getActiveScans_args() { + } + + virtual ~TabletClientService_getActiveScans_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + + _TabletClientService_getActiveScans_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + bool operator == (const TabletClientService_getActiveScans_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + return true; + } + bool operator != (const TabletClientService_getActiveScans_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_getActiveScans_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_getActiveScans_pargs { + public: + + + virtual ~TabletClientService_getActiveScans_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_getActiveScans_result__isset { + _TabletClientService_getActiveScans_result__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _TabletClientService_getActiveScans_result__isset; + +class TabletClientService_getActiveScans_result { + public: + + TabletClientService_getActiveScans_result(const TabletClientService_getActiveScans_result&); + TabletClientService_getActiveScans_result& operator=(const TabletClientService_getActiveScans_result&); + TabletClientService_getActiveScans_result() { + } + + virtual ~TabletClientService_getActiveScans_result() throw(); + std::vector success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + + _TabletClientService_getActiveScans_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + bool operator == (const TabletClientService_getActiveScans_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + return true; + } + bool operator != (const TabletClientService_getActiveScans_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_getActiveScans_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_getActiveScans_presult__isset { + _TabletClientService_getActiveScans_presult__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _TabletClientService_getActiveScans_presult__isset; + +class TabletClientService_getActiveScans_presult { + public: + + + virtual ~TabletClientService_getActiveScans_presult() throw(); + std::vector * success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + + _TabletClientService_getActiveScans_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _TabletClientService_getActiveCompactions_args__isset { + _TabletClientService_getActiveCompactions_args__isset() : tinfo(false), credentials(false) {} + bool tinfo :1; + bool credentials :1; +} _TabletClientService_getActiveCompactions_args__isset; + +class TabletClientService_getActiveCompactions_args { + public: + + TabletClientService_getActiveCompactions_args(const TabletClientService_getActiveCompactions_args&); + TabletClientService_getActiveCompactions_args& operator=(const TabletClientService_getActiveCompactions_args&); + TabletClientService_getActiveCompactions_args() { + } + + virtual ~TabletClientService_getActiveCompactions_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + + _TabletClientService_getActiveCompactions_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + bool operator == (const TabletClientService_getActiveCompactions_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + return true; + } + bool operator != (const TabletClientService_getActiveCompactions_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_getActiveCompactions_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_getActiveCompactions_pargs { + public: + + + virtual ~TabletClientService_getActiveCompactions_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_getActiveCompactions_result__isset { + _TabletClientService_getActiveCompactions_result__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _TabletClientService_getActiveCompactions_result__isset; + +class TabletClientService_getActiveCompactions_result { + public: + + TabletClientService_getActiveCompactions_result(const TabletClientService_getActiveCompactions_result&); + TabletClientService_getActiveCompactions_result& operator=(const TabletClientService_getActiveCompactions_result&); + TabletClientService_getActiveCompactions_result() { + } + + virtual ~TabletClientService_getActiveCompactions_result() throw(); + std::vector success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + + _TabletClientService_getActiveCompactions_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + bool operator == (const TabletClientService_getActiveCompactions_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + return true; + } + bool operator != (const TabletClientService_getActiveCompactions_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_getActiveCompactions_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_getActiveCompactions_presult__isset { + _TabletClientService_getActiveCompactions_presult__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _TabletClientService_getActiveCompactions_presult__isset; + +class TabletClientService_getActiveCompactions_presult { + public: + + + virtual ~TabletClientService_getActiveCompactions_presult() throw(); + std::vector * success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + + _TabletClientService_getActiveCompactions_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _TabletClientService_removeLogs_args__isset { + _TabletClientService_removeLogs_args__isset() : tinfo(false), credentials(false), filenames(false) {} + bool tinfo :1; + bool credentials :1; + bool filenames :1; +} _TabletClientService_removeLogs_args__isset; + +class TabletClientService_removeLogs_args { + public: + + TabletClientService_removeLogs_args(const TabletClientService_removeLogs_args&); + TabletClientService_removeLogs_args& operator=(const TabletClientService_removeLogs_args&); + TabletClientService_removeLogs_args() { + } + + virtual ~TabletClientService_removeLogs_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + std::vector filenames; + + _TabletClientService_removeLogs_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_filenames(const std::vector & val); + + bool operator == (const TabletClientService_removeLogs_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(filenames == rhs.filenames)) + return false; + return true; + } + bool operator != (const TabletClientService_removeLogs_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_removeLogs_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_removeLogs_pargs { + public: + + + virtual ~TabletClientService_removeLogs_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const std::vector * filenames; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_getActiveLogs_args__isset { + _TabletClientService_getActiveLogs_args__isset() : tinfo(false), credentials(false) {} + bool tinfo :1; + bool credentials :1; +} _TabletClientService_getActiveLogs_args__isset; + +class TabletClientService_getActiveLogs_args { + public: + + TabletClientService_getActiveLogs_args(const TabletClientService_getActiveLogs_args&); + TabletClientService_getActiveLogs_args& operator=(const TabletClientService_getActiveLogs_args&); + TabletClientService_getActiveLogs_args() { + } + + virtual ~TabletClientService_getActiveLogs_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + + _TabletClientService_getActiveLogs_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + bool operator == (const TabletClientService_getActiveLogs_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + return true; + } + bool operator != (const TabletClientService_getActiveLogs_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_getActiveLogs_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_getActiveLogs_pargs { + public: + + + virtual ~TabletClientService_getActiveLogs_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_getActiveLogs_result__isset { + _TabletClientService_getActiveLogs_result__isset() : success(false) {} + bool success :1; +} _TabletClientService_getActiveLogs_result__isset; + +class TabletClientService_getActiveLogs_result { + public: + + TabletClientService_getActiveLogs_result(const TabletClientService_getActiveLogs_result&); + TabletClientService_getActiveLogs_result& operator=(const TabletClientService_getActiveLogs_result&); + TabletClientService_getActiveLogs_result() { + } + + virtual ~TabletClientService_getActiveLogs_result() throw(); + std::vector success; + + _TabletClientService_getActiveLogs_result__isset __isset; + + void __set_success(const std::vector & val); + + bool operator == (const TabletClientService_getActiveLogs_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const TabletClientService_getActiveLogs_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_getActiveLogs_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_getActiveLogs_presult__isset { + _TabletClientService_getActiveLogs_presult__isset() : success(false) {} + bool success :1; +} _TabletClientService_getActiveLogs_presult__isset; + +class TabletClientService_getActiveLogs_presult { + public: + + + virtual ~TabletClientService_getActiveLogs_presult() throw(); + std::vector * success; + + _TabletClientService_getActiveLogs_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _TabletClientService_startGetSummaries_args__isset { + _TabletClientService_startGetSummaries_args__isset() : tinfo(false), credentials(false), request(false) {} + bool tinfo :1; + bool credentials :1; + bool request :1; +} _TabletClientService_startGetSummaries_args__isset; + +class TabletClientService_startGetSummaries_args { + public: + + TabletClientService_startGetSummaries_args(const TabletClientService_startGetSummaries_args&); + TabletClientService_startGetSummaries_args& operator=(const TabletClientService_startGetSummaries_args&); + TabletClientService_startGetSummaries_args() { + } + + virtual ~TabletClientService_startGetSummaries_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest request; + + _TabletClientService_startGetSummaries_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_request(const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& val); + + bool operator == (const TabletClientService_startGetSummaries_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(request == rhs.request)) + return false; + return true; + } + bool operator != (const TabletClientService_startGetSummaries_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_startGetSummaries_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_startGetSummaries_pargs { + public: + + + virtual ~TabletClientService_startGetSummaries_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest* request; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_startGetSummaries_result__isset { + _TabletClientService_startGetSummaries_result__isset() : success(false), sec(false), tope(false) {} + bool success :1; + bool sec :1; + bool tope :1; +} _TabletClientService_startGetSummaries_result__isset; + +class TabletClientService_startGetSummaries_result { + public: + + TabletClientService_startGetSummaries_result(const TabletClientService_startGetSummaries_result&); + TabletClientService_startGetSummaries_result& operator=(const TabletClientService_startGetSummaries_result&); + TabletClientService_startGetSummaries_result() { + } + + virtual ~TabletClientService_startGetSummaries_result() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException tope; + + _TabletClientService_startGetSummaries_result__isset __isset; + + void __set_success(const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& val); + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + void __set_tope(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException& val); + + bool operator == (const TabletClientService_startGetSummaries_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + if (!(tope == rhs.tope)) + return false; + return true; + } + bool operator != (const TabletClientService_startGetSummaries_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_startGetSummaries_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_startGetSummaries_presult__isset { + _TabletClientService_startGetSummaries_presult__isset() : success(false), sec(false), tope(false) {} + bool success :1; + bool sec :1; + bool tope :1; +} _TabletClientService_startGetSummaries_presult__isset; + +class TabletClientService_startGetSummaries_presult { + public: + + + virtual ~TabletClientService_startGetSummaries_presult() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries* success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException tope; + + _TabletClientService_startGetSummaries_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _TabletClientService_startGetSummariesForPartition_args__isset { + _TabletClientService_startGetSummariesForPartition_args__isset() : tinfo(false), credentials(false), request(false), modulus(false), remainder(false) {} + bool tinfo :1; + bool credentials :1; + bool request :1; + bool modulus :1; + bool remainder :1; +} _TabletClientService_startGetSummariesForPartition_args__isset; + +class TabletClientService_startGetSummariesForPartition_args { + public: + + TabletClientService_startGetSummariesForPartition_args(const TabletClientService_startGetSummariesForPartition_args&); + TabletClientService_startGetSummariesForPartition_args& operator=(const TabletClientService_startGetSummariesForPartition_args&); + TabletClientService_startGetSummariesForPartition_args() : modulus(0), remainder(0) { + } + + virtual ~TabletClientService_startGetSummariesForPartition_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest request; + int32_t modulus; + int32_t remainder; + + _TabletClientService_startGetSummariesForPartition_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_request(const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& val); + + void __set_modulus(const int32_t val); + + void __set_remainder(const int32_t val); + + bool operator == (const TabletClientService_startGetSummariesForPartition_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(request == rhs.request)) + return false; + if (!(modulus == rhs.modulus)) + return false; + if (!(remainder == rhs.remainder)) + return false; + return true; + } + bool operator != (const TabletClientService_startGetSummariesForPartition_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_startGetSummariesForPartition_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_startGetSummariesForPartition_pargs { + public: + + + virtual ~TabletClientService_startGetSummariesForPartition_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest* request; + const int32_t* modulus; + const int32_t* remainder; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_startGetSummariesForPartition_result__isset { + _TabletClientService_startGetSummariesForPartition_result__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _TabletClientService_startGetSummariesForPartition_result__isset; + +class TabletClientService_startGetSummariesForPartition_result { + public: + + TabletClientService_startGetSummariesForPartition_result(const TabletClientService_startGetSummariesForPartition_result&); + TabletClientService_startGetSummariesForPartition_result& operator=(const TabletClientService_startGetSummariesForPartition_result&); + TabletClientService_startGetSummariesForPartition_result() { + } + + virtual ~TabletClientService_startGetSummariesForPartition_result() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + + _TabletClientService_startGetSummariesForPartition_result__isset __isset; + + void __set_success(const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& val); + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + bool operator == (const TabletClientService_startGetSummariesForPartition_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + return true; + } + bool operator != (const TabletClientService_startGetSummariesForPartition_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_startGetSummariesForPartition_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_startGetSummariesForPartition_presult__isset { + _TabletClientService_startGetSummariesForPartition_presult__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _TabletClientService_startGetSummariesForPartition_presult__isset; + +class TabletClientService_startGetSummariesForPartition_presult { + public: + + + virtual ~TabletClientService_startGetSummariesForPartition_presult() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries* success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + + _TabletClientService_startGetSummariesForPartition_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _TabletClientService_startGetSummariesFromFiles_args__isset { + _TabletClientService_startGetSummariesFromFiles_args__isset() : tinfo(false), credentials(false), request(false), files(false) {} + bool tinfo :1; + bool credentials :1; + bool request :1; + bool files :1; +} _TabletClientService_startGetSummariesFromFiles_args__isset; + +class TabletClientService_startGetSummariesFromFiles_args { + public: + + TabletClientService_startGetSummariesFromFiles_args(const TabletClientService_startGetSummariesFromFiles_args&); + TabletClientService_startGetSummariesFromFiles_args& operator=(const TabletClientService_startGetSummariesFromFiles_args&); + TabletClientService_startGetSummariesFromFiles_args() { + } + + virtual ~TabletClientService_startGetSummariesFromFiles_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials credentials; + ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest request; + std::map > files; + + _TabletClientService_startGetSummariesFromFiles_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_credentials(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& val); + + void __set_request(const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& val); + + void __set_files(const std::map > & val); + + bool operator == (const TabletClientService_startGetSummariesFromFiles_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(credentials == rhs.credentials)) + return false; + if (!(request == rhs.request)) + return false; + if (!(files == rhs.files)) + return false; + return true; + } + bool operator != (const TabletClientService_startGetSummariesFromFiles_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_startGetSummariesFromFiles_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_startGetSummariesFromFiles_pargs { + public: + + + virtual ~TabletClientService_startGetSummariesFromFiles_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials* credentials; + const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest* request; + const std::map > * files; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_startGetSummariesFromFiles_result__isset { + _TabletClientService_startGetSummariesFromFiles_result__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _TabletClientService_startGetSummariesFromFiles_result__isset; + +class TabletClientService_startGetSummariesFromFiles_result { + public: + + TabletClientService_startGetSummariesFromFiles_result(const TabletClientService_startGetSummariesFromFiles_result&); + TabletClientService_startGetSummariesFromFiles_result& operator=(const TabletClientService_startGetSummariesFromFiles_result&); + TabletClientService_startGetSummariesFromFiles_result() { + } + + virtual ~TabletClientService_startGetSummariesFromFiles_result() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + + _TabletClientService_startGetSummariesFromFiles_result__isset __isset; + + void __set_success(const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& val); + + void __set_sec(const ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException& val); + + bool operator == (const TabletClientService_startGetSummariesFromFiles_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(sec == rhs.sec)) + return false; + return true; + } + bool operator != (const TabletClientService_startGetSummariesFromFiles_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_startGetSummariesFromFiles_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_startGetSummariesFromFiles_presult__isset { + _TabletClientService_startGetSummariesFromFiles_presult__isset() : success(false), sec(false) {} + bool success :1; + bool sec :1; +} _TabletClientService_startGetSummariesFromFiles_presult__isset; + +class TabletClientService_startGetSummariesFromFiles_presult { + public: + + + virtual ~TabletClientService_startGetSummariesFromFiles_presult() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries* success; + ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException sec; + + _TabletClientService_startGetSummariesFromFiles_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _TabletClientService_contiuneGetSummaries_args__isset { + _TabletClientService_contiuneGetSummaries_args__isset() : tinfo(false), sessionId(false) {} + bool tinfo :1; + bool sessionId :1; +} _TabletClientService_contiuneGetSummaries_args__isset; + +class TabletClientService_contiuneGetSummaries_args { + public: + + TabletClientService_contiuneGetSummaries_args(const TabletClientService_contiuneGetSummaries_args&); + TabletClientService_contiuneGetSummaries_args& operator=(const TabletClientService_contiuneGetSummaries_args&); + TabletClientService_contiuneGetSummaries_args() : sessionId(0) { + } + + virtual ~TabletClientService_contiuneGetSummaries_args() throw(); + ::org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + int64_t sessionId; + + _TabletClientService_contiuneGetSummaries_args__isset __isset; + + void __set_tinfo(const ::org::apache::accumulov2::core::trace::thrift::TInfo& val); + + void __set_sessionId(const int64_t val); + + bool operator == (const TabletClientService_contiuneGetSummaries_args & rhs) const + { + if (!(tinfo == rhs.tinfo)) + return false; + if (!(sessionId == rhs.sessionId)) + return false; + return true; + } + bool operator != (const TabletClientService_contiuneGetSummaries_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_contiuneGetSummaries_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class TabletClientService_contiuneGetSummaries_pargs { + public: + + + virtual ~TabletClientService_contiuneGetSummaries_pargs() throw(); + const ::org::apache::accumulov2::core::trace::thrift::TInfo* tinfo; + const int64_t* sessionId; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_contiuneGetSummaries_result__isset { + _TabletClientService_contiuneGetSummaries_result__isset() : success(false), nssi(false) {} + bool success :1; + bool nssi :1; +} _TabletClientService_contiuneGetSummaries_result__isset; + +class TabletClientService_contiuneGetSummaries_result { + public: + + TabletClientService_contiuneGetSummaries_result(const TabletClientService_contiuneGetSummaries_result&); + TabletClientService_contiuneGetSummaries_result& operator=(const TabletClientService_contiuneGetSummaries_result&); + TabletClientService_contiuneGetSummaries_result() { + } + + virtual ~TabletClientService_contiuneGetSummaries_result() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries success; + NoSuchScanIDException nssi; + + _TabletClientService_contiuneGetSummaries_result__isset __isset; + + void __set_success(const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& val); + + void __set_nssi(const NoSuchScanIDException& val); + + bool operator == (const TabletClientService_contiuneGetSummaries_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(nssi == rhs.nssi)) + return false; + return true; + } + bool operator != (const TabletClientService_contiuneGetSummaries_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletClientService_contiuneGetSummaries_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TabletClientService_contiuneGetSummaries_presult__isset { + _TabletClientService_contiuneGetSummaries_presult__isset() : success(false), nssi(false) {} + bool success :1; + bool nssi :1; +} _TabletClientService_contiuneGetSummaries_presult__isset; + +class TabletClientService_contiuneGetSummaries_presult { + public: + + + virtual ~TabletClientService_contiuneGetSummaries_presult() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries* success; + NoSuchScanIDException nssi; + + _TabletClientService_contiuneGetSummaries_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +class TabletClientServiceClient : virtual public TabletClientServiceIf, public ::org::apache::accumulov2::core::clientImpl::thrift::ClientServiceClient { + public: + TabletClientServiceClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) : + ::org::apache::accumulov2::core::clientImpl::thrift::ClientServiceClient(prot, prot) {} + TabletClientServiceClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) : ::org::apache::accumulov2::core::clientImpl::thrift::ClientServiceClient(iprot, oprot) {} + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + return piprot_; + } + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { + return poprot_; + } + void startScan( ::org::apache::accumulov2::core::dataImpl::thrift::InitialScan& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const ::org::apache::accumulov2::core::dataImpl::thrift::TRange& range, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & columns, const int32_t batchSize, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & ssiList, const std::map > & ssio, const std::vector & authorizations, const bool waitForWrites, const bool isolated, const int64_t readaheadThreshold, const TSamplerConfiguration& samplerConfig, const int64_t batchTimeOut, const std::string& classLoaderContext, const std::map & executionHints); + void send_startScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const ::org::apache::accumulov2::core::dataImpl::thrift::TRange& range, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & columns, const int32_t batchSize, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & ssiList, const std::map > & ssio, const std::vector & authorizations, const bool waitForWrites, const bool isolated, const int64_t readaheadThreshold, const TSamplerConfiguration& samplerConfig, const int64_t batchTimeOut, const std::string& classLoaderContext, const std::map & executionHints); + void recv_startScan( ::org::apache::accumulov2::core::dataImpl::thrift::InitialScan& _return); + void continueScan( ::org::apache::accumulov2::core::dataImpl::thrift::ScanResult& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID); + void send_continueScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID); + void recv_continueScan( ::org::apache::accumulov2::core::dataImpl::thrift::ScanResult& _return); + void closeScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID); + void send_closeScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID); + void startMultiScan( ::org::apache::accumulov2::core::dataImpl::thrift::InitialMultiScan& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanBatch& batch, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & columns, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & ssiList, const std::map > & ssio, const std::vector & authorizations, const bool waitForWrites, const TSamplerConfiguration& samplerConfig, const int64_t batchTimeOut, const std::string& classLoaderContext, const std::map & executionHints); + void send_startMultiScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanBatch& batch, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & columns, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & ssiList, const std::map > & ssio, const std::vector & authorizations, const bool waitForWrites, const TSamplerConfiguration& samplerConfig, const int64_t batchTimeOut, const std::string& classLoaderContext, const std::map & executionHints); + void recv_startMultiScan( ::org::apache::accumulov2::core::dataImpl::thrift::InitialMultiScan& _return); + void continueMultiScan( ::org::apache::accumulov2::core::dataImpl::thrift::MultiScanResult& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID); + void send_continueMultiScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID); + void recv_continueMultiScan( ::org::apache::accumulov2::core::dataImpl::thrift::MultiScanResult& _return); + void closeMultiScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID); + void send_closeMultiScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID); + void recv_closeMultiScan(); + ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID startUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const TDurability::type durability); + void send_startUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const TDurability::type durability); + ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID recv_startUpdate(); + void applyUpdates(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID updateID, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& keyExtent, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TMutation> & mutations); + void send_applyUpdates(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID updateID, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& keyExtent, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TMutation> & mutations); + void closeUpdate( ::org::apache::accumulov2::core::dataImpl::thrift::UpdateErrors& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID updateID); + void send_closeUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID updateID); + void recv_closeUpdate( ::org::apache::accumulov2::core::dataImpl::thrift::UpdateErrors& _return); + void update(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& keyExtent, const ::org::apache::accumulov2::core::dataImpl::thrift::TMutation& mutation, const TDurability::type durability); + void send_update(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& keyExtent, const ::org::apache::accumulov2::core::dataImpl::thrift::TMutation& mutation, const TDurability::type durability); + void recv_update(); + void startConditionalUpdate( ::org::apache::accumulov2::core::dataImpl::thrift::TConditionalSession& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::vector & authorizations, const std::string& tableID, const TDurability::type durability, const std::string& classLoaderContext); + void send_startConditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::vector & authorizations, const std::string& tableID, const TDurability::type durability, const std::string& classLoaderContext); + void recv_startConditionalUpdate( ::org::apache::accumulov2::core::dataImpl::thrift::TConditionalSession& _return); + void conditionalUpdate(std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TCMResult> & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID, const ::org::apache::accumulov2::core::dataImpl::thrift::CMBatch& mutations, const std::vector & symbols); + void send_conditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID, const ::org::apache::accumulov2::core::dataImpl::thrift::CMBatch& mutations, const std::vector & symbols); + void recv_conditionalUpdate(std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TCMResult> & _return); + void invalidateConditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID); + void send_invalidateConditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID); + void recv_invalidateConditionalUpdate(); + void closeConditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID); + void send_closeConditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID); + void bulkImport(std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent> & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const ::org::apache::accumulov2::core::dataImpl::thrift::TabletFiles& files, const bool setTime); + void send_bulkImport(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const ::org::apache::accumulov2::core::dataImpl::thrift::TabletFiles& files, const bool setTime); + void recv_bulkImport(std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent> & _return); + void loadFiles(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const std::string& dir, const std::map< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent, std::map > & files, const bool setTime); + void send_loadFiles(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const std::string& dir, const std::map< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent, std::map > & files, const bool setTime); + void splitTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const std::string& splitPoint); + void send_splitTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const std::string& splitPoint); + void recv_splitTablet(); + void loadTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent); + void send_loadTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent); + void unloadTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const TUnloadTabletGoal::type goal, const int64_t requestTime); + void send_unloadTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const TUnloadTabletGoal::type goal, const int64_t requestTime); + void flush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const std::string& tableId, const std::string& startRow, const std::string& endRow); + void send_flush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const std::string& tableId, const std::string& startRow, const std::string& endRow); + void flushTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent); + void send_flushTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent); + void chop(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent); + void send_chop(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent); + void compact(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const std::string& tableId, const std::string& startRow, const std::string& endRow); + void send_compact(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const std::string& tableId, const std::string& startRow, const std::string& endRow); + void getTabletServerStatus( ::org::apache::accumulov2::core::master::thrift::TabletServerStatus& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void send_getTabletServerStatus(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void recv_getTabletServerStatus( ::org::apache::accumulov2::core::master::thrift::TabletServerStatus& _return); + void getTabletStats(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableId); + void send_getTabletStats(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableId); + void recv_getTabletStats(std::vector & _return); + void getHistoricalStats(TabletStats& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void send_getHistoricalStats(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void recv_getHistoricalStats(TabletStats& _return); + void halt(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock); + void send_halt(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock); + void recv_halt(); + void fastHalt(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock); + void send_fastHalt(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock); + void getActiveScans(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void send_getActiveScans(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void recv_getActiveScans(std::vector & _return); + void getActiveCompactions(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void send_getActiveCompactions(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void recv_getActiveCompactions(std::vector & _return); + void removeLogs(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::vector & filenames); + void send_removeLogs(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::vector & filenames); + void getActiveLogs(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void send_getActiveLogs(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void recv_getActiveLogs(std::vector & _return); + void startGetSummaries( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request); + void send_startGetSummaries(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request); + void recv_startGetSummaries( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return); + void startGetSummariesForPartition( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request, const int32_t modulus, const int32_t remainder); + void send_startGetSummariesForPartition(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request, const int32_t modulus, const int32_t remainder); + void recv_startGetSummariesForPartition( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return); + void startGetSummariesFromFiles( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request, const std::map > & files); + void send_startGetSummariesFromFiles(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request, const std::map > & files); + void recv_startGetSummariesFromFiles( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return); + void contiuneGetSummaries( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const int64_t sessionId); + void send_contiuneGetSummaries(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const int64_t sessionId); + void recv_contiuneGetSummaries( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return); +}; + +class TabletClientServiceProcessor : public ::org::apache::accumulov2::core::clientImpl::thrift::ClientServiceProcessor { + protected: + std::shared_ptr iface_; + virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext); + private: + typedef void (TabletClientServiceProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*); + typedef std::map ProcessMap; + ProcessMap processMap_; + void process_startScan(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_continueScan(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_closeScan(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_startMultiScan(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_continueMultiScan(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_closeMultiScan(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_startUpdate(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_applyUpdates(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_closeUpdate(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_update(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_startConditionalUpdate(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_conditionalUpdate(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_invalidateConditionalUpdate(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_closeConditionalUpdate(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_bulkImport(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_loadFiles(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_splitTablet(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_loadTablet(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_unloadTablet(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_flush(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_flushTablet(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_chop(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_compact(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getTabletServerStatus(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getTabletStats(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getHistoricalStats(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_halt(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_fastHalt(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getActiveScans(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getActiveCompactions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_removeLogs(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getActiveLogs(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_startGetSummaries(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_startGetSummariesForPartition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_startGetSummariesFromFiles(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_contiuneGetSummaries(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + public: + TabletClientServiceProcessor(std::shared_ptr iface) : + ::org::apache::accumulov2::core::clientImpl::thrift::ClientServiceProcessor(iface), + iface_(iface) { + processMap_["startScan"] = &TabletClientServiceProcessor::process_startScan; + processMap_["continueScan"] = &TabletClientServiceProcessor::process_continueScan; + processMap_["closeScan"] = &TabletClientServiceProcessor::process_closeScan; + processMap_["startMultiScan"] = &TabletClientServiceProcessor::process_startMultiScan; + processMap_["continueMultiScan"] = &TabletClientServiceProcessor::process_continueMultiScan; + processMap_["closeMultiScan"] = &TabletClientServiceProcessor::process_closeMultiScan; + processMap_["startUpdate"] = &TabletClientServiceProcessor::process_startUpdate; + processMap_["applyUpdates"] = &TabletClientServiceProcessor::process_applyUpdates; + processMap_["closeUpdate"] = &TabletClientServiceProcessor::process_closeUpdate; + processMap_["update"] = &TabletClientServiceProcessor::process_update; + processMap_["startConditionalUpdate"] = &TabletClientServiceProcessor::process_startConditionalUpdate; + processMap_["conditionalUpdate"] = &TabletClientServiceProcessor::process_conditionalUpdate; + processMap_["invalidateConditionalUpdate"] = &TabletClientServiceProcessor::process_invalidateConditionalUpdate; + processMap_["closeConditionalUpdate"] = &TabletClientServiceProcessor::process_closeConditionalUpdate; + processMap_["bulkImport"] = &TabletClientServiceProcessor::process_bulkImport; + processMap_["loadFiles"] = &TabletClientServiceProcessor::process_loadFiles; + processMap_["splitTablet"] = &TabletClientServiceProcessor::process_splitTablet; + processMap_["loadTablet"] = &TabletClientServiceProcessor::process_loadTablet; + processMap_["unloadTablet"] = &TabletClientServiceProcessor::process_unloadTablet; + processMap_["flush"] = &TabletClientServiceProcessor::process_flush; + processMap_["flushTablet"] = &TabletClientServiceProcessor::process_flushTablet; + processMap_["chop"] = &TabletClientServiceProcessor::process_chop; + processMap_["compact"] = &TabletClientServiceProcessor::process_compact; + processMap_["getTabletServerStatus"] = &TabletClientServiceProcessor::process_getTabletServerStatus; + processMap_["getTabletStats"] = &TabletClientServiceProcessor::process_getTabletStats; + processMap_["getHistoricalStats"] = &TabletClientServiceProcessor::process_getHistoricalStats; + processMap_["halt"] = &TabletClientServiceProcessor::process_halt; + processMap_["fastHalt"] = &TabletClientServiceProcessor::process_fastHalt; + processMap_["getActiveScans"] = &TabletClientServiceProcessor::process_getActiveScans; + processMap_["getActiveCompactions"] = &TabletClientServiceProcessor::process_getActiveCompactions; + processMap_["removeLogs"] = &TabletClientServiceProcessor::process_removeLogs; + processMap_["getActiveLogs"] = &TabletClientServiceProcessor::process_getActiveLogs; + processMap_["startGetSummaries"] = &TabletClientServiceProcessor::process_startGetSummaries; + processMap_["startGetSummariesForPartition"] = &TabletClientServiceProcessor::process_startGetSummariesForPartition; + processMap_["startGetSummariesFromFiles"] = &TabletClientServiceProcessor::process_startGetSummariesFromFiles; + processMap_["contiuneGetSummaries"] = &TabletClientServiceProcessor::process_contiuneGetSummaries; + } + + virtual ~TabletClientServiceProcessor() {} +}; + +class TabletClientServiceProcessorFactory : public ::apache::thrift::TProcessorFactory { + public: + TabletClientServiceProcessorFactory(const std::shared_ptr< TabletClientServiceIfFactory >& handlerFactory) : + handlerFactory_(handlerFactory) {} + + std::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo& connInfo); + + protected: + std::shared_ptr< TabletClientServiceIfFactory > handlerFactory_; +}; + +class TabletClientServiceMultiface : virtual public TabletClientServiceIf, public ::org::apache::accumulov2::core::clientImpl::thrift::ClientServiceMultiface { + public: + TabletClientServiceMultiface(std::vector >& ifaces) : ifaces_(ifaces) { + std::vector >::iterator iter; + for (iter = ifaces.begin(); iter != ifaces.end(); ++iter) { + ::org::apache::accumulov2::core::clientImpl::thrift::ClientServiceMultiface::add(*iter); + } + } + virtual ~TabletClientServiceMultiface() {} + protected: + std::vector > ifaces_; + TabletClientServiceMultiface() {} + void add(std::shared_ptr iface) { + ::org::apache::accumulov2::core::clientImpl::thrift::ClientServiceMultiface::add(iface); + ifaces_.push_back(iface); + } + public: + void startScan( ::org::apache::accumulov2::core::dataImpl::thrift::InitialScan& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const ::org::apache::accumulov2::core::dataImpl::thrift::TRange& range, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & columns, const int32_t batchSize, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & ssiList, const std::map > & ssio, const std::vector & authorizations, const bool waitForWrites, const bool isolated, const int64_t readaheadThreshold, const TSamplerConfiguration& samplerConfig, const int64_t batchTimeOut, const std::string& classLoaderContext, const std::map & executionHints) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->startScan(_return, tinfo, credentials, extent, range, columns, batchSize, ssiList, ssio, authorizations, waitForWrites, isolated, readaheadThreshold, samplerConfig, batchTimeOut, classLoaderContext, executionHints); + } + ifaces_[i]->startScan(_return, tinfo, credentials, extent, range, columns, batchSize, ssiList, ssio, authorizations, waitForWrites, isolated, readaheadThreshold, samplerConfig, batchTimeOut, classLoaderContext, executionHints); + return; + } + + void continueScan( ::org::apache::accumulov2::core::dataImpl::thrift::ScanResult& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->continueScan(_return, tinfo, scanID); + } + ifaces_[i]->continueScan(_return, tinfo, scanID); + return; + } + + void closeScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->closeScan(tinfo, scanID); + } + ifaces_[i]->closeScan(tinfo, scanID); + } + + void startMultiScan( ::org::apache::accumulov2::core::dataImpl::thrift::InitialMultiScan& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanBatch& batch, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & columns, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & ssiList, const std::map > & ssio, const std::vector & authorizations, const bool waitForWrites, const TSamplerConfiguration& samplerConfig, const int64_t batchTimeOut, const std::string& classLoaderContext, const std::map & executionHints) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->startMultiScan(_return, tinfo, credentials, batch, columns, ssiList, ssio, authorizations, waitForWrites, samplerConfig, batchTimeOut, classLoaderContext, executionHints); + } + ifaces_[i]->startMultiScan(_return, tinfo, credentials, batch, columns, ssiList, ssio, authorizations, waitForWrites, samplerConfig, batchTimeOut, classLoaderContext, executionHints); + return; + } + + void continueMultiScan( ::org::apache::accumulov2::core::dataImpl::thrift::MultiScanResult& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->continueMultiScan(_return, tinfo, scanID); + } + ifaces_[i]->continueMultiScan(_return, tinfo, scanID); + return; + } + + void closeMultiScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->closeMultiScan(tinfo, scanID); + } + ifaces_[i]->closeMultiScan(tinfo, scanID); + } + + ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID startUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const TDurability::type durability) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->startUpdate(tinfo, credentials, durability); + } + return ifaces_[i]->startUpdate(tinfo, credentials, durability); + } + + void applyUpdates(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID updateID, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& keyExtent, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TMutation> & mutations) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->applyUpdates(tinfo, updateID, keyExtent, mutations); + } + ifaces_[i]->applyUpdates(tinfo, updateID, keyExtent, mutations); + } + + void closeUpdate( ::org::apache::accumulov2::core::dataImpl::thrift::UpdateErrors& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID updateID) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->closeUpdate(_return, tinfo, updateID); + } + ifaces_[i]->closeUpdate(_return, tinfo, updateID); + return; + } + + void update(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& keyExtent, const ::org::apache::accumulov2::core::dataImpl::thrift::TMutation& mutation, const TDurability::type durability) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->update(tinfo, credentials, keyExtent, mutation, durability); + } + ifaces_[i]->update(tinfo, credentials, keyExtent, mutation, durability); + } + + void startConditionalUpdate( ::org::apache::accumulov2::core::dataImpl::thrift::TConditionalSession& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::vector & authorizations, const std::string& tableID, const TDurability::type durability, const std::string& classLoaderContext) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->startConditionalUpdate(_return, tinfo, credentials, authorizations, tableID, durability, classLoaderContext); + } + ifaces_[i]->startConditionalUpdate(_return, tinfo, credentials, authorizations, tableID, durability, classLoaderContext); + return; + } + + void conditionalUpdate(std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TCMResult> & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID, const ::org::apache::accumulov2::core::dataImpl::thrift::CMBatch& mutations, const std::vector & symbols) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->conditionalUpdate(_return, tinfo, sessID, mutations, symbols); + } + ifaces_[i]->conditionalUpdate(_return, tinfo, sessID, mutations, symbols); + return; + } + + void invalidateConditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->invalidateConditionalUpdate(tinfo, sessID); + } + ifaces_[i]->invalidateConditionalUpdate(tinfo, sessID); + } + + void closeConditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->closeConditionalUpdate(tinfo, sessID); + } + ifaces_[i]->closeConditionalUpdate(tinfo, sessID); + } + + void bulkImport(std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent> & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const ::org::apache::accumulov2::core::dataImpl::thrift::TabletFiles& files, const bool setTime) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->bulkImport(_return, tinfo, credentials, tid, files, setTime); + } + ifaces_[i]->bulkImport(_return, tinfo, credentials, tid, files, setTime); + return; + } + + void loadFiles(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const std::string& dir, const std::map< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent, std::map > & files, const bool setTime) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->loadFiles(tinfo, credentials, tid, dir, files, setTime); + } + ifaces_[i]->loadFiles(tinfo, credentials, tid, dir, files, setTime); + } + + void splitTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const std::string& splitPoint) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->splitTablet(tinfo, credentials, extent, splitPoint); + } + ifaces_[i]->splitTablet(tinfo, credentials, extent, splitPoint); + } + + void loadTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->loadTablet(tinfo, credentials, lock, extent); + } + ifaces_[i]->loadTablet(tinfo, credentials, lock, extent); + } + + void unloadTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const TUnloadTabletGoal::type goal, const int64_t requestTime) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->unloadTablet(tinfo, credentials, lock, extent, goal, requestTime); + } + ifaces_[i]->unloadTablet(tinfo, credentials, lock, extent, goal, requestTime); + } + + void flush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const std::string& tableId, const std::string& startRow, const std::string& endRow) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->flush(tinfo, credentials, lock, tableId, startRow, endRow); + } + ifaces_[i]->flush(tinfo, credentials, lock, tableId, startRow, endRow); + } + + void flushTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->flushTablet(tinfo, credentials, lock, extent); + } + ifaces_[i]->flushTablet(tinfo, credentials, lock, extent); + } + + void chop(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->chop(tinfo, credentials, lock, extent); + } + ifaces_[i]->chop(tinfo, credentials, lock, extent); + } + + void compact(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const std::string& tableId, const std::string& startRow, const std::string& endRow) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->compact(tinfo, credentials, lock, tableId, startRow, endRow); + } + ifaces_[i]->compact(tinfo, credentials, lock, tableId, startRow, endRow); + } + + void getTabletServerStatus( ::org::apache::accumulov2::core::master::thrift::TabletServerStatus& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getTabletServerStatus(_return, tinfo, credentials); + } + ifaces_[i]->getTabletServerStatus(_return, tinfo, credentials); + return; + } + + void getTabletStats(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableId) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getTabletStats(_return, tinfo, credentials, tableId); + } + ifaces_[i]->getTabletStats(_return, tinfo, credentials, tableId); + return; + } + + void getHistoricalStats(TabletStats& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getHistoricalStats(_return, tinfo, credentials); + } + ifaces_[i]->getHistoricalStats(_return, tinfo, credentials); + return; + } + + void halt(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->halt(tinfo, credentials, lock); + } + ifaces_[i]->halt(tinfo, credentials, lock); + } + + void fastHalt(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->fastHalt(tinfo, credentials, lock); + } + ifaces_[i]->fastHalt(tinfo, credentials, lock); + } + + void getActiveScans(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getActiveScans(_return, tinfo, credentials); + } + ifaces_[i]->getActiveScans(_return, tinfo, credentials); + return; + } + + void getActiveCompactions(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getActiveCompactions(_return, tinfo, credentials); + } + ifaces_[i]->getActiveCompactions(_return, tinfo, credentials); + return; + } + + void removeLogs(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::vector & filenames) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->removeLogs(tinfo, credentials, filenames); + } + ifaces_[i]->removeLogs(tinfo, credentials, filenames); + } + + void getActiveLogs(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getActiveLogs(_return, tinfo, credentials); + } + ifaces_[i]->getActiveLogs(_return, tinfo, credentials); + return; + } + + void startGetSummaries( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->startGetSummaries(_return, tinfo, credentials, request); + } + ifaces_[i]->startGetSummaries(_return, tinfo, credentials, request); + return; + } + + void startGetSummariesForPartition( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request, const int32_t modulus, const int32_t remainder) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->startGetSummariesForPartition(_return, tinfo, credentials, request, modulus, remainder); + } + ifaces_[i]->startGetSummariesForPartition(_return, tinfo, credentials, request, modulus, remainder); + return; + } + + void startGetSummariesFromFiles( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request, const std::map > & files) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->startGetSummariesFromFiles(_return, tinfo, credentials, request, files); + } + ifaces_[i]->startGetSummariesFromFiles(_return, tinfo, credentials, request, files); + return; + } + + void contiuneGetSummaries( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const int64_t sessionId) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->contiuneGetSummaries(_return, tinfo, sessionId); + } + ifaces_[i]->contiuneGetSummaries(_return, tinfo, sessionId); + return; + } + +}; + +// The 'concurrent' client is a thread safe client that correctly handles +// out of order responses. It is slower than the regular client, so should +// only be used when you need to share a connection among multiple threads +class TabletClientServiceConcurrentClient : virtual public TabletClientServiceIf, public ::org::apache::accumulov2::core::clientImpl::thrift::ClientServiceConcurrentClient { + public: + TabletClientServiceConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) : + ::org::apache::accumulov2::core::clientImpl::thrift::ClientServiceConcurrentClient(prot, prot) {} + TabletClientServiceConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) : ::org::apache::accumulov2::core::clientImpl::thrift::ClientServiceConcurrentClient(iprot, oprot) {} + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + return piprot_; + } + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { + return poprot_; + } + void startScan( ::org::apache::accumulov2::core::dataImpl::thrift::InitialScan& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const ::org::apache::accumulov2::core::dataImpl::thrift::TRange& range, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & columns, const int32_t batchSize, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & ssiList, const std::map > & ssio, const std::vector & authorizations, const bool waitForWrites, const bool isolated, const int64_t readaheadThreshold, const TSamplerConfiguration& samplerConfig, const int64_t batchTimeOut, const std::string& classLoaderContext, const std::map & executionHints); + int32_t send_startScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const ::org::apache::accumulov2::core::dataImpl::thrift::TRange& range, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & columns, const int32_t batchSize, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & ssiList, const std::map > & ssio, const std::vector & authorizations, const bool waitForWrites, const bool isolated, const int64_t readaheadThreshold, const TSamplerConfiguration& samplerConfig, const int64_t batchTimeOut, const std::string& classLoaderContext, const std::map & executionHints); + void recv_startScan( ::org::apache::accumulov2::core::dataImpl::thrift::InitialScan& _return, const int32_t seqid); + void continueScan( ::org::apache::accumulov2::core::dataImpl::thrift::ScanResult& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID); + int32_t send_continueScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID); + void recv_continueScan( ::org::apache::accumulov2::core::dataImpl::thrift::ScanResult& _return, const int32_t seqid); + void closeScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID); + void send_closeScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID); + void startMultiScan( ::org::apache::accumulov2::core::dataImpl::thrift::InitialMultiScan& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanBatch& batch, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & columns, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & ssiList, const std::map > & ssio, const std::vector & authorizations, const bool waitForWrites, const TSamplerConfiguration& samplerConfig, const int64_t batchTimeOut, const std::string& classLoaderContext, const std::map & executionHints); + int32_t send_startMultiScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanBatch& batch, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & columns, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & ssiList, const std::map > & ssio, const std::vector & authorizations, const bool waitForWrites, const TSamplerConfiguration& samplerConfig, const int64_t batchTimeOut, const std::string& classLoaderContext, const std::map & executionHints); + void recv_startMultiScan( ::org::apache::accumulov2::core::dataImpl::thrift::InitialMultiScan& _return, const int32_t seqid); + void continueMultiScan( ::org::apache::accumulov2::core::dataImpl::thrift::MultiScanResult& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID); + int32_t send_continueMultiScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID); + void recv_continueMultiScan( ::org::apache::accumulov2::core::dataImpl::thrift::MultiScanResult& _return, const int32_t seqid); + void closeMultiScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID); + int32_t send_closeMultiScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID); + void recv_closeMultiScan(const int32_t seqid); + ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID startUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const TDurability::type durability); + int32_t send_startUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const TDurability::type durability); + ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID recv_startUpdate(const int32_t seqid); + void applyUpdates(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID updateID, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& keyExtent, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TMutation> & mutations); + void send_applyUpdates(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID updateID, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& keyExtent, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TMutation> & mutations); + void closeUpdate( ::org::apache::accumulov2::core::dataImpl::thrift::UpdateErrors& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID updateID); + int32_t send_closeUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID updateID); + void recv_closeUpdate( ::org::apache::accumulov2::core::dataImpl::thrift::UpdateErrors& _return, const int32_t seqid); + void update(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& keyExtent, const ::org::apache::accumulov2::core::dataImpl::thrift::TMutation& mutation, const TDurability::type durability); + int32_t send_update(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& keyExtent, const ::org::apache::accumulov2::core::dataImpl::thrift::TMutation& mutation, const TDurability::type durability); + void recv_update(const int32_t seqid); + void startConditionalUpdate( ::org::apache::accumulov2::core::dataImpl::thrift::TConditionalSession& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::vector & authorizations, const std::string& tableID, const TDurability::type durability, const std::string& classLoaderContext); + int32_t send_startConditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::vector & authorizations, const std::string& tableID, const TDurability::type durability, const std::string& classLoaderContext); + void recv_startConditionalUpdate( ::org::apache::accumulov2::core::dataImpl::thrift::TConditionalSession& _return, const int32_t seqid); + void conditionalUpdate(std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TCMResult> & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID, const ::org::apache::accumulov2::core::dataImpl::thrift::CMBatch& mutations, const std::vector & symbols); + int32_t send_conditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID, const ::org::apache::accumulov2::core::dataImpl::thrift::CMBatch& mutations, const std::vector & symbols); + void recv_conditionalUpdate(std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TCMResult> & _return, const int32_t seqid); + void invalidateConditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID); + int32_t send_invalidateConditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID); + void recv_invalidateConditionalUpdate(const int32_t seqid); + void closeConditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID); + void send_closeConditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID); + void bulkImport(std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent> & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const ::org::apache::accumulov2::core::dataImpl::thrift::TabletFiles& files, const bool setTime); + int32_t send_bulkImport(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const ::org::apache::accumulov2::core::dataImpl::thrift::TabletFiles& files, const bool setTime); + void recv_bulkImport(std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent> & _return, const int32_t seqid); + void loadFiles(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const std::string& dir, const std::map< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent, std::map > & files, const bool setTime); + void send_loadFiles(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const std::string& dir, const std::map< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent, std::map > & files, const bool setTime); + void splitTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const std::string& splitPoint); + int32_t send_splitTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const std::string& splitPoint); + void recv_splitTablet(const int32_t seqid); + void loadTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent); + void send_loadTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent); + void unloadTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const TUnloadTabletGoal::type goal, const int64_t requestTime); + void send_unloadTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const TUnloadTabletGoal::type goal, const int64_t requestTime); + void flush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const std::string& tableId, const std::string& startRow, const std::string& endRow); + void send_flush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const std::string& tableId, const std::string& startRow, const std::string& endRow); + void flushTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent); + void send_flushTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent); + void chop(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent); + void send_chop(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent); + void compact(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const std::string& tableId, const std::string& startRow, const std::string& endRow); + void send_compact(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const std::string& tableId, const std::string& startRow, const std::string& endRow); + void getTabletServerStatus( ::org::apache::accumulov2::core::master::thrift::TabletServerStatus& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + int32_t send_getTabletServerStatus(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void recv_getTabletServerStatus( ::org::apache::accumulov2::core::master::thrift::TabletServerStatus& _return, const int32_t seqid); + void getTabletStats(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableId); + int32_t send_getTabletStats(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableId); + void recv_getTabletStats(std::vector & _return, const int32_t seqid); + void getHistoricalStats(TabletStats& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + int32_t send_getHistoricalStats(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void recv_getHistoricalStats(TabletStats& _return, const int32_t seqid); + void halt(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock); + int32_t send_halt(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock); + void recv_halt(const int32_t seqid); + void fastHalt(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock); + void send_fastHalt(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock); + void getActiveScans(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + int32_t send_getActiveScans(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void recv_getActiveScans(std::vector & _return, const int32_t seqid); + void getActiveCompactions(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + int32_t send_getActiveCompactions(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void recv_getActiveCompactions(std::vector & _return, const int32_t seqid); + void removeLogs(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::vector & filenames); + void send_removeLogs(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::vector & filenames); + void getActiveLogs(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + int32_t send_getActiveLogs(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials); + void recv_getActiveLogs(std::vector & _return, const int32_t seqid); + void startGetSummaries( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request); + int32_t send_startGetSummaries(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request); + void recv_startGetSummaries( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const int32_t seqid); + void startGetSummariesForPartition( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request, const int32_t modulus, const int32_t remainder); + int32_t send_startGetSummariesForPartition(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request, const int32_t modulus, const int32_t remainder); + void recv_startGetSummariesForPartition( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const int32_t seqid); + void startGetSummariesFromFiles( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request, const std::map > & files); + int32_t send_startGetSummariesFromFiles(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request, const std::map > & files); + void recv_startGetSummariesFromFiles( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const int32_t seqid); + void contiuneGetSummaries( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const int64_t sessionId); + int32_t send_contiuneGetSummaries(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const int64_t sessionId); + void recv_contiuneGetSummaries( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const int32_t seqid); +}; + +#ifdef _MSC_VER + #pragma warning( pop ) +#endif + +}}}}}} // namespace + +#endif diff --git a/include/data/extern/thriftv2/ThriftTest.cpp b/include/data/extern/thriftv2/ThriftTest.cpp new file mode 100644 index 00000000..044ced29 --- /dev/null +++ b/include/data/extern/thriftv2/ThriftTest.cpp @@ -0,0 +1,1148 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "ThriftTest.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace clientImpl { namespace thrift { + + +ThriftTest_success_args::~ThriftTest_success_args() throw() { +} + + +uint32_t ThriftTest_success_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftTest_success_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftTest_success_args"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftTest_success_pargs::~ThriftTest_success_pargs() throw() { +} + + +uint32_t ThriftTest_success_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftTest_success_pargs"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftTest_success_result::~ThriftTest_success_result() throw() { +} + + +uint32_t ThriftTest_success_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftTest_success_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftTest_success_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftTest_success_presult::~ThriftTest_success_presult() throw() { +} + + +uint32_t ThriftTest_success_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftTest_fails_args::~ThriftTest_fails_args() throw() { +} + + +uint32_t ThriftTest_fails_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftTest_fails_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftTest_fails_args"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftTest_fails_pargs::~ThriftTest_fails_pargs() throw() { +} + + +uint32_t ThriftTest_fails_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftTest_fails_pargs"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftTest_fails_result::~ThriftTest_fails_result() throw() { +} + + +uint32_t ThriftTest_fails_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftTest_fails_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftTest_fails_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftTest_fails_presult::~ThriftTest_fails_presult() throw() { +} + + +uint32_t ThriftTest_fails_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftTest_throwsError_args::~ThriftTest_throwsError_args() throw() { +} + + +uint32_t ThriftTest_throwsError_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftTest_throwsError_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftTest_throwsError_args"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftTest_throwsError_pargs::~ThriftTest_throwsError_pargs() throw() { +} + + +uint32_t ThriftTest_throwsError_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftTest_throwsError_pargs"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftTest_throwsError_result::~ThriftTest_throwsError_result() throw() { +} + + +uint32_t ThriftTest_throwsError_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex.read(iprot); + this->__isset.ex = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftTest_throwsError_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftTest_throwsError_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex) { + xfer += oprot->writeFieldBegin("ex", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->ex.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftTest_throwsError_presult::~ThriftTest_throwsError_presult() throw() { +} + + +uint32_t ThriftTest_throwsError_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex.read(iprot); + this->__isset.ex = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +bool ThriftTestClient::success() +{ + send_success(); + return recv_success(); +} + +void ThriftTestClient::send_success() +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("success", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftTest_success_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftTestClient::recv_success() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("success") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftTest_success_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "success failed: unknown result"); +} + +bool ThriftTestClient::fails() +{ + send_fails(); + return recv_fails(); +} + +void ThriftTestClient::send_fails() +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("fails", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftTest_fails_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftTestClient::recv_fails() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("fails") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftTest_fails_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "fails failed: unknown result"); +} + +bool ThriftTestClient::throwsError() +{ + send_throwsError(); + return recv_throwsError(); +} + +void ThriftTestClient::send_throwsError() +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("throwsError", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftTest_throwsError_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftTestClient::recv_throwsError() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("throwsError") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftTest_throwsError_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.ex) { + throw result.ex; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "throwsError failed: unknown result"); +} + +bool ThriftTestProcessor::dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext) { + ProcessMap::iterator pfn; + pfn = processMap_.find(fname); + if (pfn == processMap_.end()) { + iprot->skip(::apache::thrift::protocol::T_STRUCT); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + ::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::UNKNOWN_METHOD, "Invalid method name: '"+fname+"'"); + oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return true; + } + (this->*(pfn->second))(seqid, iprot, oprot, callContext); + return true; +} + +void ThriftTestProcessor::process_success(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftTest.success", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftTest.success"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftTest.success"); + } + + ThriftTest_success_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftTest.success", bytes); + } + + ThriftTest_success_result result; + try { + result.success = iface_->success(); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftTest.success"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("success", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftTest.success"); + } + + oprot->writeMessageBegin("success", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftTest.success", bytes); + } +} + +void ThriftTestProcessor::process_fails(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftTest.fails", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftTest.fails"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftTest.fails"); + } + + ThriftTest_fails_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftTest.fails", bytes); + } + + ThriftTest_fails_result result; + try { + result.success = iface_->fails(); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftTest.fails"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("fails", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftTest.fails"); + } + + oprot->writeMessageBegin("fails", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftTest.fails", bytes); + } +} + +void ThriftTestProcessor::process_throwsError(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftTest.throwsError", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftTest.throwsError"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftTest.throwsError"); + } + + ThriftTest_throwsError_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftTest.throwsError", bytes); + } + + ThriftTest_throwsError_result result; + try { + result.success = iface_->throwsError(); + result.__isset.success = true; + } catch (ThriftSecurityException &ex) { + result.ex = ex; + result.__isset.ex = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftTest.throwsError"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("throwsError", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftTest.throwsError"); + } + + oprot->writeMessageBegin("throwsError", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftTest.throwsError", bytes); + } +} + +std::shared_ptr< ::apache::thrift::TProcessor > ThriftTestProcessorFactory::getProcessor(const ::apache::thrift::TConnectionInfo& connInfo) { + ::apache::thrift::ReleaseHandler< ThriftTestIfFactory > cleanup(handlerFactory_); + std::shared_ptr< ThriftTestIf > handler(handlerFactory_->getHandler(connInfo), cleanup); + std::shared_ptr< ::apache::thrift::TProcessor > processor(new ThriftTestProcessor(handler)); + return processor; +} + +bool ThriftTestConcurrentClient::success() +{ + int32_t seqid = send_success(); + return recv_success(seqid); +} + +int32_t ThriftTestConcurrentClient::send_success() +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("success", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftTest_success_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ThriftTestConcurrentClient::recv_success(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("success") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ThriftTest_success_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "success failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ThriftTestConcurrentClient::fails() +{ + int32_t seqid = send_fails(); + return recv_fails(seqid); +} + +int32_t ThriftTestConcurrentClient::send_fails() +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("fails", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftTest_fails_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ThriftTestConcurrentClient::recv_fails(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("fails") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ThriftTest_fails_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "fails failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ThriftTestConcurrentClient::throwsError() +{ + int32_t seqid = send_throwsError(); + return recv_throwsError(seqid); +} + +int32_t ThriftTestConcurrentClient::send_throwsError() +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("throwsError", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftTest_throwsError_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ThriftTestConcurrentClient::recv_throwsError(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("throwsError") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ThriftTest_throwsError_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.ex) { + sentry.commit(); + throw result.ex; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "throwsError failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +}}}}}} // namespace + diff --git a/include/data/extern/thriftv2/ThriftTest.h b/include/data/extern/thriftv2/ThriftTest.h new file mode 100644 index 00000000..9a5c5dbf --- /dev/null +++ b/include/data/extern/thriftv2/ThriftTest.h @@ -0,0 +1,520 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef ThriftTest_V2H +#define ThriftTest_V2H + +#include +#include +#include "client_types.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace clientImpl { namespace thrift { + +#ifdef _MSC_VER + #pragma warning( push ) + #pragma warning (disable : 4250 ) //inheriting methods via dominance +#endif + +class ThriftTestIf { + public: + virtual ~ThriftTestIf() {} + virtual bool success() = 0; + virtual bool fails() = 0; + virtual bool throwsError() = 0; +}; + +class ThriftTestIfFactory { + public: + typedef ThriftTestIf Handler; + + virtual ~ThriftTestIfFactory() {} + + virtual ThriftTestIf* getHandler(const ::apache::thrift::TConnectionInfo& connInfo) = 0; + virtual void releaseHandler(ThriftTestIf* /* handler */) = 0; +}; + +class ThriftTestIfSingletonFactory : virtual public ThriftTestIfFactory { + public: + ThriftTestIfSingletonFactory(const std::shared_ptr& iface) : iface_(iface) {} + virtual ~ThriftTestIfSingletonFactory() {} + + virtual ThriftTestIf* getHandler(const ::apache::thrift::TConnectionInfo&) { + return iface_.get(); + } + virtual void releaseHandler(ThriftTestIf* /* handler */) {} + + protected: + std::shared_ptr iface_; +}; + +class ThriftTestNull : virtual public ThriftTestIf { + public: + virtual ~ThriftTestNull() {} + bool success() { + bool _return = false; + return _return; + } + bool fails() { + bool _return = false; + return _return; + } + bool throwsError() { + bool _return = false; + return _return; + } +}; + + +class ThriftTest_success_args { + public: + + ThriftTest_success_args(const ThriftTest_success_args&); + ThriftTest_success_args& operator=(const ThriftTest_success_args&); + ThriftTest_success_args() { + } + + virtual ~ThriftTest_success_args() throw(); + + bool operator == (const ThriftTest_success_args & /* rhs */) const + { + return true; + } + bool operator != (const ThriftTest_success_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftTest_success_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftTest_success_pargs { + public: + + + virtual ~ThriftTest_success_pargs() throw(); + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftTest_success_result__isset { + _ThriftTest_success_result__isset() : success(false) {} + bool success :1; +} _ThriftTest_success_result__isset; + +class ThriftTest_success_result { + public: + + ThriftTest_success_result(const ThriftTest_success_result&); + ThriftTest_success_result& operator=(const ThriftTest_success_result&); + ThriftTest_success_result() : success(0) { + } + + virtual ~ThriftTest_success_result() throw(); + bool success; + + _ThriftTest_success_result__isset __isset; + + void __set_success(const bool val); + + bool operator == (const ThriftTest_success_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ThriftTest_success_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftTest_success_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftTest_success_presult__isset { + _ThriftTest_success_presult__isset() : success(false) {} + bool success :1; +} _ThriftTest_success_presult__isset; + +class ThriftTest_success_presult { + public: + + + virtual ~ThriftTest_success_presult() throw(); + bool* success; + + _ThriftTest_success_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + + +class ThriftTest_fails_args { + public: + + ThriftTest_fails_args(const ThriftTest_fails_args&); + ThriftTest_fails_args& operator=(const ThriftTest_fails_args&); + ThriftTest_fails_args() { + } + + virtual ~ThriftTest_fails_args() throw(); + + bool operator == (const ThriftTest_fails_args & /* rhs */) const + { + return true; + } + bool operator != (const ThriftTest_fails_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftTest_fails_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftTest_fails_pargs { + public: + + + virtual ~ThriftTest_fails_pargs() throw(); + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftTest_fails_result__isset { + _ThriftTest_fails_result__isset() : success(false) {} + bool success :1; +} _ThriftTest_fails_result__isset; + +class ThriftTest_fails_result { + public: + + ThriftTest_fails_result(const ThriftTest_fails_result&); + ThriftTest_fails_result& operator=(const ThriftTest_fails_result&); + ThriftTest_fails_result() : success(0) { + } + + virtual ~ThriftTest_fails_result() throw(); + bool success; + + _ThriftTest_fails_result__isset __isset; + + void __set_success(const bool val); + + bool operator == (const ThriftTest_fails_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ThriftTest_fails_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftTest_fails_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftTest_fails_presult__isset { + _ThriftTest_fails_presult__isset() : success(false) {} + bool success :1; +} _ThriftTest_fails_presult__isset; + +class ThriftTest_fails_presult { + public: + + + virtual ~ThriftTest_fails_presult() throw(); + bool* success; + + _ThriftTest_fails_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + + +class ThriftTest_throwsError_args { + public: + + ThriftTest_throwsError_args(const ThriftTest_throwsError_args&); + ThriftTest_throwsError_args& operator=(const ThriftTest_throwsError_args&); + ThriftTest_throwsError_args() { + } + + virtual ~ThriftTest_throwsError_args() throw(); + + bool operator == (const ThriftTest_throwsError_args & /* rhs */) const + { + return true; + } + bool operator != (const ThriftTest_throwsError_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftTest_throwsError_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftTest_throwsError_pargs { + public: + + + virtual ~ThriftTest_throwsError_pargs() throw(); + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftTest_throwsError_result__isset { + _ThriftTest_throwsError_result__isset() : success(false), ex(false) {} + bool success :1; + bool ex :1; +} _ThriftTest_throwsError_result__isset; + +class ThriftTest_throwsError_result { + public: + + ThriftTest_throwsError_result(const ThriftTest_throwsError_result&); + ThriftTest_throwsError_result& operator=(const ThriftTest_throwsError_result&); + ThriftTest_throwsError_result() : success(0) { + } + + virtual ~ThriftTest_throwsError_result() throw(); + bool success; + ThriftSecurityException ex; + + _ThriftTest_throwsError_result__isset __isset; + + void __set_success(const bool val); + + void __set_ex(const ThriftSecurityException& val); + + bool operator == (const ThriftTest_throwsError_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ex == rhs.ex)) + return false; + return true; + } + bool operator != (const ThriftTest_throwsError_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftTest_throwsError_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftTest_throwsError_presult__isset { + _ThriftTest_throwsError_presult__isset() : success(false), ex(false) {} + bool success :1; + bool ex :1; +} _ThriftTest_throwsError_presult__isset; + +class ThriftTest_throwsError_presult { + public: + + + virtual ~ThriftTest_throwsError_presult() throw(); + bool* success; + ThriftSecurityException ex; + + _ThriftTest_throwsError_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +class ThriftTestClient : virtual public ThriftTestIf { + public: + ThriftTestClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot); + } + ThriftTestClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + setProtocol(iprot,oprot); + } + private: + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot,prot); + } + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + piprot_=iprot; + poprot_=oprot; + iprot_ = iprot.get(); + oprot_ = oprot.get(); + } + public: + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + return piprot_; + } + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { + return poprot_; + } + bool success(); + void send_success(); + bool recv_success(); + bool fails(); + void send_fails(); + bool recv_fails(); + bool throwsError(); + void send_throwsError(); + bool recv_throwsError(); + protected: + std::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_; + std::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_; + ::apache::thrift::protocol::TProtocol* iprot_; + ::apache::thrift::protocol::TProtocol* oprot_; +}; + +class ThriftTestProcessor : public ::apache::thrift::TDispatchProcessor { + protected: + std::shared_ptr iface_; + virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext); + private: + typedef void (ThriftTestProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*); + typedef std::map ProcessMap; + ProcessMap processMap_; + void process_success(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_fails(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_throwsError(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + public: + ThriftTestProcessor(std::shared_ptr iface) : + iface_(iface) { + processMap_["success"] = &ThriftTestProcessor::process_success; + processMap_["fails"] = &ThriftTestProcessor::process_fails; + processMap_["throwsError"] = &ThriftTestProcessor::process_throwsError; + } + + virtual ~ThriftTestProcessor() {} +}; + +class ThriftTestProcessorFactory : public ::apache::thrift::TProcessorFactory { + public: + ThriftTestProcessorFactory(const std::shared_ptr< ThriftTestIfFactory >& handlerFactory) : + handlerFactory_(handlerFactory) {} + + std::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo& connInfo); + + protected: + std::shared_ptr< ThriftTestIfFactory > handlerFactory_; +}; + +class ThriftTestMultiface : virtual public ThriftTestIf { + public: + ThriftTestMultiface(std::vector >& ifaces) : ifaces_(ifaces) { + } + virtual ~ThriftTestMultiface() {} + protected: + std::vector > ifaces_; + ThriftTestMultiface() {} + void add(std::shared_ptr iface) { + ifaces_.push_back(iface); + } + public: + bool success() { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->success(); + } + return ifaces_[i]->success(); + } + + bool fails() { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->fails(); + } + return ifaces_[i]->fails(); + } + + bool throwsError() { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->throwsError(); + } + return ifaces_[i]->throwsError(); + } + +}; + +// The 'concurrent' client is a thread safe client that correctly handles +// out of order responses. It is slower than the regular client, so should +// only be used when you need to share a connection among multiple threads +class ThriftTestConcurrentClient : virtual public ThriftTestIf { + public: + ThriftTestConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot); + } + ThriftTestConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + setProtocol(iprot,oprot); + } + private: + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + setProtocol(prot,prot); + } + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + piprot_=iprot; + poprot_=oprot; + iprot_ = iprot.get(); + oprot_ = oprot.get(); + } + public: + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + return piprot_; + } + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { + return poprot_; + } + bool success(); + int32_t send_success(); + bool recv_success(const int32_t seqid); + bool fails(); + int32_t send_fails(); + bool recv_fails(const int32_t seqid); + bool throwsError(); + int32_t send_throwsError(); + bool recv_throwsError(const int32_t seqid); + protected: + std::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_; + std::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_; + ::apache::thrift::protocol::TProtocol* iprot_; + ::apache::thrift::protocol::TProtocol* oprot_; + ::apache::thrift::async::TConcurrentClientSyncInfo sync_; +}; + +#ifdef _MSC_VER + #pragma warning( pop ) +#endif + +}}}}}} // namespace + +#endif diff --git a/include/data/extern/thriftv2/ThriftV2Wrapper.h b/include/data/extern/thriftv2/ThriftV2Wrapper.h new file mode 100644 index 00000000..8ca8b31d --- /dev/null +++ b/include/data/extern/thriftv2/ThriftV2Wrapper.h @@ -0,0 +1,358 @@ +#ifndef THRIFTV2WRAPPER_V2H_ +#define THRIFTV2WRAPPER_V2H_ + +#include "../../constructs/security/AuthInfo.h" +#include "../../constructs/security/Authorizations.h" +#include "../../constructs/inputvalidation.h" +#include "../../constructs/IterInfo.h" +#include "../../constructs/Key.h" +#include "../../constructs/Range.h" +#include "../../constructs/KeyValue.h" +#include "../../constructs/Mutation.h" +#include "../../constructs/KeyExtent.h" +#include "../../constructs/column.h" +#include "gzip/compress.hpp" +#include "gzip/config.hpp" +#include "gzip/decompress.hpp" +#include "gzip/utils.hpp" +#include "gzip/version.hpp" + +#include "../../streaming/ByteOutputStream.h" +#include "../../streaming/NetworkOrderStream.h" +#include "../../streaming/input/NetworkOrderInputStream.h" +#include "data_types.h" +#include "security_types.h" +namespace interconnect { + +class ThriftV2Wrapper { + protected: + protected: + static std::string decompress(const char *compressed, uint32_t size) { + return gzip::decompress(compressed, size); + } + public: + + static std::shared_ptr convert(::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent extent) { + return std::make_shared(extent.table, extent.endRow, extent.prevEndRow); + + } + static std::vector convert(std::vector<::org::apache::accumulov2::core::dataImpl::thrift::TColumn> columns) { + std::vector cols; + for (auto it = columns.begin(); it != columns.end(); it++) { + cols.push_back(new cclient::data::Column((*it).columnFamily, (*it).columnQualifier, (*it).columnVisibility)); + } + + return cols; + } + + static std::vector convert(std::vector<::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> iters) { + std::vector convertedIters; + for (auto it = iters.begin(); it != iters.end(); it++) { + cclient::data::IterInfo *iterInfo = new cclient::data::IterInfo((*it).iterName, (*it).className, (*it).priority); + convertedIters.push_back(iterInfo); + } + + return convertedIters; + } + static cclient::data::security::AuthInfo *convert(org::apache::accumulov2::core::securityImpl::thrift::TCredentials &creds) { + cclient::data::streams::EndianInputStream inputStream((char*) creds.token.c_str(), creds.token.length()); + int compressedLength = inputStream.readInt(); + char *array = new char[compressedLength]; + std::string decompressed = decompress(array, compressedLength); + delete[] array; + return new cclient::data::security::AuthInfo(creds.principal, decompressed, creds.instanceId); + } + static org::apache::accumulov2::core::securityImpl::thrift::TCredentials convert(cclient::data::security::AuthInfo *authInfo) { + org::apache::accumulov2::core::securityImpl::thrift::TCredentials stackAuthInfo; + stackAuthInfo.instanceId = authInfo->getInstanceId(); + // password token needs to be compressed + + std::string compressedString; + { + auto uncompressedPassword = authInfo->getPassword(); + compressedString = gzip::compress(uncompressedPassword.data(), uncompressedPassword.size()); + } + + cclient::data::streams::BigEndianByteStream writeStream(0); + writeStream.writeInt(compressedString.size()); + writeStream.write(compressedString.c_str(), compressedString.size()); + + stackAuthInfo.tokenClassName = "org.apache.accumulo.core.client.security.tokens.PasswordToken"; + stackAuthInfo.principal = authInfo->getUserName(); + + stackAuthInfo.token = std::string(writeStream.getByteArray(), writeStream.getPos()); + return stackAuthInfo; + } + + static std::vector convert(std::vector *iters) { + + std::vector convertedIters; + if (!IsEmpty(iters)) { + for (auto it = iters->begin(); it != iters->end(); it++) { + org::apache::accumulov2::core::dataImpl::thrift::IterInfo iterInfo; + iterInfo.className = (*it)->getClass(); + iterInfo.iterName = (*it)->getName(); + iterInfo.priority = (*it)->getPriority(); + convertedIters.push_back(iterInfo); + } + } + + return convertedIters; + + } + + static std::vector convert(std::vector> *iters) { + + std::vector convertedMutations; + if (!IsEmpty(iters)) { + for (auto it = iters->begin(); it != iters->end(); it++) { + org::apache::accumulov2::core::dataImpl::thrift::TMutation mut; + mut.row = (*it)->getRow(); + + mut.data = (*it)->getDataStr(); + mut.entries = (*it)->size(); + convertedMutations.push_back(mut); + } + } + + return convertedMutations; + + } + + static cclient::data::Range* convert(org::apache::accumulov2::core::dataImpl::thrift::TRange range) { + std::shared_ptr startKey = convert(range.start); + std::shared_ptr endKey = convert(range.stop); + return new cclient::data::Range(startKey, range.startKeyInclusive, endKey, range.stopKeyInclusive); + + } + + static org::apache::accumulov2::core::dataImpl::thrift::ScanBatch convert(std::vector, cclient::data::Range*> *> *rangeIdentifiers) { + + org::apache::accumulov2::core::dataImpl::thrift::ScanBatch littleBatch; + + //typedef std::map > ScanBatch; + for (auto it : *rangeIdentifiers) { + + interconnect::ScanIdentifier, cclient::data::Range*> *identifier = it; + std::vector > extents = identifier->getGlobalMapping(); + for (std::shared_ptr ot : extents) { + org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent keyExtent; + + keyExtent.table = ot->getTableId(); + std::string endRow = ot->getEndRow(); + if (!IsEmpty(&endRow)) + keyExtent.endRow = ot->getEndRow(); + + std::string prevEndRow = ot->getEndRow(); + if (!IsEmpty(&prevEndRow)) + keyExtent.prevEndRow = ot->getPrevEndRow(); + + std::vector thriftRanges; + std::vector ranges = identifier->getIdentifiers(ot); + for (cclient::data::Range *rt : ranges) { + + org::apache::accumulov2::core::dataImpl::thrift::TRange range = convert(rt); + thriftRanges.push_back(range); + + } + littleBatch.insert(std::pair>(keyExtent, thriftRanges)); + } + + } + + return littleBatch; + } + + static org::apache::accumulov2::core::dataImpl::thrift::TKey convert(std::shared_ptr key) { + org::apache::accumulov2::core::dataImpl::thrift::TKey newKey; + if (NULL != key) { + std::pair rowPair = key->getRow(); + newKey.row = std::string(rowPair.first, rowPair.second); + + std::pair cfPair = key->getColFamily(); + if (cfPair.second > 0) + newKey.colFamily = std::string(cfPair.first, cfPair.second); + + std::pair cqPair = key->getColQualifier(); + if (cqPair.second > 0) + newKey.colQualifier = std::string(cqPair.first, cqPair.second); + + std::pair cvPair = key->getColVisibility(); + if (cvPair.second > 0) + newKey.colVisibility = std::string(cvPair.first, cvPair.second); + + newKey.timestamp = key->getTimeStamp(); + } else { + newKey.row = ""; + newKey.colFamily = ""; + newKey.colQualifier = ""; + newKey.colVisibility = ""; + + } + + return newKey; + } + + static std::shared_ptr convert(org::apache::accumulov2::core::dataImpl::thrift::TKey key) { + std::shared_ptr newKey = std::make_shared(); + newKey->setRow(key.row); + newKey->setColFamily(key.colFamily); + newKey->setColQualifier(key.colQualifier); + newKey->setColVisibility(key.colVisibility); + newKey->setTimeStamp(key.timestamp); + return newKey; + } + + static org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent convert(std::shared_ptr ot) { + org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent keyExtent; + keyExtent.table = ot->getTableId(); + std::string endRow = ot->getEndRow(); + + if (!IsEmpty(&endRow)) + keyExtent.endRow = endRow; + else + keyExtent.endRow = ""; + + std::string prevEndRow = ot->getPrevEndRow(); + + if (!IsEmpty(&prevEndRow)) + keyExtent.prevEndRow = prevEndRow; + else + keyExtent.prevEndRow = ""; + + return keyExtent; + } + + static org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent convert(const cclient::data::KeyExtent ot) { + org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent keyExtent; + keyExtent.table = ot.getTableId(); + std::string endRow = ot.getEndRow(); + + if (!IsEmpty(&endRow)) + keyExtent.endRow = endRow; + else + keyExtent.endRow = ""; + + std::string prevEndRow = ot.getPrevEndRow(); + + if (!IsEmpty(&prevEndRow)) + keyExtent.prevEndRow = prevEndRow; + else + keyExtent.prevEndRow = ""; + + return keyExtent; + } + + static std::vector > *convert(std::vector tkvVec) { + std::vector> *newvector = new std::vector>(); + std::shared_ptr prevKey = NULL; + + for (uint32_t i = 0; i < tkvVec.size(); i++) { + + org::apache::accumulov2::core::dataImpl::thrift::TKeyValue tkv = tkvVec.at(i); + std::shared_ptr key = std::make_shared(); + if (!IsEmpty(&(tkv.key.row))) { + key->setRow(tkv.key.row.c_str(), tkv.key.row.size()); + } else { + if (NULL != prevKey) { + std::pair prevRow = prevKey->getRow(); + key->setRow(prevRow.first, prevRow.second); + } + + } + if (!IsEmpty(&(tkv.key.colFamily))) { + key->setColFamily(tkv.key.colFamily.c_str(), tkv.key.colFamily.size()); + } else { + if (NULL != prevKey) { + std::pair prevCf = prevKey->getColFamily(); + key->setColFamily(prevCf.first, prevCf.second); + } + } + if (!IsEmpty(&(tkv.key.colQualifier))) { + key->setColQualifier(tkv.key.colQualifier.c_str(), tkv.key.colQualifier.size()); + } else { + if (NULL != prevKey) { + std::pair prevCq = prevKey->getColQualifier(); + key->setColQualifier(prevCq.first, prevCq.second); + } + } + + if (!IsEmpty(&(tkv.key.colVisibility))) { + key->setColVisibility(tkv.key.colVisibility.c_str(), tkv.key.colVisibility.size()); + } else { + if (NULL != prevKey) { + std::pair prevCv = prevKey->getColVisibility(); + key->setColVisibility(prevCv.first, prevCv.second); + } + } + + key->setTimeStamp(tkv.key.timestamp); + std::shared_ptr kv = std::make_shared(); + kv->setKey(key, true); + kv->setValue((uint8_t*) tkv.value.c_str(), tkv.value.size()); + + newvector->push_back(kv); + + prevKey = key; + } + return newvector; + } + + static org::apache::accumulov2::core::dataImpl::thrift::TRange convert(cclient::data::Range *range) { + org::apache::accumulov2::core::dataImpl::thrift::TRange newRange; + if (!range->getInfiniteStartKey() && NULL != range->getStartKey()) + newRange.start = convert(range->getStartKey()); + + if (!range->getInfiniteStopKey() && NULL != range->getStopKey()) + newRange.stop = convert(range->getStopKey()); + + newRange.startKeyInclusive = range->getStartKeyInclusive(); + newRange.stopKeyInclusive = range->getStopKeyInclusive(); + newRange.infiniteStartKey = range->getInfiniteStartKey(); + newRange.infiniteStopKey = range->getInfiniteStopKey(); + return newRange; + } + + static std::vector convert(std::vector *columns) { + + std::vector convertedColumns; + + if (!IsEmpty(columns)) { + for (auto it = columns->begin(); it != columns->end(); it++) { + org::apache::accumulov2::core::dataImpl::thrift::TColumn column; + std::pair cf = (*it)->getColFamily(); + column.columnFamily = std::string(cf.first, cf.second); + std::pair cq = (*it)->getColQualifier(); + if (cq.second > 0) + column.columnQualifier = std::string(cq.first, cq.second); + std::pair cv = (*it)->getColVisibility(); + if (cv.second > 0) + column.columnVisibility = std::string(cv.first, cv.second); + + convertedColumns.push_back(column); + } + } + + return convertedColumns; + + } + + static std::vector convert(cclient::data::security::Authorizations *auths) { + + return auths->getAuthorizations(); + + } + + protected: + ThriftV2Wrapper() { + + } + virtual ~ThriftV2Wrapper() { + + } +} +; + +} /* namespace interconnect */ +#endif /* THRIFTWRAPPER_V2H_ */ + diff --git a/include/data/extern/thriftv2/client_constants.h b/include/data/extern/thriftv2/client_constants.h new file mode 100644 index 00000000..7f3bb608 --- /dev/null +++ b/include/data/extern/thriftv2/client_constants.h @@ -0,0 +1,24 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef client_CONSTANTS_V2H +#define client_CONSTANTS_V2H + +#include "client_types.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace clientImpl { namespace thrift { + +class clientConstants { + public: + clientConstants(); + +}; + +extern const clientConstants g_client_constants; + +}}}}}} // namespace + +#endif diff --git a/include/data/extern/thriftv2/client_types.h b/include/data/extern/thriftv2/client_types.h new file mode 100644 index 00000000..086cb5ff --- /dev/null +++ b/include/data/extern/thriftv2/client_types.h @@ -0,0 +1,321 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef client_TYPES_V2H +#define client_TYPES_V2H + +#include + +#include +#include +#include +#include +#include + +#include +#include "security_types.h" +#include "trace_types.h" + + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace clientImpl { namespace thrift { + +struct TableOperation { + enum type { + CREATE = 0, + DELETE = 1, + RENAME = 2, + SET_PROPERTY = 3, + REMOVE_PROPERTY = 4, + OFFLINE = 5, + ONLINE = 6, + FLUSH = 7, + PERMISSION = 8, + CLONE = 9, + MERGE = 10, + DELETE_RANGE = 11, + BULK_IMPORT = 12, + COMPACT = 13, + IMPORT = 14, + EXPORT = 15, + COMPACT_CANCEL = 16 + }; +}; + +extern const std::map _TableOperation_VALUES_TO_NAMES; + +std::ostream& operator<<(std::ostream& out, const TableOperation::type& val); + +struct TableOperationExceptionType { + enum type { + EXISTS = 0, + NOTFOUND = 1, + OFFLINE = 2, + BULK_BAD_INPUT_DIRECTORY = 3, + BULK_BAD_ERROR_DIRECTORY = 4, + BAD_RANGE = 5, + OTHER = 6, + NAMESPACE_EXISTS = 7, + NAMESPACE_NOTFOUND = 8, + INVALID_NAME = 9, + BULK_BAD_LOAD_MAPPING = 10, + BULK_CONCURRENT_MERGE = 11 + }; +}; + +extern const std::map _TableOperationExceptionType_VALUES_TO_NAMES; + +std::ostream& operator<<(std::ostream& out, const TableOperationExceptionType::type& val); + +struct ConfigurationType { + enum type { + CURRENT = 0, + SITE = 1, + DEFAULT = 2 + }; +}; + +extern const std::map _ConfigurationType_VALUES_TO_NAMES; + +std::ostream& operator<<(std::ostream& out, const ConfigurationType::type& val); + +struct SecurityErrorCode { + enum type { + DEFAULT_SECURITY_ERROR = 0, + BAD_CREDENTIALS = 1, + PERMISSION_DENIED = 2, + USER_DOESNT_EXIST = 3, + CONNECTION_ERROR = 4, + USER_EXISTS = 5, + GRANT_INVALID = 6, + BAD_AUTHORIZATIONS = 7, + INVALID_INSTANCEID = 8, + TABLE_DOESNT_EXIST = 9, + UNSUPPORTED_OPERATION = 10, + INVALID_TOKEN = 11, + AUTHENTICATOR_FAILED = 12, + AUTHORIZOR_FAILED = 13, + PERMISSIONHANDLER_FAILED = 14, + TOKEN_EXPIRED = 15, + SERIALIZATION_ERROR = 16, + INSUFFICIENT_PROPERTIES = 17, + NAMESPACE_DOESNT_EXIST = 18 + }; +}; + +extern const std::map _SecurityErrorCode_VALUES_TO_NAMES; + +std::ostream& operator<<(std::ostream& out, const SecurityErrorCode::type& val); + +class ThriftSecurityException; + +class ThriftTableOperationException; + +class ThriftNotActiveServiceException; + +class TDiskUsage; + +typedef struct _ThriftSecurityException__isset { + _ThriftSecurityException__isset() : user(false), code(false) {} + bool user :1; + bool code :1; +} _ThriftSecurityException__isset; + +class ThriftSecurityException : public ::apache::thrift::TException { + public: + + ThriftSecurityException(const ThriftSecurityException&); + ThriftSecurityException& operator=(const ThriftSecurityException&); + ThriftSecurityException() : user(), code((SecurityErrorCode::type)0) { + } + + virtual ~ThriftSecurityException() throw(); + std::string user; + SecurityErrorCode::type code; + + _ThriftSecurityException__isset __isset; + + void __set_user(const std::string& val); + + void __set_code(const SecurityErrorCode::type val); + + bool operator == (const ThriftSecurityException & rhs) const + { + if (!(user == rhs.user)) + return false; + if (!(code == rhs.code)) + return false; + return true; + } + bool operator != (const ThriftSecurityException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftSecurityException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(ThriftSecurityException &a, ThriftSecurityException &b); + +std::ostream& operator<<(std::ostream& out, const ThriftSecurityException& obj); + +typedef struct _ThriftTableOperationException__isset { + _ThriftTableOperationException__isset() : tableId(false), tableName(false), op(false), type(false), description(false) {} + bool tableId :1; + bool tableName :1; + bool op :1; + bool type :1; + bool description :1; +} _ThriftTableOperationException__isset; + +class ThriftTableOperationException : public ::apache::thrift::TException { + public: + + ThriftTableOperationException(const ThriftTableOperationException&); + ThriftTableOperationException& operator=(const ThriftTableOperationException&); + ThriftTableOperationException() : tableId(), tableName(), op((TableOperation::type)0), type((TableOperationExceptionType::type)0), description() { + } + + virtual ~ThriftTableOperationException() throw(); + std::string tableId; + std::string tableName; + TableOperation::type op; + TableOperationExceptionType::type type; + std::string description; + + _ThriftTableOperationException__isset __isset; + + void __set_tableId(const std::string& val); + + void __set_tableName(const std::string& val); + + void __set_op(const TableOperation::type val); + + void __set_type(const TableOperationExceptionType::type val); + + void __set_description(const std::string& val); + + bool operator == (const ThriftTableOperationException & rhs) const + { + if (!(tableId == rhs.tableId)) + return false; + if (!(tableName == rhs.tableName)) + return false; + if (!(op == rhs.op)) + return false; + if (!(type == rhs.type)) + return false; + if (!(description == rhs.description)) + return false; + return true; + } + bool operator != (const ThriftTableOperationException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftTableOperationException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(ThriftTableOperationException &a, ThriftTableOperationException &b); + +std::ostream& operator<<(std::ostream& out, const ThriftTableOperationException& obj); + + +class ThriftNotActiveServiceException : public ::apache::thrift::TException { + public: + + ThriftNotActiveServiceException(const ThriftNotActiveServiceException&); + ThriftNotActiveServiceException& operator=(const ThriftNotActiveServiceException&); + ThriftNotActiveServiceException() { + } + + virtual ~ThriftNotActiveServiceException() throw(); + + bool operator == (const ThriftNotActiveServiceException & /* rhs */) const + { + return true; + } + bool operator != (const ThriftNotActiveServiceException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftNotActiveServiceException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(ThriftNotActiveServiceException &a, ThriftNotActiveServiceException &b); + +std::ostream& operator<<(std::ostream& out, const ThriftNotActiveServiceException& obj); + +typedef struct _TDiskUsage__isset { + _TDiskUsage__isset() : tables(false), usage(false) {} + bool tables :1; + bool usage :1; +} _TDiskUsage__isset; + +class TDiskUsage : public virtual ::apache::thrift::TBase { + public: + + TDiskUsage(const TDiskUsage&); + TDiskUsage& operator=(const TDiskUsage&); + TDiskUsage() : usage(0) { + } + + virtual ~TDiskUsage() throw(); + std::vector tables; + int64_t usage; + + _TDiskUsage__isset __isset; + + void __set_tables(const std::vector & val); + + void __set_usage(const int64_t val); + + bool operator == (const TDiskUsage & rhs) const + { + if (!(tables == rhs.tables)) + return false; + if (!(usage == rhs.usage)) + return false; + return true; + } + bool operator != (const TDiskUsage &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TDiskUsage & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TDiskUsage &a, TDiskUsage &b); + +std::ostream& operator<<(std::ostream& out, const TDiskUsage& obj); + +}}}}}} // namespace + +#endif diff --git a/include/data/extern/thriftv2/data_constants.h b/include/data/extern/thriftv2/data_constants.h new file mode 100644 index 00000000..f2042d95 --- /dev/null +++ b/include/data/extern/thriftv2/data_constants.h @@ -0,0 +1,24 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef data_CONSTANTS_V2H +#define data_CONSTANTS_V2H + +#include "data_types.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace dataImpl { namespace thrift { + +class dataConstants { + public: + dataConstants(); + +}; + +extern const dataConstants g_data_constants; + +}}}}}} // namespace + +#endif diff --git a/include/data/extern/thriftv2/data_types.h b/include/data/extern/thriftv2/data_types.h new file mode 100644 index 00000000..4d383931 --- /dev/null +++ b/include/data/extern/thriftv2/data_types.h @@ -0,0 +1,1429 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef data_TYPES_V2H +#define data_TYPES_V2H + +#include + +#include +#include +#include +#include +#include + +#include +#include "security_types.h" +#include "client_types.h" + + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace dataImpl { namespace thrift { + +struct TCMStatus { + enum type { + ACCEPTED = 0, + REJECTED = 1, + VIOLATED = 2, + IGNORED = 3 + }; +}; + +extern const std::map _TCMStatus_VALUES_TO_NAMES; + +std::ostream& operator<<(std::ostream& out, const TCMStatus::type& val); + +typedef int64_t ScanID; + +typedef int64_t UpdateID; + +typedef std::map > ScanBatch; + +typedef std::map > CMBatch; + +typedef std::map > UpdateBatch; + +typedef std::map > TabletFiles; + +class TKey; + +class TColumn; + +class TMutation; + +class TKeyExtent; + +class TKeyValue; + +class ScanResult; + +class TRange; + +class MultiScanResult; + +class InitialScan; + +class InitialMultiScan; + +class IterInfo; + +class TConstraintViolationSummary; + +class UpdateErrors; + +class TCMResult; + +class MapFileInfo; + +class TCondition; + +class TConditionalMutation; + +class TConditionalSession; + +class TSummarizerConfiguration; + +class TSummary; + +class TSummaries; + +class TRowRange; + +class TSummaryRequest; + +typedef struct _TKey__isset { + _TKey__isset() : row(false), colFamily(false), colQualifier(false), colVisibility(false), timestamp(false) {} + bool row :1; + bool colFamily :1; + bool colQualifier :1; + bool colVisibility :1; + bool timestamp :1; +} _TKey__isset; + +class TKey : public virtual ::apache::thrift::TBase { + public: + + TKey(const TKey&); + TKey& operator=(const TKey&); + TKey() : row(), colFamily(), colQualifier(), colVisibility(), timestamp(0) { + } + + virtual ~TKey() throw(); + std::string row; + std::string colFamily; + std::string colQualifier; + std::string colVisibility; + int64_t timestamp; + + _TKey__isset __isset; + + void __set_row(const std::string& val); + + void __set_colFamily(const std::string& val); + + void __set_colQualifier(const std::string& val); + + void __set_colVisibility(const std::string& val); + + void __set_timestamp(const int64_t val); + + bool operator == (const TKey & rhs) const + { + if (!(row == rhs.row)) + return false; + if (!(colFamily == rhs.colFamily)) + return false; + if (!(colQualifier == rhs.colQualifier)) + return false; + if (!(colVisibility == rhs.colVisibility)) + return false; + if (!(timestamp == rhs.timestamp)) + return false; + return true; + } + bool operator != (const TKey &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TKey & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TKey &a, TKey &b); + +std::ostream& operator<<(std::ostream& out, const TKey& obj); + +typedef struct _TColumn__isset { + _TColumn__isset() : columnFamily(false), columnQualifier(false), columnVisibility(false) {} + bool columnFamily :1; + bool columnQualifier :1; + bool columnVisibility :1; +} _TColumn__isset; + +class TColumn : public virtual ::apache::thrift::TBase { + public: + + TColumn(const TColumn&); + TColumn& operator=(const TColumn&); + TColumn() : columnFamily(), columnQualifier(), columnVisibility() { + } + + virtual ~TColumn() throw(); + std::string columnFamily; + std::string columnQualifier; + std::string columnVisibility; + + _TColumn__isset __isset; + + void __set_columnFamily(const std::string& val); + + void __set_columnQualifier(const std::string& val); + + void __set_columnVisibility(const std::string& val); + + bool operator == (const TColumn & rhs) const + { + if (!(columnFamily == rhs.columnFamily)) + return false; + if (!(columnQualifier == rhs.columnQualifier)) + return false; + if (!(columnVisibility == rhs.columnVisibility)) + return false; + return true; + } + bool operator != (const TColumn &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TColumn & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TColumn &a, TColumn &b); + +std::ostream& operator<<(std::ostream& out, const TColumn& obj); + +typedef struct _TMutation__isset { + _TMutation__isset() : row(false), data(false), values(false), entries(false), sources(false) {} + bool row :1; + bool data :1; + bool values :1; + bool entries :1; + bool sources :1; +} _TMutation__isset; + +class TMutation : public virtual ::apache::thrift::TBase { + public: + + TMutation(const TMutation&); + TMutation& operator=(const TMutation&); + TMutation() : row(), data(), entries(0) { + } + + virtual ~TMutation() throw(); + std::string row; + std::string data; + std::vector values; + int32_t entries; + std::vector sources; + + _TMutation__isset __isset; + + void __set_row(const std::string& val); + + void __set_data(const std::string& val); + + void __set_values(const std::vector & val); + + void __set_entries(const int32_t val); + + void __set_sources(const std::vector & val); + + bool operator == (const TMutation & rhs) const + { + if (!(row == rhs.row)) + return false; + if (!(data == rhs.data)) + return false; + if (!(values == rhs.values)) + return false; + if (!(entries == rhs.entries)) + return false; + if (__isset.sources != rhs.__isset.sources) + return false; + else if (__isset.sources && !(sources == rhs.sources)) + return false; + return true; + } + bool operator != (const TMutation &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TMutation & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TMutation &a, TMutation &b); + +std::ostream& operator<<(std::ostream& out, const TMutation& obj); + +typedef struct _TKeyExtent__isset { + _TKeyExtent__isset() : table(false), endRow(false), prevEndRow(false) {} + bool table :1; + bool endRow :1; + bool prevEndRow :1; +} _TKeyExtent__isset; + +class TKeyExtent : public virtual ::apache::thrift::TBase { + public: + + TKeyExtent(const TKeyExtent&); + TKeyExtent& operator=(const TKeyExtent&); + TKeyExtent() : table(), endRow(), prevEndRow() { + } + + virtual ~TKeyExtent() throw(); + std::string table; + std::string endRow; + std::string prevEndRow; + + _TKeyExtent__isset __isset; + + void __set_table(const std::string& val); + + void __set_endRow(const std::string& val); + + void __set_prevEndRow(const std::string& val); + + bool operator == (const TKeyExtent & rhs) const + { + if (!(table == rhs.table)) + return false; + if (!(endRow == rhs.endRow)) + return false; + if (!(prevEndRow == rhs.prevEndRow)) + return false; + return true; + } + bool operator != (const TKeyExtent &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TKeyExtent & rhs) const + { + if (table < rhs.table) + return true; + if (endRow < rhs.endRow) + return true; + if (prevEndRow < rhs.prevEndRow) + return true; + else return false; + } + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TKeyExtent &a, TKeyExtent &b); + +std::ostream& operator<<(std::ostream& out, const TKeyExtent& obj); + +typedef struct _TKeyValue__isset { + _TKeyValue__isset() : key(false), value(false) {} + bool key :1; + bool value :1; +} _TKeyValue__isset; + +class TKeyValue : public virtual ::apache::thrift::TBase { + public: + + TKeyValue(const TKeyValue&); + TKeyValue& operator=(const TKeyValue&); + TKeyValue() : value() { + } + + virtual ~TKeyValue() throw(); + TKey key; + std::string value; + + _TKeyValue__isset __isset; + + void __set_key(const TKey& val); + + void __set_value(const std::string& val); + + bool operator == (const TKeyValue & rhs) const + { + if (!(key == rhs.key)) + return false; + if (!(value == rhs.value)) + return false; + return true; + } + bool operator != (const TKeyValue &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TKeyValue & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TKeyValue &a, TKeyValue &b); + +std::ostream& operator<<(std::ostream& out, const TKeyValue& obj); + +typedef struct _ScanResult__isset { + _ScanResult__isset() : results(false), more(false) {} + bool results :1; + bool more :1; +} _ScanResult__isset; + +class ScanResult : public virtual ::apache::thrift::TBase { + public: + + ScanResult(const ScanResult&); + ScanResult& operator=(const ScanResult&); + ScanResult() : more(0) { + } + + virtual ~ScanResult() throw(); + std::vector results; + bool more; + + _ScanResult__isset __isset; + + void __set_results(const std::vector & val); + + void __set_more(const bool val); + + bool operator == (const ScanResult & rhs) const + { + if (!(results == rhs.results)) + return false; + if (!(more == rhs.more)) + return false; + return true; + } + bool operator != (const ScanResult &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ScanResult & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(ScanResult &a, ScanResult &b); + +std::ostream& operator<<(std::ostream& out, const ScanResult& obj); + +typedef struct _TRange__isset { + _TRange__isset() : start(false), stop(false), startKeyInclusive(false), stopKeyInclusive(false), infiniteStartKey(false), infiniteStopKey(false) {} + bool start :1; + bool stop :1; + bool startKeyInclusive :1; + bool stopKeyInclusive :1; + bool infiniteStartKey :1; + bool infiniteStopKey :1; +} _TRange__isset; + +class TRange : public virtual ::apache::thrift::TBase { + public: + + TRange(const TRange&); + TRange& operator=(const TRange&); + TRange() : startKeyInclusive(0), stopKeyInclusive(0), infiniteStartKey(0), infiniteStopKey(0) { + } + + virtual ~TRange() throw(); + TKey start; + TKey stop; + bool startKeyInclusive; + bool stopKeyInclusive; + bool infiniteStartKey; + bool infiniteStopKey; + + _TRange__isset __isset; + + void __set_start(const TKey& val); + + void __set_stop(const TKey& val); + + void __set_startKeyInclusive(const bool val); + + void __set_stopKeyInclusive(const bool val); + + void __set_infiniteStartKey(const bool val); + + void __set_infiniteStopKey(const bool val); + + bool operator == (const TRange & rhs) const + { + if (!(start == rhs.start)) + return false; + if (!(stop == rhs.stop)) + return false; + if (!(startKeyInclusive == rhs.startKeyInclusive)) + return false; + if (!(stopKeyInclusive == rhs.stopKeyInclusive)) + return false; + if (!(infiniteStartKey == rhs.infiniteStartKey)) + return false; + if (!(infiniteStopKey == rhs.infiniteStopKey)) + return false; + return true; + } + bool operator != (const TRange &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TRange & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TRange &a, TRange &b); + +std::ostream& operator<<(std::ostream& out, const TRange& obj); + +typedef struct _MultiScanResult__isset { + _MultiScanResult__isset() : results(false), failures(false), fullScans(false), partScan(false), partNextKey(false), partNextKeyInclusive(false), more(false) {} + bool results :1; + bool failures :1; + bool fullScans :1; + bool partScan :1; + bool partNextKey :1; + bool partNextKeyInclusive :1; + bool more :1; +} _MultiScanResult__isset; + +class MultiScanResult : public virtual ::apache::thrift::TBase { + public: + + MultiScanResult(const MultiScanResult&); + MultiScanResult& operator=(const MultiScanResult&); + MultiScanResult() : partNextKeyInclusive(0), more(0) { + } + + virtual ~MultiScanResult() throw(); + std::vector results; + ScanBatch failures; + std::vector fullScans; + TKeyExtent partScan; + TKey partNextKey; + bool partNextKeyInclusive; + bool more; + + _MultiScanResult__isset __isset; + + void __set_results(const std::vector & val); + + void __set_failures(const ScanBatch& val); + + void __set_fullScans(const std::vector & val); + + void __set_partScan(const TKeyExtent& val); + + void __set_partNextKey(const TKey& val); + + void __set_partNextKeyInclusive(const bool val); + + void __set_more(const bool val); + + bool operator == (const MultiScanResult & rhs) const + { + if (!(results == rhs.results)) + return false; + if (!(failures == rhs.failures)) + return false; + if (!(fullScans == rhs.fullScans)) + return false; + if (!(partScan == rhs.partScan)) + return false; + if (!(partNextKey == rhs.partNextKey)) + return false; + if (!(partNextKeyInclusive == rhs.partNextKeyInclusive)) + return false; + if (!(more == rhs.more)) + return false; + return true; + } + bool operator != (const MultiScanResult &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MultiScanResult & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(MultiScanResult &a, MultiScanResult &b); + +std::ostream& operator<<(std::ostream& out, const MultiScanResult& obj); + +typedef struct _InitialScan__isset { + _InitialScan__isset() : scanID(false), result(false) {} + bool scanID :1; + bool result :1; +} _InitialScan__isset; + +class InitialScan : public virtual ::apache::thrift::TBase { + public: + + InitialScan(const InitialScan&); + InitialScan& operator=(const InitialScan&); + InitialScan() : scanID(0) { + } + + virtual ~InitialScan() throw(); + ScanID scanID; + ScanResult result; + + _InitialScan__isset __isset; + + void __set_scanID(const ScanID val); + + void __set_result(const ScanResult& val); + + bool operator == (const InitialScan & rhs) const + { + if (!(scanID == rhs.scanID)) + return false; + if (!(result == rhs.result)) + return false; + return true; + } + bool operator != (const InitialScan &rhs) const { + return !(*this == rhs); + } + + bool operator < (const InitialScan & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(InitialScan &a, InitialScan &b); + +std::ostream& operator<<(std::ostream& out, const InitialScan& obj); + +typedef struct _InitialMultiScan__isset { + _InitialMultiScan__isset() : scanID(false), result(false) {} + bool scanID :1; + bool result :1; +} _InitialMultiScan__isset; + +class InitialMultiScan : public virtual ::apache::thrift::TBase { + public: + + InitialMultiScan(const InitialMultiScan&); + InitialMultiScan& operator=(const InitialMultiScan&); + InitialMultiScan() : scanID(0) { + } + + virtual ~InitialMultiScan() throw(); + ScanID scanID; + MultiScanResult result; + + _InitialMultiScan__isset __isset; + + void __set_scanID(const ScanID val); + + void __set_result(const MultiScanResult& val); + + bool operator == (const InitialMultiScan & rhs) const + { + if (!(scanID == rhs.scanID)) + return false; + if (!(result == rhs.result)) + return false; + return true; + } + bool operator != (const InitialMultiScan &rhs) const { + return !(*this == rhs); + } + + bool operator < (const InitialMultiScan & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(InitialMultiScan &a, InitialMultiScan &b); + +std::ostream& operator<<(std::ostream& out, const InitialMultiScan& obj); + +typedef struct _IterInfo__isset { + _IterInfo__isset() : priority(false), className(false), iterName(false) {} + bool priority :1; + bool className :1; + bool iterName :1; +} _IterInfo__isset; + +class IterInfo : public virtual ::apache::thrift::TBase { + public: + + IterInfo(const IterInfo&); + IterInfo& operator=(const IterInfo&); + IterInfo() : priority(0), className(), iterName() { + } + + virtual ~IterInfo() throw(); + int32_t priority; + std::string className; + std::string iterName; + + _IterInfo__isset __isset; + + void __set_priority(const int32_t val); + + void __set_className(const std::string& val); + + void __set_iterName(const std::string& val); + + bool operator == (const IterInfo & rhs) const + { + if (!(priority == rhs.priority)) + return false; + if (!(className == rhs.className)) + return false; + if (!(iterName == rhs.iterName)) + return false; + return true; + } + bool operator != (const IterInfo &rhs) const { + return !(*this == rhs); + } + + bool operator < (const IterInfo & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(IterInfo &a, IterInfo &b); + +std::ostream& operator<<(std::ostream& out, const IterInfo& obj); + +typedef struct _TConstraintViolationSummary__isset { + _TConstraintViolationSummary__isset() : constrainClass(false), violationCode(false), violationDescription(false), numberOfViolatingMutations(false) {} + bool constrainClass :1; + bool violationCode :1; + bool violationDescription :1; + bool numberOfViolatingMutations :1; +} _TConstraintViolationSummary__isset; + +class TConstraintViolationSummary : public virtual ::apache::thrift::TBase { + public: + + TConstraintViolationSummary(const TConstraintViolationSummary&); + TConstraintViolationSummary& operator=(const TConstraintViolationSummary&); + TConstraintViolationSummary() : constrainClass(), violationCode(0), violationDescription(), numberOfViolatingMutations(0) { + } + + virtual ~TConstraintViolationSummary() throw(); + std::string constrainClass; + int16_t violationCode; + std::string violationDescription; + int64_t numberOfViolatingMutations; + + _TConstraintViolationSummary__isset __isset; + + void __set_constrainClass(const std::string& val); + + void __set_violationCode(const int16_t val); + + void __set_violationDescription(const std::string& val); + + void __set_numberOfViolatingMutations(const int64_t val); + + bool operator == (const TConstraintViolationSummary & rhs) const + { + if (!(constrainClass == rhs.constrainClass)) + return false; + if (!(violationCode == rhs.violationCode)) + return false; + if (!(violationDescription == rhs.violationDescription)) + return false; + if (!(numberOfViolatingMutations == rhs.numberOfViolatingMutations)) + return false; + return true; + } + bool operator != (const TConstraintViolationSummary &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TConstraintViolationSummary & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TConstraintViolationSummary &a, TConstraintViolationSummary &b); + +std::ostream& operator<<(std::ostream& out, const TConstraintViolationSummary& obj); + +typedef struct _UpdateErrors__isset { + _UpdateErrors__isset() : failedExtents(false), violationSummaries(false), authorizationFailures(false) {} + bool failedExtents :1; + bool violationSummaries :1; + bool authorizationFailures :1; +} _UpdateErrors__isset; + +class UpdateErrors : public virtual ::apache::thrift::TBase { + public: + + UpdateErrors(const UpdateErrors&); + UpdateErrors& operator=(const UpdateErrors&); + UpdateErrors() { + } + + virtual ~UpdateErrors() throw(); + std::map failedExtents; + std::vector violationSummaries; + std::map authorizationFailures; + + _UpdateErrors__isset __isset; + + void __set_failedExtents(const std::map & val); + + void __set_violationSummaries(const std::vector & val); + + void __set_authorizationFailures(const std::map & val); + + bool operator == (const UpdateErrors & rhs) const + { + if (!(failedExtents == rhs.failedExtents)) + return false; + if (!(violationSummaries == rhs.violationSummaries)) + return false; + if (!(authorizationFailures == rhs.authorizationFailures)) + return false; + return true; + } + bool operator != (const UpdateErrors &rhs) const { + return !(*this == rhs); + } + + bool operator < (const UpdateErrors & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(UpdateErrors &a, UpdateErrors &b); + +std::ostream& operator<<(std::ostream& out, const UpdateErrors& obj); + +typedef struct _TCMResult__isset { + _TCMResult__isset() : cmid(false), status(false) {} + bool cmid :1; + bool status :1; +} _TCMResult__isset; + +class TCMResult : public virtual ::apache::thrift::TBase { + public: + + TCMResult(const TCMResult&); + TCMResult& operator=(const TCMResult&); + TCMResult() : cmid(0), status((TCMStatus::type)0) { + } + + virtual ~TCMResult() throw(); + int64_t cmid; + TCMStatus::type status; + + _TCMResult__isset __isset; + + void __set_cmid(const int64_t val); + + void __set_status(const TCMStatus::type val); + + bool operator == (const TCMResult & rhs) const + { + if (!(cmid == rhs.cmid)) + return false; + if (!(status == rhs.status)) + return false; + return true; + } + bool operator != (const TCMResult &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TCMResult & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TCMResult &a, TCMResult &b); + +std::ostream& operator<<(std::ostream& out, const TCMResult& obj); + +typedef struct _MapFileInfo__isset { + _MapFileInfo__isset() : estimatedSize(false) {} + bool estimatedSize :1; +} _MapFileInfo__isset; + +class MapFileInfo : public virtual ::apache::thrift::TBase { + public: + + MapFileInfo(const MapFileInfo&); + MapFileInfo& operator=(const MapFileInfo&); + MapFileInfo() : estimatedSize(0) { + } + + virtual ~MapFileInfo() throw(); + int64_t estimatedSize; + + _MapFileInfo__isset __isset; + + void __set_estimatedSize(const int64_t val); + + bool operator == (const MapFileInfo & rhs) const + { + if (!(estimatedSize == rhs.estimatedSize)) + return false; + return true; + } + bool operator != (const MapFileInfo &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MapFileInfo & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(MapFileInfo &a, MapFileInfo &b); + +std::ostream& operator<<(std::ostream& out, const MapFileInfo& obj); + +typedef struct _TCondition__isset { + _TCondition__isset() : cf(false), cq(false), cv(false), ts(false), hasTimestamp(false), val(false), iterators(false) {} + bool cf :1; + bool cq :1; + bool cv :1; + bool ts :1; + bool hasTimestamp :1; + bool val :1; + bool iterators :1; +} _TCondition__isset; + +class TCondition : public virtual ::apache::thrift::TBase { + public: + + TCondition(const TCondition&); + TCondition& operator=(const TCondition&); + TCondition() : cf(), cq(), cv(), ts(0), hasTimestamp(0), val(), iterators() { + } + + virtual ~TCondition() throw(); + std::string cf; + std::string cq; + std::string cv; + int64_t ts; + bool hasTimestamp; + std::string val; + std::string iterators; + + _TCondition__isset __isset; + + void __set_cf(const std::string& val); + + void __set_cq(const std::string& val); + + void __set_cv(const std::string& val); + + void __set_ts(const int64_t val); + + void __set_hasTimestamp(const bool val); + + void __set_val(const std::string& val); + + void __set_iterators(const std::string& val); + + bool operator == (const TCondition & rhs) const + { + if (!(cf == rhs.cf)) + return false; + if (!(cq == rhs.cq)) + return false; + if (!(cv == rhs.cv)) + return false; + if (!(ts == rhs.ts)) + return false; + if (!(hasTimestamp == rhs.hasTimestamp)) + return false; + if (!(val == rhs.val)) + return false; + if (!(iterators == rhs.iterators)) + return false; + return true; + } + bool operator != (const TCondition &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TCondition & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TCondition &a, TCondition &b); + +std::ostream& operator<<(std::ostream& out, const TCondition& obj); + +typedef struct _TConditionalMutation__isset { + _TConditionalMutation__isset() : conditions(false), mutation(false), id(false) {} + bool conditions :1; + bool mutation :1; + bool id :1; +} _TConditionalMutation__isset; + +class TConditionalMutation : public virtual ::apache::thrift::TBase { + public: + + TConditionalMutation(const TConditionalMutation&); + TConditionalMutation& operator=(const TConditionalMutation&); + TConditionalMutation() : id(0) { + } + + virtual ~TConditionalMutation() throw(); + std::vector conditions; + TMutation mutation; + int64_t id; + + _TConditionalMutation__isset __isset; + + void __set_conditions(const std::vector & val); + + void __set_mutation(const TMutation& val); + + void __set_id(const int64_t val); + + bool operator == (const TConditionalMutation & rhs) const + { + if (!(conditions == rhs.conditions)) + return false; + if (!(mutation == rhs.mutation)) + return false; + if (!(id == rhs.id)) + return false; + return true; + } + bool operator != (const TConditionalMutation &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TConditionalMutation & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TConditionalMutation &a, TConditionalMutation &b); + +std::ostream& operator<<(std::ostream& out, const TConditionalMutation& obj); + +typedef struct _TConditionalSession__isset { + _TConditionalSession__isset() : sessionId(false), tserverLock(false), ttl(false) {} + bool sessionId :1; + bool tserverLock :1; + bool ttl :1; +} _TConditionalSession__isset; + +class TConditionalSession : public virtual ::apache::thrift::TBase { + public: + + TConditionalSession(const TConditionalSession&); + TConditionalSession& operator=(const TConditionalSession&); + TConditionalSession() : sessionId(0), tserverLock(), ttl(0) { + } + + virtual ~TConditionalSession() throw(); + int64_t sessionId; + std::string tserverLock; + int64_t ttl; + + _TConditionalSession__isset __isset; + + void __set_sessionId(const int64_t val); + + void __set_tserverLock(const std::string& val); + + void __set_ttl(const int64_t val); + + bool operator == (const TConditionalSession & rhs) const + { + if (!(sessionId == rhs.sessionId)) + return false; + if (!(tserverLock == rhs.tserverLock)) + return false; + if (!(ttl == rhs.ttl)) + return false; + return true; + } + bool operator != (const TConditionalSession &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TConditionalSession & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TConditionalSession &a, TConditionalSession &b); + +std::ostream& operator<<(std::ostream& out, const TConditionalSession& obj); + +typedef struct _TSummarizerConfiguration__isset { + _TSummarizerConfiguration__isset() : classname(false), options(false), configId(false) {} + bool classname :1; + bool options :1; + bool configId :1; +} _TSummarizerConfiguration__isset; + +class TSummarizerConfiguration : public virtual ::apache::thrift::TBase { + public: + + TSummarizerConfiguration(const TSummarizerConfiguration&); + TSummarizerConfiguration& operator=(const TSummarizerConfiguration&); + TSummarizerConfiguration() : classname(), configId() { + } + + virtual ~TSummarizerConfiguration() throw(); + std::string classname; + std::map options; + std::string configId; + + _TSummarizerConfiguration__isset __isset; + + void __set_classname(const std::string& val); + + void __set_options(const std::map & val); + + void __set_configId(const std::string& val); + + bool operator == (const TSummarizerConfiguration & rhs) const + { + if (!(classname == rhs.classname)) + return false; + if (!(options == rhs.options)) + return false; + if (!(configId == rhs.configId)) + return false; + return true; + } + bool operator != (const TSummarizerConfiguration &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TSummarizerConfiguration & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TSummarizerConfiguration &a, TSummarizerConfiguration &b); + +std::ostream& operator<<(std::ostream& out, const TSummarizerConfiguration& obj); + +typedef struct _TSummary__isset { + _TSummary__isset() : summary(false), config(false), filesContaining(false), filesExceeding(false), filesLarge(false) {} + bool summary :1; + bool config :1; + bool filesContaining :1; + bool filesExceeding :1; + bool filesLarge :1; +} _TSummary__isset; + +class TSummary : public virtual ::apache::thrift::TBase { + public: + + TSummary(const TSummary&); + TSummary& operator=(const TSummary&); + TSummary() : filesContaining(0), filesExceeding(0), filesLarge(0) { + } + + virtual ~TSummary() throw(); + std::map summary; + TSummarizerConfiguration config; + int64_t filesContaining; + int64_t filesExceeding; + int64_t filesLarge; + + _TSummary__isset __isset; + + void __set_summary(const std::map & val); + + void __set_config(const TSummarizerConfiguration& val); + + void __set_filesContaining(const int64_t val); + + void __set_filesExceeding(const int64_t val); + + void __set_filesLarge(const int64_t val); + + bool operator == (const TSummary & rhs) const + { + if (!(summary == rhs.summary)) + return false; + if (!(config == rhs.config)) + return false; + if (!(filesContaining == rhs.filesContaining)) + return false; + if (!(filesExceeding == rhs.filesExceeding)) + return false; + if (!(filesLarge == rhs.filesLarge)) + return false; + return true; + } + bool operator != (const TSummary &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TSummary & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TSummary &a, TSummary &b); + +std::ostream& operator<<(std::ostream& out, const TSummary& obj); + +typedef struct _TSummaries__isset { + _TSummaries__isset() : finished(false), sessionId(false), totalFiles(false), deletedFiles(false), summaries(false) {} + bool finished :1; + bool sessionId :1; + bool totalFiles :1; + bool deletedFiles :1; + bool summaries :1; +} _TSummaries__isset; + +class TSummaries : public virtual ::apache::thrift::TBase { + public: + + TSummaries(const TSummaries&); + TSummaries& operator=(const TSummaries&); + TSummaries() : finished(0), sessionId(0), totalFiles(0), deletedFiles(0) { + } + + virtual ~TSummaries() throw(); + bool finished; + int64_t sessionId; + int64_t totalFiles; + int64_t deletedFiles; + std::vector summaries; + + _TSummaries__isset __isset; + + void __set_finished(const bool val); + + void __set_sessionId(const int64_t val); + + void __set_totalFiles(const int64_t val); + + void __set_deletedFiles(const int64_t val); + + void __set_summaries(const std::vector & val); + + bool operator == (const TSummaries & rhs) const + { + if (!(finished == rhs.finished)) + return false; + if (!(sessionId == rhs.sessionId)) + return false; + if (!(totalFiles == rhs.totalFiles)) + return false; + if (!(deletedFiles == rhs.deletedFiles)) + return false; + if (!(summaries == rhs.summaries)) + return false; + return true; + } + bool operator != (const TSummaries &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TSummaries & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TSummaries &a, TSummaries &b); + +std::ostream& operator<<(std::ostream& out, const TSummaries& obj); + +typedef struct _TRowRange__isset { + _TRowRange__isset() : startRow(false), endRow(false) {} + bool startRow :1; + bool endRow :1; +} _TRowRange__isset; + +class TRowRange : public virtual ::apache::thrift::TBase { + public: + + TRowRange(const TRowRange&); + TRowRange& operator=(const TRowRange&); + TRowRange() : startRow(), endRow() { + } + + virtual ~TRowRange() throw(); + std::string startRow; + std::string endRow; + + _TRowRange__isset __isset; + + void __set_startRow(const std::string& val); + + void __set_endRow(const std::string& val); + + bool operator == (const TRowRange & rhs) const + { + if (!(startRow == rhs.startRow)) + return false; + if (!(endRow == rhs.endRow)) + return false; + return true; + } + bool operator != (const TRowRange &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TRowRange & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TRowRange &a, TRowRange &b); + +std::ostream& operator<<(std::ostream& out, const TRowRange& obj); + +typedef struct _TSummaryRequest__isset { + _TSummaryRequest__isset() : tableId(false), bounds(false), summarizers(false), summarizerPattern(false) {} + bool tableId :1; + bool bounds :1; + bool summarizers :1; + bool summarizerPattern :1; +} _TSummaryRequest__isset; + +class TSummaryRequest : public virtual ::apache::thrift::TBase { + public: + + TSummaryRequest(const TSummaryRequest&); + TSummaryRequest& operator=(const TSummaryRequest&); + TSummaryRequest() : tableId(), summarizerPattern() { + } + + virtual ~TSummaryRequest() throw(); + std::string tableId; + TRowRange bounds; + std::vector summarizers; + std::string summarizerPattern; + + _TSummaryRequest__isset __isset; + + void __set_tableId(const std::string& val); + + void __set_bounds(const TRowRange& val); + + void __set_summarizers(const std::vector & val); + + void __set_summarizerPattern(const std::string& val); + + bool operator == (const TSummaryRequest & rhs) const + { + if (!(tableId == rhs.tableId)) + return false; + if (!(bounds == rhs.bounds)) + return false; + if (!(summarizers == rhs.summarizers)) + return false; + if (!(summarizerPattern == rhs.summarizerPattern)) + return false; + return true; + } + bool operator != (const TSummaryRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TSummaryRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TSummaryRequest &a, TSummaryRequest &b); + +std::ostream& operator<<(std::ostream& out, const TSummaryRequest& obj); + +}}}}}} // namespace + +#endif diff --git a/include/data/extern/thriftv2/gc_constants.h b/include/data/extern/thriftv2/gc_constants.h new file mode 100644 index 00000000..587e7b71 --- /dev/null +++ b/include/data/extern/thriftv2/gc_constants.h @@ -0,0 +1,24 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef gc_CONSTANTS_V2H +#define gc_CONSTANTS_V2H + +#include "gc_types.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace gc { namespace thrift { + +class gcConstants { + public: + gcConstants(); + +}; + +extern const gcConstants g_gc_constants; + +}}}}}} // namespace + +#endif diff --git a/include/data/extern/thriftv2/gc_types.h b/include/data/extern/thriftv2/gc_types.h new file mode 100644 index 00000000..114cec47 --- /dev/null +++ b/include/data/extern/thriftv2/gc_types.h @@ -0,0 +1,164 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef gc_TYPES_V2H +#define gc_TYPES_V2H + +#include + +#include +#include +#include +#include +#include + +#include +#include "security_types.h" +#include "trace_types.h" +#include "client_types.h" + + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace gc { namespace thrift { + +class GcCycleStats; + +class GCStatus; + +typedef struct _GcCycleStats__isset { + _GcCycleStats__isset() : started(false), finished(false), candidates(false), inUse(false), deleted(false), errors(false) {} + bool started :1; + bool finished :1; + bool candidates :1; + bool inUse :1; + bool deleted :1; + bool errors :1; +} _GcCycleStats__isset; + +class GcCycleStats : public virtual ::apache::thrift::TBase { + public: + + GcCycleStats(const GcCycleStats&); + GcCycleStats& operator=(const GcCycleStats&); + GcCycleStats() : started(0), finished(0), candidates(0), inUse(0), deleted(0), errors(0) { + } + + virtual ~GcCycleStats() throw(); + int64_t started; + int64_t finished; + int64_t candidates; + int64_t inUse; + int64_t deleted; + int64_t errors; + + _GcCycleStats__isset __isset; + + void __set_started(const int64_t val); + + void __set_finished(const int64_t val); + + void __set_candidates(const int64_t val); + + void __set_inUse(const int64_t val); + + void __set_deleted(const int64_t val); + + void __set_errors(const int64_t val); + + bool operator == (const GcCycleStats & rhs) const + { + if (!(started == rhs.started)) + return false; + if (!(finished == rhs.finished)) + return false; + if (!(candidates == rhs.candidates)) + return false; + if (!(inUse == rhs.inUse)) + return false; + if (!(deleted == rhs.deleted)) + return false; + if (!(errors == rhs.errors)) + return false; + return true; + } + bool operator != (const GcCycleStats &rhs) const { + return !(*this == rhs); + } + + bool operator < (const GcCycleStats & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(GcCycleStats &a, GcCycleStats &b); + +std::ostream& operator<<(std::ostream& out, const GcCycleStats& obj); + +typedef struct _GCStatus__isset { + _GCStatus__isset() : last(false), lastLog(false), current(false), currentLog(false) {} + bool last :1; + bool lastLog :1; + bool current :1; + bool currentLog :1; +} _GCStatus__isset; + +class GCStatus : public virtual ::apache::thrift::TBase { + public: + + GCStatus(const GCStatus&); + GCStatus& operator=(const GCStatus&); + GCStatus() { + } + + virtual ~GCStatus() throw(); + GcCycleStats last; + GcCycleStats lastLog; + GcCycleStats current; + GcCycleStats currentLog; + + _GCStatus__isset __isset; + + void __set_last(const GcCycleStats& val); + + void __set_lastLog(const GcCycleStats& val); + + void __set_current(const GcCycleStats& val); + + void __set_currentLog(const GcCycleStats& val); + + bool operator == (const GCStatus & rhs) const + { + if (!(last == rhs.last)) + return false; + if (!(lastLog == rhs.lastLog)) + return false; + if (!(current == rhs.current)) + return false; + if (!(currentLog == rhs.currentLog)) + return false; + return true; + } + bool operator != (const GCStatus &rhs) const { + return !(*this == rhs); + } + + bool operator < (const GCStatus & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(GCStatus &a, GCStatus &b); + +std::ostream& operator<<(std::ostream& out, const GCStatus& obj); + +}}}}}} // namespace + +#endif diff --git a/include/data/extern/thriftv2/master_constants.h b/include/data/extern/thriftv2/master_constants.h new file mode 100644 index 00000000..d4b0f7e6 --- /dev/null +++ b/include/data/extern/thriftv2/master_constants.h @@ -0,0 +1,24 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef master_CONSTANTS_V2H +#define master_CONSTANTS_V2H + +#include "master_types.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace master { namespace thrift { + +class masterConstants { + public: + masterConstants(); + +}; + +extern const masterConstants g_master_constants; + +}}}}}} // namespace + +#endif diff --git a/include/data/extern/thriftv2/master_types.h b/include/data/extern/thriftv2/master_types.h new file mode 100644 index 00000000..c77ae000 --- /dev/null +++ b/include/data/extern/thriftv2/master_types.h @@ -0,0 +1,764 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef master_TYPES_V2H +#define master_TYPES_V2H + +#include + +#include +#include +#include +#include +#include + +#include +#include "data_types.h" +#include "security_types.h" +#include "client_types.h" +#include "trace_types.h" + + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace master { namespace thrift { + +struct BulkImportState { + enum type { + INITIAL = 0, + MOVING = 1, + PROCESSING = 2, + ASSIGNING = 3, + LOADING = 4, + COPY_FILES = 5, + CLEANUP = 6 + }; +}; + +extern const std::map _BulkImportState_VALUES_TO_NAMES; + +std::ostream& operator<<(std::ostream& out, const BulkImportState::type& val); + +struct MasterState { + enum type { + INITIAL = 0, + HAVE_LOCK = 1, + SAFE_MODE = 2, + NORMAL = 3, + UNLOAD_METADATA_TABLETS = 4, + UNLOAD_ROOT_TABLET = 5, + STOP = 6 + }; +}; + +extern const std::map _MasterState_VALUES_TO_NAMES; + +std::ostream& operator<<(std::ostream& out, const MasterState::type& val); + +struct MasterGoalState { + enum type { + CLEAN_STOP = 0, + SAFE_MODE = 1, + NORMAL = 2 + }; +}; + +extern const std::map _MasterGoalState_VALUES_TO_NAMES; + +std::ostream& operator<<(std::ostream& out, const MasterGoalState::type& val); + +struct TabletLoadState { + enum type { + LOADED = 0, + LOAD_FAILURE = 1, + UNLOADED = 2, + UNLOAD_FAILURE_NOT_SERVING = 3, + UNLOAD_ERROR = 4, + CHOPPED = 5 + }; +}; + +extern const std::map _TabletLoadState_VALUES_TO_NAMES; + +std::ostream& operator<<(std::ostream& out, const TabletLoadState::type& val); + +struct FateOperation { + enum type { + TABLE_CREATE = 0, + TABLE_CLONE = 1, + TABLE_DELETE = 2, + TABLE_RENAME = 3, + TABLE_ONLINE = 4, + TABLE_OFFLINE = 5, + TABLE_MERGE = 6, + TABLE_DELETE_RANGE = 7, + TABLE_BULK_IMPORT = 8, + TABLE_COMPACT = 9, + TABLE_IMPORT = 10, + TABLE_EXPORT = 11, + TABLE_CANCEL_COMPACT = 12, + NAMESPACE_CREATE = 13, + NAMESPACE_DELETE = 14, + NAMESPACE_RENAME = 15, + TABLE_BULK_IMPORT2 = 16 + }; +}; + +extern const std::map _FateOperation_VALUES_TO_NAMES; + +std::ostream& operator<<(std::ostream& out, const FateOperation::type& val); + +class Compacting; + +class TableInfo; + +class RecoveryStatus; + +class BulkImportStatus; + +class TabletServerStatus; + +class DeadServer; + +class MasterMonitorInfo; + +class TabletSplit; + +class RecoveryException; + +typedef struct _Compacting__isset { + _Compacting__isset() : running(false), queued(false) {} + bool running :1; + bool queued :1; +} _Compacting__isset; + +class Compacting : public virtual ::apache::thrift::TBase { + public: + + Compacting(const Compacting&); + Compacting& operator=(const Compacting&); + Compacting() : running(0), queued(0) { + } + + virtual ~Compacting() throw(); + int32_t running; + int32_t queued; + + _Compacting__isset __isset; + + void __set_running(const int32_t val); + + void __set_queued(const int32_t val); + + bool operator == (const Compacting & rhs) const + { + if (!(running == rhs.running)) + return false; + if (!(queued == rhs.queued)) + return false; + return true; + } + bool operator != (const Compacting &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Compacting & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(Compacting &a, Compacting &b); + +std::ostream& operator<<(std::ostream& out, const Compacting& obj); + +typedef struct _TableInfo__isset { + _TableInfo__isset() : recs(false), recsInMemory(false), tablets(false), onlineTablets(false), ingestRate(false), ingestByteRate(false), queryRate(false), queryByteRate(false), minors(false), majors(false), scans(false), scanRate(false) {} + bool recs :1; + bool recsInMemory :1; + bool tablets :1; + bool onlineTablets :1; + bool ingestRate :1; + bool ingestByteRate :1; + bool queryRate :1; + bool queryByteRate :1; + bool minors :1; + bool majors :1; + bool scans :1; + bool scanRate :1; +} _TableInfo__isset; + +class TableInfo : public virtual ::apache::thrift::TBase { + public: + + TableInfo(const TableInfo&); + TableInfo& operator=(const TableInfo&); + TableInfo() : recs(0), recsInMemory(0), tablets(0), onlineTablets(0), ingestRate(0), ingestByteRate(0), queryRate(0), queryByteRate(0), scanRate(0) { + } + + virtual ~TableInfo() throw(); + int64_t recs; + int64_t recsInMemory; + int32_t tablets; + int32_t onlineTablets; + double ingestRate; + double ingestByteRate; + double queryRate; + double queryByteRate; + Compacting minors; + Compacting majors; + Compacting scans; + double scanRate; + + _TableInfo__isset __isset; + + void __set_recs(const int64_t val); + + void __set_recsInMemory(const int64_t val); + + void __set_tablets(const int32_t val); + + void __set_onlineTablets(const int32_t val); + + void __set_ingestRate(const double val); + + void __set_ingestByteRate(const double val); + + void __set_queryRate(const double val); + + void __set_queryByteRate(const double val); + + void __set_minors(const Compacting& val); + + void __set_majors(const Compacting& val); + + void __set_scans(const Compacting& val); + + void __set_scanRate(const double val); + + bool operator == (const TableInfo & rhs) const + { + if (!(recs == rhs.recs)) + return false; + if (!(recsInMemory == rhs.recsInMemory)) + return false; + if (!(tablets == rhs.tablets)) + return false; + if (!(onlineTablets == rhs.onlineTablets)) + return false; + if (!(ingestRate == rhs.ingestRate)) + return false; + if (!(ingestByteRate == rhs.ingestByteRate)) + return false; + if (!(queryRate == rhs.queryRate)) + return false; + if (!(queryByteRate == rhs.queryByteRate)) + return false; + if (!(minors == rhs.minors)) + return false; + if (!(majors == rhs.majors)) + return false; + if (!(scans == rhs.scans)) + return false; + if (!(scanRate == rhs.scanRate)) + return false; + return true; + } + bool operator != (const TableInfo &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TableInfo & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TableInfo &a, TableInfo &b); + +std::ostream& operator<<(std::ostream& out, const TableInfo& obj); + +typedef struct _RecoveryStatus__isset { + _RecoveryStatus__isset() : name(false), runtime(false), progress(false) {} + bool name :1; + bool runtime :1; + bool progress :1; +} _RecoveryStatus__isset; + +class RecoveryStatus : public virtual ::apache::thrift::TBase { + public: + + RecoveryStatus(const RecoveryStatus&); + RecoveryStatus& operator=(const RecoveryStatus&); + RecoveryStatus() : name(), runtime(0), progress(0) { + } + + virtual ~RecoveryStatus() throw(); + std::string name; + int32_t runtime; + double progress; + + _RecoveryStatus__isset __isset; + + void __set_name(const std::string& val); + + void __set_runtime(const int32_t val); + + void __set_progress(const double val); + + bool operator == (const RecoveryStatus & rhs) const + { + if (!(name == rhs.name)) + return false; + if (!(runtime == rhs.runtime)) + return false; + if (!(progress == rhs.progress)) + return false; + return true; + } + bool operator != (const RecoveryStatus &rhs) const { + return !(*this == rhs); + } + + bool operator < (const RecoveryStatus & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(RecoveryStatus &a, RecoveryStatus &b); + +std::ostream& operator<<(std::ostream& out, const RecoveryStatus& obj); + +typedef struct _BulkImportStatus__isset { + _BulkImportStatus__isset() : startTime(false), filename(false), state(false) {} + bool startTime :1; + bool filename :1; + bool state :1; +} _BulkImportStatus__isset; + +class BulkImportStatus : public virtual ::apache::thrift::TBase { + public: + + BulkImportStatus(const BulkImportStatus&); + BulkImportStatus& operator=(const BulkImportStatus&); + BulkImportStatus() : startTime(0), filename(), state((BulkImportState::type)0) { + } + + virtual ~BulkImportStatus() throw(); + int64_t startTime; + std::string filename; + BulkImportState::type state; + + _BulkImportStatus__isset __isset; + + void __set_startTime(const int64_t val); + + void __set_filename(const std::string& val); + + void __set_state(const BulkImportState::type val); + + bool operator == (const BulkImportStatus & rhs) const + { + if (!(startTime == rhs.startTime)) + return false; + if (!(filename == rhs.filename)) + return false; + if (!(state == rhs.state)) + return false; + return true; + } + bool operator != (const BulkImportStatus &rhs) const { + return !(*this == rhs); + } + + bool operator < (const BulkImportStatus & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(BulkImportStatus &a, BulkImportStatus &b); + +std::ostream& operator<<(std::ostream& out, const BulkImportStatus& obj); + +typedef struct _TabletServerStatus__isset { + _TabletServerStatus__isset() : tableMap(false), lastContact(false), name(false), osLoad(false), holdTime(false), lookups(false), indexCacheHits(false), indexCacheRequest(false), dataCacheHits(false), dataCacheRequest(false), logSorts(false), flushs(false), syncs(false), bulkImports(false), version(false), responseTime(false) {} + bool tableMap :1; + bool lastContact :1; + bool name :1; + bool osLoad :1; + bool holdTime :1; + bool lookups :1; + bool indexCacheHits :1; + bool indexCacheRequest :1; + bool dataCacheHits :1; + bool dataCacheRequest :1; + bool logSorts :1; + bool flushs :1; + bool syncs :1; + bool bulkImports :1; + bool version :1; + bool responseTime :1; +} _TabletServerStatus__isset; + +class TabletServerStatus : public virtual ::apache::thrift::TBase { + public: + + TabletServerStatus(const TabletServerStatus&); + TabletServerStatus& operator=(const TabletServerStatus&); + TabletServerStatus() : lastContact(0), name(), osLoad(0), holdTime(0), lookups(0), indexCacheHits(0), indexCacheRequest(0), dataCacheHits(0), dataCacheRequest(0), flushs(0), syncs(0), version(), responseTime(0) { + } + + virtual ~TabletServerStatus() throw(); + std::map tableMap; + int64_t lastContact; + std::string name; + double osLoad; + int64_t holdTime; + int64_t lookups; + int64_t indexCacheHits; + int64_t indexCacheRequest; + int64_t dataCacheHits; + int64_t dataCacheRequest; + std::vector logSorts; + int64_t flushs; + int64_t syncs; + std::vector bulkImports; + std::string version; + int64_t responseTime; + + _TabletServerStatus__isset __isset; + + void __set_tableMap(const std::map & val); + + void __set_lastContact(const int64_t val); + + void __set_name(const std::string& val); + + void __set_osLoad(const double val); + + void __set_holdTime(const int64_t val); + + void __set_lookups(const int64_t val); + + void __set_indexCacheHits(const int64_t val); + + void __set_indexCacheRequest(const int64_t val); + + void __set_dataCacheHits(const int64_t val); + + void __set_dataCacheRequest(const int64_t val); + + void __set_logSorts(const std::vector & val); + + void __set_flushs(const int64_t val); + + void __set_syncs(const int64_t val); + + void __set_bulkImports(const std::vector & val); + + void __set_version(const std::string& val); + + void __set_responseTime(const int64_t val); + + bool operator == (const TabletServerStatus & rhs) const + { + if (!(tableMap == rhs.tableMap)) + return false; + if (!(lastContact == rhs.lastContact)) + return false; + if (!(name == rhs.name)) + return false; + if (!(osLoad == rhs.osLoad)) + return false; + if (!(holdTime == rhs.holdTime)) + return false; + if (!(lookups == rhs.lookups)) + return false; + if (!(indexCacheHits == rhs.indexCacheHits)) + return false; + if (!(indexCacheRequest == rhs.indexCacheRequest)) + return false; + if (!(dataCacheHits == rhs.dataCacheHits)) + return false; + if (!(dataCacheRequest == rhs.dataCacheRequest)) + return false; + if (!(logSorts == rhs.logSorts)) + return false; + if (!(flushs == rhs.flushs)) + return false; + if (!(syncs == rhs.syncs)) + return false; + if (!(bulkImports == rhs.bulkImports)) + return false; + if (!(version == rhs.version)) + return false; + if (!(responseTime == rhs.responseTime)) + return false; + return true; + } + bool operator != (const TabletServerStatus &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletServerStatus & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TabletServerStatus &a, TabletServerStatus &b); + +std::ostream& operator<<(std::ostream& out, const TabletServerStatus& obj); + +typedef struct _DeadServer__isset { + _DeadServer__isset() : server(false), lastStatus(false), status(false) {} + bool server :1; + bool lastStatus :1; + bool status :1; +} _DeadServer__isset; + +class DeadServer : public virtual ::apache::thrift::TBase { + public: + + DeadServer(const DeadServer&); + DeadServer& operator=(const DeadServer&); + DeadServer() : server(), lastStatus(0), status() { + } + + virtual ~DeadServer() throw(); + std::string server; + int64_t lastStatus; + std::string status; + + _DeadServer__isset __isset; + + void __set_server(const std::string& val); + + void __set_lastStatus(const int64_t val); + + void __set_status(const std::string& val); + + bool operator == (const DeadServer & rhs) const + { + if (!(server == rhs.server)) + return false; + if (!(lastStatus == rhs.lastStatus)) + return false; + if (!(status == rhs.status)) + return false; + return true; + } + bool operator != (const DeadServer &rhs) const { + return !(*this == rhs); + } + + bool operator < (const DeadServer & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(DeadServer &a, DeadServer &b); + +std::ostream& operator<<(std::ostream& out, const DeadServer& obj); + +typedef struct _MasterMonitorInfo__isset { + _MasterMonitorInfo__isset() : tableMap(false), tServerInfo(false), badTServers(false), state(false), goalState(false), unassignedTablets(false), serversShuttingDown(false), deadTabletServers(false), bulkImports(false) {} + bool tableMap :1; + bool tServerInfo :1; + bool badTServers :1; + bool state :1; + bool goalState :1; + bool unassignedTablets :1; + bool serversShuttingDown :1; + bool deadTabletServers :1; + bool bulkImports :1; +} _MasterMonitorInfo__isset; + +class MasterMonitorInfo : public virtual ::apache::thrift::TBase { + public: + + MasterMonitorInfo(const MasterMonitorInfo&); + MasterMonitorInfo& operator=(const MasterMonitorInfo&); + MasterMonitorInfo() : state((MasterState::type)0), goalState((MasterGoalState::type)0), unassignedTablets(0) { + } + + virtual ~MasterMonitorInfo() throw(); + std::map tableMap; + std::vector tServerInfo; + std::map badTServers; + MasterState::type state; + MasterGoalState::type goalState; + int32_t unassignedTablets; + std::set serversShuttingDown; + std::vector deadTabletServers; + std::vector bulkImports; + + _MasterMonitorInfo__isset __isset; + + void __set_tableMap(const std::map & val); + + void __set_tServerInfo(const std::vector & val); + + void __set_badTServers(const std::map & val); + + void __set_state(const MasterState::type val); + + void __set_goalState(const MasterGoalState::type val); + + void __set_unassignedTablets(const int32_t val); + + void __set_serversShuttingDown(const std::set & val); + + void __set_deadTabletServers(const std::vector & val); + + void __set_bulkImports(const std::vector & val); + + bool operator == (const MasterMonitorInfo & rhs) const + { + if (!(tableMap == rhs.tableMap)) + return false; + if (!(tServerInfo == rhs.tServerInfo)) + return false; + if (!(badTServers == rhs.badTServers)) + return false; + if (!(state == rhs.state)) + return false; + if (!(goalState == rhs.goalState)) + return false; + if (!(unassignedTablets == rhs.unassignedTablets)) + return false; + if (!(serversShuttingDown == rhs.serversShuttingDown)) + return false; + if (!(deadTabletServers == rhs.deadTabletServers)) + return false; + if (!(bulkImports == rhs.bulkImports)) + return false; + return true; + } + bool operator != (const MasterMonitorInfo &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MasterMonitorInfo & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(MasterMonitorInfo &a, MasterMonitorInfo &b); + +std::ostream& operator<<(std::ostream& out, const MasterMonitorInfo& obj); + +typedef struct _TabletSplit__isset { + _TabletSplit__isset() : oldTablet(false), newTablets(false) {} + bool oldTablet :1; + bool newTablets :1; +} _TabletSplit__isset; + +class TabletSplit : public virtual ::apache::thrift::TBase { + public: + + TabletSplit(const TabletSplit&); + TabletSplit& operator=(const TabletSplit&); + TabletSplit() { + } + + virtual ~TabletSplit() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent oldTablet; + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent> newTablets; + + _TabletSplit__isset __isset; + + void __set_oldTablet(const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& val); + + void __set_newTablets(const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent> & val); + + bool operator == (const TabletSplit & rhs) const + { + if (!(oldTablet == rhs.oldTablet)) + return false; + if (!(newTablets == rhs.newTablets)) + return false; + return true; + } + bool operator != (const TabletSplit &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletSplit & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TabletSplit &a, TabletSplit &b); + +std::ostream& operator<<(std::ostream& out, const TabletSplit& obj); + +typedef struct _RecoveryException__isset { + _RecoveryException__isset() : why(false) {} + bool why :1; +} _RecoveryException__isset; + +class RecoveryException : public ::apache::thrift::TException { + public: + + RecoveryException(const RecoveryException&); + RecoveryException& operator=(const RecoveryException&); + RecoveryException() : why() { + } + + virtual ~RecoveryException() throw(); + std::string why; + + _RecoveryException__isset __isset; + + void __set_why(const std::string& val); + + bool operator == (const RecoveryException & rhs) const + { + if (!(why == rhs.why)) + return false; + return true; + } + bool operator != (const RecoveryException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const RecoveryException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(RecoveryException &a, RecoveryException &b); + +std::ostream& operator<<(std::ostream& out, const RecoveryException& obj); + +}}}}}} // namespace + +#endif diff --git a/include/data/extern/thriftv2/replication_constants.h b/include/data/extern/thriftv2/replication_constants.h new file mode 100644 index 00000000..7d0d04fc --- /dev/null +++ b/include/data/extern/thriftv2/replication_constants.h @@ -0,0 +1,24 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef replication_CONSTANTS_V2H +#define replication_CONSTANTS_V2H + +#include "replication_types.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace replication { namespace thrift { + +class replicationConstants { + public: + replicationConstants(); + +}; + +extern const replicationConstants g_replication_constants; + +}}}}}} // namespace + +#endif diff --git a/include/data/extern/thriftv2/replication_types.h b/include/data/extern/thriftv2/replication_types.h new file mode 100644 index 00000000..1a9b8b67 --- /dev/null +++ b/include/data/extern/thriftv2/replication_types.h @@ -0,0 +1,245 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef replication_TYPES_V2H +#define replication_TYPES_V2H + +#include + +#include +#include +#include +#include +#include + +#include +#include "data_types.h" +#include "security_types.h" + + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace replication { namespace thrift { + +struct RemoteReplicationErrorCode { + enum type { + COULD_NOT_DESERIALIZE = 0, + COULD_NOT_APPLY = 1, + TABLE_DOES_NOT_EXIST = 2, + CANNOT_AUTHENTICATE = 3, + CANNOT_INSTANTIATE_REPLAYER = 4 + }; +}; + +extern const std::map _RemoteReplicationErrorCode_VALUES_TO_NAMES; + +std::ostream& operator<<(std::ostream& out, const RemoteReplicationErrorCode::type& val); + +struct ReplicationCoordinatorErrorCode { + enum type { + NO_AVAILABLE_SERVERS = 0, + SERVICE_CONFIGURATION_UNAVAILABLE = 1, + CANNOT_AUTHENTICATE = 2 + }; +}; + +extern const std::map _ReplicationCoordinatorErrorCode_VALUES_TO_NAMES; + +std::ostream& operator<<(std::ostream& out, const ReplicationCoordinatorErrorCode::type& val); + +class WalEdits; + +class KeyValues; + +class ReplicationCoordinatorException; + +class RemoteReplicationException; + +typedef struct _WalEdits__isset { + _WalEdits__isset() : edits(false) {} + bool edits :1; +} _WalEdits__isset; + +class WalEdits : public virtual ::apache::thrift::TBase { + public: + + WalEdits(const WalEdits&); + WalEdits& operator=(const WalEdits&); + WalEdits() { + } + + virtual ~WalEdits() throw(); + std::vector edits; + + _WalEdits__isset __isset; + + void __set_edits(const std::vector & val); + + bool operator == (const WalEdits & rhs) const + { + if (!(edits == rhs.edits)) + return false; + return true; + } + bool operator != (const WalEdits &rhs) const { + return !(*this == rhs); + } + + bool operator < (const WalEdits & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(WalEdits &a, WalEdits &b); + +std::ostream& operator<<(std::ostream& out, const WalEdits& obj); + +typedef struct _KeyValues__isset { + _KeyValues__isset() : keyValues(false) {} + bool keyValues :1; +} _KeyValues__isset; + +class KeyValues : public virtual ::apache::thrift::TBase { + public: + + KeyValues(const KeyValues&); + KeyValues& operator=(const KeyValues&); + KeyValues() { + } + + virtual ~KeyValues() throw(); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyValue> keyValues; + + _KeyValues__isset __isset; + + void __set_keyValues(const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyValue> & val); + + bool operator == (const KeyValues & rhs) const + { + if (!(keyValues == rhs.keyValues)) + return false; + return true; + } + bool operator != (const KeyValues &rhs) const { + return !(*this == rhs); + } + + bool operator < (const KeyValues & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(KeyValues &a, KeyValues &b); + +std::ostream& operator<<(std::ostream& out, const KeyValues& obj); + +typedef struct _ReplicationCoordinatorException__isset { + _ReplicationCoordinatorException__isset() : code(false), reason(false) {} + bool code :1; + bool reason :1; +} _ReplicationCoordinatorException__isset; + +class ReplicationCoordinatorException : public ::apache::thrift::TException { + public: + + ReplicationCoordinatorException(const ReplicationCoordinatorException&); + ReplicationCoordinatorException& operator=(const ReplicationCoordinatorException&); + ReplicationCoordinatorException() : code((ReplicationCoordinatorErrorCode::type)0), reason() { + } + + virtual ~ReplicationCoordinatorException() throw(); + ReplicationCoordinatorErrorCode::type code; + std::string reason; + + _ReplicationCoordinatorException__isset __isset; + + void __set_code(const ReplicationCoordinatorErrorCode::type val); + + void __set_reason(const std::string& val); + + bool operator == (const ReplicationCoordinatorException & rhs) const + { + if (!(code == rhs.code)) + return false; + if (!(reason == rhs.reason)) + return false; + return true; + } + bool operator != (const ReplicationCoordinatorException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ReplicationCoordinatorException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(ReplicationCoordinatorException &a, ReplicationCoordinatorException &b); + +std::ostream& operator<<(std::ostream& out, const ReplicationCoordinatorException& obj); + +typedef struct _RemoteReplicationException__isset { + _RemoteReplicationException__isset() : code(false), reason(false) {} + bool code :1; + bool reason :1; +} _RemoteReplicationException__isset; + +class RemoteReplicationException : public ::apache::thrift::TException { + public: + + RemoteReplicationException(const RemoteReplicationException&); + RemoteReplicationException& operator=(const RemoteReplicationException&); + RemoteReplicationException() : code((RemoteReplicationErrorCode::type)0), reason() { + } + + virtual ~RemoteReplicationException() throw(); + RemoteReplicationErrorCode::type code; + std::string reason; + + _RemoteReplicationException__isset __isset; + + void __set_code(const RemoteReplicationErrorCode::type val); + + void __set_reason(const std::string& val); + + bool operator == (const RemoteReplicationException & rhs) const + { + if (!(code == rhs.code)) + return false; + if (!(reason == rhs.reason)) + return false; + return true; + } + bool operator != (const RemoteReplicationException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const RemoteReplicationException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(RemoteReplicationException &a, RemoteReplicationException &b); + +std::ostream& operator<<(std::ostream& out, const RemoteReplicationException& obj); + +}}}}}} // namespace + +#endif diff --git a/include/data/extern/thriftv2/security_constants.h b/include/data/extern/thriftv2/security_constants.h new file mode 100644 index 00000000..32d5adf6 --- /dev/null +++ b/include/data/extern/thriftv2/security_constants.h @@ -0,0 +1,24 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef security_CONSTANTS_V2H +#define security_CONSTANTS_V2H + +#include "security_types.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace securityImpl { namespace thrift { + +class securityConstants { + public: + securityConstants(); + +}; + +extern const securityConstants g_security_constants; + +}}}}}} // namespace + +#endif diff --git a/include/data/extern/thriftv2/security_types.h b/include/data/extern/thriftv2/security_types.h new file mode 100644 index 00000000..72432004 --- /dev/null +++ b/include/data/extern/thriftv2/security_types.h @@ -0,0 +1,327 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef security_TYPES_V2H +#define security_TYPES_V2H + +#include + +#include +#include +#include +#include +#include + +#include + + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace securityImpl { namespace thrift { + +class TCredentials; + +class TAuthenticationTokenIdentifier; + +class TAuthenticationKey; + +class TDelegationToken; + +class TDelegationTokenConfig; + +typedef struct _TCredentials__isset { + _TCredentials__isset() : principal(false), tokenClassName(false), token(false), instanceId(false) {} + bool principal :1; + bool tokenClassName :1; + bool token :1; + bool instanceId :1; +} _TCredentials__isset; + +class TCredentials : public virtual ::apache::thrift::TBase { + public: + + TCredentials(const TCredentials&); + TCredentials& operator=(const TCredentials&); + TCredentials() : principal(), tokenClassName(), token(), instanceId() { + } + + virtual ~TCredentials() throw(); + std::string principal; + std::string tokenClassName; + std::string token; + std::string instanceId; + + _TCredentials__isset __isset; + + void __set_principal(const std::string& val); + + void __set_tokenClassName(const std::string& val); + + void __set_token(const std::string& val); + + void __set_instanceId(const std::string& val); + + bool operator == (const TCredentials & rhs) const + { + if (!(principal == rhs.principal)) + return false; + if (!(tokenClassName == rhs.tokenClassName)) + return false; + if (!(token == rhs.token)) + return false; + if (!(instanceId == rhs.instanceId)) + return false; + return true; + } + bool operator != (const TCredentials &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TCredentials & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TCredentials &a, TCredentials &b); + +std::ostream& operator<<(std::ostream& out, const TCredentials& obj); + +typedef struct _TAuthenticationTokenIdentifier__isset { + _TAuthenticationTokenIdentifier__isset() : principal(false), keyId(false), issueDate(false), expirationDate(false), instanceId(false) {} + bool principal :1; + bool keyId :1; + bool issueDate :1; + bool expirationDate :1; + bool instanceId :1; +} _TAuthenticationTokenIdentifier__isset; + +class TAuthenticationTokenIdentifier : public virtual ::apache::thrift::TBase { + public: + + TAuthenticationTokenIdentifier(const TAuthenticationTokenIdentifier&); + TAuthenticationTokenIdentifier& operator=(const TAuthenticationTokenIdentifier&); + TAuthenticationTokenIdentifier() : principal(), keyId(0), issueDate(0), expirationDate(0), instanceId() { + } + + virtual ~TAuthenticationTokenIdentifier() throw(); + std::string principal; + int32_t keyId; + int64_t issueDate; + int64_t expirationDate; + std::string instanceId; + + _TAuthenticationTokenIdentifier__isset __isset; + + void __set_principal(const std::string& val); + + void __set_keyId(const int32_t val); + + void __set_issueDate(const int64_t val); + + void __set_expirationDate(const int64_t val); + + void __set_instanceId(const std::string& val); + + bool operator == (const TAuthenticationTokenIdentifier & rhs) const + { + if (!(principal == rhs.principal)) + return false; + if (__isset.keyId != rhs.__isset.keyId) + return false; + else if (__isset.keyId && !(keyId == rhs.keyId)) + return false; + if (__isset.issueDate != rhs.__isset.issueDate) + return false; + else if (__isset.issueDate && !(issueDate == rhs.issueDate)) + return false; + if (__isset.expirationDate != rhs.__isset.expirationDate) + return false; + else if (__isset.expirationDate && !(expirationDate == rhs.expirationDate)) + return false; + if (__isset.instanceId != rhs.__isset.instanceId) + return false; + else if (__isset.instanceId && !(instanceId == rhs.instanceId)) + return false; + return true; + } + bool operator != (const TAuthenticationTokenIdentifier &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TAuthenticationTokenIdentifier & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TAuthenticationTokenIdentifier &a, TAuthenticationTokenIdentifier &b); + +std::ostream& operator<<(std::ostream& out, const TAuthenticationTokenIdentifier& obj); + +typedef struct _TAuthenticationKey__isset { + _TAuthenticationKey__isset() : secret(false), keyId(false), expirationDate(false), creationDate(false) {} + bool secret :1; + bool keyId :1; + bool expirationDate :1; + bool creationDate :1; +} _TAuthenticationKey__isset; + +class TAuthenticationKey : public virtual ::apache::thrift::TBase { + public: + + TAuthenticationKey(const TAuthenticationKey&); + TAuthenticationKey& operator=(const TAuthenticationKey&); + TAuthenticationKey() : secret(), keyId(0), expirationDate(0), creationDate(0) { + } + + virtual ~TAuthenticationKey() throw(); + std::string secret; + int32_t keyId; + int64_t expirationDate; + int64_t creationDate; + + _TAuthenticationKey__isset __isset; + + void __set_secret(const std::string& val); + + void __set_keyId(const int32_t val); + + void __set_expirationDate(const int64_t val); + + void __set_creationDate(const int64_t val); + + bool operator == (const TAuthenticationKey & rhs) const + { + if (!(secret == rhs.secret)) + return false; + if (__isset.keyId != rhs.__isset.keyId) + return false; + else if (__isset.keyId && !(keyId == rhs.keyId)) + return false; + if (__isset.expirationDate != rhs.__isset.expirationDate) + return false; + else if (__isset.expirationDate && !(expirationDate == rhs.expirationDate)) + return false; + if (__isset.creationDate != rhs.__isset.creationDate) + return false; + else if (__isset.creationDate && !(creationDate == rhs.creationDate)) + return false; + return true; + } + bool operator != (const TAuthenticationKey &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TAuthenticationKey & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TAuthenticationKey &a, TAuthenticationKey &b); + +std::ostream& operator<<(std::ostream& out, const TAuthenticationKey& obj); + +typedef struct _TDelegationToken__isset { + _TDelegationToken__isset() : password(false), identifier(false) {} + bool password :1; + bool identifier :1; +} _TDelegationToken__isset; + +class TDelegationToken : public virtual ::apache::thrift::TBase { + public: + + TDelegationToken(const TDelegationToken&); + TDelegationToken& operator=(const TDelegationToken&); + TDelegationToken() : password() { + } + + virtual ~TDelegationToken() throw(); + std::string password; + TAuthenticationTokenIdentifier identifier; + + _TDelegationToken__isset __isset; + + void __set_password(const std::string& val); + + void __set_identifier(const TAuthenticationTokenIdentifier& val); + + bool operator == (const TDelegationToken & rhs) const + { + if (!(password == rhs.password)) + return false; + if (!(identifier == rhs.identifier)) + return false; + return true; + } + bool operator != (const TDelegationToken &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TDelegationToken & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TDelegationToken &a, TDelegationToken &b); + +std::ostream& operator<<(std::ostream& out, const TDelegationToken& obj); + +typedef struct _TDelegationTokenConfig__isset { + _TDelegationTokenConfig__isset() : lifetime(false) {} + bool lifetime :1; +} _TDelegationTokenConfig__isset; + +class TDelegationTokenConfig : public virtual ::apache::thrift::TBase { + public: + + TDelegationTokenConfig(const TDelegationTokenConfig&); + TDelegationTokenConfig& operator=(const TDelegationTokenConfig&); + TDelegationTokenConfig() : lifetime(0) { + } + + virtual ~TDelegationTokenConfig() throw(); + int64_t lifetime; + + _TDelegationTokenConfig__isset __isset; + + void __set_lifetime(const int64_t val); + + bool operator == (const TDelegationTokenConfig & rhs) const + { + if (__isset.lifetime != rhs.__isset.lifetime) + return false; + else if (__isset.lifetime && !(lifetime == rhs.lifetime)) + return false; + return true; + } + bool operator != (const TDelegationTokenConfig &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TDelegationTokenConfig & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TDelegationTokenConfig &a, TDelegationTokenConfig &b); + +std::ostream& operator<<(std::ostream& out, const TDelegationTokenConfig& obj); + +}}}}}} // namespace + +#endif diff --git a/include/data/extern/thriftv2/tabletserver_constants.h b/include/data/extern/thriftv2/tabletserver_constants.h new file mode 100644 index 00000000..effd1a01 --- /dev/null +++ b/include/data/extern/thriftv2/tabletserver_constants.h @@ -0,0 +1,24 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef tabletserver_CONSTANTS_V2H +#define tabletserver_CONSTANTS_V2H + +#include "tabletserver_types.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace tabletserver { namespace thrift { + +class tabletserverConstants { + public: + tabletserverConstants(); + +}; + +extern const tabletserverConstants g_tabletserver_constants; + +}}}}}} // namespace + +#endif diff --git a/include/data/extern/thriftv2/tabletserver_types.h b/include/data/extern/thriftv2/tabletserver_types.h new file mode 100644 index 00000000..8c7cd379 --- /dev/null +++ b/include/data/extern/thriftv2/tabletserver_types.h @@ -0,0 +1,888 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef tabletserver_TYPES_V2H +#define tabletserver_TYPES_V2H + +#include + +#include +#include +#include +#include +#include + +#include +#include "data_types.h" +#include "security_types.h" +#include "client_types.h" +#include "master_types.h" +#include "trace_types.h" + + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace tabletserver { namespace thrift { + +struct ScanType { + enum type { + SINGLE = 0, + BATCH = 1 + }; +}; + +extern const std::map _ScanType_VALUES_TO_NAMES; + +std::ostream& operator<<(std::ostream& out, const ScanType::type& val); + +struct ScanState { + enum type { + IDLE = 0, + RUNNING = 1, + QUEUED = 2 + }; +}; + +extern const std::map _ScanState_VALUES_TO_NAMES; + +std::ostream& operator<<(std::ostream& out, const ScanState::type& val); + +struct CompactionType { + enum type { + MINOR = 0, + MERGE = 1, + MAJOR = 2, + FULL = 3 + }; +}; + +extern const std::map _CompactionType_VALUES_TO_NAMES; + +std::ostream& operator<<(std::ostream& out, const CompactionType::type& val); + +struct CompactionReason { + enum type { + USER = 0, + SYSTEM = 1, + CHOP = 2, + IDLE = 3, + CLOSE = 4 + }; +}; + +extern const std::map _CompactionReason_VALUES_TO_NAMES; + +std::ostream& operator<<(std::ostream& out, const CompactionReason::type& val); + +struct TDurability { + enum type { + DEFAULT = 0, + SYNC = 1, + FLUSH = 2, + LOG = 3, + NONE = 4 + }; +}; + +extern const std::map _TDurability_VALUES_TO_NAMES; + +std::ostream& operator<<(std::ostream& out, const TDurability::type& val); + +struct TUnloadTabletGoal { + enum type { + UNKNOWN = 0, + UNASSIGNED = 1, + SUSPENDED = 2, + DELETED = 3 + }; +}; + +extern const std::map _TUnloadTabletGoal_VALUES_TO_NAMES; + +std::ostream& operator<<(std::ostream& out, const TUnloadTabletGoal::type& val); + +typedef int32_t TabletID; + +class NotServingTabletException; + +class TooManyFilesException; + +class TSampleNotPresentException; + +class NoSuchScanIDException; + +class ConstraintViolationException; + +class ActionStats; + +class TabletStats; + +class ActiveScan; + +class ActiveCompaction; + +class TIteratorSetting; + +class IteratorConfig; + +class TSamplerConfiguration; + +typedef struct _NotServingTabletException__isset { + _NotServingTabletException__isset() : extent(false) {} + bool extent :1; +} _NotServingTabletException__isset; + +class NotServingTabletException : public ::apache::thrift::TException { + public: + + NotServingTabletException(const NotServingTabletException&); + NotServingTabletException& operator=(const NotServingTabletException&); + NotServingTabletException() { + } + + virtual ~NotServingTabletException() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent extent; + + _NotServingTabletException__isset __isset; + + void __set_extent(const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& val); + + bool operator == (const NotServingTabletException & rhs) const + { + if (!(extent == rhs.extent)) + return false; + return true; + } + bool operator != (const NotServingTabletException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const NotServingTabletException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(NotServingTabletException &a, NotServingTabletException &b); + +std::ostream& operator<<(std::ostream& out, const NotServingTabletException& obj); + +typedef struct _TooManyFilesException__isset { + _TooManyFilesException__isset() : extent(false) {} + bool extent :1; +} _TooManyFilesException__isset; + +class TooManyFilesException : public ::apache::thrift::TException { + public: + + TooManyFilesException(const TooManyFilesException&); + TooManyFilesException& operator=(const TooManyFilesException&); + TooManyFilesException() { + } + + virtual ~TooManyFilesException() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent extent; + + _TooManyFilesException__isset __isset; + + void __set_extent(const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& val); + + bool operator == (const TooManyFilesException & rhs) const + { + if (!(extent == rhs.extent)) + return false; + return true; + } + bool operator != (const TooManyFilesException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TooManyFilesException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(TooManyFilesException &a, TooManyFilesException &b); + +std::ostream& operator<<(std::ostream& out, const TooManyFilesException& obj); + +typedef struct _TSampleNotPresentException__isset { + _TSampleNotPresentException__isset() : extent(false) {} + bool extent :1; +} _TSampleNotPresentException__isset; + +class TSampleNotPresentException : public ::apache::thrift::TException { + public: + + TSampleNotPresentException(const TSampleNotPresentException&); + TSampleNotPresentException& operator=(const TSampleNotPresentException&); + TSampleNotPresentException() { + } + + virtual ~TSampleNotPresentException() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent extent; + + _TSampleNotPresentException__isset __isset; + + void __set_extent(const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& val); + + bool operator == (const TSampleNotPresentException & rhs) const + { + if (!(extent == rhs.extent)) + return false; + return true; + } + bool operator != (const TSampleNotPresentException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TSampleNotPresentException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(TSampleNotPresentException &a, TSampleNotPresentException &b); + +std::ostream& operator<<(std::ostream& out, const TSampleNotPresentException& obj); + + +class NoSuchScanIDException : public ::apache::thrift::TException { + public: + + NoSuchScanIDException(const NoSuchScanIDException&); + NoSuchScanIDException& operator=(const NoSuchScanIDException&); + NoSuchScanIDException() { + } + + virtual ~NoSuchScanIDException() throw(); + + bool operator == (const NoSuchScanIDException & /* rhs */) const + { + return true; + } + bool operator != (const NoSuchScanIDException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const NoSuchScanIDException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(NoSuchScanIDException &a, NoSuchScanIDException &b); + +std::ostream& operator<<(std::ostream& out, const NoSuchScanIDException& obj); + +typedef struct _ConstraintViolationException__isset { + _ConstraintViolationException__isset() : violationSummaries(false) {} + bool violationSummaries :1; +} _ConstraintViolationException__isset; + +class ConstraintViolationException : public ::apache::thrift::TException { + public: + + ConstraintViolationException(const ConstraintViolationException&); + ConstraintViolationException& operator=(const ConstraintViolationException&); + ConstraintViolationException() { + } + + virtual ~ConstraintViolationException() throw(); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TConstraintViolationSummary> violationSummaries; + + _ConstraintViolationException__isset __isset; + + void __set_violationSummaries(const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TConstraintViolationSummary> & val); + + bool operator == (const ConstraintViolationException & rhs) const + { + if (!(violationSummaries == rhs.violationSummaries)) + return false; + return true; + } + bool operator != (const ConstraintViolationException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ConstraintViolationException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(ConstraintViolationException &a, ConstraintViolationException &b); + +std::ostream& operator<<(std::ostream& out, const ConstraintViolationException& obj); + +typedef struct _ActionStats__isset { + _ActionStats__isset() : status(false), elapsed(false), num(false), count(false), sumDev(false), fail(false), queueTime(false), queueSumDev(false) {} + bool status :1; + bool elapsed :1; + bool num :1; + bool count :1; + bool sumDev :1; + bool fail :1; + bool queueTime :1; + bool queueSumDev :1; +} _ActionStats__isset; + +class ActionStats : public virtual ::apache::thrift::TBase { + public: + + ActionStats(const ActionStats&); + ActionStats& operator=(const ActionStats&); + ActionStats() : status(0), elapsed(0), num(0), count(0), sumDev(0), fail(0), queueTime(0), queueSumDev(0) { + } + + virtual ~ActionStats() throw(); + int32_t status; + double elapsed; + int32_t num; + int64_t count; + double sumDev; + int32_t fail; + double queueTime; + double queueSumDev; + + _ActionStats__isset __isset; + + void __set_status(const int32_t val); + + void __set_elapsed(const double val); + + void __set_num(const int32_t val); + + void __set_count(const int64_t val); + + void __set_sumDev(const double val); + + void __set_fail(const int32_t val); + + void __set_queueTime(const double val); + + void __set_queueSumDev(const double val); + + bool operator == (const ActionStats & rhs) const + { + if (!(status == rhs.status)) + return false; + if (!(elapsed == rhs.elapsed)) + return false; + if (!(num == rhs.num)) + return false; + if (!(count == rhs.count)) + return false; + if (!(sumDev == rhs.sumDev)) + return false; + if (!(fail == rhs.fail)) + return false; + if (!(queueTime == rhs.queueTime)) + return false; + if (!(queueSumDev == rhs.queueSumDev)) + return false; + return true; + } + bool operator != (const ActionStats &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ActionStats & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(ActionStats &a, ActionStats &b); + +std::ostream& operator<<(std::ostream& out, const ActionStats& obj); + +typedef struct _TabletStats__isset { + _TabletStats__isset() : extent(false), majors(false), minors(false), splits(false), numEntries(false), ingestRate(false), queryRate(false), splitCreationTime(false) {} + bool extent :1; + bool majors :1; + bool minors :1; + bool splits :1; + bool numEntries :1; + bool ingestRate :1; + bool queryRate :1; + bool splitCreationTime :1; +} _TabletStats__isset; + +class TabletStats : public virtual ::apache::thrift::TBase { + public: + + TabletStats(const TabletStats&); + TabletStats& operator=(const TabletStats&); + TabletStats() : numEntries(0), ingestRate(0), queryRate(0), splitCreationTime(0) { + } + + virtual ~TabletStats() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent extent; + ActionStats majors; + ActionStats minors; + ActionStats splits; + int64_t numEntries; + double ingestRate; + double queryRate; + int64_t splitCreationTime; + + _TabletStats__isset __isset; + + void __set_extent(const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& val); + + void __set_majors(const ActionStats& val); + + void __set_minors(const ActionStats& val); + + void __set_splits(const ActionStats& val); + + void __set_numEntries(const int64_t val); + + void __set_ingestRate(const double val); + + void __set_queryRate(const double val); + + void __set_splitCreationTime(const int64_t val); + + bool operator == (const TabletStats & rhs) const + { + if (!(extent == rhs.extent)) + return false; + if (!(majors == rhs.majors)) + return false; + if (!(minors == rhs.minors)) + return false; + if (!(splits == rhs.splits)) + return false; + if (!(numEntries == rhs.numEntries)) + return false; + if (!(ingestRate == rhs.ingestRate)) + return false; + if (!(queryRate == rhs.queryRate)) + return false; + if (!(splitCreationTime == rhs.splitCreationTime)) + return false; + return true; + } + bool operator != (const TabletStats &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TabletStats & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TabletStats &a, TabletStats &b); + +std::ostream& operator<<(std::ostream& out, const TabletStats& obj); + +typedef struct _ActiveScan__isset { + _ActiveScan__isset() : client(false), user(false), tableId(false), age(false), idleTime(false), type(false), state(false), extent(false), columns(false), ssiList(false), ssio(false), authorizations(false), scanId(false), classLoaderContext(false) {} + bool client :1; + bool user :1; + bool tableId :1; + bool age :1; + bool idleTime :1; + bool type :1; + bool state :1; + bool extent :1; + bool columns :1; + bool ssiList :1; + bool ssio :1; + bool authorizations :1; + bool scanId :1; + bool classLoaderContext :1; +} _ActiveScan__isset; + +class ActiveScan : public virtual ::apache::thrift::TBase { + public: + + ActiveScan(const ActiveScan&); + ActiveScan& operator=(const ActiveScan&); + ActiveScan() : client(), user(), tableId(), age(0), idleTime(0), type((ScanType::type)0), state((ScanState::type)0), scanId(0), classLoaderContext() { + } + + virtual ~ActiveScan() throw(); + std::string client; + std::string user; + std::string tableId; + int64_t age; + int64_t idleTime; + ScanType::type type; + ScanState::type state; + ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent extent; + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> columns; + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> ssiList; + std::map > ssio; + std::vector authorizations; + int64_t scanId; + std::string classLoaderContext; + + _ActiveScan__isset __isset; + + void __set_client(const std::string& val); + + void __set_user(const std::string& val); + + void __set_tableId(const std::string& val); + + void __set_age(const int64_t val); + + void __set_idleTime(const int64_t val); + + void __set_type(const ScanType::type val); + + void __set_state(const ScanState::type val); + + void __set_extent(const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& val); + + void __set_columns(const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & val); + + void __set_ssiList(const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & val); + + void __set_ssio(const std::map > & val); + + void __set_authorizations(const std::vector & val); + + void __set_scanId(const int64_t val); + + void __set_classLoaderContext(const std::string& val); + + bool operator == (const ActiveScan & rhs) const + { + if (!(client == rhs.client)) + return false; + if (!(user == rhs.user)) + return false; + if (!(tableId == rhs.tableId)) + return false; + if (!(age == rhs.age)) + return false; + if (!(idleTime == rhs.idleTime)) + return false; + if (!(type == rhs.type)) + return false; + if (!(state == rhs.state)) + return false; + if (!(extent == rhs.extent)) + return false; + if (!(columns == rhs.columns)) + return false; + if (!(ssiList == rhs.ssiList)) + return false; + if (!(ssio == rhs.ssio)) + return false; + if (!(authorizations == rhs.authorizations)) + return false; + if (__isset.scanId != rhs.__isset.scanId) + return false; + else if (__isset.scanId && !(scanId == rhs.scanId)) + return false; + if (!(classLoaderContext == rhs.classLoaderContext)) + return false; + return true; + } + bool operator != (const ActiveScan &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ActiveScan & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(ActiveScan &a, ActiveScan &b); + +std::ostream& operator<<(std::ostream& out, const ActiveScan& obj); + +typedef struct _ActiveCompaction__isset { + _ActiveCompaction__isset() : extent(false), age(false), inputFiles(false), outputFile(false), type(false), reason(false), localityGroup(false), entriesRead(false), entriesWritten(false), ssiList(false), ssio(false) {} + bool extent :1; + bool age :1; + bool inputFiles :1; + bool outputFile :1; + bool type :1; + bool reason :1; + bool localityGroup :1; + bool entriesRead :1; + bool entriesWritten :1; + bool ssiList :1; + bool ssio :1; +} _ActiveCompaction__isset; + +class ActiveCompaction : public virtual ::apache::thrift::TBase { + public: + + ActiveCompaction(const ActiveCompaction&); + ActiveCompaction& operator=(const ActiveCompaction&); + ActiveCompaction() : age(0), outputFile(), type((CompactionType::type)0), reason((CompactionReason::type)0), localityGroup(), entriesRead(0), entriesWritten(0) { + } + + virtual ~ActiveCompaction() throw(); + ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent extent; + int64_t age; + std::vector inputFiles; + std::string outputFile; + CompactionType::type type; + CompactionReason::type reason; + std::string localityGroup; + int64_t entriesRead; + int64_t entriesWritten; + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> ssiList; + std::map > ssio; + + _ActiveCompaction__isset __isset; + + void __set_extent(const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& val); + + void __set_age(const int64_t val); + + void __set_inputFiles(const std::vector & val); + + void __set_outputFile(const std::string& val); + + void __set_type(const CompactionType::type val); + + void __set_reason(const CompactionReason::type val); + + void __set_localityGroup(const std::string& val); + + void __set_entriesRead(const int64_t val); + + void __set_entriesWritten(const int64_t val); + + void __set_ssiList(const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & val); + + void __set_ssio(const std::map > & val); + + bool operator == (const ActiveCompaction & rhs) const + { + if (!(extent == rhs.extent)) + return false; + if (!(age == rhs.age)) + return false; + if (!(inputFiles == rhs.inputFiles)) + return false; + if (!(outputFile == rhs.outputFile)) + return false; + if (!(type == rhs.type)) + return false; + if (!(reason == rhs.reason)) + return false; + if (!(localityGroup == rhs.localityGroup)) + return false; + if (!(entriesRead == rhs.entriesRead)) + return false; + if (!(entriesWritten == rhs.entriesWritten)) + return false; + if (!(ssiList == rhs.ssiList)) + return false; + if (!(ssio == rhs.ssio)) + return false; + return true; + } + bool operator != (const ActiveCompaction &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ActiveCompaction & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(ActiveCompaction &a, ActiveCompaction &b); + +std::ostream& operator<<(std::ostream& out, const ActiveCompaction& obj); + +typedef struct _TIteratorSetting__isset { + _TIteratorSetting__isset() : priority(false), name(false), iteratorClass(false), properties(false) {} + bool priority :1; + bool name :1; + bool iteratorClass :1; + bool properties :1; +} _TIteratorSetting__isset; + +class TIteratorSetting : public virtual ::apache::thrift::TBase { + public: + + TIteratorSetting(const TIteratorSetting&); + TIteratorSetting& operator=(const TIteratorSetting&); + TIteratorSetting() : priority(0), name(), iteratorClass() { + } + + virtual ~TIteratorSetting() throw(); + int32_t priority; + std::string name; + std::string iteratorClass; + std::map properties; + + _TIteratorSetting__isset __isset; + + void __set_priority(const int32_t val); + + void __set_name(const std::string& val); + + void __set_iteratorClass(const std::string& val); + + void __set_properties(const std::map & val); + + bool operator == (const TIteratorSetting & rhs) const + { + if (!(priority == rhs.priority)) + return false; + if (!(name == rhs.name)) + return false; + if (!(iteratorClass == rhs.iteratorClass)) + return false; + if (!(properties == rhs.properties)) + return false; + return true; + } + bool operator != (const TIteratorSetting &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TIteratorSetting & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TIteratorSetting &a, TIteratorSetting &b); + +std::ostream& operator<<(std::ostream& out, const TIteratorSetting& obj); + +typedef struct _IteratorConfig__isset { + _IteratorConfig__isset() : iterators(false) {} + bool iterators :1; +} _IteratorConfig__isset; + +class IteratorConfig : public virtual ::apache::thrift::TBase { + public: + + IteratorConfig(const IteratorConfig&); + IteratorConfig& operator=(const IteratorConfig&); + IteratorConfig() { + } + + virtual ~IteratorConfig() throw(); + std::vector iterators; + + _IteratorConfig__isset __isset; + + void __set_iterators(const std::vector & val); + + bool operator == (const IteratorConfig & rhs) const + { + if (!(iterators == rhs.iterators)) + return false; + return true; + } + bool operator != (const IteratorConfig &rhs) const { + return !(*this == rhs); + } + + bool operator < (const IteratorConfig & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(IteratorConfig &a, IteratorConfig &b); + +std::ostream& operator<<(std::ostream& out, const IteratorConfig& obj); + +typedef struct _TSamplerConfiguration__isset { + _TSamplerConfiguration__isset() : className(false), options(false) {} + bool className :1; + bool options :1; +} _TSamplerConfiguration__isset; + +class TSamplerConfiguration : public virtual ::apache::thrift::TBase { + public: + + TSamplerConfiguration(const TSamplerConfiguration&); + TSamplerConfiguration& operator=(const TSamplerConfiguration&); + TSamplerConfiguration() : className() { + } + + virtual ~TSamplerConfiguration() throw(); + std::string className; + std::map options; + + _TSamplerConfiguration__isset __isset; + + void __set_className(const std::string& val); + + void __set_options(const std::map & val); + + bool empty() const { + return className.empty(); + } + + bool operator == (const TSamplerConfiguration & rhs) const + { + if (!(className == rhs.className)) + return false; + if (!(options == rhs.options)) + return false; + return true; + } + bool operator != (const TSamplerConfiguration &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TSamplerConfiguration & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TSamplerConfiguration &a, TSamplerConfiguration &b); + +std::ostream& operator<<(std::ostream& out, const TSamplerConfiguration& obj); + +}}}}}} // namespace + +#endif diff --git a/include/data/extern/thriftv2/trace_constants.h b/include/data/extern/thriftv2/trace_constants.h new file mode 100644 index 00000000..bf59a0ab --- /dev/null +++ b/include/data/extern/thriftv2/trace_constants.h @@ -0,0 +1,24 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef trace_CONSTANTS_V2H +#define trace_CONSTANTS_V2H + +#include "trace_types.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace trace { namespace thrift { + +class traceConstants { + public: + traceConstants(); + +}; + +extern const traceConstants g_trace_constants; + +}}}}}} // namespace + +#endif diff --git a/include/data/extern/thriftv2/trace_types.h b/include/data/extern/thriftv2/trace_types.h new file mode 100644 index 00000000..11711c8e --- /dev/null +++ b/include/data/extern/thriftv2/trace_types.h @@ -0,0 +1,75 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef trace_TYPES_V2H +#define trace_TYPES_V2H + +#include + +#include +#include +#include +#include +#include + +#include + + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace trace { namespace thrift { + +class TInfo; + +typedef struct _TInfo__isset { + _TInfo__isset() : traceId(false), parentId(false) {} + bool traceId :1; + bool parentId :1; +} _TInfo__isset; + +class TInfo : public virtual ::apache::thrift::TBase { + public: + + TInfo(const TInfo&); + TInfo& operator=(const TInfo&); + TInfo() : traceId(0), parentId(0) { + } + + virtual ~TInfo() throw(); + int64_t traceId; + int64_t parentId; + + _TInfo__isset __isset; + + void __set_traceId(const int64_t val); + + void __set_parentId(const int64_t val); + + bool operator == (const TInfo & rhs) const + { + if (!(traceId == rhs.traceId)) + return false; + if (!(parentId == rhs.parentId)) + return false; + return true; + } + bool operator != (const TInfo &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TInfo & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TInfo &a, TInfo &b); + +std::ostream& operator<<(std::ostream& out, const TInfo& obj); + +}}}}}} // namespace + +#endif diff --git a/include/interconnect/accumulo/AccumuloMasterFacade.h b/include/interconnect/accumulo/AccumuloMasterFacade.h index c1d0385d..ab483801 100644 --- a/include/interconnect/accumulo/AccumuloMasterFacade.h +++ b/include/interconnect/accumulo/AccumuloMasterFacade.h @@ -22,585 +22,79 @@ #include #include #include "data/extern/boost/SharedPointer.h" -#include "data/extern/thrift/ClientService.h" -#include "data/extern/thrift/TabletClientService.h" +#include "data/constructs/InstanceVersion.h" #include "../scanrequest/ScanRequest.h" #include "../scanrequest/ScanIdentifier.h" -#include "data/extern/thrift/ClientService.h" #include "data/extern/thrift/master_types.h" #include "data/extern/thrift/MasterClientService.h" +#include "data/extern/thriftv2/MasterClientService.h" #include "data/extern/thrift/ThriftWrapper.h" - +#include "data/extern/thriftv2/ThriftV2Wrapper.h" #include "data/constructs/security/AuthInfo.h" #include "../Scan.h" +#include "logging/Logger.h" namespace interconnect { class AccumuloMasterFacade { private: - std::shared_ptr masterClient; + std::shared_ptr logger; + protected: uint8_t accumuloVersion; + std::string host; std::function()> createTransport; std::function createMasterTransport; - void v1_createMasterClient(std::shared_ptr underlyingTransport) { - auto protocolPtr = std::make_shared(underlyingTransport); - //std::shared_ptr protocolPtr(new apache::thrift::protocol::TCompactProtocol(underlyingTransport)); - //if (NULL != masterClient) { - - // delete masterClient; - // masterClient = NULL; - // } - masterClient = std::make_shared(boost::tools::from_shared_ptr(protocolPtr)); - } - - bool v1_createTable(cclient::data::security::AuthInfo *auth, const std::string &table) { - - std::vector tableArgs; - tableArgs.push_back(table); - tableArgs.push_back("MILLIS"); - std::map options; - try { - std::string returnValue = doFateOperations(auth, AccumuloFateOperation::TABLE_CREATE, tableArgs, options, true); - } catch (org::apache::accumulo::core::client::impl::thrift::ThriftTableOperationException &e) { - switch (e.type) { - case org::apache::accumulo::core::client::impl::thrift::TableOperationExceptionType::EXISTS: - default: - return false; - } - } - - return true; - - } - - bool v1_importDirectory(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &dir, std::string failure_dir, bool setTime) { - - std::vector tableArgs; - - tableArgs.push_back(table); - tableArgs.push_back(dir); - tableArgs.push_back(failure_dir); - if (__builtin_expect(setTime, false)) - tableArgs.push_back("false"); - else - tableArgs.push_back("true"); - - std::map options; - try { - std::string returnValue = doFateOperations(auth, AccumuloFateOperation::TABLE_BULK_IMPORT, tableArgs, options, false); - } catch (org::apache::accumulo::core::client::impl::thrift::ThriftTableOperationException &e) { - switch (e.type) { - case org::apache::accumulo::core::client::impl::thrift::TableOperationExceptionType::EXISTS: - default: - return false; - } - } catch (apache::thrift::TApplicationException &e) { - return false; - } - - return true; - - } - - bool v1_compactFallBack(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &startrow, const std::string &endrow, bool wait) { - std::vector tableArgs; - tableArgs.push_back(table); - tableArgs.push_back(startrow); - tableArgs.push_back(endrow); - std::shared_ptr strBuffer(new apache::thrift::transport::TMemoryBuffer()); - std::shared_ptr binaryProtcol(new apache::thrift::protocol::TBinaryProtocol(strBuffer)); - org::apache::accumulo::core::tabletserver::thrift::IteratorConfig config; - config.write(binaryProtcol.get()); - - std::string buff = strBuffer->getBufferAsString(); - tableArgs.push_back(buff); - - std::map options; - try { - std::string returnValue = doFateOperations(auth, AccumuloFateOperation::TABLE_COMPACT, tableArgs, options, wait); - } catch (org::apache::accumulo::core::client::impl::thrift::ThriftTableOperationException &e) { - return false; - } catch (apache::thrift::TApplicationException &e) { - return false; - } - - return true; - - } - - bool v1_compact(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &startrow, const std::string &endrow, bool wait) { - - std::vector tableArgs; - tableArgs.push_back(table); - tableArgs.push_back(startrow); - tableArgs.push_back(endrow); - std::shared_ptr strBuffer(new apache::thrift::transport::TMemoryBuffer()); - std::shared_ptr binaryProtcol(new apache::thrift::protocol::TBinaryProtocol(strBuffer)); - org::apache::accumulo::core::tabletserver::thrift::IteratorConfig config; - org::apache::accumulo::core::tabletserver::thrift::TIteratorSetting setting; - setting.name = "vers"; - setting.priority = 10; - setting.iteratorClass = "org.apache.accumulo.core.iterators.user.VersioningIterator"; - - //config.iterators.push_back(setting); - - config.write(binaryProtcol.get()); - - std::string buff = strBuffer->getBufferAsString(); - tableArgs.push_back(buff); - - std::string clazz = "org.apache.accumulo.tserver.compaction.EverythingCompactionStrategy"; - cclient::data::streams::BigEndianByteStream bout(clazz.size() + 10); - - bout.writeInt(0xcc5e6024); - bout.writeByte(1); - - bout.writeShort(clazz.size()); - bout.writeBytes(clazz.data(), clazz.size()); - bout.writeInt(0); - - tableArgs.push_back(std::string(bout.getByteArray(), bout.getPos())); - - std::map options; - try { - std::string returnValue = doFateOperations(auth, AccumuloFateOperation::TABLE_COMPACT, tableArgs, options, wait); - } catch (org::apache::accumulo::core::client::impl::thrift::ThriftTableOperationException &e) { - return false; - } catch (const apache::thrift::TApplicationException &e) { - return compactFallBack(auth, table, startrow, endrow, wait); - } - - return true; - } - - bool v1_flush(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &startrow, const std::string &endrow, bool wait) { - org::apache::accumulo::core::trace::thrift::TInfo transId; - org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); - transId.parentId = 0; - transId.traceId = rand(); - - int64_t flushId = 0; - try { - flushId = masterClient->initiateFlush(transId, creds, table); - - } catch (const org::apache::accumulo::core::client::impl::thrift::ThriftTableOperationException &e) { - recreateMasterTransport(); - return false; - } catch (const apache::thrift::TApplicationException &e) { - recreateMasterTransport(); - return false; - } - - uint64_t maxLoops = 2147483647; - if (!wait) { - maxLoops = 1; - } - - while (true) { - try { - transId.parentId = transId.traceId; - transId.traceId++; - recreateMasterTransport(); - masterClient->waitForFlush(transId, creds, table, startrow, endrow, flushId, maxLoops); - break; - } catch (const apache::thrift::transport::TTransportException &e) { - recreateMasterTransport(); - std::this_thread::sleep_for(std::chrono::milliseconds(100)); - } catch (const org::apache::accumulo::core::client::impl::thrift::ThriftTableOperationException &e) { - recreateMasterTransport(); - return false; - } catch (const apache::thrift::TApplicationException &e) { - recreateMasterTransport(); - return false; - } - } - - return true; - } - - bool v1_removeTable(cclient::data::security::AuthInfo *auth, const std::string &table) { - - std::vector tableArgs; - tableArgs.push_back(table); - std::map options; - try { - std::string returnValue = doFateOperations(auth, AccumuloFateOperation::TABLE_DELETE, tableArgs, options); - } catch (org::apache::accumulo::core::client::impl::thrift::ThriftTableOperationException &e) { - switch (e.type) { - case org::apache::accumulo::core::client::impl::thrift::TableOperationExceptionType::EXISTS: - default: - return false; - } - } - - return true; - - } - - void v1_removeTableProperty(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &property) { - org::apache::accumulo::core::trace::thrift::TInfo transId; - org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); - transId.parentId = 0; - transId.traceId = rand(); - - masterClient->removeTableProperty(transId, creds, table, property); - } - - void v1_setTableProperty(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &property, const std::string &value) { - org::apache::accumulo::core::trace::thrift::TInfo transId; - org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); - transId.parentId = 0; - transId.traceId = rand(); - - masterClient->setTableProperty(transId, creds, table, property, value); - } - - /**namespace operations**/ - - bool v1_createNamespace(cclient::data::security::AuthInfo *auth, std::string name) { - - std::vector tableArgs; - tableArgs.push_back(name); - //tableArgs.push_back ("MILLIS"); - std::map options; - try { - std::string returnValue = doFateOperations(auth, AccumuloFateOperation::NAMESPACE_CREATE, tableArgs, options, true); - } catch (org::apache::accumulo::core::client::impl::thrift::ThriftTableOperationException &e) { - switch (e.type) { - case org::apache::accumulo::core::client::impl::thrift::TableOperationExceptionType::NAMESPACE_NOTFOUND: - default: - return false; - } - } - - return true; - - } - - bool v1_deletenamespace(cclient::data::security::AuthInfo *auth, std::string name) { - - std::vector tableArgs; - tableArgs.push_back(name); - //tableArgs.push_back ("MILLIS"); - std::map options; - try { - std::string returnValue = doFateOperations(auth, AccumuloFateOperation::NAMESPACE_DELETE, tableArgs, options, true); - } catch (org::apache::accumulo::core::client::impl::thrift::ThriftTableOperationException &e) { - switch (e.type) { - case org::apache::accumulo::core::client::impl::thrift::TableOperationExceptionType::NAMESPACE_NOTFOUND: - default: - return false; - } - } - - return true; - - } - - bool v1_renamenamespace(cclient::data::security::AuthInfo *auth, std::string oldName, std::string newName) { - - std::vector tableArgs; - tableArgs.push_back(oldName); - tableArgs.push_back(newName); - std::map options; - try { - std::string returnValue = doFateOperations(auth, AccumuloFateOperation::NAMESPACE_RENAME, tableArgs, options, true); - } catch (org::apache::accumulo::core::client::impl::thrift::ThriftTableOperationException &e) { - switch (e.type) { - case org::apache::accumulo::core::client::impl::thrift::TableOperationExceptionType::NAMESPACE_NOTFOUND: - default: - return false; - } - } - - return true; - - } - - void v1_removeNamespaceProperty(cclient::data::security::AuthInfo *auth, std::string nameSpaceName, const std::string &property) { - org::apache::accumulo::core::trace::thrift::TInfo transId; - org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); - transId.parentId = 0; - transId.traceId = rand(); - - masterClient->removeNamespaceProperty(transId, creds, nameSpaceName, property); - } - - void v1_setNamespaceProperty(cclient::data::security::AuthInfo *auth, std::string nameSpaceName, const std::string &property, const std::string &value) { - org::apache::accumulo::core::trace::thrift::TInfo transId; - org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); - transId.parentId = 0; - transId.traceId = rand(); - - masterClient->setNamespaceProperty(transId, creds, nameSpaceName, property, value); - } - public: - AccumuloMasterFacade(std::function fx, std::function()> tfx) + AccumuloMasterFacade(const std::string &host, int version, std::function fx, std::function()> tfx) : createMasterTransport(fx), createTransport(tfx), - accumuloVersion(ACCUMULO_UNKNOWN) { - accumuloVersion = ACCUMULO_ONE; + host(host), + accumuloVersion(version) { } - void createMasterClient(std::shared_ptr underlyingTransport) { - switch (accumuloVersion) { - case ACCUMULO_ONE: - v1_createMasterClient(underlyingTransport); - break; - } + virtual ~AccumuloMasterFacade() { } + virtual void createMasterClient(std::shared_ptr underlyingTransport) = 0; + void recreateMasterTransport() { createMasterTransport(); } - std::string doFateOperations(cclient::data::security::AuthInfo *auth, AccumuloFateOperation mytype, const std::vector &tableArgs, const std::map &options, - bool wait = false) { - std::string ret; - switch (accumuloVersion) { - case ACCUMULO_ONE: - ret = v1_doFateOperations(auth, mytype, tableArgs, options, wait); - break; - } - return ret; - } - - std::string v1_doFateOperations(cclient::data::security::AuthInfo *auth, AccumuloFateOperation mytype, const std::vector &tableArgs, const std::map &options, - bool wait = false) { - auto myMasterClient = masterClient; + virtual std::string doFateOperations(cclient::data::security::AuthInfo *auth, AccumuloFateOperation mytype, const std::vector &tableArgs, + const std::map &options, bool wait = false) = 0; - org::apache::accumulo::core::master::thrift::FateOperation::type type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_CREATE; - switch (mytype) { - case TABLE_CREATE: - type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_CREATE; - break; - case TABLE_CLONE: - type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_CLONE; - break; - case TABLE_DELETE: - type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_DELETE; - break; - case TABLE_RENAME: - type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_RENAME; - break; - case TABLE_ONLINE: - type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_ONLINE; - break; - case TABLE_OFFLINE: - type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_OFFLINE; - break; - case TABLE_MERGE: - type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_MERGE; - break; - case TABLE_DELETE_RANGE: - type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_DELETE_RANGE; - break; - case TABLE_BULK_IMPORT: - type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_BULK_IMPORT; - break; - case TABLE_COMPACT: - type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_COMPACT; - break; - case TABLE_IMPORT: - type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_IMPORT; - break; - case TABLE_EXPORT: - type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_EXPORT; - break; - case TABLE_CANCEL_COMPACT: - type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_CANCEL_COMPACT; - break; - case NAMESPACE_CREATE: - type = org::apache::accumulo::core::master::thrift::FateOperation::type::NAMESPACE_CREATE; - break; - case NAMESPACE_DELETE: - type = org::apache::accumulo::core::master::thrift::FateOperation::type::NAMESPACE_DELETE; - break; - case NAMESPACE_RENAME: - type = org::apache::accumulo::core::master::thrift::FateOperation::type::NAMESPACE_RENAME; - break; - default: - return ""; - }; - org::apache::accumulo::core::trace::thrift::TInfo transId; - org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); - transId.parentId = 0; - transId.traceId = rand(); - int64_t fateTransId = myMasterClient->beginFateOperation(transId, creds); + virtual bool createTable(cclient::data::security::AuthInfo *auth, const std::string &table) = 0; - transId.parentId = transId.traceId; - transId.traceId = transId.traceId + 1; + virtual bool importDirectory(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &dir, std::string failure_dir, bool setTime)= 0; - bool succeeded = false; - while (!succeeded) { + virtual bool compactFallBack(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &startrow, const std::string &endrow, bool wait)= 0; + virtual bool compact(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &startrow, const std::string &endrow, bool wait) = 0; - try { - myMasterClient->executeFateOperation(transId, creds, fateTransId, type, tableArgs, options, !wait); - succeeded = true; - } catch (apache::thrift::transport::TTransportException &e) { - std::cout << e.what() << std::endl; - recreateMasterTransport(); - succeeded = false; - std::this_thread::sleep_for(std::chrono::milliseconds(100)); - } + virtual bool flush(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &startrow, const std::string &endrow, bool wait)= 0; - } + virtual bool removeTable(cclient::data::security::AuthInfo *auth, const std::string &table) = 0; - std::string returnValue; - if (wait) { - while (true) { - transId.parentId = transId.traceId; - transId.traceId = transId.traceId + 1; - auto myTransport = createTransport(); - try { + virtual void removeTableProperty(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &property) = 0; - auto protocolPtr = std::make_shared(boost::tools::from_shared_ptr(myTransport)); - org::apache::accumulo::core::master::thrift::MasterClientServiceClient waitClient(boost::tools::from_shared_ptr(protocolPtr)); - waitClient.waitForFateOperation(returnValue, transId, creds, fateTransId); - - break; - - } catch (apache::thrift::transport::TTransportException &e) { - std::cout << e.what() << std::endl; - std::this_thread::sleep_for(std::chrono::milliseconds(100)); - myTransport->close(); - } catch (std::runtime_error &e) { - std::cout << e.what() << std::endl; - myTransport->close(); - throw e; - } - myTransport->close(); - - } - - transId.parentId = transId.traceId; - transId.traceId = transId.traceId + 1; - myMasterClient->finishFateOperation(transId, creds, fateTransId); - recreateMasterTransport(); - } - return returnValue; - } - - bool createTable(cclient::data::security::AuthInfo *auth, const std::string &table) { - switch (accumuloVersion) { - case ACCUMULO_ONE: - return v1_createTable(auth, table); - break; - } - return false; - } - - bool importDirectory(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &dir, std::string failure_dir, bool setTime) { - switch (accumuloVersion) { - case ACCUMULO_ONE: - return v1_importDirectory(auth, table, dir, failure_dir, setTime); - break; - } - return false; - } - - bool compactFallBack(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &startrow, const std::string &endrow, bool wait) { - switch (accumuloVersion) { - case ACCUMULO_ONE: - return v1_compactFallBack(auth, table, startrow, endrow, wait); - break; - } - return false; - } - - bool compact(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &startrow, const std::string &endrow, bool wait) { - switch (accumuloVersion) { - case ACCUMULO_ONE: - return v1_compact(auth, table, startrow, endrow, wait); - break; - } - return false; - } - - bool flush(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &startrow, const std::string &endrow, bool wait) { - switch (accumuloVersion) { - case ACCUMULO_ONE: - return v1_flush(auth, table, startrow, endrow, wait); - break; - } - return false; - } - - bool removeTable(cclient::data::security::AuthInfo *auth, const std::string &table) { - switch (accumuloVersion) { - case ACCUMULO_ONE: - return v1_removeTable(auth, table); - break; - } - return false; - } - - void removeTableProperty(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &property) { - switch (accumuloVersion) { - case ACCUMULO_ONE: - v1_removeTableProperty(auth, table, property); - break; - } - } - - void setTableProperty(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &property, const std::string &value) { - switch (accumuloVersion) { - case ACCUMULO_ONE: - v1_setTableProperty(auth, table, property, value); - break; - } - } + virtual void setTableProperty(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &property, const std::string &value) = 0; /**namespace operations**/ - bool createNamespace(cclient::data::security::AuthInfo *auth, std::string name) { - switch (accumuloVersion) { - case ACCUMULO_ONE: - return v1_createNamespace(auth, name); - break; - } - return false; - } + virtual bool createNamespace(cclient::data::security::AuthInfo *auth, std::string name) = 0; - bool deletenamespace(cclient::data::security::AuthInfo *auth, std::string name) { - switch (accumuloVersion) { - case ACCUMULO_ONE: - return v1_deletenamespace(auth, name); - break; - } - return false; - } + virtual bool deletenamespace(cclient::data::security::AuthInfo *auth, std::string name) = 0; - bool renamenamespace(cclient::data::security::AuthInfo *auth, std::string oldName, std::string newName) { - switch (accumuloVersion) { - case ACCUMULO_ONE: - return v1_renamenamespace(auth, oldName, newName); - break; - } - return false; - } + virtual bool renamenamespace(cclient::data::security::AuthInfo *auth, std::string oldName, std::string newName) = 0; - void removeNamespaceProperty(cclient::data::security::AuthInfo *auth, std::string nameSpaceName, const std::string &property) { - switch (accumuloVersion) { - case ACCUMULO_ONE: - v1_removeNamespaceProperty(auth, nameSpaceName, property); - break; - } - } + virtual void removeNamespaceProperty(cclient::data::security::AuthInfo *auth, std::string nameSpaceName, const std::string &property)= 0; - void setNamespaceProperty(cclient::data::security::AuthInfo *auth, std::string nameSpaceName, const std::string &property, const std::string &value) { - switch (accumuloVersion) { - case ACCUMULO_ONE: - v1_setNamespaceProperty(auth, nameSpaceName, property, value); - break; - } - } + virtual void setNamespaceProperty(cclient::data::security::AuthInfo *auth, std::string nameSpaceName, const std::string &property, const std::string &value)= 0; }; diff --git a/include/interconnect/accumulo/AccumuloMasterOne.h b/include/interconnect/accumulo/AccumuloMasterOne.h new file mode 100644 index 00000000..026b2f4b --- /dev/null +++ b/include/interconnect/accumulo/AccumuloMasterOne.h @@ -0,0 +1,527 @@ +/* + * Licensed 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. + */ + +#pragma once + +#include "AccumuloMasterFacade.h" +#include "data/extern/thrift/ClientService.h" +#include "data/extern/thrift/TabletClientService.h" +#include + +#include +#include +#include "data/extern/boost/SharedPointer.h" +#include "data/constructs/InstanceVersion.h" +#include "../scanrequest/ScanRequest.h" +#include "../scanrequest/ScanIdentifier.h" +#include "data/extern/thrift/master_types.h" +#include "data/extern/thrift/MasterClientService.h" +#include "data/extern/thriftv2/MasterClientService.h" +#include "data/extern/thrift/ThriftWrapper.h" +#include "data/extern/thriftv2/ThriftV2Wrapper.h" +#include "data/constructs/security/AuthInfo.h" +#include "../Scan.h" +#include "logging/Logger.h" + +namespace interconnect { + +class AccumuloMasterFacadeV1 : public AccumuloMasterFacade { + + private: + + std::shared_ptr logger; + + std::shared_ptr masterClient; + + void v1_createMasterClient(std::shared_ptr underlyingTransport) { + auto protocolPtr = std::make_shared(underlyingTransport); + masterClient = std::make_shared(boost::tools::from_shared_ptr(protocolPtr)); + } + + bool v1_createTable(cclient::data::security::AuthInfo *auth, const std::string &table) { + + std::vector tableArgs; + tableArgs.push_back(table); + tableArgs.push_back("MILLIS"); + std::map options; + try { + std::string returnValue = doFateOperations(auth, AccumuloFateOperation::TABLE_CREATE, tableArgs, options, true); + } catch (org::apache::accumulo::core::client::impl::thrift::ThriftTableOperationException &e) { + switch (e.type) { + case org::apache::accumulo::core::client::impl::thrift::TableOperationExceptionType::EXISTS: + default: + return false; + } + } + + return true; + + } + + bool v1_importDirectory(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &dir, std::string failure_dir, bool setTime) { + + std::vector tableArgs; + + tableArgs.push_back(table); + tableArgs.push_back(dir); + tableArgs.push_back(failure_dir); + if (__builtin_expect(setTime, false)) + tableArgs.push_back("false"); + else + tableArgs.push_back("true"); + + std::map options; + try { + std::string returnValue = doFateOperations(auth, AccumuloFateOperation::TABLE_BULK_IMPORT, tableArgs, options, false); + } catch (org::apache::accumulo::core::client::impl::thrift::ThriftTableOperationException &e) { + switch (e.type) { + case org::apache::accumulo::core::client::impl::thrift::TableOperationExceptionType::EXISTS: + default: + return false; + } + } catch (apache::thrift::TApplicationException &e) { + return false; + } + + return true; + + } + + bool v1_compactFallBack(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &startrow, const std::string &endrow, bool wait) { + std::vector tableArgs; + tableArgs.push_back(table); + tableArgs.push_back(startrow); + tableArgs.push_back(endrow); + std::shared_ptr strBuffer(new apache::thrift::transport::TMemoryBuffer()); + std::shared_ptr binaryProtcol(new apache::thrift::protocol::TBinaryProtocol(strBuffer)); + org::apache::accumulo::core::tabletserver::thrift::IteratorConfig config; + config.write(binaryProtcol.get()); + + std::string buff = strBuffer->getBufferAsString(); + tableArgs.push_back(buff); + + std::map options; + try { + std::string returnValue = doFateOperations(auth, AccumuloFateOperation::TABLE_COMPACT, tableArgs, options, wait); + } catch (org::apache::accumulo::core::client::impl::thrift::ThriftTableOperationException &e) { + return false; + } catch (apache::thrift::TApplicationException &e) { + return false; + } + + return true; + + } + + bool v1_compact(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &startrow, const std::string &endrow, bool wait) { + + std::vector tableArgs; + tableArgs.push_back(table); + tableArgs.push_back(startrow); + tableArgs.push_back(endrow); + std::shared_ptr strBuffer(new apache::thrift::transport::TMemoryBuffer()); + std::shared_ptr binaryProtcol(new apache::thrift::protocol::TBinaryProtocol(strBuffer)); + org::apache::accumulo::core::tabletserver::thrift::IteratorConfig config; + org::apache::accumulo::core::tabletserver::thrift::TIteratorSetting setting; + setting.name = "vers"; + setting.priority = 10; + setting.iteratorClass = "org.apache.accumulo.core.iterators.user.VersioningIterator"; + + //config.iterators.push_back(setting); + + config.write(binaryProtcol.get()); + + std::string buff = strBuffer->getBufferAsString(); + tableArgs.push_back(buff); + + std::string clazz = "org.apache.accumulo.tserver.compaction.EverythingCompactionStrategy"; + cclient::data::streams::BigEndianByteStream bout(clazz.size() + 10); + + bout.writeInt(0xcc5e6024); + bout.writeByte(1); + + bout.writeShort(clazz.size()); + bout.writeBytes(clazz.data(), clazz.size()); + bout.writeInt(0); + + tableArgs.push_back(std::string(bout.getByteArray(), bout.getPos())); + + std::map options; + try { + std::string returnValue = doFateOperations(auth, AccumuloFateOperation::TABLE_COMPACT, tableArgs, options, wait); + } catch (org::apache::accumulo::core::client::impl::thrift::ThriftTableOperationException &e) { + return false; + } catch (const apache::thrift::TApplicationException &e) { + return compactFallBack(auth, table, startrow, endrow, wait); + } + + return true; + } + + bool v1_flush(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &startrow, const std::string &endrow, bool wait) { + org::apache::accumulo::core::trace::thrift::TInfo transId; + org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); + transId.parentId = 0; + transId.traceId = rand(); + + int64_t flushId = 0; + try { + flushId = masterClient->initiateFlush(transId, creds, table); + + } catch (const org::apache::accumulo::core::client::impl::thrift::ThriftTableOperationException &e) { + recreateMasterTransport(); + return false; + } catch (const apache::thrift::TApplicationException &e) { + recreateMasterTransport(); + return false; + } + + uint64_t maxLoops = 2147483647; + if (!wait) { + maxLoops = 1; + } + + while (true) { + try { + transId.parentId = transId.traceId; + transId.traceId++; + recreateMasterTransport(); + masterClient->waitForFlush(transId, creds, table, startrow, endrow, flushId, maxLoops); + break; + } catch (const apache::thrift::transport::TTransportException &e) { + recreateMasterTransport(); + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + } catch (const org::apache::accumulo::core::client::impl::thrift::ThriftTableOperationException &e) { + recreateMasterTransport(); + return false; + } catch (const apache::thrift::TApplicationException &e) { + recreateMasterTransport(); + return false; + } + } + + return true; + } + + bool v1_removeTable(cclient::data::security::AuthInfo *auth, const std::string &table) { + + std::vector tableArgs; + tableArgs.push_back(table); + std::map options; + try { + std::string returnValue = doFateOperations(auth, AccumuloFateOperation::TABLE_DELETE, tableArgs, options); + } catch (org::apache::accumulo::core::client::impl::thrift::ThriftTableOperationException &e) { + switch (e.type) { + case org::apache::accumulo::core::client::impl::thrift::TableOperationExceptionType::EXISTS: + default: + return false; + } + } + + return true; + + } + + void v1_removeTableProperty(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &property) { + org::apache::accumulo::core::trace::thrift::TInfo transId; + org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); + transId.parentId = 0; + transId.traceId = rand(); + + masterClient->removeTableProperty(transId, creds, table, property); + } + + void v1_setTableProperty(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &property, const std::string &value) { + org::apache::accumulo::core::trace::thrift::TInfo transId; + org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); + transId.parentId = 0; + transId.traceId = rand(); + + masterClient->setTableProperty(transId, creds, table, property, value); + } + + /**namespace operations**/ + + bool v1_createNamespace(cclient::data::security::AuthInfo *auth, std::string name) { + + std::vector tableArgs; + tableArgs.push_back(name); + //tableArgs.push_back ("MILLIS"); + std::map options; + try { + std::string returnValue = doFateOperations(auth, AccumuloFateOperation::NAMESPACE_CREATE, tableArgs, options, true); + } catch (org::apache::accumulo::core::client::impl::thrift::ThriftTableOperationException &e) { + switch (e.type) { + case org::apache::accumulo::core::client::impl::thrift::TableOperationExceptionType::NAMESPACE_NOTFOUND: + default: + return false; + } + } + + return true; + + } + + bool v1_deletenamespace(cclient::data::security::AuthInfo *auth, std::string name) { + + std::vector tableArgs; + tableArgs.push_back(name); + //tableArgs.push_back ("MILLIS"); + std::map options; + try { + std::string returnValue = doFateOperations(auth, AccumuloFateOperation::NAMESPACE_DELETE, tableArgs, options, true); + } catch (org::apache::accumulo::core::client::impl::thrift::ThriftTableOperationException &e) { + switch (e.type) { + case org::apache::accumulo::core::client::impl::thrift::TableOperationExceptionType::NAMESPACE_NOTFOUND: + default: + return false; + } + } + + return true; + + } + + bool v1_renamenamespace(cclient::data::security::AuthInfo *auth, std::string oldName, std::string newName) { + + std::vector tableArgs; + tableArgs.push_back(oldName); + tableArgs.push_back(newName); + std::map options; + try { + std::string returnValue = doFateOperations(auth, AccumuloFateOperation::NAMESPACE_RENAME, tableArgs, options, true); + } catch (org::apache::accumulo::core::client::impl::thrift::ThriftTableOperationException &e) { + switch (e.type) { + case org::apache::accumulo::core::client::impl::thrift::TableOperationExceptionType::NAMESPACE_NOTFOUND: + default: + return false; + } + } + + return true; + + } + + void v1_removeNamespaceProperty(cclient::data::security::AuthInfo *auth, std::string nameSpaceName, const std::string &property) { + org::apache::accumulo::core::trace::thrift::TInfo transId; + org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); + transId.parentId = 0; + transId.traceId = rand(); + + masterClient->removeNamespaceProperty(transId, creds, nameSpaceName, property); + } + + void v1_setNamespaceProperty(cclient::data::security::AuthInfo *auth, std::string nameSpaceName, const std::string &property, const std::string &value) { + org::apache::accumulo::core::trace::thrift::TInfo transId; + org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); + transId.parentId = 0; + transId.traceId = rand(); + + masterClient->setNamespaceProperty(transId, creds, nameSpaceName, property, value); + } + + public: + + AccumuloMasterFacadeV1(const std::string &host, std::function fx, std::function()> tfx) + : AccumuloMasterFacade(host, ACCUMULO_ONE, fx, tfx), + logger(logging::LoggerFactory::getLogger()) { + } + + void createMasterClient(std::shared_ptr underlyingTransport) override { + v1_createMasterClient(underlyingTransport); + } + + std::string doFateOperations(cclient::data::security::AuthInfo *auth, AccumuloFateOperation mytype, const std::vector &tableArgs, const std::map &options, + bool wait = false) override { + std::string ret; + + ret = v1_doFateOperations(auth, mytype, tableArgs, options, wait); + + return ret; + } + + std::string v1_doFateOperations(cclient::data::security::AuthInfo *auth, AccumuloFateOperation mytype, const std::vector &tableArgs, const std::map &options, + bool wait = false) { + auto myMasterClient = masterClient; + + org::apache::accumulo::core::master::thrift::FateOperation::type type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_CREATE; + switch (mytype) { + case TABLE_CREATE: + type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_CREATE; + break; + case TABLE_CLONE: + type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_CLONE; + break; + case TABLE_DELETE: + type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_DELETE; + break; + case TABLE_RENAME: + type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_RENAME; + break; + case TABLE_ONLINE: + type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_ONLINE; + break; + case TABLE_OFFLINE: + type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_OFFLINE; + break; + case TABLE_MERGE: + type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_MERGE; + break; + case TABLE_DELETE_RANGE: + type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_DELETE_RANGE; + break; + case TABLE_BULK_IMPORT: + type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_BULK_IMPORT; + break; + case TABLE_COMPACT: + type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_COMPACT; + break; + case TABLE_IMPORT: + type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_IMPORT; + break; + case TABLE_EXPORT: + type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_EXPORT; + break; + case TABLE_CANCEL_COMPACT: + type = org::apache::accumulo::core::master::thrift::FateOperation::type::TABLE_CANCEL_COMPACT; + break; + case NAMESPACE_CREATE: + type = org::apache::accumulo::core::master::thrift::FateOperation::type::NAMESPACE_CREATE; + break; + case NAMESPACE_DELETE: + type = org::apache::accumulo::core::master::thrift::FateOperation::type::NAMESPACE_DELETE; + break; + case NAMESPACE_RENAME: + type = org::apache::accumulo::core::master::thrift::FateOperation::type::NAMESPACE_RENAME; + break; + default: + return ""; + }; + org::apache::accumulo::core::trace::thrift::TInfo transId; + org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); + transId.parentId = 0; + transId.traceId = rand(); + int64_t fateTransId = myMasterClient->beginFateOperation(transId, creds); + + transId.parentId = transId.traceId; + transId.traceId = transId.traceId + 1; + + bool succeeded = false; + while (!succeeded) { + + try { + myMasterClient->executeFateOperation(transId, creds, fateTransId, type, tableArgs, options, !wait); + succeeded = true; + } catch (apache::thrift::transport::TTransportException &e) { + std::cout << e.what() << std::endl; + recreateMasterTransport(); + succeeded = false; + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + } + + } + + std::string returnValue; + if (wait) { + while (true) { + transId.parentId = transId.traceId; + transId.traceId = transId.traceId + 1; + auto myTransport = createTransport(); + try { + + auto protocolPtr = std::make_shared(boost::tools::from_shared_ptr(myTransport)); + org::apache::accumulo::core::master::thrift::MasterClientServiceClient waitClient(boost::tools::from_shared_ptr(protocolPtr)); + waitClient.waitForFateOperation(returnValue, transId, creds, fateTransId); + + break; + + } catch (apache::thrift::transport::TTransportException &e) { + std::cout << e.what() << std::endl; + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + myTransport->close(); + } catch (std::runtime_error &e) { + std::cout << e.what() << std::endl; + myTransport->close(); + throw e; + } + myTransport->close(); + + } + + transId.parentId = transId.traceId; + transId.traceId = transId.traceId + 1; + myMasterClient->finishFateOperation(transId, creds, fateTransId); + recreateMasterTransport(); + } + return returnValue; + } + + bool createTable(cclient::data::security::AuthInfo *auth, const std::string &table) override { + return v1_createTable(auth, table); + return false; + } + + bool importDirectory(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &dir, std::string failure_dir, bool setTime) override { + return v1_importDirectory(auth, table, dir, failure_dir, setTime); + } + + bool compactFallBack(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &startrow, const std::string &endrow, bool wait) override { + return v1_compactFallBack(auth, table, startrow, endrow, wait); + } + + bool compact(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &startrow, const std::string &endrow, bool wait) override { + return v1_compact(auth, table, startrow, endrow, wait); + } + + bool flush(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &startrow, const std::string &endrow, bool wait) override { + return v1_flush(auth, table, startrow, endrow, wait); + } + + bool removeTable(cclient::data::security::AuthInfo *auth, const std::string &table) override { + return v1_removeTable(auth, table); + } + + void removeTableProperty(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &property) override { + v1_removeTableProperty(auth, table, property); + } + + void setTableProperty(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &property, const std::string &value) override { + v1_setTableProperty(auth, table, property, value); + } + + /**namespace operations**/ + + bool createNamespace(cclient::data::security::AuthInfo *auth, std::string name) override { + return v1_createNamespace(auth, name); + } + + bool deletenamespace(cclient::data::security::AuthInfo *auth, std::string name) override { + return v1_deletenamespace(auth, name); + } + + bool renamenamespace(cclient::data::security::AuthInfo *auth, std::string oldName, std::string newName) override { + return v1_renamenamespace(auth, oldName, newName); + } + + void removeNamespaceProperty(cclient::data::security::AuthInfo *auth, std::string nameSpaceName, const std::string &property) override { + v1_removeNamespaceProperty(auth, nameSpaceName, property); + } + + void setNamespaceProperty(cclient::data::security::AuthInfo *auth, std::string nameSpaceName, const std::string &property, const std::string &value) override { + v1_setNamespaceProperty(auth, nameSpaceName, property, value); + } + +}; + +} diff --git a/include/interconnect/accumulo/AccumuloMasterTwo.h b/include/interconnect/accumulo/AccumuloMasterTwo.h new file mode 100644 index 00000000..40767557 --- /dev/null +++ b/include/interconnect/accumulo/AccumuloMasterTwo.h @@ -0,0 +1,528 @@ +/* + * Licensed 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. + */ + +#pragma once + +#include "AccumuloMasterFacade.h" +#include "data/extern/thrift/ClientService.h" +#include "data/extern/thrift/TabletClientService.h" +#include + +#include +#include +#include "data/extern/boost/SharedPointer.h" +#include "data/constructs/InstanceVersion.h" +#include "../scanrequest/ScanRequest.h" +#include "../scanrequest/ScanIdentifier.h" +#include "data/extern/thrift/master_types.h" +#include "data/extern/thrift/MasterClientService.h" +#include "data/extern/thriftv2/MasterClientService.h" +#include "data/extern/thrift/ThriftWrapper.h" +#include "data/extern/thriftv2/ThriftV2Wrapper.h" +#include "data/constructs/security/AuthInfo.h" +#include "../Scan.h" +#include "logging/Logger.h" + +namespace interconnect { + +class AccumuloMasterFacadeV2 : public AccumuloMasterFacade { + + private: + + std::shared_ptr logger; + + std::shared_ptr masterClientV2; + + bool v2_createTable(cclient::data::security::AuthInfo *auth, const std::string &table) { + + std::vector tableArgs; + tableArgs.push_back(table); + tableArgs.push_back("MILLIS"); + tableArgs.push_back("ONLINE"); + tableArgs.push_back("0"); + std::map options; + try { + std::string returnValue = doFateOperations(auth, AccumuloFateOperation::TABLE_CREATE, tableArgs, options, true); + } catch (org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException &e) { + switch (e.type) { + case org::apache::accumulov2::core::clientImpl::thrift::TableOperationExceptionType::EXISTS: + default: + return false; + } + } + + return true; + + } + + bool v2_importDirectory(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &dir, std::string failure_dir, bool setTime) { + + std::vector tableArgs; + + tableArgs.push_back(table); + tableArgs.push_back(dir); + tableArgs.push_back(failure_dir); + if (__builtin_expect(setTime, false)) + tableArgs.push_back("false"); + else + tableArgs.push_back("true"); + + std::map options; + try { + std::string returnValue = doFateOperations(auth, AccumuloFateOperation::TABLE_BULK_IMPORT, tableArgs, options, false); + } catch (org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException &e) { + switch (e.type) { + case org::apache::accumulov2::core::clientImpl::thrift::TableOperationExceptionType::EXISTS: + default: + return false; + } + } catch (apache::thrift::TApplicationException &e) { + return false; + } + + return true; + + } + + bool v2_compactFallBack(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &startrow, const std::string &endrow, bool wait) { + std::vector tableArgs; + tableArgs.push_back(table); + tableArgs.push_back(startrow); + tableArgs.push_back(endrow); + std::shared_ptr strBuffer(new apache::thrift::transport::TMemoryBuffer()); + std::shared_ptr binaryProtcol(new apache::thrift::protocol::TBinaryProtocol(strBuffer)); + org::apache::accumulov2::core::tabletserver::thrift::IteratorConfig config; + config.write(binaryProtcol.get()); + + std::string buff = strBuffer->getBufferAsString(); + tableArgs.push_back(buff); + + std::map options; + try { + std::string returnValue = doFateOperations(auth, AccumuloFateOperation::TABLE_COMPACT, tableArgs, options, wait); + } catch (org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException &e) { + return false; + } catch (apache::thrift::TApplicationException &e) { + return false; + } + + return true; + + } + + bool v2_compact(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &startrow, const std::string &endrow, bool wait) { + + std::vector tableArgs; + tableArgs.push_back(table); + tableArgs.push_back(startrow); + tableArgs.push_back(endrow); + std::shared_ptr strBuffer(new apache::thrift::transport::TMemoryBuffer()); + std::shared_ptr binaryProtcol(new apache::thrift::protocol::TBinaryProtocol(strBuffer)); + org::apache::accumulov2::core::tabletserver::thrift::IteratorConfig config; + org::apache::accumulov2::core::tabletserver::thrift::TIteratorSetting setting; + setting.name = "vers"; + setting.priority = 10; + setting.iteratorClass = "org.apache.accumulo.core.iterators.user.VersioningIterator"; + + //config.iterators.push_back(setting); + + config.write(binaryProtcol.get()); + + std::string buff = strBuffer->getBufferAsString(); + tableArgs.push_back(buff); + + std::string clazz = "org.apache.accumulo.tserver.compaction.EverythingCompactionStrategy"; + cclient::data::streams::BigEndianByteStream bout(clazz.size() + 10); + + bout.writeInt(0xcc5e6024); + bout.writeByte(1); + + bout.writeShort(clazz.size()); + bout.writeBytes(clazz.data(), clazz.size()); + bout.writeInt(0); + + tableArgs.push_back(std::string(bout.getByteArray(), bout.getPos())); + + std::map options; + try { + std::string returnValue = doFateOperations(auth, AccumuloFateOperation::TABLE_COMPACT, tableArgs, options, wait); + } catch (org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException &e) { + return false; + } catch (const apache::thrift::TApplicationException &e) { + return compactFallBack(auth, table, startrow, endrow, wait); + } + + return true; + } + + bool v2_flush(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &startrow, const std::string &endrow, bool wait) { + org::apache::accumulov2::core::trace::thrift::TInfo transId; + org::apache::accumulov2::core::securityImpl::thrift::TCredentials creds = ThriftV2Wrapper::convert(auth); + transId.parentId = 0; + transId.traceId = rand(); + + int64_t flushId = 0; + try { + flushId = masterClientV2->initiateFlush(transId, creds, table); + + } catch (const org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException &e) { + recreateMasterTransport(); + return false; + } catch (const apache::thrift::TApplicationException &e) { + recreateMasterTransport(); + return false; + } + + uint64_t maxLoops = 2147483647; + if (!wait) { + maxLoops = 1; + } + + while (true) { + try { + transId.parentId = transId.traceId; + transId.traceId++; + recreateMasterTransport(); + masterClientV2->waitForFlush(transId, creds, table, startrow, endrow, flushId, maxLoops); + break; + } catch (const apache::thrift::transport::TTransportException &e) { + recreateMasterTransport(); + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + } catch (const org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException &e) { + recreateMasterTransport(); + return false; + } catch (const apache::thrift::TApplicationException &e) { + recreateMasterTransport(); + return false; + } + } + + return true; + } + + bool v2_removeTable(cclient::data::security::AuthInfo *auth, const std::string &table) { + + std::vector tableArgs; + tableArgs.push_back(table); + std::map options; + try { + std::string returnValue = doFateOperations(auth, AccumuloFateOperation::TABLE_DELETE, tableArgs, options); + } catch (org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException &e) { + switch (e.type) { + case org::apache::accumulov2::core::clientImpl::thrift::TableOperationExceptionType::EXISTS: + default: + return false; + } + } + + return true; + + } + + void v2_removeTableProperty(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &property) { + org::apache::accumulov2::core::trace::thrift::TInfo transId; + org::apache::accumulov2::core::securityImpl::thrift::TCredentials creds = ThriftV2Wrapper::convert(auth); + transId.parentId = 0; + transId.traceId = rand(); + + masterClientV2->removeTableProperty(transId, creds, table, property); + } + + void v2_setTableProperty(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &property, const std::string &value) { + org::apache::accumulov2::core::trace::thrift::TInfo transId; + org::apache::accumulov2::core::securityImpl::thrift::TCredentials creds = ThriftV2Wrapper::convert(auth); + transId.parentId = 0; + transId.traceId = rand(); + + masterClientV2->setTableProperty(transId, creds, table, property, value); + } + + /**namespace operations**/ + + bool v2_createNamespace(cclient::data::security::AuthInfo *auth, std::string name) { + + std::vector tableArgs; + tableArgs.push_back(name); + //tableArgs.push_back ("MILLIS"); + std::map options; + try { + std::string returnValue = doFateOperations(auth, AccumuloFateOperation::NAMESPACE_CREATE, tableArgs, options, true); + } catch (org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException &e) { + switch (e.type) { + case org::apache::accumulov2::core::clientImpl::thrift::TableOperationExceptionType::NAMESPACE_NOTFOUND: + default: + return false; + } + } + + return true; + + } + + bool v2_deletenamespace(cclient::data::security::AuthInfo *auth, std::string name) { + + std::vector tableArgs; + tableArgs.push_back(name); + //tableArgs.push_back ("MILLIS"); + std::map options; + try { + std::string returnValue = doFateOperations(auth, AccumuloFateOperation::NAMESPACE_DELETE, tableArgs, options, true); + } catch (org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException &e) { + switch (e.type) { + case org::apache::accumulov2::core::clientImpl::thrift::TableOperationExceptionType::NAMESPACE_NOTFOUND: + default: + return false; + } + } + + return true; + + } + + bool v2_renamenamespace(cclient::data::security::AuthInfo *auth, std::string oldName, std::string newName) { + + std::vector tableArgs; + tableArgs.push_back(oldName); + tableArgs.push_back(newName); + std::map options; + try { + std::string returnValue = doFateOperations(auth, AccumuloFateOperation::NAMESPACE_RENAME, tableArgs, options, true); + } catch (org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException &e) { + switch (e.type) { + case org::apache::accumulov2::core::clientImpl::thrift::TableOperationExceptionType::NAMESPACE_NOTFOUND: + default: + return false; + } + } + + return true; + + } + + void v2_removeNamespaceProperty(cclient::data::security::AuthInfo *auth, std::string nameSpaceName, const std::string &property) { + org::apache::accumulov2::core::trace::thrift::TInfo transId; + org::apache::accumulov2::core::securityImpl::thrift::TCredentials creds = ThriftV2Wrapper::convert(auth); + transId.parentId = 0; + transId.traceId = rand(); + + masterClientV2->removeNamespaceProperty(transId, creds, nameSpaceName, property); + } + + void v2_setNamespaceProperty(cclient::data::security::AuthInfo *auth, std::string nameSpaceName, const std::string &property, const std::string &value) { + org::apache::accumulov2::core::trace::thrift::TInfo transId; + org::apache::accumulov2::core::securityImpl::thrift::TCredentials creds = ThriftV2Wrapper::convert(auth); + transId.parentId = 0; + transId.traceId = rand(); + + masterClientV2->setNamespaceProperty(transId, creds, nameSpaceName, property, value); + } + + void v2_createMasterClient(std::shared_ptr underlyingTransport) { + auto protocolPtr = std::make_shared(underlyingTransport); + masterClientV2 = std::make_shared(boost::tools::from_shared_ptr(protocolPtr)); + } + + public: + + AccumuloMasterFacadeV2(const std::string &host, std::function fx, std::function()> tfx) + : AccumuloMasterFacade(host, ACCUMULO_TWO, fx, tfx), + logger(logging::LoggerFactory::getLogger()) { + } + + void createMasterClient(std::shared_ptr underlyingTransport) { + v2_createMasterClient(underlyingTransport); + } + + std::string doFateOperations(cclient::data::security::AuthInfo *auth, AccumuloFateOperation mytype, const std::vector &tableArgs, const std::map &options, + bool wait = false) { + std::string ret; + ret = v2_doFateOperations(auth, mytype, tableArgs, options, wait); + return ret; + } + + std::string v2_doFateOperations(cclient::data::security::AuthInfo *auth, AccumuloFateOperation mytype, const std::vector &tableArgs, const std::map &options, + bool wait = false) { + auto myMasterClient = masterClientV2; + + org::apache::accumulov2::core::master::thrift::FateOperation::type type = org::apache::accumulov2::core::master::thrift::FateOperation::type::TABLE_CREATE; + switch (mytype) { + case TABLE_CREATE: + type = org::apache::accumulov2::core::master::thrift::FateOperation::type::TABLE_CREATE; + break; + case TABLE_CLONE: + type = org::apache::accumulov2::core::master::thrift::FateOperation::type::TABLE_CLONE; + break; + case TABLE_DELETE: + type = org::apache::accumulov2::core::master::thrift::FateOperation::type::TABLE_DELETE; + break; + case TABLE_RENAME: + type = org::apache::accumulov2::core::master::thrift::FateOperation::type::TABLE_RENAME; + break; + case TABLE_ONLINE: + type = org::apache::accumulov2::core::master::thrift::FateOperation::type::TABLE_ONLINE; + break; + case TABLE_OFFLINE: + type = org::apache::accumulov2::core::master::thrift::FateOperation::type::TABLE_OFFLINE; + break; + case TABLE_MERGE: + type = org::apache::accumulov2::core::master::thrift::FateOperation::type::TABLE_MERGE; + break; + case TABLE_DELETE_RANGE: + type = org::apache::accumulov2::core::master::thrift::FateOperation::type::TABLE_DELETE_RANGE; + break; + case TABLE_BULK_IMPORT: + type = org::apache::accumulov2::core::master::thrift::FateOperation::type::TABLE_BULK_IMPORT; + break; + case TABLE_COMPACT: + type = org::apache::accumulov2::core::master::thrift::FateOperation::type::TABLE_COMPACT; + break; + case TABLE_IMPORT: + type = org::apache::accumulov2::core::master::thrift::FateOperation::type::TABLE_IMPORT; + break; + case TABLE_EXPORT: + type = org::apache::accumulov2::core::master::thrift::FateOperation::type::TABLE_EXPORT; + break; + case TABLE_CANCEL_COMPACT: + type = org::apache::accumulov2::core::master::thrift::FateOperation::type::TABLE_CANCEL_COMPACT; + break; + case NAMESPACE_CREATE: + type = org::apache::accumulov2::core::master::thrift::FateOperation::type::NAMESPACE_CREATE; + break; + case NAMESPACE_DELETE: + type = org::apache::accumulov2::core::master::thrift::FateOperation::type::NAMESPACE_DELETE; + break; + case NAMESPACE_RENAME: + type = org::apache::accumulov2::core::master::thrift::FateOperation::type::NAMESPACE_RENAME; + break; + default: + return ""; + }; + org::apache::accumulov2::core::trace::thrift::TInfo transId; + org::apache::accumulov2::core::securityImpl::thrift::TCredentials creds = ThriftV2Wrapper::convert(auth); + transId.parentId = 0; + transId.traceId = rand(); + int64_t fateTransId = myMasterClient->beginFateOperation(transId, creds); + + transId.parentId = transId.traceId; + transId.traceId = transId.traceId + 1; + + bool succeeded = false; + while (!succeeded) { + + try { + myMasterClient->executeFateOperation(transId, creds, fateTransId, type, tableArgs, options, !wait); + succeeded = true; + } catch (apache::thrift::transport::TTransportException &e) { + logging::LOG_ERROR(logger) << "Error during fate " << e.what(); + recreateMasterTransport(); + succeeded = false; + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + } + + } + + std::string returnValue; + if (wait) { + while (true) { + transId.parentId = transId.traceId; + transId.traceId = transId.traceId + 1; + auto myTransport = createTransport(); + try { + + auto protocolPtr = std::make_shared(boost::tools::from_shared_ptr(myTransport)); + org::apache::accumulov2::core::master::thrift::MasterClientServiceClient waitClient(boost::tools::from_shared_ptr(protocolPtr)); + waitClient.waitForFateOperation(returnValue, transId, creds, fateTransId); + + break; + + } catch (apache::thrift::transport::TTransportException &e) { + logging::LOG_ERROR(logger) << "Error during fate " << e.what(); + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + myTransport->close(); + } catch (std::runtime_error &e) { + logging::LOG_ERROR(logger) << "Error during fate " << e.what(); + myTransport->close(); + throw e; + } + myTransport->close(); + + } + + transId.parentId = transId.traceId; + transId.traceId = transId.traceId + 1; + myMasterClient->finishFateOperation(transId, creds, fateTransId); + recreateMasterTransport(); + } + return returnValue; + } + + bool createTable(cclient::data::security::AuthInfo *auth, const std::string &table) { + return v2_createTable(auth, table); + + } + + bool importDirectory(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &dir, std::string failure_dir, bool setTime) { + return v2_importDirectory(auth, table, dir, failure_dir, setTime); + } + + bool compactFallBack(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &startrow, const std::string &endrow, bool wait) { + return v2_compactFallBack(auth, table, startrow, endrow, wait); + } + + bool compact(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &startrow, const std::string &endrow, bool wait) { + return v2_compact(auth, table, startrow, endrow, wait); + } + + bool flush(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &startrow, const std::string &endrow, bool wait) { + return v2_flush(auth, table, startrow, endrow, wait); + } + + bool removeTable(cclient::data::security::AuthInfo *auth, const std::string &table) { + return v2_removeTable(auth, table); + + } + + void removeTableProperty(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &property) { + v2_removeTableProperty(auth, table, property); + } + + void setTableProperty(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &property, const std::string &value) { + v2_setTableProperty(auth, table, property, value);\ + } + + /**namespace operations**/ + + bool createNamespace(cclient::data::security::AuthInfo *auth, std::string name) { + return v2_createNamespace(auth, name); + } + + bool deletenamespace(cclient::data::security::AuthInfo *auth, std::string name) { + return v2_deletenamespace(auth, name); + } + + bool renamenamespace(cclient::data::security::AuthInfo *auth, std::string oldName, std::string newName) { + return v2_renamenamespace(auth, oldName, newName); + } + + void removeNamespaceProperty(cclient::data::security::AuthInfo *auth, std::string nameSpaceName, const std::string &property) { + v2_removeNamespaceProperty(auth, nameSpaceName, property); + } + + void setNamespaceProperty(cclient::data::security::AuthInfo *auth, std::string nameSpaceName, const std::string &property, const std::string &value) { + v2_setNamespaceProperty(auth, nameSpaceName, property, value); + } + +}; + +} diff --git a/include/interconnect/accumulo/AccumuloServerFacade.h b/include/interconnect/accumulo/AccumuloServerFacade.h index 9f55537d..a2bb77d0 100644 --- a/include/interconnect/accumulo/AccumuloServerFacade.h +++ b/include/interconnect/accumulo/AccumuloServerFacade.h @@ -1,5 +1,5 @@ /* - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed under the Apache License, Version 2.0 (the "License") = 0; * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * @@ -14,21 +14,18 @@ #pragma once #include "AccumuloFacade.h" -#include "data/extern/thrift/ClientService.h" -#include "data/extern/thrift/TabletClientService.h" #include #include #include #include "data/extern/boost/SharedPointer.h" -#include "data/extern/thrift/ClientService.h" -#include "data/exceptions/NotServingException.h" -#include "data/extern/thrift/TabletClientService.h" #include "../scanrequest/ScanRequest.h" #include "../scanrequest/ScanIdentifier.h" #include "data/extern/thrift/ThriftWrapper.h" +#include "data/extern/thriftv2/ThriftV2Wrapper.h" #include "data/constructs/security/AuthInfo.h" #include "../Scan.h" +#include "logging/Logger.h" namespace interconnect { @@ -36,84 +33,49 @@ class AccumuloServerFacade { private: - std::map convertedMap; - std::mutex mutex; - - void v1_authenticate(cclient::data::security::AuthInfo *auth); - - std::map v1_getNamespaceConfiguration(cclient::data::security::AuthInfo *auth, const std::string &nameSpaceName); - - Scan *v1_singleScan(ScanRequest, cclient::data::Range*> > *request); - - Scan *v1_multiScan(ScanRequest, cclient::data::Range*> > *request); - - org::apache::accumulo::core::security::thrift::TCredentials getOrSetCredentials(cclient::data::security::AuthInfo *convert); - - void v1_registerService(std::string instance, std::string clusterManagers); - - Scan *v1_beginScan(ScanRequest, cclient::data::Range*> > *request); - - Scan *v1_continueScan(Scan *originalScan); - - void *v1_write(cclient::data::security::AuthInfo *auth, std::map>> *request); - - bool v1_dropUser(cclient::data::security::AuthInfo *auth, std::string user); - - bool v1_changeUserPassword(cclient::data::security::AuthInfo *auth, std::string user, std::string password); - - bool v1_createUser(cclient::data::security::AuthInfo *auth, std::string user, std::string password); - - std::map v1_getTableConfiguration(cclient::data::security::AuthInfo *auth, std::string table); - - cclient::data::security::Authorizations *v1_getUserAuths(cclient::data::security::AuthInfo *auth, std::string user); - - void v1_changeUserAuths(cclient::data::security::AuthInfo *auth, std::string user, cclient::data::security::Authorizations *auths); - - void v1_splitTablet(cclient::data::security::AuthInfo *auth, std::shared_ptr extent, std::string split); - - void v1_close(); - + std::shared_ptr logger; + protected: uint8_t accumuloVersion; - - std::unique_ptr client; - std::unique_ptr tserverClient; public: - AccumuloServerFacade(); + explicit AccumuloServerFacade(int version); + virtual ~AccumuloServerFacade() { + + } - Scan *multiScan(ScanRequest, cclient::data::Range*> > *request); + virtual Scan *multiScan(ScanRequest, cclient::data::Range*> > *request) = 0; - Scan * singleScan(ScanRequest, cclient::data::Range*> > *request); + virtual Scan * singleScan(ScanRequest, cclient::data::Range*> > *request) = 0; - Scan *beginScan(ScanRequest, cclient::data::Range*> > *request); + virtual Scan *beginScan(ScanRequest, cclient::data::Range*> > *request) = 0; - Scan *continueScan(Scan *originalScan); + virtual Scan *continueScan(Scan *originalScan) = 0; - void *write(cclient::data::security::AuthInfo *auth, std::map>> *request); + virtual void *write(cclient::data::security::AuthInfo *auth, std::map>> *request) = 0; - bool dropUser(cclient::data::security::AuthInfo *auth, const std::string &user); + virtual bool dropUser(cclient::data::security::AuthInfo *auth, const std::string &user) = 0; - bool changeUserPassword(cclient::data::security::AuthInfo *auth, const std::string &user, const std::string &password); + virtual bool changeUserPassword(cclient::data::security::AuthInfo *auth, const std::string &user, const std::string &password) = 0; - bool createUser(cclient::data::security::AuthInfo *auth, const std::string &user, const std::string &password); + virtual bool createUser(cclient::data::security::AuthInfo *auth, const std::string &user, const std::string &password) = 0; - std::map getTableConfiguration(cclient::data::security::AuthInfo *auth, const std::string &table); + virtual std::map getTableConfiguration(cclient::data::security::AuthInfo *auth, const std::string &table) = 0; - cclient::data::security::Authorizations *getUserAuths(cclient::data::security::AuthInfo *auth, const std::string &user); + virtual cclient::data::security::Authorizations *getUserAuths(cclient::data::security::AuthInfo *auth, const std::string &user) = 0; - void changeUserAuths(cclient::data::security::AuthInfo *auth, const std::string &user, cclient::data::security::Authorizations *auths); + virtual void changeUserAuths(cclient::data::security::AuthInfo *auth, const std::string &user, cclient::data::security::Authorizations *auths) = 0; - void splitTablet(cclient::data::security::AuthInfo *auth, const std::shared_ptr extent, std::string split); + virtual void splitTablet(cclient::data::security::AuthInfo *auth, const std::shared_ptr extent, std::string split) = 0; - void registerService(std::string instance, std::string clusterManagers); + virtual void registerService(std::string instance, std::string clusterManagers) = 0; - void close(); + virtual void close() = 0; - void initialize(std::shared_ptr protocolPtr); + virtual void initialize(std::shared_ptr protocolPtr, bool callRegistration = true) = 0; - std::map getNamespaceConfiguration(cclient::data::security::AuthInfo *auth, const std::string &nameSpaceName); + virtual std::map getNamespaceConfiguration(cclient::data::security::AuthInfo *auth, const std::string &nameSpaceName) = 0; - void authenticate(cclient::data::security::AuthInfo *auth); + virtual void authenticate(cclient::data::security::AuthInfo *auth) = 0; }; diff --git a/include/interconnect/accumulo/AccumuloServerOne.h b/include/interconnect/accumulo/AccumuloServerOne.h new file mode 100644 index 00000000..5ebdb6a4 --- /dev/null +++ b/include/interconnect/accumulo/AccumuloServerOne.h @@ -0,0 +1,127 @@ +/* + * Licensed 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. + */ + +#pragma once +#include "AccumuloServerFacade.h" +#include "data/extern/thrift/ClientService.h" +#include "data/extern/thrift/TabletClientService.h" +#include + +#include +#include +#include "data/extern/boost/SharedPointer.h" +#include "data/extern/thrift/ClientService.h" +#include "data/extern/thriftv2/ClientService.h" +#include "data/exceptions/NotServingException.h" +#include "data/extern/thrift/TabletClientService.h" +#include "data/extern/thriftv2/TabletClientService.h" +#include "../scanrequest/ScanRequest.h" +#include "../scanrequest/ScanIdentifier.h" +#include "data/extern/thrift/ThriftWrapper.h" +#include "data/extern/thriftv2/ThriftV2Wrapper.h" +#include "data/constructs/security/AuthInfo.h" +#include "../Scan.h" +#include "logging/Logger.h" + +namespace interconnect { + +class AccumuloServerFacadeV1 : public AccumuloServerFacade { + + private: + + std::shared_ptr logger; + + std::map convertedMap_V2; + + std::map convertedMap; + std::mutex mutex; + + void v1_authenticate(cclient::data::security::AuthInfo *auth); + + std::map v1_getNamespaceConfiguration(cclient::data::security::AuthInfo *auth, const std::string &nameSpaceName); + + Scan *v1_singleScan(ScanRequest, cclient::data::Range*> > *request); + + Scan *v1_multiScan(ScanRequest, cclient::data::Range*> > *request); + + Scan *v1_beginScan(ScanRequest, cclient::data::Range*> > *request); + + org::apache::accumulo::core::security::thrift::TCredentials getOrSetCredentials(cclient::data::security::AuthInfo *convert); + + void v1_registerService(std::string instance, std::string clusterManagers); + + Scan *v1_continueScan(Scan *originalScan); + + void *v1_write(cclient::data::security::AuthInfo *auth, std::map>> *request); + + bool v1_dropUser(cclient::data::security::AuthInfo *auth, std::string user); + + bool v1_changeUserPassword(cclient::data::security::AuthInfo *auth, std::string user, std::string password); + + bool v1_createUser(cclient::data::security::AuthInfo *auth, std::string user, std::string password); + + std::map v1_getTableConfiguration(cclient::data::security::AuthInfo *auth, std::string table); + + cclient::data::security::Authorizations *v1_getUserAuths(cclient::data::security::AuthInfo *auth, std::string user); + + void v1_changeUserAuths(cclient::data::security::AuthInfo *auth, std::string user, cclient::data::security::Authorizations *auths); + + void v1_splitTablet(cclient::data::security::AuthInfo *auth, std::shared_ptr extent, std::string split); + + void v1_close(); + + std::unique_ptr client; + std::unique_ptr tserverClient; + + public: + + AccumuloServerFacadeV1(); + + Scan *multiScan(ScanRequest, cclient::data::Range*> > *request) override; + + Scan * singleScan(ScanRequest, cclient::data::Range*> > *request) override; + + Scan *beginScan(ScanRequest, cclient::data::Range*> > *request) override; + + Scan *continueScan(Scan *originalScan) override; + + void *write(cclient::data::security::AuthInfo *auth, std::map>> *request) override; + + bool dropUser(cclient::data::security::AuthInfo *auth, const std::string &user) override; + + bool changeUserPassword(cclient::data::security::AuthInfo *auth, const std::string &user, const std::string &password) override; + + bool createUser(cclient::data::security::AuthInfo *auth, const std::string &user, const std::string &password) override; + + std::map getTableConfiguration(cclient::data::security::AuthInfo *auth, const std::string &table) override; + + cclient::data::security::Authorizations *getUserAuths(cclient::data::security::AuthInfo *auth, const std::string &user) override; + + void changeUserAuths(cclient::data::security::AuthInfo *auth, const std::string &user, cclient::data::security::Authorizations *auths) override; + + void splitTablet(cclient::data::security::AuthInfo *auth, const std::shared_ptr extent, std::string split) override; + + void registerService(std::string instance, std::string clusterManagers) override; + + void close() override; + + void initialize(std::shared_ptr protocolPtr, bool callRegistration = true) override; + + std::map getNamespaceConfiguration(cclient::data::security::AuthInfo *auth, const std::string &nameSpaceName) override; + + void authenticate(cclient::data::security::AuthInfo *auth) override; + +}; + +} diff --git a/include/interconnect/accumulo/AccumuloServerTwo.h b/include/interconnect/accumulo/AccumuloServerTwo.h new file mode 100644 index 00000000..dbf8673f --- /dev/null +++ b/include/interconnect/accumulo/AccumuloServerTwo.h @@ -0,0 +1,122 @@ +/* + * Licensed 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. + */ + +#pragma once +#include "AccumuloServerFacade.h" +#include "data/extern/thrift/ClientService.h" +#include "data/extern/thrift/TabletClientService.h" +#include + +#include +#include +#include "data/extern/boost/SharedPointer.h" +#include "data/extern/thriftv2/ClientService.h" +#include "data/exceptions/NotServingException.h" +#include "data/extern/thriftv2/TabletClientService.h" +#include "../scanrequest/ScanRequest.h" +#include "../scanrequest/ScanIdentifier.h" +#include "data/extern/thriftv2/ThriftV2Wrapper.h" +#include "data/constructs/security/AuthInfo.h" +#include "../Scan.h" +#include "logging/Logger.h" + +namespace interconnect { + +class AccumuloServerFacadeV2 : public AccumuloServerFacade { + + private: + + std::shared_ptr logger; + + std::map convertedMap_V2; + + std::mutex mutex; + + void v2_authenticate(cclient::data::security::AuthInfo *auth); + + Scan *v2_singleScan(ScanRequest, cclient::data::Range*> > *request); + + Scan *v2_multiScan(ScanRequest, cclient::data::Range*> > *request); + + Scan *v2_beginScan(ScanRequest, cclient::data::Range*> > *request); + + void v2_registerService(std::string instance, std::string clusterManagers); + + org::apache::accumulov2::core::securityImpl::thrift::TCredentials getOrSetCredentialsV2(cclient::data::security::AuthInfo *convert); + + std::map v2_getNamespaceConfiguration(cclient::data::security::AuthInfo *auth, const std::string &nameSpaceName); + + Scan *v2_continueScan(Scan *originalScan); + + void *v2_write(cclient::data::security::AuthInfo *auth, std::map>> *request); + + bool v2_dropUser(cclient::data::security::AuthInfo *auth, std::string user); + + bool v2_changeUserPassword(cclient::data::security::AuthInfo *auth, std::string user, std::string password); + + bool v2_createUser(cclient::data::security::AuthInfo *auth, std::string user, std::string password); + + std::map v2_getTableConfiguration(cclient::data::security::AuthInfo *auth, std::string table); + + cclient::data::security::Authorizations *v2_getUserAuths(cclient::data::security::AuthInfo *auth, std::string user); + + void v2_changeUserAuths(cclient::data::security::AuthInfo *auth, std::string user, cclient::data::security::Authorizations *auths); + + void v2_splitTablet(cclient::data::security::AuthInfo *auth, std::shared_ptr extent, std::string split); + + void v2_close(); + + std::unique_ptr client_V2; + std::unique_ptr tserverClient_V2; + public: + + AccumuloServerFacadeV2(); + + Scan *multiScan(ScanRequest, cclient::data::Range*> > *request) override; + + Scan * singleScan(ScanRequest, cclient::data::Range*> > *request) override; + + Scan *beginScan(ScanRequest, cclient::data::Range*> > *request) override; + + Scan *continueScan(Scan *originalScan) override; + + void *write(cclient::data::security::AuthInfo *auth, std::map>> *request) override; + + bool dropUser(cclient::data::security::AuthInfo *auth, const std::string &user) override; + + bool changeUserPassword(cclient::data::security::AuthInfo *auth, const std::string &user, const std::string &password) override; + + bool createUser(cclient::data::security::AuthInfo *auth, const std::string &user, const std::string &password) override; + + std::map getTableConfiguration(cclient::data::security::AuthInfo *auth, const std::string &table) override; + + cclient::data::security::Authorizations *getUserAuths(cclient::data::security::AuthInfo *auth, const std::string &user) override; + + void changeUserAuths(cclient::data::security::AuthInfo *auth, const std::string &user, cclient::data::security::Authorizations *auths) override; + + void splitTablet(cclient::data::security::AuthInfo *auth, const std::shared_ptr extent, std::string split) override; + + void registerService(std::string instance, std::string clusterManagers) override; + + void close() override; + + void initialize(std::shared_ptr protocolPtr, bool callRegistration = true) override; + + std::map getNamespaceConfiguration(cclient::data::security::AuthInfo *auth, const std::string &nameSpaceName) override; + + void authenticate(cclient::data::security::AuthInfo *auth) override; + +}; + +} diff --git a/include/interconnect/tableOps/ClientTableOps.h b/include/interconnect/tableOps/ClientTableOps.h index 44151108..47e9ebd8 100644 --- a/include/interconnect/tableOps/ClientTableOps.h +++ b/include/interconnect/tableOps/ClientTableOps.h @@ -24,6 +24,8 @@ #include "../transport/AccumuloMasterTransporter.h" #include "../RootInterface.h" #include "../../writer/Sink.h" +#include "logging/Logger.h" +#include "logging/LoggerConfiguration.h" namespace interconnect { @@ -43,7 +45,8 @@ class AccumuloTableOperations : public interconnect::TableOperations>(creds, instance, table), clientInterface(interface), tserverConn(tserverConn), - distributedConnector(distributedConnector) { + distributedConnector(distributedConnector), + logger(logging::LoggerFactory::getLogger()){ loadTableOps(); getTableId(); @@ -105,7 +108,7 @@ class AccumuloTableOperations : public interconnect::TableOperations>> createScanner(cclient::data::security::Authorizations *auths, uint16_t threads); + std::unique_ptr>> createScanner(cclient::data::security::Authorizations *auths, uint16_t threads) override; /** * Creates a writer for the current table @@ -163,7 +166,7 @@ class AccumuloTableOperations : public interconnect::TableOperations> createWriter(cclient::data::security::Authorizations *auths, uint16_t threads); + std::unique_ptr> createWriter(cclient::data::security::Authorizations *auths, uint16_t threads) override; protected: @@ -174,6 +177,9 @@ class AccumuloTableOperations : public interconnect::TableOperations> *clientInterface; void loadTableOps(bool force = false); + + private: + std::shared_ptr logger; }; extern std::map nameSpaceIds; diff --git a/include/interconnect/transport/AccumuloMasterTransporter.h b/include/interconnect/transport/AccumuloMasterTransporter.h index d600db41..ba0ea4fb 100644 --- a/include/interconnect/transport/AccumuloMasterTransporter.h +++ b/include/interconnect/transport/AccumuloMasterTransporter.h @@ -50,6 +50,9 @@ #include "BaseTransport.h" #include "FateInterface.h" #include "interconnect/accumulo/AccumuloMasterFacade.h" +#include "interconnect/accumulo/AccumuloMasterOne.h" +#include "interconnect/accumulo/AccumuloMasterTwo.h" +#include "data/constructs/InstanceVersion.h" namespace interconnect { #include @@ -70,7 +73,7 @@ namespace interconnect { class AccumuloMasterTransporter : public ThriftTransporter, public FateInterface { protected: - AccumuloMasterFacade master; + std::unique_ptr master; // thrift master client interface. @@ -87,101 +90,115 @@ class AccumuloMasterTransporter : public ThriftTransporter, public FateInterface * **/ void createMasterClient() { - master.createMasterClient(underlyingTransport); + master->createMasterClient(underlyingTransport); } - void recreateMasterClient() { + void recreateMasterClient() override{ underlyingTransport->close(); underlyingTransport.reset(); - /* - if (NULL != masterClient) { - - delete masterClient; - masterClient = NULL; - }*/ underlyingTransport = boost::tools::from_shared_ptr(createTransporter()); createMasterClient(); } virtual std::string doFateOperations(cclient::data::security::AuthInfo *auth, AccumuloFateOperation type, const std::vector &tableArgs, const std::map &options, bool wait = false) override { - return master.doFateOperations(auth, type, tableArgs, options, wait); + return master->doFateOperations(auth, type, tableArgs, options, wait); + } + + void switchInterconnect() override { + switch (cclient::data::InstanceVersion::getVersion(getConnection()->getHost())) { + case 1: + master = std::make_unique(getConnection()->getHost(),[&]() { + recreateMasterClient(); + }, + [&]() ->std::shared_ptr { + return createTransporter(); + }); + + break; + case 2: + master = std::make_unique(getConnection()->getHost(),[&]() { + recreateMasterClient(); + }, + [&]() ->std::shared_ptr { + return createTransporter(); + }); + + break; + } + + createMasterClient(); } public: virtual void registerService(std::string instance, std::string clusterManagers) { createMasterClient(); - createClientService(); + createClientService(true); } explicit AccumuloMasterTransporter(std::shared_ptr conn) : interconnect::ThriftTransporter(conn), - interconnect::ServerTransport>(conn), - master([&]() { - recreateMasterClient(); - }, - [&]() ->std::shared_ptr { - return createTransporter(); - }) { + interconnect::ServerTransport>(conn){ + switchInterconnect(); createMasterClient(); - createClientService(); + createClientService(true); } bool createTable(cclient::data::security::AuthInfo *auth, const std::string &table) { - return master.createTable(auth, table); + return master->createTable(auth, table); } bool importDirectory(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &dir, std::string failure_dir, bool setTime) { - return master.importDirectory(auth, table, dir, failure_dir, setTime); + return master->importDirectory(auth, table, dir, failure_dir, setTime); } bool compactFallBack(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &startrow, const std::string &endrow, bool wait) { - return master.compactFallBack(auth, table, startrow, endrow, wait); + return master->compactFallBack(auth, table, startrow, endrow, wait); } bool compact(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &startrow, const std::string &endrow, bool wait) { - return master.compact(auth, table, startrow, endrow, wait); + return master->compact(auth, table, startrow, endrow, wait); } bool flush(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &startrow, const std::string &endrow, bool wait) { - return master.flush(auth, table, startrow, endrow, wait); + return master->flush(auth, table, startrow, endrow, wait); } bool removeTable(cclient::data::security::AuthInfo *auth, const std::string &table) { - return master.removeTable(auth, table); + return master->removeTable(auth, table); } void removeTableProperty(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &property) { - master.removeTableProperty(auth, table, property); + master->removeTableProperty(auth, table, property); } void setTableProperty(cclient::data::security::AuthInfo *auth, const std::string &table, const std::string &property, const std::string &value) { - master.setTableProperty(auth, table, property, value); + master->setTableProperty(auth, table, property, value); } /**namespace operations**/ bool createNamespace(cclient::data::security::AuthInfo *auth, std::string name) { - return master.createNamespace(auth, name); + return master->createNamespace(auth, name); } bool deletenamespace(cclient::data::security::AuthInfo *auth, std::string name) { - return master.deletenamespace(auth, name); + return master->deletenamespace(auth, name); } bool renamenamespace(cclient::data::security::AuthInfo *auth, std::string oldName, std::string newName) { - return master.renamenamespace(auth, oldName, newName); + return master->renamenamespace(auth, oldName, newName); } void removeNamespaceProperty(cclient::data::security::AuthInfo *auth, std::string nameSpaceName, const std::string &property) { - master.removeNamespaceProperty(auth, nameSpaceName, property); + master->removeNamespaceProperty(auth, nameSpaceName, property); } void setNamespaceProperty(cclient::data::security::AuthInfo *auth, std::string nameSpaceName, const std::string &property, const std::string &value) { - master.setNamespaceProperty(auth, nameSpaceName, property, value); + master->setNamespaceProperty(auth, nameSpaceName, property, value); } virtual ~AccumuloMasterTransporter() { diff --git a/include/interconnect/transport/AccumuloServerTransport.h b/include/interconnect/transport/AccumuloServerTransport.h index b154897e..12288225 100644 --- a/include/interconnect/transport/AccumuloServerTransport.h +++ b/include/interconnect/transport/AccumuloServerTransport.h @@ -63,9 +63,7 @@ class AccumuloServerFacade : public ThriftTransporter { protected: public: - explicit AccumuloServerTransport(const std::shared_ptr &conn) - : ThriftTransporter(conn) { - + explicit AccumuloServerFacade(const std::shared_ptr &conn) : ThriftTransporter(conn) { } virtual void newTransporter(const std::shared_ptr &conn) override { diff --git a/include/interconnect/transport/BaseTransport.h b/include/interconnect/transport/BaseTransport.h index ed8bb91e..492c2691 100644 --- a/include/interconnect/transport/BaseTransport.h +++ b/include/interconnect/transport/BaseTransport.h @@ -42,6 +42,8 @@ #include #include "interconnect/accumulo/AccumuloServerFacade.h" +#include "interconnect/accumulo/AccumuloServerOne.h" +#include "interconnect/accumulo/AccumuloServerTwo.h" #include "data/extern/boost/SharedPointer.h" #include "data/extern/thrift/ClientService.h" #include "data/extern/thrift/TabletClientService.h" @@ -51,6 +53,9 @@ #include "data/extern/thrift/ThriftWrapper.h" #include "data/constructs/security/AuthInfo.h" #include "../Scan.h" +#include "logging/Logger.h" +#include "logging/LoggerConfiguration.h" +#include "data/constructs/InstanceVersion.h" namespace interconnect { @@ -58,7 +63,9 @@ class ThriftTransporter : virtual public ServerTransport underlyingTransport; - AccumuloServerFacade server; + std::shared_ptr logger; + + std::unique_ptr server; std::shared_ptr clonedConnection; @@ -67,11 +74,21 @@ class ThriftTransporter : virtual public ServerTransport createTransporter(); Scan *singleScan(ScanRequest, cclient::data::Range*> > *request) { - return server.singleScan(request); + return server->singleScan(request); } Scan *multiScan(ScanRequest, cclient::data::Range*> > *request) { - return server.multiScan(request); + return server->multiScan(request); + } + + std::shared_ptr getConnection() const { + return clonedConnection; + } + + /** + * Self healing function to switch the interconnect if a failure occurs. + */ + virtual void switchInterconnect() { } public: @@ -82,63 +99,63 @@ class ThriftTransporter : virtual public ServerTransport getNamespaceConfiguration(cclient::data::security::AuthInfo *auth, const std::string &nameSpaceName); - apache::thrift::transport::TTransport getTransport(); + apache::thrift::transport::TTransport getTransport() override; virtual void authenticate(cclient::data::security::AuthInfo *auth) override; void createIfClosed(); void closeAndCreateClient(); - void createClientService(); + void createClientService(bool callRegistration = false); virtual void registerService(const std::string &instance, const std::string &clusterManagers) override { createClientService(); - server.registerService(instance, clusterManagers); + server->registerService(instance, clusterManagers); } - Scan *beginScan(ScanRequest, cclient::data::Range*> > *request) { - return server.beginScan(request); + Scan *beginScan(ScanRequest, cclient::data::Range*> > *request) override { + return server->beginScan(request); } Scan * continueScan(Scan *originalScan) { - return server.continueScan(originalScan); + return server->continueScan(originalScan); } - void *write(cclient::data::security::AuthInfo *auth, std::map>> *request) { - return server.write(auth, request); + void *write(cclient::data::security::AuthInfo *auth, std::map>> *request) override { + return server->write(auth, request); } bool dropUser(cclient::data::security::AuthInfo *auth, const std::string &user) { - return server.dropUser(auth, user); + return server->dropUser(auth, user); } bool changeUserPassword(cclient::data::security::AuthInfo *auth, const std::string &user, const std::string &password) { - return server.changeUserPassword(auth, user, password); + return server->changeUserPassword(auth, user, password); } bool createUser(cclient::data::security::AuthInfo *auth, const std::string &user, const std::string &password) { - return server.createUser(auth, user, password); + return server->createUser(auth, user, password); } std::map getTableConfiguration(cclient::data::security::AuthInfo *auth, const std::string &table) { - return server.getTableConfiguration(auth, table); + return server->getTableConfiguration(auth, table); } cclient::data::security::Authorizations *getUserAuths(cclient::data::security::AuthInfo *auth, const std::string &user) { - return server.getUserAuths(auth, user); + return server->getUserAuths(auth, user); } void changeUserAuths(cclient::data::security::AuthInfo *auth, const std::string &user, cclient::data::security::Authorizations *auths) { - server.changeUserAuths(auth, user, auths); + server->changeUserAuths(auth, user, auths); } void splitTablet(cclient::data::security::AuthInfo *auth, std::shared_ptr extent, const std::string &split) { - server.splitTablet(auth, extent, split); + server->splitTablet(auth, extent, split); } - void close() { - server.close(); + void close() override { + server->close(); underlyingTransport->close(); } @@ -146,11 +163,11 @@ class ThriftTransporter : virtual public ServerTransportisOpen(); } - bool isOpen() { + bool isOpen() override { return underlyingTransport->isOpen(); } diff --git a/include/interconnect/transport/Transport.h b/include/interconnect/transport/Transport.h index 4035d105..9b62a1a5 100644 --- a/include/interconnect/transport/Transport.h +++ b/include/interconnect/transport/Transport.h @@ -23,7 +23,7 @@ class Transporter { protected: virtual void newTransporter(const std::shared_ptr &conn) = 0; public: - explicit Transporter(const std::shared_ptr &conn) { + explicit Transporter(const std::shared_ptr &conn){ } diff --git a/include/logging/Logger.h b/include/logging/Logger.h new file mode 100644 index 00000000..104172de --- /dev/null +++ b/include/logging/Logger.h @@ -0,0 +1,289 @@ +/** + * + * 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 __LOGGER_H__ +#define __LOGGER_H__ + +#include +#include +#include +#include + +#include "spdlog/spdlog.h" + +namespace logging { + +#define LOG_BUFFER_SIZE 1024 + +class LoggerControl { + public: + LoggerControl() + : is_enabled_(true) { + + } + + bool is_enabled(){ + return is_enabled_; + } + + void setEnabled(bool status){ + is_enabled_ = status; + } + protected: + std::atomic is_enabled_; +}; + +template +inline std::string format_string(char const* format_str, Args&&... args) { + char buf[LOG_BUFFER_SIZE]; + std::snprintf(buf, LOG_BUFFER_SIZE, format_str, args...); + return std::string(buf); +} + +inline std::string format_string(char const* format_str) { + return format_str; +} + +inline char const* conditional_conversion(std::string const& str) { + return str.c_str(); +} + +template +inline T conditional_conversion(T const& t) { + return t; +} + +typedef enum { + trace = 0, + debug = 1, + info = 2, + warn = 3, + err = 4, + critical = 5, + off = 6 +} LOG_LEVEL; + +class BaseLogger { + public: + + virtual ~BaseLogger() { + + } + virtual void log_string(LOG_LEVEL level, std::string str) = 0; + + virtual bool should_log(const LOG_LEVEL &level) { + return true; + } + +}; + +/** + * LogBuilder is a class to facilitate using the LOG macros below and an associated put-to operator. + * + */ +class LogBuilder { + public: + LogBuilder(BaseLogger *l, LOG_LEVEL level) + : ignore(false), + ptr(l), + level(level) { + if (!l->should_log(level)) { + setIgnore(); + } + } + + ~LogBuilder() { + if (!ignore) + log_string(level); + } + + void setIgnore() { + ignore = true; + } + + void log_string(LOG_LEVEL level) { + ptr->log_string(level, str.str()); + } + + template + LogBuilder &operator<<(const T &o) { + if (!ignore) + str << o; + return *this; + } + + bool ignore; + BaseLogger *ptr; + std::stringstream str; + LOG_LEVEL level; +}; + +class Logger : public BaseLogger { + public: + /** + * @brief Log error message + * @param format format string ('man printf' for syntax) + * @warning does not check @p log or @p format for null. Caller must ensure parameters and format string lengths match + */ + template + void log_error(const char * const format, const Args& ... args) { + log(spdlog::level::err, format, args...); + } + + /** + * @brief Log warn message + * @param format format string ('man printf' for syntax) + * @warning does not check @p log or @p format for null. Caller must ensure parameters and format string lengths match + */ + template + void log_warn(const char * const format, const Args& ... args) { + log(spdlog::level::warn, format, args...); + } + + /** + * @brief Log info message + * @param format format string ('man printf' for syntax) + * @warning does not check @p log or @p format for null. Caller must ensure parameters and format string lengths match + */ + template + void log_info(const char * const format, const Args& ... args) { + log(spdlog::level::info, format, args...); + } + + /** + * @brief Log debug message + * @param format format string ('man printf' for syntax) + * @warning does not check @p log or @p format for null. Caller must ensure parameters and format string lengths match + */ + template + void log_debug(const char * const format, const Args& ... args) { + log(spdlog::level::debug, format, args...); + } + + /** + * @brief Log trace message + * @param format format string ('man printf' for syntax) + * @warning does not check @p log or @p format for null. Caller must ensure parameters and format string lengths match + */ + template + void log_trace(const char * const format, const Args& ... args) { + log(spdlog::level::trace, format, args...); + } + + bool should_log(const LOG_LEVEL &level) { + if (controller_ && !controller_->is_enabled()) + return false; + spdlog::level::level_enum logger_level = spdlog::level::level_enum::info; + switch (level) { + case critical: + logger_level = spdlog::level::level_enum::critical; + break; + case err: + logger_level = spdlog::level::level_enum::err; + break; + case info: + break; + case debug: + logger_level = spdlog::level::level_enum::debug; + break; + case off: + logger_level = spdlog::level::level_enum::off; + break; + case trace: + logger_level = spdlog::level::level_enum::trace; + break; + case warn: + logger_level = spdlog::level::level_enum::warn; + break; + } + + std::lock_guard lock(mutex_); + if (!delegate_->should_log(logger_level)) { + return false; + } + return true; + } + + protected: + + virtual void log_string(LOG_LEVEL level, std::string str) { + switch (level) { + case critical: + log_warn(str.c_str()); + break; + case err: + log_error(str.c_str()); + break; + case info: + log_info(str.c_str()); + break; + case debug: + log_debug(str.c_str()); + break; + case trace: + log_trace(str.c_str()); + break; + case warn: + log_warn(str.c_str()); + break; + case off: + break; + } + } + Logger(std::shared_ptr delegate, std::shared_ptr controller) + : delegate_(delegate), controller_(controller) { + } + + Logger(std::shared_ptr delegate) + : delegate_(delegate), controller_(nullptr) { + } + + + std::shared_ptr delegate_; + std::shared_ptr controller_; + + std::mutex mutex_; + private: + template + inline void log(spdlog::level::level_enum level, const char * const format, const Args& ... args) { + if (controller_ && !controller_->is_enabled()) + return; + std::lock_guard lock(mutex_); + if (!delegate_->should_log(level)) { + return; + } + const auto str = format_string(format, conditional_conversion(args)...); + delegate_->log(level, str); + } + + Logger(Logger const&); + Logger& operator=(Logger const&); +}; + +#define LOG_DEBUG(x) LogBuilder(x.get(),logging::LOG_LEVEL::debug) + +#define LOG_INFO(x) LogBuilder(x.get(),logging::LOG_LEVEL::info) + +#define LOG_TRACE(x) LogBuilder(x.get(),logging::LOG_LEVEL::trace) + +#define LOG_ERROR(x) LogBuilder(x.get(),logging::LOG_LEVEL::err) + +#define LOG_WARN(x) LogBuilder(x.get(),logging::LOG_LEVEL::warn) + +} /* namespace logging */ + +#endif diff --git a/include/logging/LoggerConfiguration.h b/include/logging/LoggerConfiguration.h new file mode 100644 index 00000000..e9e8950c --- /dev/null +++ b/include/logging/LoggerConfiguration.h @@ -0,0 +1,202 @@ +/** + * @file LoggerConfiguration.h + * Logger class declaration + * This is a C++ wrapper for spdlog, a lightweight C++ logging library + * + * 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 __LOGGER_CONFIGURATION_H__ +#define __LOGGER_CONFIGURATION_H__ + +#include +#include +#include +#include "spdlog/spdlog.h" +#include "spdlog/formatter.h" + +#include "Logger.h" +#include "utils/ClassUtils.h" +#include "Properties.h" + +namespace logging { + +namespace internal { +struct LoggerNamespace { + spdlog::level::level_enum level; + bool has_level; + std::vector> sinks; + std::map> children; + + LoggerNamespace() + : level(spdlog::level::off), + has_level(false), + sinks(std::vector>()), + children(std::map>()) { + } +}; +} +; + +class LoggerProperties : public Properties { + public: + LoggerProperties() + : Properties("Logger properties") { + } + /** + * Gets all keys that start with the given prefix and do not have a "." after the prefix and "." separator. + * + * Ex: with type argument "appender" + * you would get back a property of "appender.rolling" but not "appender.rolling.file_name" + */ + std::vector get_keys_of_type(const std::string &type); + + /** + * Registers a sink with the given name. This allows for programmatic definition of sinks. + */ + void add_sink(const std::string &name, std::shared_ptr sink) { + sinks_[name] = sink; + } + std::map> initial_sinks() { + return sinks_; + } + + static const char* appender_prefix; + static const char* logger_prefix; + private: + std::map> sinks_; +}; + +class LoggerConfiguration { + public: + /** + * Gets the current log configuration + */ + static LoggerConfiguration& getConfiguration() { + static LoggerConfiguration logger_configuration; + return logger_configuration; + } + + static std::unique_ptr newInstance() { + return std::unique_ptr(new LoggerConfiguration()); + } + + void disableLogging() { + controller_->setEnabled(false); + } + + void enableLogging(LOG_LEVEL level = LOG_LEVEL::debug, bool use_stdout = true) { + controller_->setEnabled(true); + if (use_stdout) { + auto logger_properties = std::make_shared(); + logger_properties->set("spdlog.pattern", "[%Y-%m-%d %H:%M:%S.%e] [%n] [%l] %v"); + logger_properties->set("spdlog.shorten_names", "true"); + logger_properties->set("appender.stdout", "stdout"); + std::string strlevel = "DEBUG"; + switch (level) { + case LOG_LEVEL::info: + strlevel = "INFO"; + break; + case LOG_LEVEL::debug: + strlevel = "DEBUG"; + break; + case LOG_LEVEL::trace: + strlevel = "TRACE"; + break; + case LOG_LEVEL::warn: + strlevel = "WARN"; + break; + case LOG_LEVEL::err: + strlevel = "ERROR"; + break; + case LOG_LEVEL::critical: + strlevel = "ERROR"; + break; + case LOG_LEVEL::off: + strlevel = "OFF"; + break; + } + logger_properties->set("logger.root", strlevel + ",stdout"); + initialize(logger_properties); + } + + } + + bool shortenClassNames() const { + return shorten_names_; + } + /** + * (Re)initializes the logging configuation with the given logger properties. + */ + void initialize(const std::shared_ptr &logger_properties); + + /** + * Can be used to get arbitrarily named Logger, LoggerFactory should be preferred within a class. + */ + std::shared_ptr getLogger(const std::string &name); + static const char *spdlog_default_pattern; + protected: + static std::shared_ptr initialize_namespaces(const std::shared_ptr &logger_properties); + static std::shared_ptr get_logger(std::shared_ptr logger, const std::shared_ptr &root_namespace, const std::string &name, + std::shared_ptr formatter, bool remove_if_present = false); + private: + static std::shared_ptr create_default_root(); + + class LoggerImpl : public Logger { + public: + explicit LoggerImpl(const std::string &name, const std::shared_ptr &controller, const std::shared_ptr &delegate) + : Logger(delegate, controller), + name(name) { + } + + void set_delegate(std::shared_ptr delegate) { + std::lock_guard lock(mutex_); + delegate_ = delegate; + } + const std::string name; + + }; + + LoggerConfiguration(); + std::shared_ptr root_namespace_; + std::vector> loggers; + std::shared_ptr formatter_; + std::mutex mutex; + std::shared_ptr logger_ = nullptr; + std::shared_ptr controller_; + bool shorten_names_; + +}; + +template +class LoggerFactory { + public: + /** + * Gets an initialized logger for the template class. + */ + static std::shared_ptr getLogger() { + static std::shared_ptr logger = LoggerConfiguration::getConfiguration().getLogger(ClassUtils::getClassName()); + return logger; + } + + static std::shared_ptr getAliasedLogger(const std::string &alias) { + std::shared_ptr logger = LoggerConfiguration::getConfiguration().getLogger(alias); + return logger; + } +}; + +} /* namespace logging */ + +#endif diff --git a/include/logging/Properties.h b/include/logging/Properties.h new file mode 100644 index 00000000..026cf459 --- /dev/null +++ b/include/logging/Properties.h @@ -0,0 +1,146 @@ +/** + * @file Configure.h + * Configure class declaration + * + * 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 __PROPERTIES_H__ +#define __PROPERTIES_H__ + +#include +#include +#include +#include +#include +#include +#include +#include "Logger.h" + +#ifndef FILE_SEPARATOR + #ifdef WIN32 + #define FILE_SEPARATOR '\\' + #else + #define FILE_SEPARATOR '/' + #endif +#endif + +#ifndef PATH_MAX +#define PATH_MAX 2048 +#endif + + +class Properties { + public: + Properties(const std::string& name = ""); + + virtual ~Properties() { + + } + + virtual const std::string& getName() { + return name_; + } + + // Clear the load config + void clear() { + std::lock_guard lock(mutex_); + properties_.clear(); + } + // Set the config value + void set(const std::string &key, const std::string &value) { + std::lock_guard lock(mutex_); + properties_[key] = value; + dirty_ = true; + } + // Check whether the config value existed + bool has(std::string key) { + std::lock_guard lock(mutex_); + return (properties_.find(key) != properties_.end()); + } + /** + * Returns the config value by placing it into the referenced param value + * @param key key to look up + * @param value value in which to place the map's stored property value + * @returns true if found, false otherwise. + */ + bool get(const std::string &key, std::string &value); + + /** + * Returns the config value by placing it into the referenced param value + * Uses alternate_key if key is not found within the map. + * + * @param key key to look up + * @param alternate_key is the secondary lookup key if key is not found + * @param value value in which to place the map's stored property value + * @returns true if found, false otherwise. + */ + bool get(const std::string &key, const std::string &alternate_key, std::string &value); + + /** + * Returns the configuration value or an empty string. + * @return value corresponding to key or empty value. + */ + int getInt(const std::string &key, int default_value); + + // Parse one line in configure file like key=value + bool parseConfigureFileLine(char *buf, std::string &prop_key, std::string &prop_value); + // Load Configure File + void loadConfigurationFile(const char *fileName); + // Set the determined MINIFI_HOME + void setHome(std::string minifiHome) { + minifi_home_ = minifiHome; + } + + std::vector getConfiguredKeys() { + std::vector keys; + for (auto &property : properties_) { + keys.push_back(property.first); + } + return keys; + } + + // Get the determined MINIFI_HOME + std::string getHome() const { + return minifi_home_; + } + // Parse Command Line + void parseCommandLine(int argc, char **argv); + + protected: + + bool validateConfigurationFile(const std::string &file); + + std::map properties_; + + + private: + + std::atomic dirty_; + + std::string properties_file_; + + // Mutex for protection + std::mutex mutex_; + // Logger + std::shared_ptr logger_; + // Home location for this executable + std::string minifi_home_; + + std::string name_; +}; + + +#endif diff --git a/include/scanner/impl/Scanner.h b/include/scanner/impl/Scanner.h index db7961be..48b7d7c7 100644 --- a/include/scanner/impl/Scanner.h +++ b/include/scanner/impl/Scanner.h @@ -73,7 +73,7 @@ class Scanner : public scanners::Source> *getResultSet() { + Results> *getResultSet() override { std::lock_guard lock(scannerLock); if (IsEmpty(&ranges)) { @@ -140,11 +140,11 @@ class Scanner : public scanners::Source ranges, std::vector> *locatedTablets) { + void locateFailedTablet(std::vector ranges, std::vector> *locatedTablets) override { std::map, std::vector, pointer_comparator > > > returnRanges; std::set locations; tableLocator->binRanges(credentials, &ranges, &locations, &returnRanges); diff --git a/include/utils/ClassUtils.h b/include/utils/ClassUtils.h new file mode 100644 index 00000000..82cef078 --- /dev/null +++ b/include/utils/ClassUtils.h @@ -0,0 +1,59 @@ +/** + * 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. + */ +#pragma once + +#include +#ifdef _WIN32 +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN 1 +#endif +// can't include cxxabi +#else +#include +#endif + +namespace ClassUtils { + +template +static inline std::string getClassName() { +#ifndef WIN32 + char *b = abi::__cxa_demangle(typeid(T).name(), 0, 0, 0); + if (b == nullptr) + return std::string(); + std::string name = b; + std::free(b); + return name; +#else + std::string adjusted_name = typeid(T).name(); + // can probably skip class manually for slightly higher performance + const std::string clazz = "class "; + auto haz_clazz = adjusted_name.find(clazz); + if (haz_clazz == 0) + adjusted_name = adjusted_name.substr(clazz.length(), adjusted_name.length() - clazz.length()); + return adjusted_name; +#endif +} + +/** + * Shortens class names via the canonical representation ( package with name ) + * @param class_name input class name + * @param out output class name that is shortened. + * @return true if out has been updated, false otherwise + */ +bool shortenClassName(const std::string &class_name, std::string &out); + +} /* namespace ClassUtils */ diff --git a/include/utils/StringUtils.h b/include/utils/StringUtils.h new file mode 100644 index 00000000..10fc8558 --- /dev/null +++ b/include/utils/StringUtils.h @@ -0,0 +1,232 @@ +/** + * 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. + */ +#pragma once +#include +#include +#ifdef WIN32 +#include +#include +#endif +#include +#include +#include +#include + +enum TimeUnit { + DAY, + HOUR, + MINUTE, + SECOND, + MILLISECOND, + NANOSECOND +}; +#if defined(WIN32) || (__cplusplus >= 201103L && (!defined(__GLIBCXX__) || (__cplusplus >= 201402L) || (defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE > 4))) +#define HAVE_REGEX_CPP 1 +#else +#define HAVE_REGEX_CPP 0 +#endif + +namespace utils { + +namespace { +template +struct string_traits; +template<> +struct string_traits { + template + static std::string convert_to_string(T&& t) { + return std::to_string(std::forward(t)); + } +}; + +template<> +struct string_traits { + template + static std::wstring convert_to_string(T&& t) { + return std::to_wstring(std::forward(t)); + } +}; +} + +/** + * Stateless String utility class. + * + * Design: Static class, with no member variables + * + * Purpose: Houses many useful string utilities. + */ +class StringUtils { + public: + /** + * Converts a string to a boolean + * Better handles mixed case. + * @param input input string + * @param output output string. + */ + static bool StringToBool(std::string input, bool &output); + + // Trim String utils + + /** + * Trims a string left to right + * @param s incoming string + * @returns modified string + */ + static std::string trim(std::string s); + + /** + * Trims left most part of a string + * @param s incoming string + * @returns modified string + */ + static inline std::string trimLeft(std::string s) { + s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::pointer_to_unary_function(isspace)))); + return s; + } + + /** + * Trims a string on the right + * @param s incoming string + * @returns modified string + */ + + static inline std::string trimRight(std::string s) { + s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::pointer_to_unary_function(isspace))).base(), s.end()); + return s; + } + + /** + * Compares strings by lower casing them. + */ + static inline bool equalsIgnoreCase(const std::string &left, const std::string right) { + if (left.length() == right.length()) { + return std::equal(right.begin(), right.end(), left.begin(), [](unsigned char lc, unsigned char rc) {return tolower(lc) == tolower(rc);}); + } else { + return false; + } + } + + static std::vector split(const std::string &str, const std::string &delimiter); + + /** + * Converts a string to a float + * @param input input string + * @param output output float + * @param cp failure policy + */ + static bool StringToFloat(std::string input, float &output); + + static std::string replaceEnvironmentVariables(std::string& original_string); + + static std::string& replaceAll(std::string& source_string, const std::string &from_string, const std::string &to_string); + + inline static bool endsWithIgnoreCase(const std::string &value, const std::string & endString) { + if (endString.size() > value.size()) + return false; + return std::equal(endString.rbegin(), endString.rend(), value.rbegin(), [](unsigned char lc, unsigned char rc) {return tolower(lc) == tolower(rc);}); + } + + inline static bool endsWith(const std::string &value, const std::string & endString) { + if (endString.size() > value.size()) + return false; + return std::equal(endString.rbegin(), endString.rend(), value.rbegin()); + } + + inline static std::string hex_ascii(const std::string& in) { + int len = in.length(); + std::string newString; + for (int i = 0; i < len; i += 2) { + std::string sstr = in.substr(i, 2); + char chr = (char) (int) strtol(sstr.c_str(), 0x00, 16); + newString.push_back(chr); + } + return newString; + } + + /** + * Concatenates strings stored in an arbitrary container using the provided separator. + * @tparam TChar char type of the string (char or wchar_t) + * @tparam U arbitrary container which has string or wstring value type + * @param separator that is inserted between each elements. Type should match the type of strings in container. + * @param container that contains the strings to be concatenated + * @return the result string + */ + template>::value>::type* = nullptr> + static std::basic_string join(const std::basic_string& separator, const U& container) { + typedef typename U::const_iterator ITtype; + ITtype it = container.cbegin(); + std::basic_stringstream sstream; + while (it != container.cend()) { + sstream << (*it); + ++it; + if (it != container.cend()) { + sstream << separator; + } + } + return sstream.str(); + } + ; + + /** + * Just a wrapper for the above function to be able to create separator from const char* or const wchar_t* + */ + template>::value>::type* = nullptr> + static std::basic_string join(const TChar* separator, const U& container) { + return join(std::basic_string(separator), container); + } + ; + + /** + * Concatenates string representation of integrals stored in an arbitrary container using the provided separator. + * @tparam TChar char type of the string (char or wchar_t) + * @tparam U arbitrary container which has any integral value type + * @param separator that is inserted between each elements. Type of this determines the result type. (wstring separator -> wstring) + * @param container that contains the integrals to be concatenated + * @return the result string + */ + template::value>::type* = nullptr, + typename std::enable_if>::value>::type* = nullptr> + static std::basic_string join(const std::basic_string& separator, const U& container) { + typedef typename U::const_iterator ITtype; + ITtype it = container.cbegin(); + std::basic_stringstream sstream; + while (it != container.cend()) { + sstream << string_traits::convert_to_string(*it); + ++it; + if (it != container.cend()) { + sstream << separator; + } + } + return sstream.str(); + } + + /** + * Just a wrapper for the above function to be able to create separator from const char* or const wchar_t* + */ + template::value>::type* = nullptr, + typename std::enable_if>::value>::type* = nullptr> + static std::basic_string join(const TChar* separator, const U& container) { + return join(std::basic_string(separator), container); + } + static std::string replaceMap(std::string source_string, const std::map &replace_map); +}; + + + + + +} /* namespace utils */ diff --git a/src/data/client/MetaDataLocationObtainer.cpp b/src/data/client/MetaDataLocationObtainer.cpp index 97a52ec0..fbe49599 100644 --- a/src/data/client/MetaDataLocationObtainer.cpp +++ b/src/data/client/MetaDataLocationObtainer.cpp @@ -40,6 +40,7 @@ MetaDataLocationObtainer::~MetaDataLocationObtainer() { std::vector MetaDataLocationObtainer::findTablet(cclient::data::security::AuthInfo *credentials, cclient::data::TabletLocation *source, std::string row, std::string stopRow, TabletLocator *parent) { + logging::LOG_TRACE(logger) << "FindTablet " << row << " end:" << stopRow; std::vector tabletLocations; std::shared_ptr startKey = std::make_shared(); startKey->setRow(row.c_str(), row.size()); @@ -66,6 +67,7 @@ std::vector MetaDataLocationObtainer::findTablet( std::vector iters; iters.push_back(&wriIter); + logging::LOG_TRACE(logger) << "Performing scan of " << row << " end:" << stopRow << " against " << source->getServer() << ":" << source->getPort() << " on " << source->getExtent(); interconnect::Scan *initScan = directConnect.scan(columns, &iters); std::vector > kvResults; initScan->getNextResults(&kvResults); @@ -83,6 +85,7 @@ std::vector MetaDataLocationObtainer::findTablet( for (std::map, std::shared_ptr >::iterator it = results.begin(); it != results.end(); it++) { key = it->first; + logging::LOG_DEBUG(logger) << "FindTablet received" << key; currentRow = std::string(key->getRow().first, key->getRow().second); if (currentRow != lastRowFromKey) { prevRow = 0; @@ -103,8 +106,7 @@ std::vector MetaDataLocationObtainer::findTablet( location = std::string ((char*) valBytes.first, valBytes.second); session = cq; } - else if (cf == METADATA_TABLET_COLUMN_FAMILY - && cq == METADATA_PREV_ROW_COLUMN_CQ) + else if (cf == METADATA_TABLET_COLUMN_FAMILY && cq == METADATA_PREV_ROW_COLUMN_CQ) { prevRow = value; } @@ -120,6 +122,8 @@ std::vector MetaDataLocationObtainer::findTablet( } + logging::LOG_DEBUG(logger) << "Finished FindTablet received"; + delete initScan; return tabletLocations; diff --git a/src/data/client/TabletServerLocator.cpp b/src/data/client/TabletServerLocator.cpp index bf91425d..5bdfec11 100644 --- a/src/data/client/TabletServerLocator.cpp +++ b/src/data/client/TabletServerLocator.cpp @@ -16,23 +16,20 @@ #include "data/client/TabletLocationObtainer.h" #include "data/client/TabletLocation.h" -namespace cclient -{ -namespace impl -{ +namespace cclient { +namespace impl { -TabletServerLocator::TabletServerLocator (std::string tableId, - TabletLocator *parent, - TabletLocationObtainer *lc, - cclient::data::Instance *inst) : - tableId (tableId), parent (parent), locator (lc), instance (inst) -{ - lastTabletRow = tableId; - lastTabletRow.append ("<"); +TabletServerLocator::TabletServerLocator(std::string tableId, TabletLocator *parent, TabletLocationObtainer *lc, cclient::data::Instance *inst) + : tableId(tableId), + parent(parent), + locator(lc), + instance(inst), + logger(logging::LoggerFactory::getLogger()){ + lastTabletRow = tableId; + lastTabletRow.append("<"); } -TabletServerLocator::~TabletServerLocator () -{ +TabletServerLocator::~TabletServerLocator() { invalidateCache(); } diff --git a/src/data/extern/thriftv2/ClientService.cpp b/src/data/extern/thriftv2/ClientService.cpp new file mode 100644 index 00000000..db60c854 --- /dev/null +++ b/src/data/extern/thriftv2/ClientService.cpp @@ -0,0 +1,13811 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "data/extern/thriftv2/ClientService.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace clientImpl { namespace thrift { + + +ClientService_getRootTabletLocation_args::~ClientService_getRootTabletLocation_args() throw() { +} + + +uint32_t ClientService_getRootTabletLocation_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_getRootTabletLocation_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_getRootTabletLocation_args"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_getRootTabletLocation_pargs::~ClientService_getRootTabletLocation_pargs() throw() { +} + + +uint32_t ClientService_getRootTabletLocation_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_getRootTabletLocation_pargs"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_getRootTabletLocation_result::~ClientService_getRootTabletLocation_result() throw() { +} + + +uint32_t ClientService_getRootTabletLocation_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_getRootTabletLocation_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_getRootTabletLocation_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0); + xfer += oprot->writeString(this->success); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_getRootTabletLocation_presult::~ClientService_getRootTabletLocation_presult() throw() { +} + + +uint32_t ClientService_getRootTabletLocation_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_getInstanceId_args::~ClientService_getInstanceId_args() throw() { +} + + +uint32_t ClientService_getInstanceId_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_getInstanceId_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_getInstanceId_args"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_getInstanceId_pargs::~ClientService_getInstanceId_pargs() throw() { +} + + +uint32_t ClientService_getInstanceId_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_getInstanceId_pargs"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_getInstanceId_result::~ClientService_getInstanceId_result() throw() { +} + + +uint32_t ClientService_getInstanceId_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_getInstanceId_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_getInstanceId_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0); + xfer += oprot->writeString(this->success); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_getInstanceId_presult::~ClientService_getInstanceId_presult() throw() { +} + + +uint32_t ClientService_getInstanceId_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_getZooKeepers_args::~ClientService_getZooKeepers_args() throw() { +} + + +uint32_t ClientService_getZooKeepers_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_getZooKeepers_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_getZooKeepers_args"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_getZooKeepers_pargs::~ClientService_getZooKeepers_pargs() throw() { +} + + +uint32_t ClientService_getZooKeepers_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_getZooKeepers_pargs"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_getZooKeepers_result::~ClientService_getZooKeepers_result() throw() { +} + + +uint32_t ClientService_getZooKeepers_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_getZooKeepers_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_getZooKeepers_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0); + xfer += oprot->writeString(this->success); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_getZooKeepers_presult::~ClientService_getZooKeepers_presult() throw() { +} + + +uint32_t ClientService_getZooKeepers_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_bulkImportFiles_args::~ClientService_bulkImportFiles_args() throw() { +} + + +uint32_t ClientService_bulkImportFiles_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->tid); + this->__isset.tid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableId); + this->__isset.tableId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->files.clear(); + uint32_t _size17; + ::apache::thrift::protocol::TType _etype20; + xfer += iprot->readListBegin(_etype20, _size17); + this->files.resize(_size17); + uint32_t _i21; + for (_i21 = 0; _i21 < _size17; ++_i21) + { + xfer += iprot->readString(this->files[_i21]); + } + xfer += iprot->readListEnd(); + } + this->__isset.files = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->errorDir); + this->__isset.errorDir = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->setTime); + this->__isset.setTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_bulkImportFiles_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_bulkImportFiles_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tid", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->tid); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableId", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->tableId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("files", ::apache::thrift::protocol::T_LIST, 5); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->files.size())); + std::vector ::const_iterator _iter22; + for (_iter22 = this->files.begin(); _iter22 != this->files.end(); ++_iter22) + { + xfer += oprot->writeString((*_iter22)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("errorDir", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->errorDir); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("setTime", ::apache::thrift::protocol::T_BOOL, 7); + xfer += oprot->writeBool(this->setTime); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 8); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_bulkImportFiles_pargs::~ClientService_bulkImportFiles_pargs() throw() { +} + + +uint32_t ClientService_bulkImportFiles_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_bulkImportFiles_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tid", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64((*(this->tid))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableId", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->tableId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("files", ::apache::thrift::protocol::T_LIST, 5); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->files)).size())); + std::vector ::const_iterator _iter23; + for (_iter23 = (*(this->files)).begin(); _iter23 != (*(this->files)).end(); ++_iter23) + { + xfer += oprot->writeString((*_iter23)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("errorDir", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString((*(this->errorDir))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("setTime", ::apache::thrift::protocol::T_BOOL, 7); + xfer += oprot->writeBool((*(this->setTime))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 8); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_bulkImportFiles_result::~ClientService_bulkImportFiles_result() throw() { +} + + +uint32_t ClientService_bulkImportFiles_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size24; + ::apache::thrift::protocol::TType _etype27; + xfer += iprot->readListBegin(_etype27, _size24); + this->success.resize(_size24); + uint32_t _i28; + for (_i28 = 0; _i28 < _size24; ++_i28) + { + xfer += iprot->readString(this->success[_i28]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_bulkImportFiles_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_bulkImportFiles_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::vector ::const_iterator _iter29; + for (_iter29 = this->success.begin(); _iter29 != this->success.end(); ++_iter29) + { + xfer += oprot->writeString((*_iter29)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tope) { + xfer += oprot->writeFieldBegin("tope", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tope.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_bulkImportFiles_presult::~ClientService_bulkImportFiles_presult() throw() { +} + + +uint32_t ClientService_bulkImportFiles_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size30; + ::apache::thrift::protocol::TType _etype33; + xfer += iprot->readListBegin(_etype33, _size30); + (*(this->success)).resize(_size30); + uint32_t _i34; + for (_i34 = 0; _i34 < _size30; ++_i34) + { + xfer += iprot->readString((*(this->success))[_i34]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_isActive_args::~ClientService_isActive_args() throw() { +} + + +uint32_t ClientService_isActive_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->tid); + this->__isset.tid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_isActive_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_isActive_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tid", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->tid); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_isActive_pargs::~ClientService_isActive_pargs() throw() { +} + + +uint32_t ClientService_isActive_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_isActive_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tid", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64((*(this->tid))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_isActive_result::~ClientService_isActive_result() throw() { +} + + +uint32_t ClientService_isActive_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_isActive_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_isActive_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_isActive_presult::~ClientService_isActive_presult() throw() { +} + + +uint32_t ClientService_isActive_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_ping_args::~ClientService_ping_args() throw() { +} + + +uint32_t ClientService_ping_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_ping_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_ping_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_ping_pargs::~ClientService_ping_pargs() throw() { +} + + +uint32_t ClientService_ping_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_ping_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_ping_result::~ClientService_ping_result() throw() { +} + + +uint32_t ClientService_ping_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_ping_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_ping_result"); + + if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_ping_presult::~ClientService_ping_presult() throw() { +} + + +uint32_t ClientService_ping_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_getDiskUsage_args::~ClientService_getDiskUsage_args() throw() { +} + + +uint32_t ClientService_getDiskUsage_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 2: + if (ftype == ::apache::thrift::protocol::T_SET) { + { + this->tables.clear(); + uint32_t _size35; + ::apache::thrift::protocol::TType _etype38; + xfer += iprot->readSetBegin(_etype38, _size35); + uint32_t _i39; + for (_i39 = 0; _i39 < _size35; ++_i39) + { + std::string _elem40; + xfer += iprot->readString(_elem40); + this->tables.insert(_elem40); + } + xfer += iprot->readSetEnd(); + } + this->__isset.tables = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_getDiskUsage_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_getDiskUsage_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tables", ::apache::thrift::protocol::T_SET, 2); + { + xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_STRING, static_cast(this->tables.size())); + std::set ::const_iterator _iter41; + for (_iter41 = this->tables.begin(); _iter41 != this->tables.end(); ++_iter41) + { + xfer += oprot->writeString((*_iter41)); + } + xfer += oprot->writeSetEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_getDiskUsage_pargs::~ClientService_getDiskUsage_pargs() throw() { +} + + +uint32_t ClientService_getDiskUsage_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_getDiskUsage_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tables", ::apache::thrift::protocol::T_SET, 2); + { + xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->tables)).size())); + std::set ::const_iterator _iter42; + for (_iter42 = (*(this->tables)).begin(); _iter42 != (*(this->tables)).end(); ++_iter42) + { + xfer += oprot->writeString((*_iter42)); + } + xfer += oprot->writeSetEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_getDiskUsage_result::~ClientService_getDiskUsage_result() throw() { +} + + +uint32_t ClientService_getDiskUsage_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size43; + ::apache::thrift::protocol::TType _etype46; + xfer += iprot->readListBegin(_etype46, _size43); + this->success.resize(_size43); + uint32_t _i47; + for (_i47 = 0; _i47 < _size43; ++_i47) + { + xfer += this->success[_i47].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->toe.read(iprot); + this->__isset.toe = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_getDiskUsage_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_getDiskUsage_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter48; + for (_iter48 = this->success.begin(); _iter48 != this->success.end(); ++_iter48) + { + xfer += (*_iter48).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.toe) { + xfer += oprot->writeFieldBegin("toe", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->toe.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_getDiskUsage_presult::~ClientService_getDiskUsage_presult() throw() { +} + + +uint32_t ClientService_getDiskUsage_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size49; + ::apache::thrift::protocol::TType _etype52; + xfer += iprot->readListBegin(_etype52, _size49); + (*(this->success)).resize(_size49); + uint32_t _i53; + for (_i53 = 0; _i53 < _size49; ++_i53) + { + xfer += (*(this->success))[_i53].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->toe.read(iprot); + this->__isset.toe = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_listLocalUsers_args::~ClientService_listLocalUsers_args() throw() { +} + + +uint32_t ClientService_listLocalUsers_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_listLocalUsers_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_listLocalUsers_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_listLocalUsers_pargs::~ClientService_listLocalUsers_pargs() throw() { +} + + +uint32_t ClientService_listLocalUsers_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_listLocalUsers_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_listLocalUsers_result::~ClientService_listLocalUsers_result() throw() { +} + + +uint32_t ClientService_listLocalUsers_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_SET) { + { + this->success.clear(); + uint32_t _size54; + ::apache::thrift::protocol::TType _etype57; + xfer += iprot->readSetBegin(_etype57, _size54); + uint32_t _i58; + for (_i58 = 0; _i58 < _size54; ++_i58) + { + std::string _elem59; + xfer += iprot->readString(_elem59); + this->success.insert(_elem59); + } + xfer += iprot->readSetEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_listLocalUsers_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_listLocalUsers_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_SET, 0); + { + xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::set ::const_iterator _iter60; + for (_iter60 = this->success.begin(); _iter60 != this->success.end(); ++_iter60) + { + xfer += oprot->writeString((*_iter60)); + } + xfer += oprot->writeSetEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_listLocalUsers_presult::~ClientService_listLocalUsers_presult() throw() { +} + + +uint32_t ClientService_listLocalUsers_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_SET) { + { + (*(this->success)).clear(); + uint32_t _size61; + ::apache::thrift::protocol::TType _etype64; + xfer += iprot->readSetBegin(_etype64, _size61); + uint32_t _i65; + for (_i65 = 0; _i65 < _size61; ++_i65) + { + std::string _elem66; + xfer += iprot->readString(_elem66); + (*(this->success)).insert(_elem66); + } + xfer += iprot->readSetEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_createLocalUser_args::~ClientService_createLocalUser_args() throw() { +} + + +uint32_t ClientService_createLocalUser_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal); + this->__isset.principal = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->password); + this->__isset.password = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_createLocalUser_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_createLocalUser_args"); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->principal); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("password", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary(this->password); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 6); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_createLocalUser_pargs::~ClientService_createLocalUser_pargs() throw() { +} + + +uint32_t ClientService_createLocalUser_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_createLocalUser_pargs"); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->principal))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("password", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary((*(this->password))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 6); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_createLocalUser_result::~ClientService_createLocalUser_result() throw() { +} + + +uint32_t ClientService_createLocalUser_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_createLocalUser_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_createLocalUser_result"); + + if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_createLocalUser_presult::~ClientService_createLocalUser_presult() throw() { +} + + +uint32_t ClientService_createLocalUser_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_dropLocalUser_args::~ClientService_dropLocalUser_args() throw() { +} + + +uint32_t ClientService_dropLocalUser_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal); + this->__isset.principal = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_dropLocalUser_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_dropLocalUser_args"); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->principal); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_dropLocalUser_pargs::~ClientService_dropLocalUser_pargs() throw() { +} + + +uint32_t ClientService_dropLocalUser_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_dropLocalUser_pargs"); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->principal))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_dropLocalUser_result::~ClientService_dropLocalUser_result() throw() { +} + + +uint32_t ClientService_dropLocalUser_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_dropLocalUser_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_dropLocalUser_result"); + + if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_dropLocalUser_presult::~ClientService_dropLocalUser_presult() throw() { +} + + +uint32_t ClientService_dropLocalUser_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_changeLocalUserPassword_args::~ClientService_changeLocalUserPassword_args() throw() { +} + + +uint32_t ClientService_changeLocalUserPassword_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal); + this->__isset.principal = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->password); + this->__isset.password = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_changeLocalUserPassword_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_changeLocalUserPassword_args"); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->principal); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("password", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary(this->password); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_changeLocalUserPassword_pargs::~ClientService_changeLocalUserPassword_pargs() throw() { +} + + +uint32_t ClientService_changeLocalUserPassword_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_changeLocalUserPassword_pargs"); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->principal))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("password", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary((*(this->password))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_changeLocalUserPassword_result::~ClientService_changeLocalUserPassword_result() throw() { +} + + +uint32_t ClientService_changeLocalUserPassword_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_changeLocalUserPassword_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_changeLocalUserPassword_result"); + + if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_changeLocalUserPassword_presult::~ClientService_changeLocalUserPassword_presult() throw() { +} + + +uint32_t ClientService_changeLocalUserPassword_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_authenticate_args::~ClientService_authenticate_args() throw() { +} + + +uint32_t ClientService_authenticate_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_authenticate_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_authenticate_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_authenticate_pargs::~ClientService_authenticate_pargs() throw() { +} + + +uint32_t ClientService_authenticate_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_authenticate_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_authenticate_result::~ClientService_authenticate_result() throw() { +} + + +uint32_t ClientService_authenticate_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_authenticate_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_authenticate_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_authenticate_presult::~ClientService_authenticate_presult() throw() { +} + + +uint32_t ClientService_authenticate_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_authenticateUser_args::~ClientService_authenticateUser_args() throw() { +} + + +uint32_t ClientService_authenticateUser_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->toAuth.read(iprot); + this->__isset.toAuth = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_authenticateUser_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_authenticateUser_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("toAuth", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->toAuth.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_authenticateUser_pargs::~ClientService_authenticateUser_pargs() throw() { +} + + +uint32_t ClientService_authenticateUser_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_authenticateUser_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("toAuth", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->toAuth)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_authenticateUser_result::~ClientService_authenticateUser_result() throw() { +} + + +uint32_t ClientService_authenticateUser_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_authenticateUser_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_authenticateUser_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_authenticateUser_presult::~ClientService_authenticateUser_presult() throw() { +} + + +uint32_t ClientService_authenticateUser_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_changeAuthorizations_args::~ClientService_changeAuthorizations_args() throw() { +} + + +uint32_t ClientService_changeAuthorizations_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal); + this->__isset.principal = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->authorizations.clear(); + uint32_t _size67; + ::apache::thrift::protocol::TType _etype70; + xfer += iprot->readListBegin(_etype70, _size67); + this->authorizations.resize(_size67); + uint32_t _i71; + for (_i71 = 0; _i71 < _size67; ++_i71) + { + xfer += iprot->readBinary(this->authorizations[_i71]); + } + xfer += iprot->readListEnd(); + } + this->__isset.authorizations = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_changeAuthorizations_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_changeAuthorizations_args"); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->principal); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("authorizations", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->authorizations.size())); + std::vector ::const_iterator _iter72; + for (_iter72 = this->authorizations.begin(); _iter72 != this->authorizations.end(); ++_iter72) + { + xfer += oprot->writeBinary((*_iter72)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_changeAuthorizations_pargs::~ClientService_changeAuthorizations_pargs() throw() { +} + + +uint32_t ClientService_changeAuthorizations_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_changeAuthorizations_pargs"); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->principal))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("authorizations", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->authorizations)).size())); + std::vector ::const_iterator _iter73; + for (_iter73 = (*(this->authorizations)).begin(); _iter73 != (*(this->authorizations)).end(); ++_iter73) + { + xfer += oprot->writeBinary((*_iter73)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_changeAuthorizations_result::~ClientService_changeAuthorizations_result() throw() { +} + + +uint32_t ClientService_changeAuthorizations_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_changeAuthorizations_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_changeAuthorizations_result"); + + if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_changeAuthorizations_presult::~ClientService_changeAuthorizations_presult() throw() { +} + + +uint32_t ClientService_changeAuthorizations_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_getUserAuthorizations_args::~ClientService_getUserAuthorizations_args() throw() { +} + + +uint32_t ClientService_getUserAuthorizations_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal); + this->__isset.principal = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_getUserAuthorizations_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_getUserAuthorizations_args"); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->principal); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_getUserAuthorizations_pargs::~ClientService_getUserAuthorizations_pargs() throw() { +} + + +uint32_t ClientService_getUserAuthorizations_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_getUserAuthorizations_pargs"); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->principal))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_getUserAuthorizations_result::~ClientService_getUserAuthorizations_result() throw() { +} + + +uint32_t ClientService_getUserAuthorizations_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size74; + ::apache::thrift::protocol::TType _etype77; + xfer += iprot->readListBegin(_etype77, _size74); + this->success.resize(_size74); + uint32_t _i78; + for (_i78 = 0; _i78 < _size74; ++_i78) + { + xfer += iprot->readBinary(this->success[_i78]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_getUserAuthorizations_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_getUserAuthorizations_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::vector ::const_iterator _iter79; + for (_iter79 = this->success.begin(); _iter79 != this->success.end(); ++_iter79) + { + xfer += oprot->writeBinary((*_iter79)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_getUserAuthorizations_presult::~ClientService_getUserAuthorizations_presult() throw() { +} + + +uint32_t ClientService_getUserAuthorizations_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size80; + ::apache::thrift::protocol::TType _etype83; + xfer += iprot->readListBegin(_etype83, _size80); + (*(this->success)).resize(_size80); + uint32_t _i84; + for (_i84 = 0; _i84 < _size80; ++_i84) + { + xfer += iprot->readBinary((*(this->success))[_i84]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_hasSystemPermission_args::~ClientService_hasSystemPermission_args() throw() { +} + + +uint32_t ClientService_hasSystemPermission_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal); + this->__isset.principal = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BYTE) { + xfer += iprot->readByte(this->sysPerm); + this->__isset.sysPerm = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_hasSystemPermission_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_hasSystemPermission_args"); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->principal); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("sysPerm", ::apache::thrift::protocol::T_BYTE, 3); + xfer += oprot->writeByte(this->sysPerm); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_hasSystemPermission_pargs::~ClientService_hasSystemPermission_pargs() throw() { +} + + +uint32_t ClientService_hasSystemPermission_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_hasSystemPermission_pargs"); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->principal))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("sysPerm", ::apache::thrift::protocol::T_BYTE, 3); + xfer += oprot->writeByte((*(this->sysPerm))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_hasSystemPermission_result::~ClientService_hasSystemPermission_result() throw() { +} + + +uint32_t ClientService_hasSystemPermission_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_hasSystemPermission_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_hasSystemPermission_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_hasSystemPermission_presult::~ClientService_hasSystemPermission_presult() throw() { +} + + +uint32_t ClientService_hasSystemPermission_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_hasTablePermission_args::~ClientService_hasTablePermission_args() throw() { +} + + +uint32_t ClientService_hasTablePermission_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal); + this->__isset.principal = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BYTE) { + xfer += iprot->readByte(this->tblPerm); + this->__isset.tblPerm = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_hasTablePermission_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_hasTablePermission_args"); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->principal); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->tableName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tblPerm", ::apache::thrift::protocol::T_BYTE, 4); + xfer += oprot->writeByte(this->tblPerm); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 6); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_hasTablePermission_pargs::~ClientService_hasTablePermission_pargs() throw() { +} + + +uint32_t ClientService_hasTablePermission_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_hasTablePermission_pargs"); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->principal))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tblPerm", ::apache::thrift::protocol::T_BYTE, 4); + xfer += oprot->writeByte((*(this->tblPerm))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 6); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_hasTablePermission_result::~ClientService_hasTablePermission_result() throw() { +} + + +uint32_t ClientService_hasTablePermission_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_hasTablePermission_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_hasTablePermission_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tope) { + xfer += oprot->writeFieldBegin("tope", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tope.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_hasTablePermission_presult::~ClientService_hasTablePermission_presult() throw() { +} + + +uint32_t ClientService_hasTablePermission_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_hasNamespacePermission_args::~ClientService_hasNamespacePermission_args() throw() { +} + + +uint32_t ClientService_hasNamespacePermission_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal); + this->__isset.principal = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->ns); + this->__isset.ns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_BYTE) { + xfer += iprot->readByte(this->tblNspcPerm); + this->__isset.tblNspcPerm = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_hasNamespacePermission_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_hasNamespacePermission_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->principal); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ns", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->ns); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tblNspcPerm", ::apache::thrift::protocol::T_BYTE, 5); + xfer += oprot->writeByte(this->tblNspcPerm); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_hasNamespacePermission_pargs::~ClientService_hasNamespacePermission_pargs() throw() { +} + + +uint32_t ClientService_hasNamespacePermission_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_hasNamespacePermission_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->principal))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ns", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->ns))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tblNspcPerm", ::apache::thrift::protocol::T_BYTE, 5); + xfer += oprot->writeByte((*(this->tblNspcPerm))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_hasNamespacePermission_result::~ClientService_hasNamespacePermission_result() throw() { +} + + +uint32_t ClientService_hasNamespacePermission_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_hasNamespacePermission_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_hasNamespacePermission_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tope) { + xfer += oprot->writeFieldBegin("tope", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tope.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_hasNamespacePermission_presult::~ClientService_hasNamespacePermission_presult() throw() { +} + + +uint32_t ClientService_hasNamespacePermission_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_grantSystemPermission_args::~ClientService_grantSystemPermission_args() throw() { +} + + +uint32_t ClientService_grantSystemPermission_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal); + this->__isset.principal = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BYTE) { + xfer += iprot->readByte(this->permission); + this->__isset.permission = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_grantSystemPermission_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_grantSystemPermission_args"); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->principal); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("permission", ::apache::thrift::protocol::T_BYTE, 3); + xfer += oprot->writeByte(this->permission); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_grantSystemPermission_pargs::~ClientService_grantSystemPermission_pargs() throw() { +} + + +uint32_t ClientService_grantSystemPermission_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_grantSystemPermission_pargs"); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->principal))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("permission", ::apache::thrift::protocol::T_BYTE, 3); + xfer += oprot->writeByte((*(this->permission))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_grantSystemPermission_result::~ClientService_grantSystemPermission_result() throw() { +} + + +uint32_t ClientService_grantSystemPermission_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_grantSystemPermission_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_grantSystemPermission_result"); + + if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_grantSystemPermission_presult::~ClientService_grantSystemPermission_presult() throw() { +} + + +uint32_t ClientService_grantSystemPermission_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_revokeSystemPermission_args::~ClientService_revokeSystemPermission_args() throw() { +} + + +uint32_t ClientService_revokeSystemPermission_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal); + this->__isset.principal = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BYTE) { + xfer += iprot->readByte(this->permission); + this->__isset.permission = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_revokeSystemPermission_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_revokeSystemPermission_args"); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->principal); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("permission", ::apache::thrift::protocol::T_BYTE, 3); + xfer += oprot->writeByte(this->permission); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_revokeSystemPermission_pargs::~ClientService_revokeSystemPermission_pargs() throw() { +} + + +uint32_t ClientService_revokeSystemPermission_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_revokeSystemPermission_pargs"); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->principal))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("permission", ::apache::thrift::protocol::T_BYTE, 3); + xfer += oprot->writeByte((*(this->permission))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_revokeSystemPermission_result::~ClientService_revokeSystemPermission_result() throw() { +} + + +uint32_t ClientService_revokeSystemPermission_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_revokeSystemPermission_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_revokeSystemPermission_result"); + + if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_revokeSystemPermission_presult::~ClientService_revokeSystemPermission_presult() throw() { +} + + +uint32_t ClientService_revokeSystemPermission_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_grantTablePermission_args::~ClientService_grantTablePermission_args() throw() { +} + + +uint32_t ClientService_grantTablePermission_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal); + this->__isset.principal = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BYTE) { + xfer += iprot->readByte(this->permission); + this->__isset.permission = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_grantTablePermission_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_grantTablePermission_args"); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->principal); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->tableName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("permission", ::apache::thrift::protocol::T_BYTE, 4); + xfer += oprot->writeByte(this->permission); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 6); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_grantTablePermission_pargs::~ClientService_grantTablePermission_pargs() throw() { +} + + +uint32_t ClientService_grantTablePermission_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_grantTablePermission_pargs"); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->principal))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("permission", ::apache::thrift::protocol::T_BYTE, 4); + xfer += oprot->writeByte((*(this->permission))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 6); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_grantTablePermission_result::~ClientService_grantTablePermission_result() throw() { +} + + +uint32_t ClientService_grantTablePermission_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_grantTablePermission_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_grantTablePermission_result"); + + if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tope) { + xfer += oprot->writeFieldBegin("tope", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tope.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_grantTablePermission_presult::~ClientService_grantTablePermission_presult() throw() { +} + + +uint32_t ClientService_grantTablePermission_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_revokeTablePermission_args::~ClientService_revokeTablePermission_args() throw() { +} + + +uint32_t ClientService_revokeTablePermission_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal); + this->__isset.principal = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BYTE) { + xfer += iprot->readByte(this->permission); + this->__isset.permission = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_revokeTablePermission_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_revokeTablePermission_args"); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->principal); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->tableName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("permission", ::apache::thrift::protocol::T_BYTE, 4); + xfer += oprot->writeByte(this->permission); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 6); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_revokeTablePermission_pargs::~ClientService_revokeTablePermission_pargs() throw() { +} + + +uint32_t ClientService_revokeTablePermission_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_revokeTablePermission_pargs"); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->principal))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("permission", ::apache::thrift::protocol::T_BYTE, 4); + xfer += oprot->writeByte((*(this->permission))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 6); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_revokeTablePermission_result::~ClientService_revokeTablePermission_result() throw() { +} + + +uint32_t ClientService_revokeTablePermission_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_revokeTablePermission_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_revokeTablePermission_result"); + + if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tope) { + xfer += oprot->writeFieldBegin("tope", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tope.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_revokeTablePermission_presult::~ClientService_revokeTablePermission_presult() throw() { +} + + +uint32_t ClientService_revokeTablePermission_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_grantNamespacePermission_args::~ClientService_grantNamespacePermission_args() throw() { +} + + +uint32_t ClientService_grantNamespacePermission_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal); + this->__isset.principal = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->ns); + this->__isset.ns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_BYTE) { + xfer += iprot->readByte(this->permission); + this->__isset.permission = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_grantNamespacePermission_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_grantNamespacePermission_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->principal); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ns", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->ns); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("permission", ::apache::thrift::protocol::T_BYTE, 5); + xfer += oprot->writeByte(this->permission); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_grantNamespacePermission_pargs::~ClientService_grantNamespacePermission_pargs() throw() { +} + + +uint32_t ClientService_grantNamespacePermission_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_grantNamespacePermission_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->principal))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ns", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->ns))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("permission", ::apache::thrift::protocol::T_BYTE, 5); + xfer += oprot->writeByte((*(this->permission))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_grantNamespacePermission_result::~ClientService_grantNamespacePermission_result() throw() { +} + + +uint32_t ClientService_grantNamespacePermission_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_grantNamespacePermission_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_grantNamespacePermission_result"); + + if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tope) { + xfer += oprot->writeFieldBegin("tope", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tope.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_grantNamespacePermission_presult::~ClientService_grantNamespacePermission_presult() throw() { +} + + +uint32_t ClientService_grantNamespacePermission_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_revokeNamespacePermission_args::~ClientService_revokeNamespacePermission_args() throw() { +} + + +uint32_t ClientService_revokeNamespacePermission_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal); + this->__isset.principal = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->ns); + this->__isset.ns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_BYTE) { + xfer += iprot->readByte(this->permission); + this->__isset.permission = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_revokeNamespacePermission_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_revokeNamespacePermission_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->principal); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ns", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->ns); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("permission", ::apache::thrift::protocol::T_BYTE, 5); + xfer += oprot->writeByte(this->permission); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_revokeNamespacePermission_pargs::~ClientService_revokeNamespacePermission_pargs() throw() { +} + + +uint32_t ClientService_revokeNamespacePermission_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_revokeNamespacePermission_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->principal))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ns", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->ns))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("permission", ::apache::thrift::protocol::T_BYTE, 5); + xfer += oprot->writeByte((*(this->permission))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_revokeNamespacePermission_result::~ClientService_revokeNamespacePermission_result() throw() { +} + + +uint32_t ClientService_revokeNamespacePermission_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_revokeNamespacePermission_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_revokeNamespacePermission_result"); + + if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tope) { + xfer += oprot->writeFieldBegin("tope", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tope.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_revokeNamespacePermission_presult::~ClientService_revokeNamespacePermission_presult() throw() { +} + + +uint32_t ClientService_revokeNamespacePermission_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_getConfiguration_args::~ClientService_getConfiguration_args() throw() { +} + + +uint32_t ClientService_getConfiguration_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast85; + xfer += iprot->readI32(ecast85); + this->type = (ConfigurationType::type)ecast85; + this->__isset.type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_getConfiguration_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_getConfiguration_args"); + + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((int32_t)this->type); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_getConfiguration_pargs::~ClientService_getConfiguration_pargs() throw() { +} + + +uint32_t ClientService_getConfiguration_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_getConfiguration_pargs"); + + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((int32_t)(*(this->type))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_getConfiguration_result::~ClientService_getConfiguration_result() throw() { +} + + +uint32_t ClientService_getConfiguration_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->success.clear(); + uint32_t _size86; + ::apache::thrift::protocol::TType _ktype87; + ::apache::thrift::protocol::TType _vtype88; + xfer += iprot->readMapBegin(_ktype87, _vtype88, _size86); + uint32_t _i90; + for (_i90 = 0; _i90 < _size86; ++_i90) + { + std::string _key91; + xfer += iprot->readString(_key91); + std::string& _val92 = this->success[_key91]; + xfer += iprot->readString(_val92); + } + xfer += iprot->readMapEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_getConfiguration_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_getConfiguration_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::map ::const_iterator _iter93; + for (_iter93 = this->success.begin(); _iter93 != this->success.end(); ++_iter93) + { + xfer += oprot->writeString(_iter93->first); + xfer += oprot->writeString(_iter93->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_getConfiguration_presult::~ClientService_getConfiguration_presult() throw() { +} + + +uint32_t ClientService_getConfiguration_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + (*(this->success)).clear(); + uint32_t _size94; + ::apache::thrift::protocol::TType _ktype95; + ::apache::thrift::protocol::TType _vtype96; + xfer += iprot->readMapBegin(_ktype95, _vtype96, _size94); + uint32_t _i98; + for (_i98 = 0; _i98 < _size94; ++_i98) + { + std::string _key99; + xfer += iprot->readString(_key99); + std::string& _val100 = (*(this->success))[_key99]; + xfer += iprot->readString(_val100); + } + xfer += iprot->readMapEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_getTableConfiguration_args::~ClientService_getTableConfiguration_args() throw() { +} + + +uint32_t ClientService_getTableConfiguration_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_getTableConfiguration_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_getTableConfiguration_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tableName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_getTableConfiguration_pargs::~ClientService_getTableConfiguration_pargs() throw() { +} + + +uint32_t ClientService_getTableConfiguration_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_getTableConfiguration_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_getTableConfiguration_result::~ClientService_getTableConfiguration_result() throw() { +} + + +uint32_t ClientService_getTableConfiguration_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->success.clear(); + uint32_t _size101; + ::apache::thrift::protocol::TType _ktype102; + ::apache::thrift::protocol::TType _vtype103; + xfer += iprot->readMapBegin(_ktype102, _vtype103, _size101); + uint32_t _i105; + for (_i105 = 0; _i105 < _size101; ++_i105) + { + std::string _key106; + xfer += iprot->readString(_key106); + std::string& _val107 = this->success[_key106]; + xfer += iprot->readString(_val107); + } + xfer += iprot->readMapEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_getTableConfiguration_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_getTableConfiguration_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::map ::const_iterator _iter108; + for (_iter108 = this->success.begin(); _iter108 != this->success.end(); ++_iter108) + { + xfer += oprot->writeString(_iter108->first); + xfer += oprot->writeString(_iter108->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tope) { + xfer += oprot->writeFieldBegin("tope", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tope.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_getTableConfiguration_presult::~ClientService_getTableConfiguration_presult() throw() { +} + + +uint32_t ClientService_getTableConfiguration_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + (*(this->success)).clear(); + uint32_t _size109; + ::apache::thrift::protocol::TType _ktype110; + ::apache::thrift::protocol::TType _vtype111; + xfer += iprot->readMapBegin(_ktype110, _vtype111, _size109); + uint32_t _i113; + for (_i113 = 0; _i113 < _size109; ++_i113) + { + std::string _key114; + xfer += iprot->readString(_key114); + std::string& _val115 = (*(this->success))[_key114]; + xfer += iprot->readString(_val115); + } + xfer += iprot->readMapEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_getNamespaceConfiguration_args::~ClientService_getNamespaceConfiguration_args() throw() { +} + + +uint32_t ClientService_getNamespaceConfiguration_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->ns); + this->__isset.ns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_getNamespaceConfiguration_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_getNamespaceConfiguration_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ns", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->ns); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_getNamespaceConfiguration_pargs::~ClientService_getNamespaceConfiguration_pargs() throw() { +} + + +uint32_t ClientService_getNamespaceConfiguration_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_getNamespaceConfiguration_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ns", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->ns))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_getNamespaceConfiguration_result::~ClientService_getNamespaceConfiguration_result() throw() { +} + + +uint32_t ClientService_getNamespaceConfiguration_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->success.clear(); + uint32_t _size116; + ::apache::thrift::protocol::TType _ktype117; + ::apache::thrift::protocol::TType _vtype118; + xfer += iprot->readMapBegin(_ktype117, _vtype118, _size116); + uint32_t _i120; + for (_i120 = 0; _i120 < _size116; ++_i120) + { + std::string _key121; + xfer += iprot->readString(_key121); + std::string& _val122 = this->success[_key121]; + xfer += iprot->readString(_val122); + } + xfer += iprot->readMapEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_getNamespaceConfiguration_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_getNamespaceConfiguration_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::map ::const_iterator _iter123; + for (_iter123 = this->success.begin(); _iter123 != this->success.end(); ++_iter123) + { + xfer += oprot->writeString(_iter123->first); + xfer += oprot->writeString(_iter123->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tope) { + xfer += oprot->writeFieldBegin("tope", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tope.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_getNamespaceConfiguration_presult::~ClientService_getNamespaceConfiguration_presult() throw() { +} + + +uint32_t ClientService_getNamespaceConfiguration_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + (*(this->success)).clear(); + uint32_t _size124; + ::apache::thrift::protocol::TType _ktype125; + ::apache::thrift::protocol::TType _vtype126; + xfer += iprot->readMapBegin(_ktype125, _vtype126, _size124); + uint32_t _i128; + for (_i128 = 0; _i128 < _size124; ++_i128) + { + std::string _key129; + xfer += iprot->readString(_key129); + std::string& _val130 = (*(this->success))[_key129]; + xfer += iprot->readString(_val130); + } + xfer += iprot->readMapEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_checkClass_args::~ClientService_checkClass_args() throw() { +} + + +uint32_t ClientService_checkClass_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->className); + this->__isset.className = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->interfaceMatch); + this->__isset.interfaceMatch = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_checkClass_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_checkClass_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("className", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->className); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("interfaceMatch", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->interfaceMatch); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_checkClass_pargs::~ClientService_checkClass_pargs() throw() { +} + + +uint32_t ClientService_checkClass_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_checkClass_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("className", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->className))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("interfaceMatch", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->interfaceMatch))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_checkClass_result::~ClientService_checkClass_result() throw() { +} + + +uint32_t ClientService_checkClass_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_checkClass_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_checkClass_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_checkClass_presult::~ClientService_checkClass_presult() throw() { +} + + +uint32_t ClientService_checkClass_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_checkTableClass_args::~ClientService_checkTableClass_args() throw() { +} + + +uint32_t ClientService_checkTableClass_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableId); + this->__isset.tableId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->className); + this->__isset.className = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->interfaceMatch); + this->__isset.interfaceMatch = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_checkTableClass_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_checkTableClass_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableId", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tableId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("className", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->className); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("interfaceMatch", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->interfaceMatch); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_checkTableClass_pargs::~ClientService_checkTableClass_pargs() throw() { +} + + +uint32_t ClientService_checkTableClass_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_checkTableClass_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableId", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tableId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("className", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->className))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("interfaceMatch", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->interfaceMatch))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_checkTableClass_result::~ClientService_checkTableClass_result() throw() { +} + + +uint32_t ClientService_checkTableClass_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_checkTableClass_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_checkTableClass_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tope) { + xfer += oprot->writeFieldBegin("tope", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tope.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_checkTableClass_presult::~ClientService_checkTableClass_presult() throw() { +} + + +uint32_t ClientService_checkTableClass_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ClientService_checkNamespaceClass_args::~ClientService_checkNamespaceClass_args() throw() { +} + + +uint32_t ClientService_checkNamespaceClass_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->namespaceId); + this->__isset.namespaceId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->className); + this->__isset.className = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->interfaceMatch); + this->__isset.interfaceMatch = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_checkNamespaceClass_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_checkNamespaceClass_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("namespaceId", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->namespaceId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("className", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->className); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("interfaceMatch", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->interfaceMatch); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_checkNamespaceClass_pargs::~ClientService_checkNamespaceClass_pargs() throw() { +} + + +uint32_t ClientService_checkNamespaceClass_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientService_checkNamespaceClass_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("namespaceId", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->namespaceId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("className", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->className))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("interfaceMatch", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString((*(this->interfaceMatch))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_checkNamespaceClass_result::~ClientService_checkNamespaceClass_result() throw() { +} + + +uint32_t ClientService_checkNamespaceClass_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClientService_checkNamespaceClass_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ClientService_checkNamespaceClass_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tope) { + xfer += oprot->writeFieldBegin("tope", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tope.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ClientService_checkNamespaceClass_presult::~ClientService_checkNamespaceClass_presult() throw() { +} + + +uint32_t ClientService_checkNamespaceClass_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +void ClientServiceClient::getRootTabletLocation(std::string& _return) +{ + send_getRootTabletLocation(); + recv_getRootTabletLocation(_return); +} + +void ClientServiceClient::send_getRootTabletLocation() +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getRootTabletLocation", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_getRootTabletLocation_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ClientServiceClient::recv_getRootTabletLocation(std::string& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getRootTabletLocation") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ClientService_getRootTabletLocation_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getRootTabletLocation failed: unknown result"); +} + +void ClientServiceClient::getInstanceId(std::string& _return) +{ + send_getInstanceId(); + recv_getInstanceId(_return); +} + +void ClientServiceClient::send_getInstanceId() +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getInstanceId", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_getInstanceId_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ClientServiceClient::recv_getInstanceId(std::string& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getInstanceId") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ClientService_getInstanceId_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getInstanceId failed: unknown result"); +} + +void ClientServiceClient::getZooKeepers(std::string& _return) +{ + send_getZooKeepers(); + recv_getZooKeepers(_return); +} + +void ClientServiceClient::send_getZooKeepers() +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getZooKeepers", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_getZooKeepers_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ClientServiceClient::recv_getZooKeepers(std::string& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getZooKeepers") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ClientService_getZooKeepers_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getZooKeepers failed: unknown result"); +} + +void ClientServiceClient::bulkImportFiles(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const std::string& tableId, const std::vector & files, const std::string& errorDir, const bool setTime) +{ + send_bulkImportFiles(tinfo, credentials, tid, tableId, files, errorDir, setTime); + recv_bulkImportFiles(_return); +} + +void ClientServiceClient::send_bulkImportFiles(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const std::string& tableId, const std::vector & files, const std::string& errorDir, const bool setTime) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("bulkImportFiles", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_bulkImportFiles_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.tid = &tid; + args.tableId = &tableId; + args.files = &files; + args.errorDir = &errorDir; + args.setTime = &setTime; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ClientServiceClient::recv_bulkImportFiles(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("bulkImportFiles") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ClientService_bulkImportFiles_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tope) { + throw result.tope; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "bulkImportFiles failed: unknown result"); +} + +bool ClientServiceClient::isActive(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const int64_t tid) +{ + send_isActive(tinfo, tid); + return recv_isActive(); +} + +void ClientServiceClient::send_isActive(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const int64_t tid) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("isActive", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_isActive_pargs args; + args.tinfo = &tinfo; + args.tid = &tid; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ClientServiceClient::recv_isActive() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("isActive") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ClientService_isActive_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "isActive failed: unknown result"); +} + +void ClientServiceClient::ping(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + send_ping(credentials); + recv_ping(); +} + +void ClientServiceClient::send_ping(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("ping", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_ping_pargs args; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ClientServiceClient::recv_ping() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("ping") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ClientService_ping_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + throw result.sec; + } + return; +} + +void ClientServiceClient::getDiskUsage(std::vector & _return, const std::set & tables, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + send_getDiskUsage(tables, credentials); + recv_getDiskUsage(_return); +} + +void ClientServiceClient::send_getDiskUsage(const std::set & tables, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getDiskUsage", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_getDiskUsage_pargs args; + args.tables = &tables; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ClientServiceClient::recv_getDiskUsage(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getDiskUsage") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ClientService_getDiskUsage_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.toe) { + throw result.toe; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getDiskUsage failed: unknown result"); +} + +void ClientServiceClient::listLocalUsers(std::set & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + send_listLocalUsers(tinfo, credentials); + recv_listLocalUsers(_return); +} + +void ClientServiceClient::send_listLocalUsers(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("listLocalUsers", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_listLocalUsers_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ClientServiceClient::recv_listLocalUsers(std::set & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("listLocalUsers") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ClientService_listLocalUsers_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.sec) { + throw result.sec; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "listLocalUsers failed: unknown result"); +} + +void ClientServiceClient::createLocalUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& password) +{ + send_createLocalUser(tinfo, credentials, principal, password); + recv_createLocalUser(); +} + +void ClientServiceClient::send_createLocalUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& password) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("createLocalUser", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_createLocalUser_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.password = &password; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ClientServiceClient::recv_createLocalUser() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("createLocalUser") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ClientService_createLocalUser_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + throw result.sec; + } + return; +} + +void ClientServiceClient::dropLocalUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal) +{ + send_dropLocalUser(tinfo, credentials, principal); + recv_dropLocalUser(); +} + +void ClientServiceClient::send_dropLocalUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("dropLocalUser", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_dropLocalUser_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ClientServiceClient::recv_dropLocalUser() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("dropLocalUser") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ClientService_dropLocalUser_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + throw result.sec; + } + return; +} + +void ClientServiceClient::changeLocalUserPassword(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& password) +{ + send_changeLocalUserPassword(tinfo, credentials, principal, password); + recv_changeLocalUserPassword(); +} + +void ClientServiceClient::send_changeLocalUserPassword(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& password) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("changeLocalUserPassword", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_changeLocalUserPassword_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.password = &password; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ClientServiceClient::recv_changeLocalUserPassword() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("changeLocalUserPassword") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ClientService_changeLocalUserPassword_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + throw result.sec; + } + return; +} + +bool ClientServiceClient::authenticate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + send_authenticate(tinfo, credentials); + return recv_authenticate(); +} + +void ClientServiceClient::send_authenticate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("authenticate", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_authenticate_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ClientServiceClient::recv_authenticate() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("authenticate") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ClientService_authenticate_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.sec) { + throw result.sec; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "authenticate failed: unknown result"); +} + +bool ClientServiceClient::authenticateUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& toAuth) +{ + send_authenticateUser(tinfo, credentials, toAuth); + return recv_authenticateUser(); +} + +void ClientServiceClient::send_authenticateUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& toAuth) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("authenticateUser", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_authenticateUser_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.toAuth = &toAuth; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ClientServiceClient::recv_authenticateUser() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("authenticateUser") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ClientService_authenticateUser_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.sec) { + throw result.sec; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "authenticateUser failed: unknown result"); +} + +void ClientServiceClient::changeAuthorizations(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::vector & authorizations) +{ + send_changeAuthorizations(tinfo, credentials, principal, authorizations); + recv_changeAuthorizations(); +} + +void ClientServiceClient::send_changeAuthorizations(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::vector & authorizations) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("changeAuthorizations", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_changeAuthorizations_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.authorizations = &authorizations; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ClientServiceClient::recv_changeAuthorizations() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("changeAuthorizations") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ClientService_changeAuthorizations_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + throw result.sec; + } + return; +} + +void ClientServiceClient::getUserAuthorizations(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal) +{ + send_getUserAuthorizations(tinfo, credentials, principal); + recv_getUserAuthorizations(_return); +} + +void ClientServiceClient::send_getUserAuthorizations(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getUserAuthorizations", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_getUserAuthorizations_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ClientServiceClient::recv_getUserAuthorizations(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getUserAuthorizations") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ClientService_getUserAuthorizations_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.sec) { + throw result.sec; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getUserAuthorizations failed: unknown result"); +} + +bool ClientServiceClient::hasSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t sysPerm) +{ + send_hasSystemPermission(tinfo, credentials, principal, sysPerm); + return recv_hasSystemPermission(); +} + +void ClientServiceClient::send_hasSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t sysPerm) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("hasSystemPermission", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_hasSystemPermission_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.sysPerm = &sysPerm; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ClientServiceClient::recv_hasSystemPermission() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("hasSystemPermission") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ClientService_hasSystemPermission_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.sec) { + throw result.sec; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "hasSystemPermission failed: unknown result"); +} + +bool ClientServiceClient::hasTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t tblPerm) +{ + send_hasTablePermission(tinfo, credentials, principal, tableName, tblPerm); + return recv_hasTablePermission(); +} + +void ClientServiceClient::send_hasTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t tblPerm) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("hasTablePermission", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_hasTablePermission_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.tableName = &tableName; + args.tblPerm = &tblPerm; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ClientServiceClient::recv_hasTablePermission() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("hasTablePermission") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ClientService_hasTablePermission_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tope) { + throw result.tope; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "hasTablePermission failed: unknown result"); +} + +bool ClientServiceClient::hasNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t tblNspcPerm) +{ + send_hasNamespacePermission(tinfo, credentials, principal, ns, tblNspcPerm); + return recv_hasNamespacePermission(); +} + +void ClientServiceClient::send_hasNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t tblNspcPerm) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("hasNamespacePermission", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_hasNamespacePermission_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.ns = &ns; + args.tblNspcPerm = &tblNspcPerm; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ClientServiceClient::recv_hasNamespacePermission() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("hasNamespacePermission") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ClientService_hasNamespacePermission_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tope) { + throw result.tope; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "hasNamespacePermission failed: unknown result"); +} + +void ClientServiceClient::grantSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t permission) +{ + send_grantSystemPermission(tinfo, credentials, principal, permission); + recv_grantSystemPermission(); +} + +void ClientServiceClient::send_grantSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t permission) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("grantSystemPermission", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_grantSystemPermission_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.permission = &permission; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ClientServiceClient::recv_grantSystemPermission() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("grantSystemPermission") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ClientService_grantSystemPermission_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + throw result.sec; + } + return; +} + +void ClientServiceClient::revokeSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t permission) +{ + send_revokeSystemPermission(tinfo, credentials, principal, permission); + recv_revokeSystemPermission(); +} + +void ClientServiceClient::send_revokeSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t permission) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("revokeSystemPermission", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_revokeSystemPermission_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.permission = &permission; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ClientServiceClient::recv_revokeSystemPermission() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("revokeSystemPermission") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ClientService_revokeSystemPermission_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + throw result.sec; + } + return; +} + +void ClientServiceClient::grantTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t permission) +{ + send_grantTablePermission(tinfo, credentials, principal, tableName, permission); + recv_grantTablePermission(); +} + +void ClientServiceClient::send_grantTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t permission) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("grantTablePermission", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_grantTablePermission_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.tableName = &tableName; + args.permission = &permission; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ClientServiceClient::recv_grantTablePermission() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("grantTablePermission") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ClientService_grantTablePermission_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tope) { + throw result.tope; + } + return; +} + +void ClientServiceClient::revokeTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t permission) +{ + send_revokeTablePermission(tinfo, credentials, principal, tableName, permission); + recv_revokeTablePermission(); +} + +void ClientServiceClient::send_revokeTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t permission) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("revokeTablePermission", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_revokeTablePermission_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.tableName = &tableName; + args.permission = &permission; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ClientServiceClient::recv_revokeTablePermission() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("revokeTablePermission") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ClientService_revokeTablePermission_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tope) { + throw result.tope; + } + return; +} + +void ClientServiceClient::grantNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t permission) +{ + send_grantNamespacePermission(tinfo, credentials, principal, ns, permission); + recv_grantNamespacePermission(); +} + +void ClientServiceClient::send_grantNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t permission) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("grantNamespacePermission", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_grantNamespacePermission_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.ns = &ns; + args.permission = &permission; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ClientServiceClient::recv_grantNamespacePermission() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("grantNamespacePermission") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ClientService_grantNamespacePermission_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tope) { + throw result.tope; + } + return; +} + +void ClientServiceClient::revokeNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t permission) +{ + send_revokeNamespacePermission(tinfo, credentials, principal, ns, permission); + recv_revokeNamespacePermission(); +} + +void ClientServiceClient::send_revokeNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t permission) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("revokeNamespacePermission", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_revokeNamespacePermission_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.ns = &ns; + args.permission = &permission; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ClientServiceClient::recv_revokeNamespacePermission() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("revokeNamespacePermission") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ClientService_revokeNamespacePermission_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tope) { + throw result.tope; + } + return; +} + +void ClientServiceClient::getConfiguration(std::map & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ConfigurationType::type type) +{ + send_getConfiguration(tinfo, credentials, type); + recv_getConfiguration(_return); +} + +void ClientServiceClient::send_getConfiguration(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ConfigurationType::type type) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getConfiguration", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_getConfiguration_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.type = &type; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ClientServiceClient::recv_getConfiguration(std::map & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getConfiguration") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ClientService_getConfiguration_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getConfiguration failed: unknown result"); +} + +void ClientServiceClient::getTableConfiguration(std::map & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName) +{ + send_getTableConfiguration(tinfo, credentials, tableName); + recv_getTableConfiguration(_return); +} + +void ClientServiceClient::send_getTableConfiguration(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getTableConfiguration", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_getTableConfiguration_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.tableName = &tableName; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ClientServiceClient::recv_getTableConfiguration(std::map & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getTableConfiguration") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ClientService_getTableConfiguration_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.tope) { + throw result.tope; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getTableConfiguration failed: unknown result"); +} + +void ClientServiceClient::getNamespaceConfiguration(std::map & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns) +{ + send_getNamespaceConfiguration(tinfo, credentials, ns); + recv_getNamespaceConfiguration(_return); +} + +void ClientServiceClient::send_getNamespaceConfiguration(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getNamespaceConfiguration", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_getNamespaceConfiguration_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.ns = &ns; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ClientServiceClient::recv_getNamespaceConfiguration(std::map & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getNamespaceConfiguration") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ClientService_getNamespaceConfiguration_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.tope) { + throw result.tope; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getNamespaceConfiguration failed: unknown result"); +} + +bool ClientServiceClient::checkClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& className, const std::string& interfaceMatch) +{ + send_checkClass(tinfo, credentials, className, interfaceMatch); + return recv_checkClass(); +} + +void ClientServiceClient::send_checkClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& className, const std::string& interfaceMatch) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("checkClass", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_checkClass_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.className = &className; + args.interfaceMatch = &interfaceMatch; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ClientServiceClient::recv_checkClass() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("checkClass") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ClientService_checkClass_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "checkClass failed: unknown result"); +} + +bool ClientServiceClient::checkTableClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableId, const std::string& className, const std::string& interfaceMatch) +{ + send_checkTableClass(tinfo, credentials, tableId, className, interfaceMatch); + return recv_checkTableClass(); +} + +void ClientServiceClient::send_checkTableClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableId, const std::string& className, const std::string& interfaceMatch) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("checkTableClass", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_checkTableClass_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.tableId = &tableId; + args.className = &className; + args.interfaceMatch = &interfaceMatch; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ClientServiceClient::recv_checkTableClass() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("checkTableClass") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ClientService_checkTableClass_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tope) { + throw result.tope; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "checkTableClass failed: unknown result"); +} + +bool ClientServiceClient::checkNamespaceClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& namespaceId, const std::string& className, const std::string& interfaceMatch) +{ + send_checkNamespaceClass(tinfo, credentials, namespaceId, className, interfaceMatch); + return recv_checkNamespaceClass(); +} + +void ClientServiceClient::send_checkNamespaceClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& namespaceId, const std::string& className, const std::string& interfaceMatch) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("checkNamespaceClass", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_checkNamespaceClass_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.namespaceId = &namespaceId; + args.className = &className; + args.interfaceMatch = &interfaceMatch; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ClientServiceClient::recv_checkNamespaceClass() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("checkNamespaceClass") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ClientService_checkNamespaceClass_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tope) { + throw result.tope; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "checkNamespaceClass failed: unknown result"); +} + +bool ClientServiceProcessor::dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext) { + ProcessMap::iterator pfn; + pfn = processMap_.find(fname); + if (pfn == processMap_.end()) { + iprot->skip(::apache::thrift::protocol::T_STRUCT); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + ::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::UNKNOWN_METHOD, "Invalid method name: '"+fname+"'"); + oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return true; + } + (this->*(pfn->second))(seqid, iprot, oprot, callContext); + return true; +} + +void ClientServiceProcessor::process_getRootTabletLocation(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.getRootTabletLocation", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.getRootTabletLocation"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.getRootTabletLocation"); + } + + ClientService_getRootTabletLocation_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.getRootTabletLocation", bytes); + } + + ClientService_getRootTabletLocation_result result; + try { + iface_->getRootTabletLocation(result.success); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.getRootTabletLocation"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getRootTabletLocation", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.getRootTabletLocation"); + } + + oprot->writeMessageBegin("getRootTabletLocation", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.getRootTabletLocation", bytes); + } +} + +void ClientServiceProcessor::process_getInstanceId(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.getInstanceId", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.getInstanceId"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.getInstanceId"); + } + + ClientService_getInstanceId_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.getInstanceId", bytes); + } + + ClientService_getInstanceId_result result; + try { + iface_->getInstanceId(result.success); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.getInstanceId"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getInstanceId", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.getInstanceId"); + } + + oprot->writeMessageBegin("getInstanceId", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.getInstanceId", bytes); + } +} + +void ClientServiceProcessor::process_getZooKeepers(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.getZooKeepers", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.getZooKeepers"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.getZooKeepers"); + } + + ClientService_getZooKeepers_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.getZooKeepers", bytes); + } + + ClientService_getZooKeepers_result result; + try { + iface_->getZooKeepers(result.success); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.getZooKeepers"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getZooKeepers", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.getZooKeepers"); + } + + oprot->writeMessageBegin("getZooKeepers", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.getZooKeepers", bytes); + } +} + +void ClientServiceProcessor::process_bulkImportFiles(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.bulkImportFiles", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.bulkImportFiles"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.bulkImportFiles"); + } + + ClientService_bulkImportFiles_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.bulkImportFiles", bytes); + } + + ClientService_bulkImportFiles_result result; + try { + iface_->bulkImportFiles(result.success, args.tinfo, args.credentials, args.tid, args.tableId, args.files, args.errorDir, args.setTime); + result.__isset.success = true; + } catch (ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (ThriftTableOperationException &tope) { + result.tope = tope; + result.__isset.tope = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.bulkImportFiles"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("bulkImportFiles", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.bulkImportFiles"); + } + + oprot->writeMessageBegin("bulkImportFiles", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.bulkImportFiles", bytes); + } +} + +void ClientServiceProcessor::process_isActive(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.isActive", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.isActive"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.isActive"); + } + + ClientService_isActive_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.isActive", bytes); + } + + ClientService_isActive_result result; + try { + result.success = iface_->isActive(args.tinfo, args.tid); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.isActive"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("isActive", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.isActive"); + } + + oprot->writeMessageBegin("isActive", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.isActive", bytes); + } +} + +void ClientServiceProcessor::process_ping(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.ping", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.ping"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.ping"); + } + + ClientService_ping_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.ping", bytes); + } + + ClientService_ping_result result; + try { + iface_->ping(args.credentials); + } catch (ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.ping"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("ping", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.ping"); + } + + oprot->writeMessageBegin("ping", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.ping", bytes); + } +} + +void ClientServiceProcessor::process_getDiskUsage(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.getDiskUsage", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.getDiskUsage"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.getDiskUsage"); + } + + ClientService_getDiskUsage_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.getDiskUsage", bytes); + } + + ClientService_getDiskUsage_result result; + try { + iface_->getDiskUsage(result.success, args.tables, args.credentials); + result.__isset.success = true; + } catch (ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (ThriftTableOperationException &toe) { + result.toe = toe; + result.__isset.toe = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.getDiskUsage"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getDiskUsage", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.getDiskUsage"); + } + + oprot->writeMessageBegin("getDiskUsage", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.getDiskUsage", bytes); + } +} + +void ClientServiceProcessor::process_listLocalUsers(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.listLocalUsers", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.listLocalUsers"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.listLocalUsers"); + } + + ClientService_listLocalUsers_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.listLocalUsers", bytes); + } + + ClientService_listLocalUsers_result result; + try { + iface_->listLocalUsers(result.success, args.tinfo, args.credentials); + result.__isset.success = true; + } catch (ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.listLocalUsers"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("listLocalUsers", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.listLocalUsers"); + } + + oprot->writeMessageBegin("listLocalUsers", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.listLocalUsers", bytes); + } +} + +void ClientServiceProcessor::process_createLocalUser(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.createLocalUser", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.createLocalUser"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.createLocalUser"); + } + + ClientService_createLocalUser_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.createLocalUser", bytes); + } + + ClientService_createLocalUser_result result; + try { + iface_->createLocalUser(args.tinfo, args.credentials, args.principal, args.password); + } catch (ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.createLocalUser"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("createLocalUser", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.createLocalUser"); + } + + oprot->writeMessageBegin("createLocalUser", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.createLocalUser", bytes); + } +} + +void ClientServiceProcessor::process_dropLocalUser(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.dropLocalUser", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.dropLocalUser"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.dropLocalUser"); + } + + ClientService_dropLocalUser_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.dropLocalUser", bytes); + } + + ClientService_dropLocalUser_result result; + try { + iface_->dropLocalUser(args.tinfo, args.credentials, args.principal); + } catch (ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.dropLocalUser"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("dropLocalUser", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.dropLocalUser"); + } + + oprot->writeMessageBegin("dropLocalUser", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.dropLocalUser", bytes); + } +} + +void ClientServiceProcessor::process_changeLocalUserPassword(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.changeLocalUserPassword", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.changeLocalUserPassword"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.changeLocalUserPassword"); + } + + ClientService_changeLocalUserPassword_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.changeLocalUserPassword", bytes); + } + + ClientService_changeLocalUserPassword_result result; + try { + iface_->changeLocalUserPassword(args.tinfo, args.credentials, args.principal, args.password); + } catch (ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.changeLocalUserPassword"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("changeLocalUserPassword", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.changeLocalUserPassword"); + } + + oprot->writeMessageBegin("changeLocalUserPassword", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.changeLocalUserPassword", bytes); + } +} + +void ClientServiceProcessor::process_authenticate(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.authenticate", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.authenticate"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.authenticate"); + } + + ClientService_authenticate_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.authenticate", bytes); + } + + ClientService_authenticate_result result; + try { + result.success = iface_->authenticate(args.tinfo, args.credentials); + result.__isset.success = true; + } catch (ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.authenticate"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("authenticate", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.authenticate"); + } + + oprot->writeMessageBegin("authenticate", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.authenticate", bytes); + } +} + +void ClientServiceProcessor::process_authenticateUser(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.authenticateUser", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.authenticateUser"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.authenticateUser"); + } + + ClientService_authenticateUser_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.authenticateUser", bytes); + } + + ClientService_authenticateUser_result result; + try { + result.success = iface_->authenticateUser(args.tinfo, args.credentials, args.toAuth); + result.__isset.success = true; + } catch (ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.authenticateUser"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("authenticateUser", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.authenticateUser"); + } + + oprot->writeMessageBegin("authenticateUser", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.authenticateUser", bytes); + } +} + +void ClientServiceProcessor::process_changeAuthorizations(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.changeAuthorizations", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.changeAuthorizations"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.changeAuthorizations"); + } + + ClientService_changeAuthorizations_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.changeAuthorizations", bytes); + } + + ClientService_changeAuthorizations_result result; + try { + iface_->changeAuthorizations(args.tinfo, args.credentials, args.principal, args.authorizations); + } catch (ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.changeAuthorizations"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("changeAuthorizations", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.changeAuthorizations"); + } + + oprot->writeMessageBegin("changeAuthorizations", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.changeAuthorizations", bytes); + } +} + +void ClientServiceProcessor::process_getUserAuthorizations(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.getUserAuthorizations", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.getUserAuthorizations"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.getUserAuthorizations"); + } + + ClientService_getUserAuthorizations_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.getUserAuthorizations", bytes); + } + + ClientService_getUserAuthorizations_result result; + try { + iface_->getUserAuthorizations(result.success, args.tinfo, args.credentials, args.principal); + result.__isset.success = true; + } catch (ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.getUserAuthorizations"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getUserAuthorizations", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.getUserAuthorizations"); + } + + oprot->writeMessageBegin("getUserAuthorizations", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.getUserAuthorizations", bytes); + } +} + +void ClientServiceProcessor::process_hasSystemPermission(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.hasSystemPermission", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.hasSystemPermission"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.hasSystemPermission"); + } + + ClientService_hasSystemPermission_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.hasSystemPermission", bytes); + } + + ClientService_hasSystemPermission_result result; + try { + result.success = iface_->hasSystemPermission(args.tinfo, args.credentials, args.principal, args.sysPerm); + result.__isset.success = true; + } catch (ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.hasSystemPermission"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("hasSystemPermission", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.hasSystemPermission"); + } + + oprot->writeMessageBegin("hasSystemPermission", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.hasSystemPermission", bytes); + } +} + +void ClientServiceProcessor::process_hasTablePermission(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.hasTablePermission", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.hasTablePermission"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.hasTablePermission"); + } + + ClientService_hasTablePermission_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.hasTablePermission", bytes); + } + + ClientService_hasTablePermission_result result; + try { + result.success = iface_->hasTablePermission(args.tinfo, args.credentials, args.principal, args.tableName, args.tblPerm); + result.__isset.success = true; + } catch (ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (ThriftTableOperationException &tope) { + result.tope = tope; + result.__isset.tope = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.hasTablePermission"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("hasTablePermission", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.hasTablePermission"); + } + + oprot->writeMessageBegin("hasTablePermission", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.hasTablePermission", bytes); + } +} + +void ClientServiceProcessor::process_hasNamespacePermission(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.hasNamespacePermission", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.hasNamespacePermission"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.hasNamespacePermission"); + } + + ClientService_hasNamespacePermission_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.hasNamespacePermission", bytes); + } + + ClientService_hasNamespacePermission_result result; + try { + result.success = iface_->hasNamespacePermission(args.tinfo, args.credentials, args.principal, args.ns, args.tblNspcPerm); + result.__isset.success = true; + } catch (ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (ThriftTableOperationException &tope) { + result.tope = tope; + result.__isset.tope = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.hasNamespacePermission"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("hasNamespacePermission", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.hasNamespacePermission"); + } + + oprot->writeMessageBegin("hasNamespacePermission", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.hasNamespacePermission", bytes); + } +} + +void ClientServiceProcessor::process_grantSystemPermission(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.grantSystemPermission", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.grantSystemPermission"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.grantSystemPermission"); + } + + ClientService_grantSystemPermission_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.grantSystemPermission", bytes); + } + + ClientService_grantSystemPermission_result result; + try { + iface_->grantSystemPermission(args.tinfo, args.credentials, args.principal, args.permission); + } catch (ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.grantSystemPermission"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("grantSystemPermission", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.grantSystemPermission"); + } + + oprot->writeMessageBegin("grantSystemPermission", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.grantSystemPermission", bytes); + } +} + +void ClientServiceProcessor::process_revokeSystemPermission(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.revokeSystemPermission", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.revokeSystemPermission"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.revokeSystemPermission"); + } + + ClientService_revokeSystemPermission_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.revokeSystemPermission", bytes); + } + + ClientService_revokeSystemPermission_result result; + try { + iface_->revokeSystemPermission(args.tinfo, args.credentials, args.principal, args.permission); + } catch (ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.revokeSystemPermission"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("revokeSystemPermission", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.revokeSystemPermission"); + } + + oprot->writeMessageBegin("revokeSystemPermission", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.revokeSystemPermission", bytes); + } +} + +void ClientServiceProcessor::process_grantTablePermission(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.grantTablePermission", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.grantTablePermission"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.grantTablePermission"); + } + + ClientService_grantTablePermission_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.grantTablePermission", bytes); + } + + ClientService_grantTablePermission_result result; + try { + iface_->grantTablePermission(args.tinfo, args.credentials, args.principal, args.tableName, args.permission); + } catch (ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (ThriftTableOperationException &tope) { + result.tope = tope; + result.__isset.tope = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.grantTablePermission"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("grantTablePermission", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.grantTablePermission"); + } + + oprot->writeMessageBegin("grantTablePermission", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.grantTablePermission", bytes); + } +} + +void ClientServiceProcessor::process_revokeTablePermission(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.revokeTablePermission", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.revokeTablePermission"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.revokeTablePermission"); + } + + ClientService_revokeTablePermission_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.revokeTablePermission", bytes); + } + + ClientService_revokeTablePermission_result result; + try { + iface_->revokeTablePermission(args.tinfo, args.credentials, args.principal, args.tableName, args.permission); + } catch (ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (ThriftTableOperationException &tope) { + result.tope = tope; + result.__isset.tope = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.revokeTablePermission"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("revokeTablePermission", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.revokeTablePermission"); + } + + oprot->writeMessageBegin("revokeTablePermission", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.revokeTablePermission", bytes); + } +} + +void ClientServiceProcessor::process_grantNamespacePermission(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.grantNamespacePermission", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.grantNamespacePermission"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.grantNamespacePermission"); + } + + ClientService_grantNamespacePermission_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.grantNamespacePermission", bytes); + } + + ClientService_grantNamespacePermission_result result; + try { + iface_->grantNamespacePermission(args.tinfo, args.credentials, args.principal, args.ns, args.permission); + } catch (ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (ThriftTableOperationException &tope) { + result.tope = tope; + result.__isset.tope = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.grantNamespacePermission"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("grantNamespacePermission", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.grantNamespacePermission"); + } + + oprot->writeMessageBegin("grantNamespacePermission", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.grantNamespacePermission", bytes); + } +} + +void ClientServiceProcessor::process_revokeNamespacePermission(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.revokeNamespacePermission", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.revokeNamespacePermission"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.revokeNamespacePermission"); + } + + ClientService_revokeNamespacePermission_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.revokeNamespacePermission", bytes); + } + + ClientService_revokeNamespacePermission_result result; + try { + iface_->revokeNamespacePermission(args.tinfo, args.credentials, args.principal, args.ns, args.permission); + } catch (ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (ThriftTableOperationException &tope) { + result.tope = tope; + result.__isset.tope = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.revokeNamespacePermission"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("revokeNamespacePermission", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.revokeNamespacePermission"); + } + + oprot->writeMessageBegin("revokeNamespacePermission", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.revokeNamespacePermission", bytes); + } +} + +void ClientServiceProcessor::process_getConfiguration(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.getConfiguration", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.getConfiguration"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.getConfiguration"); + } + + ClientService_getConfiguration_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.getConfiguration", bytes); + } + + ClientService_getConfiguration_result result; + try { + iface_->getConfiguration(result.success, args.tinfo, args.credentials, args.type); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.getConfiguration"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getConfiguration", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.getConfiguration"); + } + + oprot->writeMessageBegin("getConfiguration", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.getConfiguration", bytes); + } +} + +void ClientServiceProcessor::process_getTableConfiguration(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.getTableConfiguration", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.getTableConfiguration"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.getTableConfiguration"); + } + + ClientService_getTableConfiguration_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.getTableConfiguration", bytes); + } + + ClientService_getTableConfiguration_result result; + try { + iface_->getTableConfiguration(result.success, args.tinfo, args.credentials, args.tableName); + result.__isset.success = true; + } catch (ThriftTableOperationException &tope) { + result.tope = tope; + result.__isset.tope = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.getTableConfiguration"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getTableConfiguration", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.getTableConfiguration"); + } + + oprot->writeMessageBegin("getTableConfiguration", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.getTableConfiguration", bytes); + } +} + +void ClientServiceProcessor::process_getNamespaceConfiguration(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.getNamespaceConfiguration", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.getNamespaceConfiguration"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.getNamespaceConfiguration"); + } + + ClientService_getNamespaceConfiguration_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.getNamespaceConfiguration", bytes); + } + + ClientService_getNamespaceConfiguration_result result; + try { + iface_->getNamespaceConfiguration(result.success, args.tinfo, args.credentials, args.ns); + result.__isset.success = true; + } catch (ThriftTableOperationException &tope) { + result.tope = tope; + result.__isset.tope = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.getNamespaceConfiguration"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getNamespaceConfiguration", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.getNamespaceConfiguration"); + } + + oprot->writeMessageBegin("getNamespaceConfiguration", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.getNamespaceConfiguration", bytes); + } +} + +void ClientServiceProcessor::process_checkClass(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.checkClass", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.checkClass"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.checkClass"); + } + + ClientService_checkClass_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.checkClass", bytes); + } + + ClientService_checkClass_result result; + try { + result.success = iface_->checkClass(args.tinfo, args.credentials, args.className, args.interfaceMatch); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.checkClass"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("checkClass", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.checkClass"); + } + + oprot->writeMessageBegin("checkClass", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.checkClass", bytes); + } +} + +void ClientServiceProcessor::process_checkTableClass(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.checkTableClass", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.checkTableClass"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.checkTableClass"); + } + + ClientService_checkTableClass_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.checkTableClass", bytes); + } + + ClientService_checkTableClass_result result; + try { + result.success = iface_->checkTableClass(args.tinfo, args.credentials, args.tableId, args.className, args.interfaceMatch); + result.__isset.success = true; + } catch (ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (ThriftTableOperationException &tope) { + result.tope = tope; + result.__isset.tope = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.checkTableClass"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("checkTableClass", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.checkTableClass"); + } + + oprot->writeMessageBegin("checkTableClass", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.checkTableClass", bytes); + } +} + +void ClientServiceProcessor::process_checkNamespaceClass(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ClientService.checkNamespaceClass", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ClientService.checkNamespaceClass"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ClientService.checkNamespaceClass"); + } + + ClientService_checkNamespaceClass_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ClientService.checkNamespaceClass", bytes); + } + + ClientService_checkNamespaceClass_result result; + try { + result.success = iface_->checkNamespaceClass(args.tinfo, args.credentials, args.namespaceId, args.className, args.interfaceMatch); + result.__isset.success = true; + } catch (ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (ThriftTableOperationException &tope) { + result.tope = tope; + result.__isset.tope = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ClientService.checkNamespaceClass"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("checkNamespaceClass", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ClientService.checkNamespaceClass"); + } + + oprot->writeMessageBegin("checkNamespaceClass", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ClientService.checkNamespaceClass", bytes); + } +} + +std::shared_ptr< ::apache::thrift::TProcessor > ClientServiceProcessorFactory::getProcessor(const ::apache::thrift::TConnectionInfo& connInfo) { + ::apache::thrift::ReleaseHandler< ClientServiceIfFactory > cleanup(handlerFactory_); + std::shared_ptr< ClientServiceIf > handler(handlerFactory_->getHandler(connInfo), cleanup); + std::shared_ptr< ::apache::thrift::TProcessor > processor(new ClientServiceProcessor(handler)); + return processor; +} + +void ClientServiceConcurrentClient::getRootTabletLocation(std::string& _return) +{ + int32_t seqid = send_getRootTabletLocation(); + recv_getRootTabletLocation(_return, seqid); +} + +int32_t ClientServiceConcurrentClient::send_getRootTabletLocation() +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("getRootTabletLocation", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_getRootTabletLocation_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ClientServiceConcurrentClient::recv_getRootTabletLocation(std::string& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getRootTabletLocation") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ClientService_getRootTabletLocation_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getRootTabletLocation failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ClientServiceConcurrentClient::getInstanceId(std::string& _return) +{ + int32_t seqid = send_getInstanceId(); + recv_getInstanceId(_return, seqid); +} + +int32_t ClientServiceConcurrentClient::send_getInstanceId() +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("getInstanceId", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_getInstanceId_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ClientServiceConcurrentClient::recv_getInstanceId(std::string& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getInstanceId") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ClientService_getInstanceId_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getInstanceId failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ClientServiceConcurrentClient::getZooKeepers(std::string& _return) +{ + int32_t seqid = send_getZooKeepers(); + recv_getZooKeepers(_return, seqid); +} + +int32_t ClientServiceConcurrentClient::send_getZooKeepers() +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("getZooKeepers", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_getZooKeepers_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ClientServiceConcurrentClient::recv_getZooKeepers(std::string& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getZooKeepers") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ClientService_getZooKeepers_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getZooKeepers failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ClientServiceConcurrentClient::bulkImportFiles(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const std::string& tableId, const std::vector & files, const std::string& errorDir, const bool setTime) +{ + int32_t seqid = send_bulkImportFiles(tinfo, credentials, tid, tableId, files, errorDir, setTime); + recv_bulkImportFiles(_return, seqid); +} + +int32_t ClientServiceConcurrentClient::send_bulkImportFiles(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const std::string& tableId, const std::vector & files, const std::string& errorDir, const bool setTime) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("bulkImportFiles", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_bulkImportFiles_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.tid = &tid; + args.tableId = &tableId; + args.files = &files; + args.errorDir = &errorDir; + args.setTime = &setTime; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ClientServiceConcurrentClient::recv_bulkImportFiles(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("bulkImportFiles") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ClientService_bulkImportFiles_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tope) { + sentry.commit(); + throw result.tope; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "bulkImportFiles failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ClientServiceConcurrentClient::isActive(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const int64_t tid) +{ + int32_t seqid = send_isActive(tinfo, tid); + return recv_isActive(seqid); +} + +int32_t ClientServiceConcurrentClient::send_isActive(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const int64_t tid) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("isActive", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_isActive_pargs args; + args.tinfo = &tinfo; + args.tid = &tid; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ClientServiceConcurrentClient::recv_isActive(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("isActive") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ClientService_isActive_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "isActive failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ClientServiceConcurrentClient::ping(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t seqid = send_ping(credentials); + recv_ping(seqid); +} + +int32_t ClientServiceConcurrentClient::send_ping(const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("ping", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_ping_pargs args; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ClientServiceConcurrentClient::recv_ping(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("ping") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ClientService_ping_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ClientServiceConcurrentClient::getDiskUsage(std::vector & _return, const std::set & tables, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t seqid = send_getDiskUsage(tables, credentials); + recv_getDiskUsage(_return, seqid); +} + +int32_t ClientServiceConcurrentClient::send_getDiskUsage(const std::set & tables, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("getDiskUsage", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_getDiskUsage_pargs args; + args.tables = &tables; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ClientServiceConcurrentClient::recv_getDiskUsage(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getDiskUsage") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ClientService_getDiskUsage_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.toe) { + sentry.commit(); + throw result.toe; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getDiskUsage failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ClientServiceConcurrentClient::listLocalUsers(std::set & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t seqid = send_listLocalUsers(tinfo, credentials); + recv_listLocalUsers(_return, seqid); +} + +int32_t ClientServiceConcurrentClient::send_listLocalUsers(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("listLocalUsers", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_listLocalUsers_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ClientServiceConcurrentClient::recv_listLocalUsers(std::set & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("listLocalUsers") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ClientService_listLocalUsers_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "listLocalUsers failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ClientServiceConcurrentClient::createLocalUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& password) +{ + int32_t seqid = send_createLocalUser(tinfo, credentials, principal, password); + recv_createLocalUser(seqid); +} + +int32_t ClientServiceConcurrentClient::send_createLocalUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& password) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("createLocalUser", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_createLocalUser_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.password = &password; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ClientServiceConcurrentClient::recv_createLocalUser(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("createLocalUser") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ClientService_createLocalUser_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ClientServiceConcurrentClient::dropLocalUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal) +{ + int32_t seqid = send_dropLocalUser(tinfo, credentials, principal); + recv_dropLocalUser(seqid); +} + +int32_t ClientServiceConcurrentClient::send_dropLocalUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("dropLocalUser", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_dropLocalUser_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ClientServiceConcurrentClient::recv_dropLocalUser(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("dropLocalUser") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ClientService_dropLocalUser_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ClientServiceConcurrentClient::changeLocalUserPassword(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& password) +{ + int32_t seqid = send_changeLocalUserPassword(tinfo, credentials, principal, password); + recv_changeLocalUserPassword(seqid); +} + +int32_t ClientServiceConcurrentClient::send_changeLocalUserPassword(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& password) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("changeLocalUserPassword", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_changeLocalUserPassword_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.password = &password; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ClientServiceConcurrentClient::recv_changeLocalUserPassword(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("changeLocalUserPassword") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ClientService_changeLocalUserPassword_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ClientServiceConcurrentClient::authenticate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t seqid = send_authenticate(tinfo, credentials); + return recv_authenticate(seqid); +} + +int32_t ClientServiceConcurrentClient::send_authenticate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("authenticate", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_authenticate_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ClientServiceConcurrentClient::recv_authenticate(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("authenticate") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ClientService_authenticate_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "authenticate failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ClientServiceConcurrentClient::authenticateUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& toAuth) +{ + int32_t seqid = send_authenticateUser(tinfo, credentials, toAuth); + return recv_authenticateUser(seqid); +} + +int32_t ClientServiceConcurrentClient::send_authenticateUser(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& toAuth) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("authenticateUser", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_authenticateUser_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.toAuth = &toAuth; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ClientServiceConcurrentClient::recv_authenticateUser(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("authenticateUser") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ClientService_authenticateUser_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "authenticateUser failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ClientServiceConcurrentClient::changeAuthorizations(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::vector & authorizations) +{ + int32_t seqid = send_changeAuthorizations(tinfo, credentials, principal, authorizations); + recv_changeAuthorizations(seqid); +} + +int32_t ClientServiceConcurrentClient::send_changeAuthorizations(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::vector & authorizations) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("changeAuthorizations", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_changeAuthorizations_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.authorizations = &authorizations; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ClientServiceConcurrentClient::recv_changeAuthorizations(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("changeAuthorizations") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ClientService_changeAuthorizations_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ClientServiceConcurrentClient::getUserAuthorizations(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal) +{ + int32_t seqid = send_getUserAuthorizations(tinfo, credentials, principal); + recv_getUserAuthorizations(_return, seqid); +} + +int32_t ClientServiceConcurrentClient::send_getUserAuthorizations(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("getUserAuthorizations", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_getUserAuthorizations_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ClientServiceConcurrentClient::recv_getUserAuthorizations(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getUserAuthorizations") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ClientService_getUserAuthorizations_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getUserAuthorizations failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ClientServiceConcurrentClient::hasSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t sysPerm) +{ + int32_t seqid = send_hasSystemPermission(tinfo, credentials, principal, sysPerm); + return recv_hasSystemPermission(seqid); +} + +int32_t ClientServiceConcurrentClient::send_hasSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t sysPerm) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("hasSystemPermission", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_hasSystemPermission_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.sysPerm = &sysPerm; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ClientServiceConcurrentClient::recv_hasSystemPermission(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("hasSystemPermission") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ClientService_hasSystemPermission_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "hasSystemPermission failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ClientServiceConcurrentClient::hasTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t tblPerm) +{ + int32_t seqid = send_hasTablePermission(tinfo, credentials, principal, tableName, tblPerm); + return recv_hasTablePermission(seqid); +} + +int32_t ClientServiceConcurrentClient::send_hasTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t tblPerm) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("hasTablePermission", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_hasTablePermission_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.tableName = &tableName; + args.tblPerm = &tblPerm; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ClientServiceConcurrentClient::recv_hasTablePermission(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("hasTablePermission") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ClientService_hasTablePermission_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tope) { + sentry.commit(); + throw result.tope; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "hasTablePermission failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ClientServiceConcurrentClient::hasNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t tblNspcPerm) +{ + int32_t seqid = send_hasNamespacePermission(tinfo, credentials, principal, ns, tblNspcPerm); + return recv_hasNamespacePermission(seqid); +} + +int32_t ClientServiceConcurrentClient::send_hasNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t tblNspcPerm) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("hasNamespacePermission", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_hasNamespacePermission_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.ns = &ns; + args.tblNspcPerm = &tblNspcPerm; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ClientServiceConcurrentClient::recv_hasNamespacePermission(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("hasNamespacePermission") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ClientService_hasNamespacePermission_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tope) { + sentry.commit(); + throw result.tope; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "hasNamespacePermission failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ClientServiceConcurrentClient::grantSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t permission) +{ + int32_t seqid = send_grantSystemPermission(tinfo, credentials, principal, permission); + recv_grantSystemPermission(seqid); +} + +int32_t ClientServiceConcurrentClient::send_grantSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t permission) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("grantSystemPermission", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_grantSystemPermission_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.permission = &permission; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ClientServiceConcurrentClient::recv_grantSystemPermission(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("grantSystemPermission") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ClientService_grantSystemPermission_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ClientServiceConcurrentClient::revokeSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t permission) +{ + int32_t seqid = send_revokeSystemPermission(tinfo, credentials, principal, permission); + recv_revokeSystemPermission(seqid); +} + +int32_t ClientServiceConcurrentClient::send_revokeSystemPermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const int8_t permission) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("revokeSystemPermission", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_revokeSystemPermission_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.permission = &permission; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ClientServiceConcurrentClient::recv_revokeSystemPermission(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("revokeSystemPermission") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ClientService_revokeSystemPermission_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ClientServiceConcurrentClient::grantTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t permission) +{ + int32_t seqid = send_grantTablePermission(tinfo, credentials, principal, tableName, permission); + recv_grantTablePermission(seqid); +} + +int32_t ClientServiceConcurrentClient::send_grantTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t permission) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("grantTablePermission", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_grantTablePermission_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.tableName = &tableName; + args.permission = &permission; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ClientServiceConcurrentClient::recv_grantTablePermission(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("grantTablePermission") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ClientService_grantTablePermission_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tope) { + sentry.commit(); + throw result.tope; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ClientServiceConcurrentClient::revokeTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t permission) +{ + int32_t seqid = send_revokeTablePermission(tinfo, credentials, principal, tableName, permission); + recv_revokeTablePermission(seqid); +} + +int32_t ClientServiceConcurrentClient::send_revokeTablePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& tableName, const int8_t permission) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("revokeTablePermission", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_revokeTablePermission_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.tableName = &tableName; + args.permission = &permission; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ClientServiceConcurrentClient::recv_revokeTablePermission(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("revokeTablePermission") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ClientService_revokeTablePermission_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tope) { + sentry.commit(); + throw result.tope; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ClientServiceConcurrentClient::grantNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t permission) +{ + int32_t seqid = send_grantNamespacePermission(tinfo, credentials, principal, ns, permission); + recv_grantNamespacePermission(seqid); +} + +int32_t ClientServiceConcurrentClient::send_grantNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t permission) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("grantNamespacePermission", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_grantNamespacePermission_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.ns = &ns; + args.permission = &permission; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ClientServiceConcurrentClient::recv_grantNamespacePermission(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("grantNamespacePermission") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ClientService_grantNamespacePermission_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tope) { + sentry.commit(); + throw result.tope; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ClientServiceConcurrentClient::revokeNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t permission) +{ + int32_t seqid = send_revokeNamespacePermission(tinfo, credentials, principal, ns, permission); + recv_revokeNamespacePermission(seqid); +} + +int32_t ClientServiceConcurrentClient::send_revokeNamespacePermission(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& principal, const std::string& ns, const int8_t permission) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("revokeNamespacePermission", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_revokeNamespacePermission_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.principal = &principal; + args.ns = &ns; + args.permission = &permission; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ClientServiceConcurrentClient::recv_revokeNamespacePermission(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("revokeNamespacePermission") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ClientService_revokeNamespacePermission_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tope) { + sentry.commit(); + throw result.tope; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ClientServiceConcurrentClient::getConfiguration(std::map & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ConfigurationType::type type) +{ + int32_t seqid = send_getConfiguration(tinfo, credentials, type); + recv_getConfiguration(_return, seqid); +} + +int32_t ClientServiceConcurrentClient::send_getConfiguration(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ConfigurationType::type type) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("getConfiguration", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_getConfiguration_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.type = &type; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ClientServiceConcurrentClient::recv_getConfiguration(std::map & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getConfiguration") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ClientService_getConfiguration_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getConfiguration failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ClientServiceConcurrentClient::getTableConfiguration(std::map & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName) +{ + int32_t seqid = send_getTableConfiguration(tinfo, credentials, tableName); + recv_getTableConfiguration(_return, seqid); +} + +int32_t ClientServiceConcurrentClient::send_getTableConfiguration(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("getTableConfiguration", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_getTableConfiguration_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.tableName = &tableName; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ClientServiceConcurrentClient::recv_getTableConfiguration(std::map & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getTableConfiguration") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ClientService_getTableConfiguration_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.tope) { + sentry.commit(); + throw result.tope; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getTableConfiguration failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ClientServiceConcurrentClient::getNamespaceConfiguration(std::map & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns) +{ + int32_t seqid = send_getNamespaceConfiguration(tinfo, credentials, ns); + recv_getNamespaceConfiguration(_return, seqid); +} + +int32_t ClientServiceConcurrentClient::send_getNamespaceConfiguration(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("getNamespaceConfiguration", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_getNamespaceConfiguration_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.ns = &ns; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ClientServiceConcurrentClient::recv_getNamespaceConfiguration(std::map & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getNamespaceConfiguration") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ClientService_getNamespaceConfiguration_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.tope) { + sentry.commit(); + throw result.tope; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getNamespaceConfiguration failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ClientServiceConcurrentClient::checkClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& className, const std::string& interfaceMatch) +{ + int32_t seqid = send_checkClass(tinfo, credentials, className, interfaceMatch); + return recv_checkClass(seqid); +} + +int32_t ClientServiceConcurrentClient::send_checkClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& className, const std::string& interfaceMatch) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("checkClass", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_checkClass_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.className = &className; + args.interfaceMatch = &interfaceMatch; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ClientServiceConcurrentClient::recv_checkClass(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("checkClass") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ClientService_checkClass_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "checkClass failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ClientServiceConcurrentClient::checkTableClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableId, const std::string& className, const std::string& interfaceMatch) +{ + int32_t seqid = send_checkTableClass(tinfo, credentials, tableId, className, interfaceMatch); + return recv_checkTableClass(seqid); +} + +int32_t ClientServiceConcurrentClient::send_checkTableClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableId, const std::string& className, const std::string& interfaceMatch) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("checkTableClass", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_checkTableClass_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.tableId = &tableId; + args.className = &className; + args.interfaceMatch = &interfaceMatch; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ClientServiceConcurrentClient::recv_checkTableClass(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("checkTableClass") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ClientService_checkTableClass_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tope) { + sentry.commit(); + throw result.tope; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "checkTableClass failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ClientServiceConcurrentClient::checkNamespaceClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& namespaceId, const std::string& className, const std::string& interfaceMatch) +{ + int32_t seqid = send_checkNamespaceClass(tinfo, credentials, namespaceId, className, interfaceMatch); + return recv_checkNamespaceClass(seqid); +} + +int32_t ClientServiceConcurrentClient::send_checkNamespaceClass(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& namespaceId, const std::string& className, const std::string& interfaceMatch) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("checkNamespaceClass", ::apache::thrift::protocol::T_CALL, cseqid); + + ClientService_checkNamespaceClass_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.namespaceId = &namespaceId; + args.className = &className; + args.interfaceMatch = &interfaceMatch; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ClientServiceConcurrentClient::recv_checkNamespaceClass(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("checkNamespaceClass") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ClientService_checkNamespaceClass_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tope) { + sentry.commit(); + throw result.tope; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "checkNamespaceClass failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +}}}}}} // namespace + diff --git a/src/data/extern/thriftv2/FateService.cpp b/src/data/extern/thriftv2/FateService.cpp new file mode 100644 index 00000000..eaf4593f --- /dev/null +++ b/src/data/extern/thriftv2/FateService.cpp @@ -0,0 +1,2067 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "data/extern/thriftv2/FateService.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace master { namespace thrift { + + +FateService_beginFateOperation_args::~FateService_beginFateOperation_args() throw() { +} + + +uint32_t FateService_beginFateOperation_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FateService_beginFateOperation_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FateService_beginFateOperation_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FateService_beginFateOperation_pargs::~FateService_beginFateOperation_pargs() throw() { +} + + +uint32_t FateService_beginFateOperation_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FateService_beginFateOperation_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FateService_beginFateOperation_result::~FateService_beginFateOperation_result() throw() { +} + + +uint32_t FateService_beginFateOperation_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FateService_beginFateOperation_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("FateService_beginFateOperation_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I64, 0); + xfer += oprot->writeI64(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tnase) { + xfer += oprot->writeFieldBegin("tnase", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tnase.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FateService_beginFateOperation_presult::~FateService_beginFateOperation_presult() throw() { +} + + +uint32_t FateService_beginFateOperation_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +FateService_executeFateOperation_args::~FateService_executeFateOperation_args() throw() { +} + + +uint32_t FateService_executeFateOperation_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 7: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->opid); + this->__isset.opid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast88; + xfer += iprot->readI32(ecast88); + this->op = (FateOperation::type)ecast88; + this->__isset.op = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->arguments.clear(); + uint32_t _size89; + ::apache::thrift::protocol::TType _etype92; + xfer += iprot->readListBegin(_etype92, _size89); + this->arguments.resize(_size89); + uint32_t _i93; + for (_i93 = 0; _i93 < _size89; ++_i93) + { + xfer += iprot->readBinary(this->arguments[_i93]); + } + xfer += iprot->readListEnd(); + } + this->__isset.arguments = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->options.clear(); + uint32_t _size94; + ::apache::thrift::protocol::TType _ktype95; + ::apache::thrift::protocol::TType _vtype96; + xfer += iprot->readMapBegin(_ktype95, _vtype96, _size94); + uint32_t _i98; + for (_i98 = 0; _i98 < _size94; ++_i98) + { + std::string _key99; + xfer += iprot->readString(_key99); + std::string& _val100 = this->options[_key99]; + xfer += iprot->readString(_val100); + } + xfer += iprot->readMapEnd(); + } + this->__isset.options = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->autoClean); + this->__isset.autoClean = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FateService_executeFateOperation_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FateService_executeFateOperation_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("opid", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->opid); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("op", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)this->op); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("arguments", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->arguments.size())); + std::vector ::const_iterator _iter101; + for (_iter101 = this->arguments.begin(); _iter101 != this->arguments.end(); ++_iter101) + { + xfer += oprot->writeBinary((*_iter101)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("options", ::apache::thrift::protocol::T_MAP, 5); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->options.size())); + std::map ::const_iterator _iter102; + for (_iter102 = this->options.begin(); _iter102 != this->options.end(); ++_iter102) + { + xfer += oprot->writeString(_iter102->first); + xfer += oprot->writeString(_iter102->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("autoClean", ::apache::thrift::protocol::T_BOOL, 6); + xfer += oprot->writeBool(this->autoClean); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 7); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FateService_executeFateOperation_pargs::~FateService_executeFateOperation_pargs() throw() { +} + + +uint32_t FateService_executeFateOperation_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FateService_executeFateOperation_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("opid", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64((*(this->opid))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("op", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)(*(this->op))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("arguments", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->arguments)).size())); + std::vector ::const_iterator _iter103; + for (_iter103 = (*(this->arguments)).begin(); _iter103 != (*(this->arguments)).end(); ++_iter103) + { + xfer += oprot->writeBinary((*_iter103)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("options", ::apache::thrift::protocol::T_MAP, 5); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->options)).size())); + std::map ::const_iterator _iter104; + for (_iter104 = (*(this->options)).begin(); _iter104 != (*(this->options)).end(); ++_iter104) + { + xfer += oprot->writeString(_iter104->first); + xfer += oprot->writeString(_iter104->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("autoClean", ::apache::thrift::protocol::T_BOOL, 6); + xfer += oprot->writeBool((*(this->autoClean))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 7); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FateService_executeFateOperation_result::~FateService_executeFateOperation_result() throw() { +} + + +uint32_t FateService_executeFateOperation_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FateService_executeFateOperation_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("FateService_executeFateOperation_result"); + + if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tope) { + xfer += oprot->writeFieldBegin("tope", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tope.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tnase) { + xfer += oprot->writeFieldBegin("tnase", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->tnase.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FateService_executeFateOperation_presult::~FateService_executeFateOperation_presult() throw() { +} + + +uint32_t FateService_executeFateOperation_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +FateService_waitForFateOperation_args::~FateService_waitForFateOperation_args() throw() { +} + + +uint32_t FateService_waitForFateOperation_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->opid); + this->__isset.opid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FateService_waitForFateOperation_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FateService_waitForFateOperation_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("opid", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->opid); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FateService_waitForFateOperation_pargs::~FateService_waitForFateOperation_pargs() throw() { +} + + +uint32_t FateService_waitForFateOperation_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FateService_waitForFateOperation_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("opid", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64((*(this->opid))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FateService_waitForFateOperation_result::~FateService_waitForFateOperation_result() throw() { +} + + +uint32_t FateService_waitForFateOperation_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FateService_waitForFateOperation_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("FateService_waitForFateOperation_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0); + xfer += oprot->writeString(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tope) { + xfer += oprot->writeFieldBegin("tope", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tope.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tnase) { + xfer += oprot->writeFieldBegin("tnase", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->tnase.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FateService_waitForFateOperation_presult::~FateService_waitForFateOperation_presult() throw() { +} + + +uint32_t FateService_waitForFateOperation_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +FateService_finishFateOperation_args::~FateService_finishFateOperation_args() throw() { +} + + +uint32_t FateService_finishFateOperation_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->opid); + this->__isset.opid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FateService_finishFateOperation_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FateService_finishFateOperation_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("opid", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->opid); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FateService_finishFateOperation_pargs::~FateService_finishFateOperation_pargs() throw() { +} + + +uint32_t FateService_finishFateOperation_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FateService_finishFateOperation_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("opid", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64((*(this->opid))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FateService_finishFateOperation_result::~FateService_finishFateOperation_result() throw() { +} + + +uint32_t FateService_finishFateOperation_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FateService_finishFateOperation_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("FateService_finishFateOperation_result"); + + if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tnase) { + xfer += oprot->writeFieldBegin("tnase", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tnase.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +FateService_finishFateOperation_presult::~FateService_finishFateOperation_presult() throw() { +} + + +uint32_t FateService_finishFateOperation_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +int64_t FateServiceClient::beginFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + send_beginFateOperation(tinfo, credentials); + return recv_beginFateOperation(); +} + +void FateServiceClient::send_beginFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("beginFateOperation", ::apache::thrift::protocol::T_CALL, cseqid); + + FateService_beginFateOperation_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +int64_t FateServiceClient::recv_beginFateOperation() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("beginFateOperation") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + int64_t _return; + FateService_beginFateOperation_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tnase) { + throw result.tnase; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "beginFateOperation failed: unknown result"); +} + +void FateServiceClient::executeFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid, const FateOperation::type op, const std::vector & arguments, const std::map & options, const bool autoClean) +{ + send_executeFateOperation(tinfo, credentials, opid, op, arguments, options, autoClean); + recv_executeFateOperation(); +} + +void FateServiceClient::send_executeFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid, const FateOperation::type op, const std::vector & arguments, const std::map & options, const bool autoClean) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("executeFateOperation", ::apache::thrift::protocol::T_CALL, cseqid); + + FateService_executeFateOperation_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.opid = &opid; + args.op = &op; + args.arguments = &arguments; + args.options = &options; + args.autoClean = &autoClean; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void FateServiceClient::recv_executeFateOperation() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("executeFateOperation") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + FateService_executeFateOperation_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tope) { + throw result.tope; + } + if (result.__isset.tnase) { + throw result.tnase; + } + return; +} + +void FateServiceClient::waitForFateOperation(std::string& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid) +{ + send_waitForFateOperation(tinfo, credentials, opid); + recv_waitForFateOperation(_return); +} + +void FateServiceClient::send_waitForFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("waitForFateOperation", ::apache::thrift::protocol::T_CALL, cseqid); + + FateService_waitForFateOperation_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.opid = &opid; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void FateServiceClient::recv_waitForFateOperation(std::string& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("waitForFateOperation") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + FateService_waitForFateOperation_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tope) { + throw result.tope; + } + if (result.__isset.tnase) { + throw result.tnase; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "waitForFateOperation failed: unknown result"); +} + +void FateServiceClient::finishFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid) +{ + send_finishFateOperation(tinfo, credentials, opid); + recv_finishFateOperation(); +} + +void FateServiceClient::send_finishFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("finishFateOperation", ::apache::thrift::protocol::T_CALL, cseqid); + + FateService_finishFateOperation_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.opid = &opid; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void FateServiceClient::recv_finishFateOperation() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("finishFateOperation") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + FateService_finishFateOperation_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tnase) { + throw result.tnase; + } + return; +} + +bool FateServiceProcessor::dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext) { + ProcessMap::iterator pfn; + pfn = processMap_.find(fname); + if (pfn == processMap_.end()) { + iprot->skip(::apache::thrift::protocol::T_STRUCT); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + ::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::UNKNOWN_METHOD, "Invalid method name: '"+fname+"'"); + oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return true; + } + (this->*(pfn->second))(seqid, iprot, oprot, callContext); + return true; +} + +void FateServiceProcessor::process_beginFateOperation(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("FateService.beginFateOperation", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "FateService.beginFateOperation"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "FateService.beginFateOperation"); + } + + FateService_beginFateOperation_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "FateService.beginFateOperation", bytes); + } + + FateService_beginFateOperation_result result; + try { + result.success = iface_->beginFateOperation(args.tinfo, args.credentials); + result.__isset.success = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException &tnase) { + result.tnase = tnase; + result.__isset.tnase = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "FateService.beginFateOperation"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("beginFateOperation", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "FateService.beginFateOperation"); + } + + oprot->writeMessageBegin("beginFateOperation", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "FateService.beginFateOperation", bytes); + } +} + +void FateServiceProcessor::process_executeFateOperation(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("FateService.executeFateOperation", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "FateService.executeFateOperation"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "FateService.executeFateOperation"); + } + + FateService_executeFateOperation_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "FateService.executeFateOperation", bytes); + } + + FateService_executeFateOperation_result result; + try { + iface_->executeFateOperation(args.tinfo, args.credentials, args.opid, args.op, args.arguments, args.options, args.autoClean); + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException &tope) { + result.tope = tope; + result.__isset.tope = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException &tnase) { + result.tnase = tnase; + result.__isset.tnase = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "FateService.executeFateOperation"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("executeFateOperation", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "FateService.executeFateOperation"); + } + + oprot->writeMessageBegin("executeFateOperation", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "FateService.executeFateOperation", bytes); + } +} + +void FateServiceProcessor::process_waitForFateOperation(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("FateService.waitForFateOperation", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "FateService.waitForFateOperation"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "FateService.waitForFateOperation"); + } + + FateService_waitForFateOperation_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "FateService.waitForFateOperation", bytes); + } + + FateService_waitForFateOperation_result result; + try { + iface_->waitForFateOperation(result.success, args.tinfo, args.credentials, args.opid); + result.__isset.success = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException &tope) { + result.tope = tope; + result.__isset.tope = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException &tnase) { + result.tnase = tnase; + result.__isset.tnase = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "FateService.waitForFateOperation"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("waitForFateOperation", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "FateService.waitForFateOperation"); + } + + oprot->writeMessageBegin("waitForFateOperation", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "FateService.waitForFateOperation", bytes); + } +} + +void FateServiceProcessor::process_finishFateOperation(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("FateService.finishFateOperation", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "FateService.finishFateOperation"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "FateService.finishFateOperation"); + } + + FateService_finishFateOperation_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "FateService.finishFateOperation", bytes); + } + + FateService_finishFateOperation_result result; + try { + iface_->finishFateOperation(args.tinfo, args.credentials, args.opid); + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException &tnase) { + result.tnase = tnase; + result.__isset.tnase = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "FateService.finishFateOperation"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("finishFateOperation", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "FateService.finishFateOperation"); + } + + oprot->writeMessageBegin("finishFateOperation", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "FateService.finishFateOperation", bytes); + } +} + +std::shared_ptr< ::apache::thrift::TProcessor > FateServiceProcessorFactory::getProcessor(const ::apache::thrift::TConnectionInfo& connInfo) { + ::apache::thrift::ReleaseHandler< FateServiceIfFactory > cleanup(handlerFactory_); + std::shared_ptr< FateServiceIf > handler(handlerFactory_->getHandler(connInfo), cleanup); + std::shared_ptr< ::apache::thrift::TProcessor > processor(new FateServiceProcessor(handler)); + return processor; +} + +int64_t FateServiceConcurrentClient::beginFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t seqid = send_beginFateOperation(tinfo, credentials); + return recv_beginFateOperation(seqid); +} + +int32_t FateServiceConcurrentClient::send_beginFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("beginFateOperation", ::apache::thrift::protocol::T_CALL, cseqid); + + FateService_beginFateOperation_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +int64_t FateServiceConcurrentClient::recv_beginFateOperation(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("beginFateOperation") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + int64_t _return; + FateService_beginFateOperation_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tnase) { + sentry.commit(); + throw result.tnase; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "beginFateOperation failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void FateServiceConcurrentClient::executeFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid, const FateOperation::type op, const std::vector & arguments, const std::map & options, const bool autoClean) +{ + int32_t seqid = send_executeFateOperation(tinfo, credentials, opid, op, arguments, options, autoClean); + recv_executeFateOperation(seqid); +} + +int32_t FateServiceConcurrentClient::send_executeFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid, const FateOperation::type op, const std::vector & arguments, const std::map & options, const bool autoClean) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("executeFateOperation", ::apache::thrift::protocol::T_CALL, cseqid); + + FateService_executeFateOperation_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.opid = &opid; + args.op = &op; + args.arguments = &arguments; + args.options = &options; + args.autoClean = &autoClean; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void FateServiceConcurrentClient::recv_executeFateOperation(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("executeFateOperation") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + FateService_executeFateOperation_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tope) { + sentry.commit(); + throw result.tope; + } + if (result.__isset.tnase) { + sentry.commit(); + throw result.tnase; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void FateServiceConcurrentClient::waitForFateOperation(std::string& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid) +{ + int32_t seqid = send_waitForFateOperation(tinfo, credentials, opid); + recv_waitForFateOperation(_return, seqid); +} + +int32_t FateServiceConcurrentClient::send_waitForFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("waitForFateOperation", ::apache::thrift::protocol::T_CALL, cseqid); + + FateService_waitForFateOperation_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.opid = &opid; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void FateServiceConcurrentClient::recv_waitForFateOperation(std::string& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("waitForFateOperation") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + FateService_waitForFateOperation_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tope) { + sentry.commit(); + throw result.tope; + } + if (result.__isset.tnase) { + sentry.commit(); + throw result.tnase; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "waitForFateOperation failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void FateServiceConcurrentClient::finishFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid) +{ + int32_t seqid = send_finishFateOperation(tinfo, credentials, opid); + recv_finishFateOperation(seqid); +} + +int32_t FateServiceConcurrentClient::send_finishFateOperation(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t opid) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("finishFateOperation", ::apache::thrift::protocol::T_CALL, cseqid); + + FateService_finishFateOperation_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.opid = &opid; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void FateServiceConcurrentClient::recv_finishFateOperation(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("finishFateOperation") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + FateService_finishFateOperation_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tnase) { + sentry.commit(); + throw result.tnase; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +}}}}}} // namespace + diff --git a/src/data/extern/thriftv2/GCMonitorService.cpp b/src/data/extern/thriftv2/GCMonitorService.cpp new file mode 100644 index 00000000..72bd791f --- /dev/null +++ b/src/data/extern/thriftv2/GCMonitorService.cpp @@ -0,0 +1,469 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "data/extern/thriftv2/GCMonitorService.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace gc { namespace thrift { + + +GCMonitorService_getStatus_args::~GCMonitorService_getStatus_args() throw() { +} + + +uint32_t GCMonitorService_getStatus_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t GCMonitorService_getStatus_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("GCMonitorService_getStatus_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +GCMonitorService_getStatus_pargs::~GCMonitorService_getStatus_pargs() throw() { +} + + +uint32_t GCMonitorService_getStatus_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("GCMonitorService_getStatus_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +GCMonitorService_getStatus_result::~GCMonitorService_getStatus_result() throw() { +} + + +uint32_t GCMonitorService_getStatus_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t GCMonitorService_getStatus_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("GCMonitorService_getStatus_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +GCMonitorService_getStatus_presult::~GCMonitorService_getStatus_presult() throw() { +} + + +uint32_t GCMonitorService_getStatus_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +void GCMonitorServiceClient::getStatus(GCStatus& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + send_getStatus(tinfo, credentials); + recv_getStatus(_return); +} + +void GCMonitorServiceClient::send_getStatus(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getStatus", ::apache::thrift::protocol::T_CALL, cseqid); + + GCMonitorService_getStatus_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void GCMonitorServiceClient::recv_getStatus(GCStatus& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getStatus") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + GCMonitorService_getStatus_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.sec) { + throw result.sec; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getStatus failed: unknown result"); +} + +bool GCMonitorServiceProcessor::dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext) { + ProcessMap::iterator pfn; + pfn = processMap_.find(fname); + if (pfn == processMap_.end()) { + iprot->skip(::apache::thrift::protocol::T_STRUCT); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + ::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::UNKNOWN_METHOD, "Invalid method name: '"+fname+"'"); + oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return true; + } + (this->*(pfn->second))(seqid, iprot, oprot, callContext); + return true; +} + +void GCMonitorServiceProcessor::process_getStatus(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("GCMonitorService.getStatus", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "GCMonitorService.getStatus"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "GCMonitorService.getStatus"); + } + + GCMonitorService_getStatus_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "GCMonitorService.getStatus", bytes); + } + + GCMonitorService_getStatus_result result; + try { + iface_->getStatus(result.success, args.tinfo, args.credentials); + result.__isset.success = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "GCMonitorService.getStatus"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getStatus", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "GCMonitorService.getStatus"); + } + + oprot->writeMessageBegin("getStatus", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "GCMonitorService.getStatus", bytes); + } +} + +std::shared_ptr< ::apache::thrift::TProcessor > GCMonitorServiceProcessorFactory::getProcessor(const ::apache::thrift::TConnectionInfo& connInfo) { + ::apache::thrift::ReleaseHandler< GCMonitorServiceIfFactory > cleanup(handlerFactory_); + std::shared_ptr< GCMonitorServiceIf > handler(handlerFactory_->getHandler(connInfo), cleanup); + std::shared_ptr< ::apache::thrift::TProcessor > processor(new GCMonitorServiceProcessor(handler)); + return processor; +} + +void GCMonitorServiceConcurrentClient::getStatus(GCStatus& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t seqid = send_getStatus(tinfo, credentials); + recv_getStatus(_return, seqid); +} + +int32_t GCMonitorServiceConcurrentClient::send_getStatus(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("getStatus", ::apache::thrift::protocol::T_CALL, cseqid); + + GCMonitorService_getStatus_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void GCMonitorServiceConcurrentClient::recv_getStatus(GCStatus& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getStatus") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + GCMonitorService_getStatus_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getStatus failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +}}}}}} // namespace + diff --git a/src/data/extern/thriftv2/MasterClientService.cpp b/src/data/extern/thriftv2/MasterClientService.cpp new file mode 100644 index 00000000..51c2c6a8 --- /dev/null +++ b/src/data/extern/thriftv2/MasterClientService.cpp @@ -0,0 +1,8128 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "data/extern/thriftv2/MasterClientService.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace master { namespace thrift { + + +MasterClientService_initiateFlush_args::~MasterClientService_initiateFlush_args() throw() { +} + + +uint32_t MasterClientService_initiateFlush_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_initiateFlush_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_initiateFlush_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tableName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_initiateFlush_pargs::~MasterClientService_initiateFlush_pargs() throw() { +} + + +uint32_t MasterClientService_initiateFlush_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_initiateFlush_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_initiateFlush_result::~MasterClientService_initiateFlush_result() throw() { +} + + +uint32_t MasterClientService_initiateFlush_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_initiateFlush_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("MasterClientService_initiateFlush_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I64, 0); + xfer += oprot->writeI64(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tope) { + xfer += oprot->writeFieldBegin("tope", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tope.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tnase) { + xfer += oprot->writeFieldBegin("tnase", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->tnase.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_initiateFlush_presult::~MasterClientService_initiateFlush_presult() throw() { +} + + +uint32_t MasterClientService_initiateFlush_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +MasterClientService_waitForFlush_args::~MasterClientService_waitForFlush_args() throw() { +} + + +uint32_t MasterClientService_waitForFlush_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->startRow); + this->__isset.startRow = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->endRow); + this->__isset.endRow = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->flushID); + this->__isset.flushID = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->maxLoops); + this->__isset.maxLoops = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_waitForFlush_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_waitForFlush_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tableName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("flushID", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->flushID); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("maxLoops", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->maxLoops); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("startRow", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeBinary(this->startRow); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("endRow", ::apache::thrift::protocol::T_STRING, 7); + xfer += oprot->writeBinary(this->endRow); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_waitForFlush_pargs::~MasterClientService_waitForFlush_pargs() throw() { +} + + +uint32_t MasterClientService_waitForFlush_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_waitForFlush_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("flushID", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64((*(this->flushID))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("maxLoops", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64((*(this->maxLoops))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("startRow", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeBinary((*(this->startRow))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("endRow", ::apache::thrift::protocol::T_STRING, 7); + xfer += oprot->writeBinary((*(this->endRow))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_waitForFlush_result::~MasterClientService_waitForFlush_result() throw() { +} + + +uint32_t MasterClientService_waitForFlush_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_waitForFlush_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("MasterClientService_waitForFlush_result"); + + if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tope) { + xfer += oprot->writeFieldBegin("tope", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tope.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tnase) { + xfer += oprot->writeFieldBegin("tnase", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->tnase.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_waitForFlush_presult::~MasterClientService_waitForFlush_presult() throw() { +} + + +uint32_t MasterClientService_waitForFlush_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +MasterClientService_setTableProperty_args::~MasterClientService_setTableProperty_args() throw() { +} + + +uint32_t MasterClientService_setTableProperty_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->property); + this->__isset.property = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->value); + this->__isset.value = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_setTableProperty_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_setTableProperty_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tableName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("property", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->property); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->value); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_setTableProperty_pargs::~MasterClientService_setTableProperty_pargs() throw() { +} + + +uint32_t MasterClientService_setTableProperty_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_setTableProperty_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("property", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->property))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->value))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_setTableProperty_result::~MasterClientService_setTableProperty_result() throw() { +} + + +uint32_t MasterClientService_setTableProperty_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_setTableProperty_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("MasterClientService_setTableProperty_result"); + + if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tope) { + xfer += oprot->writeFieldBegin("tope", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tope.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tnase) { + xfer += oprot->writeFieldBegin("tnase", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->tnase.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_setTableProperty_presult::~MasterClientService_setTableProperty_presult() throw() { +} + + +uint32_t MasterClientService_setTableProperty_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +MasterClientService_removeTableProperty_args::~MasterClientService_removeTableProperty_args() throw() { +} + + +uint32_t MasterClientService_removeTableProperty_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->property); + this->__isset.property = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_removeTableProperty_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_removeTableProperty_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tableName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("property", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->property); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_removeTableProperty_pargs::~MasterClientService_removeTableProperty_pargs() throw() { +} + + +uint32_t MasterClientService_removeTableProperty_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_removeTableProperty_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("property", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->property))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_removeTableProperty_result::~MasterClientService_removeTableProperty_result() throw() { +} + + +uint32_t MasterClientService_removeTableProperty_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_removeTableProperty_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("MasterClientService_removeTableProperty_result"); + + if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tope) { + xfer += oprot->writeFieldBegin("tope", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tope.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tnase) { + xfer += oprot->writeFieldBegin("tnase", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->tnase.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_removeTableProperty_presult::~MasterClientService_removeTableProperty_presult() throw() { +} + + +uint32_t MasterClientService_removeTableProperty_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +MasterClientService_setNamespaceProperty_args::~MasterClientService_setNamespaceProperty_args() throw() { +} + + +uint32_t MasterClientService_setNamespaceProperty_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->ns); + this->__isset.ns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->property); + this->__isset.property = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->value); + this->__isset.value = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_setNamespaceProperty_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_setNamespaceProperty_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ns", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->ns); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("property", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->property); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->value); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_setNamespaceProperty_pargs::~MasterClientService_setNamespaceProperty_pargs() throw() { +} + + +uint32_t MasterClientService_setNamespaceProperty_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_setNamespaceProperty_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ns", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->ns))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("property", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->property))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->value))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_setNamespaceProperty_result::~MasterClientService_setNamespaceProperty_result() throw() { +} + + +uint32_t MasterClientService_setNamespaceProperty_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_setNamespaceProperty_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("MasterClientService_setNamespaceProperty_result"); + + if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tope) { + xfer += oprot->writeFieldBegin("tope", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tope.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tnase) { + xfer += oprot->writeFieldBegin("tnase", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->tnase.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_setNamespaceProperty_presult::~MasterClientService_setNamespaceProperty_presult() throw() { +} + + +uint32_t MasterClientService_setNamespaceProperty_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +MasterClientService_removeNamespaceProperty_args::~MasterClientService_removeNamespaceProperty_args() throw() { +} + + +uint32_t MasterClientService_removeNamespaceProperty_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->ns); + this->__isset.ns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->property); + this->__isset.property = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_removeNamespaceProperty_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_removeNamespaceProperty_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ns", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->ns); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("property", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->property); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_removeNamespaceProperty_pargs::~MasterClientService_removeNamespaceProperty_pargs() throw() { +} + + +uint32_t MasterClientService_removeNamespaceProperty_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_removeNamespaceProperty_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ns", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->ns))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("property", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->property))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_removeNamespaceProperty_result::~MasterClientService_removeNamespaceProperty_result() throw() { +} + + +uint32_t MasterClientService_removeNamespaceProperty_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_removeNamespaceProperty_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("MasterClientService_removeNamespaceProperty_result"); + + if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tope) { + xfer += oprot->writeFieldBegin("tope", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tope.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tnase) { + xfer += oprot->writeFieldBegin("tnase", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->tnase.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_removeNamespaceProperty_presult::~MasterClientService_removeNamespaceProperty_presult() throw() { +} + + +uint32_t MasterClientService_removeNamespaceProperty_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +MasterClientService_setMasterGoalState_args::~MasterClientService_setMasterGoalState_args() throw() { +} + + +uint32_t MasterClientService_setMasterGoalState_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast105; + xfer += iprot->readI32(ecast105); + this->state = (MasterGoalState::type)ecast105; + this->__isset.state = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_setMasterGoalState_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_setMasterGoalState_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->state); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_setMasterGoalState_pargs::~MasterClientService_setMasterGoalState_pargs() throw() { +} + + +uint32_t MasterClientService_setMasterGoalState_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_setMasterGoalState_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)(*(this->state))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_setMasterGoalState_result::~MasterClientService_setMasterGoalState_result() throw() { +} + + +uint32_t MasterClientService_setMasterGoalState_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_setMasterGoalState_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("MasterClientService_setMasterGoalState_result"); + + if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tnase) { + xfer += oprot->writeFieldBegin("tnase", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tnase.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_setMasterGoalState_presult::~MasterClientService_setMasterGoalState_presult() throw() { +} + + +uint32_t MasterClientService_setMasterGoalState_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +MasterClientService_shutdown_args::~MasterClientService_shutdown_args() throw() { +} + + +uint32_t MasterClientService_shutdown_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->stopTabletServers); + this->__isset.stopTabletServers = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_shutdown_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_shutdown_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("stopTabletServers", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->stopTabletServers); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_shutdown_pargs::~MasterClientService_shutdown_pargs() throw() { +} + + +uint32_t MasterClientService_shutdown_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_shutdown_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("stopTabletServers", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool((*(this->stopTabletServers))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_shutdown_result::~MasterClientService_shutdown_result() throw() { +} + + +uint32_t MasterClientService_shutdown_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_shutdown_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("MasterClientService_shutdown_result"); + + if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tnase) { + xfer += oprot->writeFieldBegin("tnase", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tnase.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_shutdown_presult::~MasterClientService_shutdown_presult() throw() { +} + + +uint32_t MasterClientService_shutdown_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +MasterClientService_shutdownTabletServer_args::~MasterClientService_shutdownTabletServer_args() throw() { +} + + +uint32_t MasterClientService_shutdownTabletServer_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tabletServer); + this->__isset.tabletServer = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->force); + this->__isset.force = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_shutdownTabletServer_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_shutdownTabletServer_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tabletServer", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tabletServer); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("force", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool(this->force); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_shutdownTabletServer_pargs::~MasterClientService_shutdownTabletServer_pargs() throw() { +} + + +uint32_t MasterClientService_shutdownTabletServer_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_shutdownTabletServer_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tabletServer", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tabletServer))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("force", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool((*(this->force))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_shutdownTabletServer_result::~MasterClientService_shutdownTabletServer_result() throw() { +} + + +uint32_t MasterClientService_shutdownTabletServer_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_shutdownTabletServer_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("MasterClientService_shutdownTabletServer_result"); + + if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tnase) { + xfer += oprot->writeFieldBegin("tnase", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tnase.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_shutdownTabletServer_presult::~MasterClientService_shutdownTabletServer_presult() throw() { +} + + +uint32_t MasterClientService_shutdownTabletServer_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +MasterClientService_setSystemProperty_args::~MasterClientService_setSystemProperty_args() throw() { +} + + +uint32_t MasterClientService_setSystemProperty_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->property); + this->__isset.property = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->value); + this->__isset.value = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_setSystemProperty_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_setSystemProperty_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("property", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->property); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->value); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_setSystemProperty_pargs::~MasterClientService_setSystemProperty_pargs() throw() { +} + + +uint32_t MasterClientService_setSystemProperty_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_setSystemProperty_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("property", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->property))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->value))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_setSystemProperty_result::~MasterClientService_setSystemProperty_result() throw() { +} + + +uint32_t MasterClientService_setSystemProperty_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_setSystemProperty_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("MasterClientService_setSystemProperty_result"); + + if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tnase) { + xfer += oprot->writeFieldBegin("tnase", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tnase.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_setSystemProperty_presult::~MasterClientService_setSystemProperty_presult() throw() { +} + + +uint32_t MasterClientService_setSystemProperty_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +MasterClientService_removeSystemProperty_args::~MasterClientService_removeSystemProperty_args() throw() { +} + + +uint32_t MasterClientService_removeSystemProperty_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->property); + this->__isset.property = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_removeSystemProperty_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_removeSystemProperty_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("property", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->property); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_removeSystemProperty_pargs::~MasterClientService_removeSystemProperty_pargs() throw() { +} + + +uint32_t MasterClientService_removeSystemProperty_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_removeSystemProperty_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("property", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->property))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_removeSystemProperty_result::~MasterClientService_removeSystemProperty_result() throw() { +} + + +uint32_t MasterClientService_removeSystemProperty_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_removeSystemProperty_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("MasterClientService_removeSystemProperty_result"); + + if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tnase) { + xfer += oprot->writeFieldBegin("tnase", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tnase.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_removeSystemProperty_presult::~MasterClientService_removeSystemProperty_presult() throw() { +} + + +uint32_t MasterClientService_removeSystemProperty_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +MasterClientService_getMasterStats_args::~MasterClientService_getMasterStats_args() throw() { +} + + +uint32_t MasterClientService_getMasterStats_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_getMasterStats_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_getMasterStats_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_getMasterStats_pargs::~MasterClientService_getMasterStats_pargs() throw() { +} + + +uint32_t MasterClientService_getMasterStats_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_getMasterStats_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_getMasterStats_result::~MasterClientService_getMasterStats_result() throw() { +} + + +uint32_t MasterClientService_getMasterStats_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_getMasterStats_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("MasterClientService_getMasterStats_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tnase) { + xfer += oprot->writeFieldBegin("tnase", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tnase.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_getMasterStats_presult::~MasterClientService_getMasterStats_presult() throw() { +} + + +uint32_t MasterClientService_getMasterStats_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +MasterClientService_waitForBalance_args::~MasterClientService_waitForBalance_args() throw() { +} + + +uint32_t MasterClientService_waitForBalance_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_waitForBalance_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_waitForBalance_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_waitForBalance_pargs::~MasterClientService_waitForBalance_pargs() throw() { +} + + +uint32_t MasterClientService_waitForBalance_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_waitForBalance_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_waitForBalance_result::~MasterClientService_waitForBalance_result() throw() { +} + + +uint32_t MasterClientService_waitForBalance_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_waitForBalance_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("MasterClientService_waitForBalance_result"); + + if (this->__isset.tnase) { + xfer += oprot->writeFieldBegin("tnase", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tnase.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_waitForBalance_presult::~MasterClientService_waitForBalance_presult() throw() { +} + + +uint32_t MasterClientService_waitForBalance_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +MasterClientService_reportSplitExtent_args::~MasterClientService_reportSplitExtent_args() throw() { +} + + +uint32_t MasterClientService_reportSplitExtent_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->serverName); + this->__isset.serverName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->split.read(iprot); + this->__isset.split = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_reportSplitExtent_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_reportSplitExtent_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("serverName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->serverName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("split", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->split.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_reportSplitExtent_pargs::~MasterClientService_reportSplitExtent_pargs() throw() { +} + + +uint32_t MasterClientService_reportSplitExtent_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_reportSplitExtent_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("serverName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->serverName))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("split", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->split)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_reportTabletStatus_args::~MasterClientService_reportTabletStatus_args() throw() { +} + + +uint32_t MasterClientService_reportTabletStatus_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->serverName); + this->__isset.serverName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast106; + xfer += iprot->readI32(ecast106); + this->status = (TabletLoadState::type)ecast106; + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tablet.read(iprot); + this->__isset.tablet = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_reportTabletStatus_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_reportTabletStatus_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("serverName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->serverName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)this->status); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tablet", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->tablet.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_reportTabletStatus_pargs::~MasterClientService_reportTabletStatus_pargs() throw() { +} + + +uint32_t MasterClientService_reportTabletStatus_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_reportTabletStatus_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("serverName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->serverName))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)(*(this->status))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tablet", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += (*(this->tablet)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_getActiveTservers_args::~MasterClientService_getActiveTservers_args() throw() { +} + + +uint32_t MasterClientService_getActiveTservers_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_getActiveTservers_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_getActiveTservers_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_getActiveTservers_pargs::~MasterClientService_getActiveTservers_pargs() throw() { +} + + +uint32_t MasterClientService_getActiveTservers_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_getActiveTservers_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_getActiveTservers_result::~MasterClientService_getActiveTservers_result() throw() { +} + + +uint32_t MasterClientService_getActiveTservers_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size107; + ::apache::thrift::protocol::TType _etype110; + xfer += iprot->readListBegin(_etype110, _size107); + this->success.resize(_size107); + uint32_t _i111; + for (_i111 = 0; _i111 < _size107; ++_i111) + { + xfer += iprot->readString(this->success[_i111]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_getActiveTservers_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("MasterClientService_getActiveTservers_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::vector ::const_iterator _iter112; + for (_iter112 = this->success.begin(); _iter112 != this->success.end(); ++_iter112) + { + xfer += oprot->writeString((*_iter112)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tnase) { + xfer += oprot->writeFieldBegin("tnase", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tnase.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_getActiveTservers_presult::~MasterClientService_getActiveTservers_presult() throw() { +} + + +uint32_t MasterClientService_getActiveTservers_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size113; + ::apache::thrift::protocol::TType _etype116; + xfer += iprot->readListBegin(_etype116, _size113); + (*(this->success)).resize(_size113); + uint32_t _i117; + for (_i117 = 0; _i117 < _size113; ++_i117) + { + xfer += iprot->readString((*(this->success))[_i117]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +MasterClientService_getDelegationToken_args::~MasterClientService_getDelegationToken_args() throw() { +} + + +uint32_t MasterClientService_getDelegationToken_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->cfg.read(iprot); + this->__isset.cfg = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_getDelegationToken_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_getDelegationToken_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("cfg", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->cfg.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_getDelegationToken_pargs::~MasterClientService_getDelegationToken_pargs() throw() { +} + + +uint32_t MasterClientService_getDelegationToken_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_getDelegationToken_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("cfg", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->cfg)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_getDelegationToken_result::~MasterClientService_getDelegationToken_result() throw() { +} + + +uint32_t MasterClientService_getDelegationToken_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_getDelegationToken_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("MasterClientService_getDelegationToken_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tnase) { + xfer += oprot->writeFieldBegin("tnase", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tnase.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_getDelegationToken_presult::~MasterClientService_getDelegationToken_presult() throw() { +} + + +uint32_t MasterClientService_getDelegationToken_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +MasterClientService_drainReplicationTable_args::~MasterClientService_drainReplicationTable_args() throw() { +} + + +uint32_t MasterClientService_drainReplicationTable_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tfino.read(iprot); + this->__isset.tfino = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_SET) { + { + this->logsToWatch.clear(); + uint32_t _size118; + ::apache::thrift::protocol::TType _etype121; + xfer += iprot->readSetBegin(_etype121, _size118); + uint32_t _i122; + for (_i122 = 0; _i122 < _size118; ++_i122) + { + std::string _elem123; + xfer += iprot->readString(_elem123); + this->logsToWatch.insert(_elem123); + } + xfer += iprot->readSetEnd(); + } + this->__isset.logsToWatch = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_drainReplicationTable_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_drainReplicationTable_args"); + + xfer += oprot->writeFieldBegin("tfino", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tfino.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->tableName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("logsToWatch", ::apache::thrift::protocol::T_SET, 4); + { + xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_STRING, static_cast(this->logsToWatch.size())); + std::set ::const_iterator _iter124; + for (_iter124 = this->logsToWatch.begin(); _iter124 != this->logsToWatch.end(); ++_iter124) + { + xfer += oprot->writeString((*_iter124)); + } + xfer += oprot->writeSetEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_drainReplicationTable_pargs::~MasterClientService_drainReplicationTable_pargs() throw() { +} + + +uint32_t MasterClientService_drainReplicationTable_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterClientService_drainReplicationTable_pargs"); + + xfer += oprot->writeFieldBegin("tfino", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tfino)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("logsToWatch", ::apache::thrift::protocol::T_SET, 4); + { + xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->logsToWatch)).size())); + std::set ::const_iterator _iter125; + for (_iter125 = (*(this->logsToWatch)).begin(); _iter125 != (*(this->logsToWatch)).end(); ++_iter125) + { + xfer += oprot->writeString((*_iter125)); + } + xfer += oprot->writeSetEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_drainReplicationTable_result::~MasterClientService_drainReplicationTable_result() throw() { +} + + +uint32_t MasterClientService_drainReplicationTable_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterClientService_drainReplicationTable_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("MasterClientService_drainReplicationTable_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tnase) { + xfer += oprot->writeFieldBegin("tnase", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tnase.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +MasterClientService_drainReplicationTable_presult::~MasterClientService_drainReplicationTable_presult() throw() { +} + + +uint32_t MasterClientService_drainReplicationTable_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tnase.read(iprot); + this->__isset.tnase = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +int64_t MasterClientServiceClient::initiateFlush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName) +{ + send_initiateFlush(tinfo, credentials, tableName); + return recv_initiateFlush(); +} + +void MasterClientServiceClient::send_initiateFlush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("initiateFlush", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_initiateFlush_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.tableName = &tableName; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +int64_t MasterClientServiceClient::recv_initiateFlush() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("initiateFlush") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + int64_t _return; + MasterClientService_initiateFlush_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tope) { + throw result.tope; + } + if (result.__isset.tnase) { + throw result.tnase; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "initiateFlush failed: unknown result"); +} + +void MasterClientServiceClient::waitForFlush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& startRow, const std::string& endRow, const int64_t flushID, const int64_t maxLoops) +{ + send_waitForFlush(tinfo, credentials, tableName, startRow, endRow, flushID, maxLoops); + recv_waitForFlush(); +} + +void MasterClientServiceClient::send_waitForFlush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& startRow, const std::string& endRow, const int64_t flushID, const int64_t maxLoops) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("waitForFlush", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_waitForFlush_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.tableName = &tableName; + args.startRow = &startRow; + args.endRow = &endRow; + args.flushID = &flushID; + args.maxLoops = &maxLoops; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void MasterClientServiceClient::recv_waitForFlush() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("waitForFlush") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + MasterClientService_waitForFlush_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tope) { + throw result.tope; + } + if (result.__isset.tnase) { + throw result.tnase; + } + return; +} + +void MasterClientServiceClient::setTableProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& property, const std::string& value) +{ + send_setTableProperty(tinfo, credentials, tableName, property, value); + recv_setTableProperty(); +} + +void MasterClientServiceClient::send_setTableProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& property, const std::string& value) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("setTableProperty", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_setTableProperty_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.tableName = &tableName; + args.property = &property; + args.value = &value; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void MasterClientServiceClient::recv_setTableProperty() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("setTableProperty") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + MasterClientService_setTableProperty_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tope) { + throw result.tope; + } + if (result.__isset.tnase) { + throw result.tnase; + } + return; +} + +void MasterClientServiceClient::removeTableProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& property) +{ + send_removeTableProperty(tinfo, credentials, tableName, property); + recv_removeTableProperty(); +} + +void MasterClientServiceClient::send_removeTableProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& property) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("removeTableProperty", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_removeTableProperty_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.tableName = &tableName; + args.property = &property; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void MasterClientServiceClient::recv_removeTableProperty() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("removeTableProperty") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + MasterClientService_removeTableProperty_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tope) { + throw result.tope; + } + if (result.__isset.tnase) { + throw result.tnase; + } + return; +} + +void MasterClientServiceClient::setNamespaceProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns, const std::string& property, const std::string& value) +{ + send_setNamespaceProperty(tinfo, credentials, ns, property, value); + recv_setNamespaceProperty(); +} + +void MasterClientServiceClient::send_setNamespaceProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns, const std::string& property, const std::string& value) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("setNamespaceProperty", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_setNamespaceProperty_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.ns = &ns; + args.property = &property; + args.value = &value; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void MasterClientServiceClient::recv_setNamespaceProperty() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("setNamespaceProperty") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + MasterClientService_setNamespaceProperty_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tope) { + throw result.tope; + } + if (result.__isset.tnase) { + throw result.tnase; + } + return; +} + +void MasterClientServiceClient::removeNamespaceProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns, const std::string& property) +{ + send_removeNamespaceProperty(tinfo, credentials, ns, property); + recv_removeNamespaceProperty(); +} + +void MasterClientServiceClient::send_removeNamespaceProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns, const std::string& property) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("removeNamespaceProperty", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_removeNamespaceProperty_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.ns = &ns; + args.property = &property; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void MasterClientServiceClient::recv_removeNamespaceProperty() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("removeNamespaceProperty") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + MasterClientService_removeNamespaceProperty_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tope) { + throw result.tope; + } + if (result.__isset.tnase) { + throw result.tnase; + } + return; +} + +void MasterClientServiceClient::setMasterGoalState(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const MasterGoalState::type state) +{ + send_setMasterGoalState(tinfo, credentials, state); + recv_setMasterGoalState(); +} + +void MasterClientServiceClient::send_setMasterGoalState(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const MasterGoalState::type state) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("setMasterGoalState", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_setMasterGoalState_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.state = &state; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void MasterClientServiceClient::recv_setMasterGoalState() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("setMasterGoalState") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + MasterClientService_setMasterGoalState_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tnase) { + throw result.tnase; + } + return; +} + +void MasterClientServiceClient::shutdown(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const bool stopTabletServers) +{ + send_shutdown(tinfo, credentials, stopTabletServers); + recv_shutdown(); +} + +void MasterClientServiceClient::send_shutdown(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const bool stopTabletServers) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("shutdown", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_shutdown_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.stopTabletServers = &stopTabletServers; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void MasterClientServiceClient::recv_shutdown() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("shutdown") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + MasterClientService_shutdown_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tnase) { + throw result.tnase; + } + return; +} + +void MasterClientServiceClient::shutdownTabletServer(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tabletServer, const bool force) +{ + send_shutdownTabletServer(tinfo, credentials, tabletServer, force); + recv_shutdownTabletServer(); +} + +void MasterClientServiceClient::send_shutdownTabletServer(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tabletServer, const bool force) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("shutdownTabletServer", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_shutdownTabletServer_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.tabletServer = &tabletServer; + args.force = &force; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void MasterClientServiceClient::recv_shutdownTabletServer() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("shutdownTabletServer") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + MasterClientService_shutdownTabletServer_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tnase) { + throw result.tnase; + } + return; +} + +void MasterClientServiceClient::setSystemProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& property, const std::string& value) +{ + send_setSystemProperty(tinfo, credentials, property, value); + recv_setSystemProperty(); +} + +void MasterClientServiceClient::send_setSystemProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& property, const std::string& value) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("setSystemProperty", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_setSystemProperty_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.property = &property; + args.value = &value; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void MasterClientServiceClient::recv_setSystemProperty() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("setSystemProperty") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + MasterClientService_setSystemProperty_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tnase) { + throw result.tnase; + } + return; +} + +void MasterClientServiceClient::removeSystemProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& property) +{ + send_removeSystemProperty(tinfo, credentials, property); + recv_removeSystemProperty(); +} + +void MasterClientServiceClient::send_removeSystemProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& property) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("removeSystemProperty", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_removeSystemProperty_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.property = &property; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void MasterClientServiceClient::recv_removeSystemProperty() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("removeSystemProperty") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + MasterClientService_removeSystemProperty_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tnase) { + throw result.tnase; + } + return; +} + +void MasterClientServiceClient::getMasterStats(MasterMonitorInfo& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + send_getMasterStats(tinfo, credentials); + recv_getMasterStats(_return); +} + +void MasterClientServiceClient::send_getMasterStats(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getMasterStats", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_getMasterStats_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void MasterClientServiceClient::recv_getMasterStats(MasterMonitorInfo& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getMasterStats") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + MasterClientService_getMasterStats_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tnase) { + throw result.tnase; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getMasterStats failed: unknown result"); +} + +void MasterClientServiceClient::waitForBalance(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo) +{ + send_waitForBalance(tinfo); + recv_waitForBalance(); +} + +void MasterClientServiceClient::send_waitForBalance(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("waitForBalance", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_waitForBalance_pargs args; + args.tinfo = &tinfo; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void MasterClientServiceClient::recv_waitForBalance() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("waitForBalance") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + MasterClientService_waitForBalance_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.tnase) { + throw result.tnase; + } + return; +} + +void MasterClientServiceClient::reportSplitExtent(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& serverName, const TabletSplit& split) +{ + send_reportSplitExtent(tinfo, credentials, serverName, split); +} + +void MasterClientServiceClient::send_reportSplitExtent(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& serverName, const TabletSplit& split) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("reportSplitExtent", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + MasterClientService_reportSplitExtent_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.serverName = &serverName; + args.split = &split; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void MasterClientServiceClient::reportTabletStatus(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& serverName, const TabletLoadState::type status, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& tablet) +{ + send_reportTabletStatus(tinfo, credentials, serverName, status, tablet); +} + +void MasterClientServiceClient::send_reportTabletStatus(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& serverName, const TabletLoadState::type status, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& tablet) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("reportTabletStatus", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + MasterClientService_reportTabletStatus_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.serverName = &serverName; + args.status = &status; + args.tablet = &tablet; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void MasterClientServiceClient::getActiveTservers(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + send_getActiveTservers(tinfo, credentials); + recv_getActiveTservers(_return); +} + +void MasterClientServiceClient::send_getActiveTservers(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getActiveTservers", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_getActiveTservers_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void MasterClientServiceClient::recv_getActiveTservers(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getActiveTservers") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + MasterClientService_getActiveTservers_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tnase) { + throw result.tnase; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getActiveTservers failed: unknown result"); +} + +void MasterClientServiceClient::getDelegationToken( ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationToken& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationTokenConfig& cfg) +{ + send_getDelegationToken(tinfo, credentials, cfg); + recv_getDelegationToken(_return); +} + +void MasterClientServiceClient::send_getDelegationToken(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationTokenConfig& cfg) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getDelegationToken", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_getDelegationToken_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.cfg = &cfg; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void MasterClientServiceClient::recv_getDelegationToken( ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationToken& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getDelegationToken") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + MasterClientService_getDelegationToken_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tnase) { + throw result.tnase; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getDelegationToken failed: unknown result"); +} + +bool MasterClientServiceClient::drainReplicationTable(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tfino, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::set & logsToWatch) +{ + send_drainReplicationTable(tfino, credentials, tableName, logsToWatch); + return recv_drainReplicationTable(); +} + +void MasterClientServiceClient::send_drainReplicationTable(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tfino, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::set & logsToWatch) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drainReplicationTable", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_drainReplicationTable_pargs args; + args.tfino = &tfino; + args.credentials = &credentials; + args.tableName = &tableName; + args.logsToWatch = &logsToWatch; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool MasterClientServiceClient::recv_drainReplicationTable() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drainReplicationTable") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + MasterClientService_drainReplicationTable_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.tnase) { + throw result.tnase; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drainReplicationTable failed: unknown result"); +} + +bool MasterClientServiceProcessor::dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext) { + ProcessMap::iterator pfn; + pfn = processMap_.find(fname); + if (pfn == processMap_.end()) { + return FateServiceProcessor::dispatchCall(iprot, oprot, fname, seqid, callContext); + } + (this->*(pfn->second))(seqid, iprot, oprot, callContext); + return true; +} + +void MasterClientServiceProcessor::process_initiateFlush(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("MasterClientService.initiateFlush", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "MasterClientService.initiateFlush"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "MasterClientService.initiateFlush"); + } + + MasterClientService_initiateFlush_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "MasterClientService.initiateFlush", bytes); + } + + MasterClientService_initiateFlush_result result; + try { + result.success = iface_->initiateFlush(args.tinfo, args.credentials, args.tableName); + result.__isset.success = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException &tope) { + result.tope = tope; + result.__isset.tope = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException &tnase) { + result.tnase = tnase; + result.__isset.tnase = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "MasterClientService.initiateFlush"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("initiateFlush", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "MasterClientService.initiateFlush"); + } + + oprot->writeMessageBegin("initiateFlush", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "MasterClientService.initiateFlush", bytes); + } +} + +void MasterClientServiceProcessor::process_waitForFlush(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("MasterClientService.waitForFlush", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "MasterClientService.waitForFlush"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "MasterClientService.waitForFlush"); + } + + MasterClientService_waitForFlush_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "MasterClientService.waitForFlush", bytes); + } + + MasterClientService_waitForFlush_result result; + try { + iface_->waitForFlush(args.tinfo, args.credentials, args.tableName, args.startRow, args.endRow, args.flushID, args.maxLoops); + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException &tope) { + result.tope = tope; + result.__isset.tope = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException &tnase) { + result.tnase = tnase; + result.__isset.tnase = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "MasterClientService.waitForFlush"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("waitForFlush", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "MasterClientService.waitForFlush"); + } + + oprot->writeMessageBegin("waitForFlush", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "MasterClientService.waitForFlush", bytes); + } +} + +void MasterClientServiceProcessor::process_setTableProperty(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("MasterClientService.setTableProperty", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "MasterClientService.setTableProperty"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "MasterClientService.setTableProperty"); + } + + MasterClientService_setTableProperty_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "MasterClientService.setTableProperty", bytes); + } + + MasterClientService_setTableProperty_result result; + try { + iface_->setTableProperty(args.tinfo, args.credentials, args.tableName, args.property, args.value); + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException &tope) { + result.tope = tope; + result.__isset.tope = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException &tnase) { + result.tnase = tnase; + result.__isset.tnase = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "MasterClientService.setTableProperty"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("setTableProperty", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "MasterClientService.setTableProperty"); + } + + oprot->writeMessageBegin("setTableProperty", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "MasterClientService.setTableProperty", bytes); + } +} + +void MasterClientServiceProcessor::process_removeTableProperty(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("MasterClientService.removeTableProperty", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "MasterClientService.removeTableProperty"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "MasterClientService.removeTableProperty"); + } + + MasterClientService_removeTableProperty_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "MasterClientService.removeTableProperty", bytes); + } + + MasterClientService_removeTableProperty_result result; + try { + iface_->removeTableProperty(args.tinfo, args.credentials, args.tableName, args.property); + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException &tope) { + result.tope = tope; + result.__isset.tope = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException &tnase) { + result.tnase = tnase; + result.__isset.tnase = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "MasterClientService.removeTableProperty"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("removeTableProperty", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "MasterClientService.removeTableProperty"); + } + + oprot->writeMessageBegin("removeTableProperty", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "MasterClientService.removeTableProperty", bytes); + } +} + +void MasterClientServiceProcessor::process_setNamespaceProperty(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("MasterClientService.setNamespaceProperty", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "MasterClientService.setNamespaceProperty"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "MasterClientService.setNamespaceProperty"); + } + + MasterClientService_setNamespaceProperty_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "MasterClientService.setNamespaceProperty", bytes); + } + + MasterClientService_setNamespaceProperty_result result; + try { + iface_->setNamespaceProperty(args.tinfo, args.credentials, args.ns, args.property, args.value); + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException &tope) { + result.tope = tope; + result.__isset.tope = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException &tnase) { + result.tnase = tnase; + result.__isset.tnase = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "MasterClientService.setNamespaceProperty"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("setNamespaceProperty", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "MasterClientService.setNamespaceProperty"); + } + + oprot->writeMessageBegin("setNamespaceProperty", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "MasterClientService.setNamespaceProperty", bytes); + } +} + +void MasterClientServiceProcessor::process_removeNamespaceProperty(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("MasterClientService.removeNamespaceProperty", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "MasterClientService.removeNamespaceProperty"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "MasterClientService.removeNamespaceProperty"); + } + + MasterClientService_removeNamespaceProperty_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "MasterClientService.removeNamespaceProperty", bytes); + } + + MasterClientService_removeNamespaceProperty_result result; + try { + iface_->removeNamespaceProperty(args.tinfo, args.credentials, args.ns, args.property); + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException &tope) { + result.tope = tope; + result.__isset.tope = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException &tnase) { + result.tnase = tnase; + result.__isset.tnase = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "MasterClientService.removeNamespaceProperty"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("removeNamespaceProperty", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "MasterClientService.removeNamespaceProperty"); + } + + oprot->writeMessageBegin("removeNamespaceProperty", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "MasterClientService.removeNamespaceProperty", bytes); + } +} + +void MasterClientServiceProcessor::process_setMasterGoalState(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("MasterClientService.setMasterGoalState", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "MasterClientService.setMasterGoalState"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "MasterClientService.setMasterGoalState"); + } + + MasterClientService_setMasterGoalState_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "MasterClientService.setMasterGoalState", bytes); + } + + MasterClientService_setMasterGoalState_result result; + try { + iface_->setMasterGoalState(args.tinfo, args.credentials, args.state); + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException &tnase) { + result.tnase = tnase; + result.__isset.tnase = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "MasterClientService.setMasterGoalState"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("setMasterGoalState", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "MasterClientService.setMasterGoalState"); + } + + oprot->writeMessageBegin("setMasterGoalState", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "MasterClientService.setMasterGoalState", bytes); + } +} + +void MasterClientServiceProcessor::process_shutdown(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("MasterClientService.shutdown", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "MasterClientService.shutdown"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "MasterClientService.shutdown"); + } + + MasterClientService_shutdown_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "MasterClientService.shutdown", bytes); + } + + MasterClientService_shutdown_result result; + try { + iface_->shutdown(args.tinfo, args.credentials, args.stopTabletServers); + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException &tnase) { + result.tnase = tnase; + result.__isset.tnase = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "MasterClientService.shutdown"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("shutdown", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "MasterClientService.shutdown"); + } + + oprot->writeMessageBegin("shutdown", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "MasterClientService.shutdown", bytes); + } +} + +void MasterClientServiceProcessor::process_shutdownTabletServer(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("MasterClientService.shutdownTabletServer", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "MasterClientService.shutdownTabletServer"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "MasterClientService.shutdownTabletServer"); + } + + MasterClientService_shutdownTabletServer_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "MasterClientService.shutdownTabletServer", bytes); + } + + MasterClientService_shutdownTabletServer_result result; + try { + iface_->shutdownTabletServer(args.tinfo, args.credentials, args.tabletServer, args.force); + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException &tnase) { + result.tnase = tnase; + result.__isset.tnase = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "MasterClientService.shutdownTabletServer"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("shutdownTabletServer", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "MasterClientService.shutdownTabletServer"); + } + + oprot->writeMessageBegin("shutdownTabletServer", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "MasterClientService.shutdownTabletServer", bytes); + } +} + +void MasterClientServiceProcessor::process_setSystemProperty(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("MasterClientService.setSystemProperty", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "MasterClientService.setSystemProperty"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "MasterClientService.setSystemProperty"); + } + + MasterClientService_setSystemProperty_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "MasterClientService.setSystemProperty", bytes); + } + + MasterClientService_setSystemProperty_result result; + try { + iface_->setSystemProperty(args.tinfo, args.credentials, args.property, args.value); + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException &tnase) { + result.tnase = tnase; + result.__isset.tnase = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "MasterClientService.setSystemProperty"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("setSystemProperty", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "MasterClientService.setSystemProperty"); + } + + oprot->writeMessageBegin("setSystemProperty", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "MasterClientService.setSystemProperty", bytes); + } +} + +void MasterClientServiceProcessor::process_removeSystemProperty(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("MasterClientService.removeSystemProperty", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "MasterClientService.removeSystemProperty"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "MasterClientService.removeSystemProperty"); + } + + MasterClientService_removeSystemProperty_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "MasterClientService.removeSystemProperty", bytes); + } + + MasterClientService_removeSystemProperty_result result; + try { + iface_->removeSystemProperty(args.tinfo, args.credentials, args.property); + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException &tnase) { + result.tnase = tnase; + result.__isset.tnase = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "MasterClientService.removeSystemProperty"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("removeSystemProperty", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "MasterClientService.removeSystemProperty"); + } + + oprot->writeMessageBegin("removeSystemProperty", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "MasterClientService.removeSystemProperty", bytes); + } +} + +void MasterClientServiceProcessor::process_getMasterStats(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("MasterClientService.getMasterStats", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "MasterClientService.getMasterStats"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "MasterClientService.getMasterStats"); + } + + MasterClientService_getMasterStats_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "MasterClientService.getMasterStats", bytes); + } + + MasterClientService_getMasterStats_result result; + try { + iface_->getMasterStats(result.success, args.tinfo, args.credentials); + result.__isset.success = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException &tnase) { + result.tnase = tnase; + result.__isset.tnase = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "MasterClientService.getMasterStats"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getMasterStats", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "MasterClientService.getMasterStats"); + } + + oprot->writeMessageBegin("getMasterStats", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "MasterClientService.getMasterStats", bytes); + } +} + +void MasterClientServiceProcessor::process_waitForBalance(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("MasterClientService.waitForBalance", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "MasterClientService.waitForBalance"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "MasterClientService.waitForBalance"); + } + + MasterClientService_waitForBalance_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "MasterClientService.waitForBalance", bytes); + } + + MasterClientService_waitForBalance_result result; + try { + iface_->waitForBalance(args.tinfo); + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException &tnase) { + result.tnase = tnase; + result.__isset.tnase = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "MasterClientService.waitForBalance"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("waitForBalance", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "MasterClientService.waitForBalance"); + } + + oprot->writeMessageBegin("waitForBalance", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "MasterClientService.waitForBalance", bytes); + } +} + +void MasterClientServiceProcessor::process_reportSplitExtent(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("MasterClientService.reportSplitExtent", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "MasterClientService.reportSplitExtent"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "MasterClientService.reportSplitExtent"); + } + + MasterClientService_reportSplitExtent_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "MasterClientService.reportSplitExtent", bytes); + } + + try { + iface_->reportSplitExtent(args.tinfo, args.credentials, args.serverName, args.split); + } catch (const std::exception&) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "MasterClientService.reportSplitExtent"); + } + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->asyncComplete(ctx, "MasterClientService.reportSplitExtent"); + } + + return; +} + +void MasterClientServiceProcessor::process_reportTabletStatus(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("MasterClientService.reportTabletStatus", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "MasterClientService.reportTabletStatus"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "MasterClientService.reportTabletStatus"); + } + + MasterClientService_reportTabletStatus_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "MasterClientService.reportTabletStatus", bytes); + } + + try { + iface_->reportTabletStatus(args.tinfo, args.credentials, args.serverName, args.status, args.tablet); + } catch (const std::exception&) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "MasterClientService.reportTabletStatus"); + } + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->asyncComplete(ctx, "MasterClientService.reportTabletStatus"); + } + + return; +} + +void MasterClientServiceProcessor::process_getActiveTservers(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("MasterClientService.getActiveTservers", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "MasterClientService.getActiveTservers"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "MasterClientService.getActiveTservers"); + } + + MasterClientService_getActiveTservers_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "MasterClientService.getActiveTservers", bytes); + } + + MasterClientService_getActiveTservers_result result; + try { + iface_->getActiveTservers(result.success, args.tinfo, args.credentials); + result.__isset.success = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException &tnase) { + result.tnase = tnase; + result.__isset.tnase = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "MasterClientService.getActiveTservers"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getActiveTservers", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "MasterClientService.getActiveTservers"); + } + + oprot->writeMessageBegin("getActiveTservers", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "MasterClientService.getActiveTservers", bytes); + } +} + +void MasterClientServiceProcessor::process_getDelegationToken(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("MasterClientService.getDelegationToken", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "MasterClientService.getDelegationToken"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "MasterClientService.getDelegationToken"); + } + + MasterClientService_getDelegationToken_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "MasterClientService.getDelegationToken", bytes); + } + + MasterClientService_getDelegationToken_result result; + try { + iface_->getDelegationToken(result.success, args.tinfo, args.credentials, args.cfg); + result.__isset.success = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException &tnase) { + result.tnase = tnase; + result.__isset.tnase = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "MasterClientService.getDelegationToken"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getDelegationToken", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "MasterClientService.getDelegationToken"); + } + + oprot->writeMessageBegin("getDelegationToken", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "MasterClientService.getDelegationToken", bytes); + } +} + +void MasterClientServiceProcessor::process_drainReplicationTable(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("MasterClientService.drainReplicationTable", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "MasterClientService.drainReplicationTable"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "MasterClientService.drainReplicationTable"); + } + + MasterClientService_drainReplicationTable_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "MasterClientService.drainReplicationTable", bytes); + } + + MasterClientService_drainReplicationTable_result result; + try { + result.success = iface_->drainReplicationTable(args.tfino, args.credentials, args.tableName, args.logsToWatch); + result.__isset.success = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftNotActiveServiceException &tnase) { + result.tnase = tnase; + result.__isset.tnase = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "MasterClientService.drainReplicationTable"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drainReplicationTable", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "MasterClientService.drainReplicationTable"); + } + + oprot->writeMessageBegin("drainReplicationTable", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "MasterClientService.drainReplicationTable", bytes); + } +} + +std::shared_ptr< ::apache::thrift::TProcessor > MasterClientServiceProcessorFactory::getProcessor(const ::apache::thrift::TConnectionInfo& connInfo) { + ::apache::thrift::ReleaseHandler< MasterClientServiceIfFactory > cleanup(handlerFactory_); + std::shared_ptr< MasterClientServiceIf > handler(handlerFactory_->getHandler(connInfo), cleanup); + std::shared_ptr< ::apache::thrift::TProcessor > processor(new MasterClientServiceProcessor(handler)); + return processor; +} + +int64_t MasterClientServiceConcurrentClient::initiateFlush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName) +{ + int32_t seqid = send_initiateFlush(tinfo, credentials, tableName); + return recv_initiateFlush(seqid); +} + +int32_t MasterClientServiceConcurrentClient::send_initiateFlush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("initiateFlush", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_initiateFlush_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.tableName = &tableName; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +int64_t MasterClientServiceConcurrentClient::recv_initiateFlush(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("initiateFlush") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + int64_t _return; + MasterClientService_initiateFlush_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tope) { + sentry.commit(); + throw result.tope; + } + if (result.__isset.tnase) { + sentry.commit(); + throw result.tnase; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "initiateFlush failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void MasterClientServiceConcurrentClient::waitForFlush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& startRow, const std::string& endRow, const int64_t flushID, const int64_t maxLoops) +{ + int32_t seqid = send_waitForFlush(tinfo, credentials, tableName, startRow, endRow, flushID, maxLoops); + recv_waitForFlush(seqid); +} + +int32_t MasterClientServiceConcurrentClient::send_waitForFlush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& startRow, const std::string& endRow, const int64_t flushID, const int64_t maxLoops) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("waitForFlush", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_waitForFlush_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.tableName = &tableName; + args.startRow = &startRow; + args.endRow = &endRow; + args.flushID = &flushID; + args.maxLoops = &maxLoops; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void MasterClientServiceConcurrentClient::recv_waitForFlush(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("waitForFlush") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + MasterClientService_waitForFlush_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tope) { + sentry.commit(); + throw result.tope; + } + if (result.__isset.tnase) { + sentry.commit(); + throw result.tnase; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void MasterClientServiceConcurrentClient::setTableProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& property, const std::string& value) +{ + int32_t seqid = send_setTableProperty(tinfo, credentials, tableName, property, value); + recv_setTableProperty(seqid); +} + +int32_t MasterClientServiceConcurrentClient::send_setTableProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& property, const std::string& value) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("setTableProperty", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_setTableProperty_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.tableName = &tableName; + args.property = &property; + args.value = &value; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void MasterClientServiceConcurrentClient::recv_setTableProperty(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("setTableProperty") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + MasterClientService_setTableProperty_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tope) { + sentry.commit(); + throw result.tope; + } + if (result.__isset.tnase) { + sentry.commit(); + throw result.tnase; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void MasterClientServiceConcurrentClient::removeTableProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& property) +{ + int32_t seqid = send_removeTableProperty(tinfo, credentials, tableName, property); + recv_removeTableProperty(seqid); +} + +int32_t MasterClientServiceConcurrentClient::send_removeTableProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::string& property) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("removeTableProperty", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_removeTableProperty_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.tableName = &tableName; + args.property = &property; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void MasterClientServiceConcurrentClient::recv_removeTableProperty(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("removeTableProperty") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + MasterClientService_removeTableProperty_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tope) { + sentry.commit(); + throw result.tope; + } + if (result.__isset.tnase) { + sentry.commit(); + throw result.tnase; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void MasterClientServiceConcurrentClient::setNamespaceProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns, const std::string& property, const std::string& value) +{ + int32_t seqid = send_setNamespaceProperty(tinfo, credentials, ns, property, value); + recv_setNamespaceProperty(seqid); +} + +int32_t MasterClientServiceConcurrentClient::send_setNamespaceProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns, const std::string& property, const std::string& value) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("setNamespaceProperty", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_setNamespaceProperty_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.ns = &ns; + args.property = &property; + args.value = &value; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void MasterClientServiceConcurrentClient::recv_setNamespaceProperty(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("setNamespaceProperty") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + MasterClientService_setNamespaceProperty_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tope) { + sentry.commit(); + throw result.tope; + } + if (result.__isset.tnase) { + sentry.commit(); + throw result.tnase; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void MasterClientServiceConcurrentClient::removeNamespaceProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns, const std::string& property) +{ + int32_t seqid = send_removeNamespaceProperty(tinfo, credentials, ns, property); + recv_removeNamespaceProperty(seqid); +} + +int32_t MasterClientServiceConcurrentClient::send_removeNamespaceProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& ns, const std::string& property) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("removeNamespaceProperty", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_removeNamespaceProperty_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.ns = &ns; + args.property = &property; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void MasterClientServiceConcurrentClient::recv_removeNamespaceProperty(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("removeNamespaceProperty") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + MasterClientService_removeNamespaceProperty_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tope) { + sentry.commit(); + throw result.tope; + } + if (result.__isset.tnase) { + sentry.commit(); + throw result.tnase; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void MasterClientServiceConcurrentClient::setMasterGoalState(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const MasterGoalState::type state) +{ + int32_t seqid = send_setMasterGoalState(tinfo, credentials, state); + recv_setMasterGoalState(seqid); +} + +int32_t MasterClientServiceConcurrentClient::send_setMasterGoalState(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const MasterGoalState::type state) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("setMasterGoalState", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_setMasterGoalState_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.state = &state; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void MasterClientServiceConcurrentClient::recv_setMasterGoalState(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("setMasterGoalState") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + MasterClientService_setMasterGoalState_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tnase) { + sentry.commit(); + throw result.tnase; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void MasterClientServiceConcurrentClient::shutdown(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const bool stopTabletServers) +{ + int32_t seqid = send_shutdown(tinfo, credentials, stopTabletServers); + recv_shutdown(seqid); +} + +int32_t MasterClientServiceConcurrentClient::send_shutdown(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const bool stopTabletServers) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("shutdown", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_shutdown_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.stopTabletServers = &stopTabletServers; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void MasterClientServiceConcurrentClient::recv_shutdown(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("shutdown") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + MasterClientService_shutdown_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tnase) { + sentry.commit(); + throw result.tnase; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void MasterClientServiceConcurrentClient::shutdownTabletServer(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tabletServer, const bool force) +{ + int32_t seqid = send_shutdownTabletServer(tinfo, credentials, tabletServer, force); + recv_shutdownTabletServer(seqid); +} + +int32_t MasterClientServiceConcurrentClient::send_shutdownTabletServer(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tabletServer, const bool force) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("shutdownTabletServer", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_shutdownTabletServer_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.tabletServer = &tabletServer; + args.force = &force; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void MasterClientServiceConcurrentClient::recv_shutdownTabletServer(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("shutdownTabletServer") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + MasterClientService_shutdownTabletServer_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tnase) { + sentry.commit(); + throw result.tnase; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void MasterClientServiceConcurrentClient::setSystemProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& property, const std::string& value) +{ + int32_t seqid = send_setSystemProperty(tinfo, credentials, property, value); + recv_setSystemProperty(seqid); +} + +int32_t MasterClientServiceConcurrentClient::send_setSystemProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& property, const std::string& value) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("setSystemProperty", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_setSystemProperty_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.property = &property; + args.value = &value; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void MasterClientServiceConcurrentClient::recv_setSystemProperty(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("setSystemProperty") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + MasterClientService_setSystemProperty_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tnase) { + sentry.commit(); + throw result.tnase; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void MasterClientServiceConcurrentClient::removeSystemProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& property) +{ + int32_t seqid = send_removeSystemProperty(tinfo, credentials, property); + recv_removeSystemProperty(seqid); +} + +int32_t MasterClientServiceConcurrentClient::send_removeSystemProperty(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& property) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("removeSystemProperty", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_removeSystemProperty_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.property = &property; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void MasterClientServiceConcurrentClient::recv_removeSystemProperty(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("removeSystemProperty") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + MasterClientService_removeSystemProperty_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tnase) { + sentry.commit(); + throw result.tnase; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void MasterClientServiceConcurrentClient::getMasterStats(MasterMonitorInfo& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t seqid = send_getMasterStats(tinfo, credentials); + recv_getMasterStats(_return, seqid); +} + +int32_t MasterClientServiceConcurrentClient::send_getMasterStats(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("getMasterStats", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_getMasterStats_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void MasterClientServiceConcurrentClient::recv_getMasterStats(MasterMonitorInfo& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getMasterStats") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + MasterClientService_getMasterStats_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tnase) { + sentry.commit(); + throw result.tnase; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getMasterStats failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void MasterClientServiceConcurrentClient::waitForBalance(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo) +{ + int32_t seqid = send_waitForBalance(tinfo); + recv_waitForBalance(seqid); +} + +int32_t MasterClientServiceConcurrentClient::send_waitForBalance(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("waitForBalance", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_waitForBalance_pargs args; + args.tinfo = &tinfo; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void MasterClientServiceConcurrentClient::recv_waitForBalance(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("waitForBalance") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + MasterClientService_waitForBalance_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.tnase) { + sentry.commit(); + throw result.tnase; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void MasterClientServiceConcurrentClient::reportSplitExtent(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& serverName, const TabletSplit& split) +{ + send_reportSplitExtent(tinfo, credentials, serverName, split); +} + +void MasterClientServiceConcurrentClient::send_reportSplitExtent(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& serverName, const TabletSplit& split) +{ + int32_t cseqid = 0; + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("reportSplitExtent", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + MasterClientService_reportSplitExtent_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.serverName = &serverName; + args.split = &split; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); +} + +void MasterClientServiceConcurrentClient::reportTabletStatus(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& serverName, const TabletLoadState::type status, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& tablet) +{ + send_reportTabletStatus(tinfo, credentials, serverName, status, tablet); +} + +void MasterClientServiceConcurrentClient::send_reportTabletStatus(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& serverName, const TabletLoadState::type status, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& tablet) +{ + int32_t cseqid = 0; + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("reportTabletStatus", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + MasterClientService_reportTabletStatus_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.serverName = &serverName; + args.status = &status; + args.tablet = &tablet; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); +} + +void MasterClientServiceConcurrentClient::getActiveTservers(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t seqid = send_getActiveTservers(tinfo, credentials); + recv_getActiveTservers(_return, seqid); +} + +int32_t MasterClientServiceConcurrentClient::send_getActiveTservers(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("getActiveTservers", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_getActiveTservers_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void MasterClientServiceConcurrentClient::recv_getActiveTservers(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getActiveTservers") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + MasterClientService_getActiveTservers_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tnase) { + sentry.commit(); + throw result.tnase; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getActiveTservers failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void MasterClientServiceConcurrentClient::getDelegationToken( ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationToken& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationTokenConfig& cfg) +{ + int32_t seqid = send_getDelegationToken(tinfo, credentials, cfg); + recv_getDelegationToken(_return, seqid); +} + +int32_t MasterClientServiceConcurrentClient::send_getDelegationToken(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationTokenConfig& cfg) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("getDelegationToken", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_getDelegationToken_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.cfg = &cfg; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void MasterClientServiceConcurrentClient::recv_getDelegationToken( ::org::apache::accumulov2::core::securityImpl::thrift::TDelegationToken& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getDelegationToken") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + MasterClientService_getDelegationToken_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tnase) { + sentry.commit(); + throw result.tnase; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getDelegationToken failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool MasterClientServiceConcurrentClient::drainReplicationTable(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tfino, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::set & logsToWatch) +{ + int32_t seqid = send_drainReplicationTable(tfino, credentials, tableName, logsToWatch); + return recv_drainReplicationTable(seqid); +} + +int32_t MasterClientServiceConcurrentClient::send_drainReplicationTable(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tfino, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableName, const std::set & logsToWatch) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("drainReplicationTable", ::apache::thrift::protocol::T_CALL, cseqid); + + MasterClientService_drainReplicationTable_pargs args; + args.tfino = &tfino; + args.credentials = &credentials; + args.tableName = &tableName; + args.logsToWatch = &logsToWatch; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool MasterClientServiceConcurrentClient::recv_drainReplicationTable(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drainReplicationTable") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + MasterClientService_drainReplicationTable_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.tnase) { + sentry.commit(); + throw result.tnase; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drainReplicationTable failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +}}}}}} // namespace + diff --git a/src/data/extern/thriftv2/ReplicationCoordinator.cpp b/src/data/extern/thriftv2/ReplicationCoordinator.cpp new file mode 100644 index 00000000..7c8183de --- /dev/null +++ b/src/data/extern/thriftv2/ReplicationCoordinator.cpp @@ -0,0 +1,469 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "data/extern/thriftv2/ReplicationCoordinator.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace replication { namespace thrift { + + +ReplicationCoordinator_getServicerAddress_args::~ReplicationCoordinator_getServicerAddress_args() throw() { +} + + +uint32_t ReplicationCoordinator_getServicerAddress_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->remoteTableId); + this->__isset.remoteTableId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ReplicationCoordinator_getServicerAddress_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ReplicationCoordinator_getServicerAddress_args"); + + xfer += oprot->writeFieldBegin("remoteTableId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->remoteTableId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ReplicationCoordinator_getServicerAddress_pargs::~ReplicationCoordinator_getServicerAddress_pargs() throw() { +} + + +uint32_t ReplicationCoordinator_getServicerAddress_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ReplicationCoordinator_getServicerAddress_pargs"); + + xfer += oprot->writeFieldBegin("remoteTableId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->remoteTableId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ReplicationCoordinator_getServicerAddress_result::~ReplicationCoordinator_getServicerAddress_result() throw() { +} + + +uint32_t ReplicationCoordinator_getServicerAddress_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->e.read(iprot); + this->__isset.e = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ReplicationCoordinator_getServicerAddress_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ReplicationCoordinator_getServicerAddress_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0); + xfer += oprot->writeString(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.e) { + xfer += oprot->writeFieldBegin("e", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->e.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ReplicationCoordinator_getServicerAddress_presult::~ReplicationCoordinator_getServicerAddress_presult() throw() { +} + + +uint32_t ReplicationCoordinator_getServicerAddress_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->e.read(iprot); + this->__isset.e = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +void ReplicationCoordinatorClient::getServicerAddress(std::string& _return, const std::string& remoteTableId, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + send_getServicerAddress(remoteTableId, credentials); + recv_getServicerAddress(_return); +} + +void ReplicationCoordinatorClient::send_getServicerAddress(const std::string& remoteTableId, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getServicerAddress", ::apache::thrift::protocol::T_CALL, cseqid); + + ReplicationCoordinator_getServicerAddress_pargs args; + args.remoteTableId = &remoteTableId; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ReplicationCoordinatorClient::recv_getServicerAddress(std::string& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getServicerAddress") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ReplicationCoordinator_getServicerAddress_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.e) { + throw result.e; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getServicerAddress failed: unknown result"); +} + +bool ReplicationCoordinatorProcessor::dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext) { + ProcessMap::iterator pfn; + pfn = processMap_.find(fname); + if (pfn == processMap_.end()) { + iprot->skip(::apache::thrift::protocol::T_STRUCT); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + ::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::UNKNOWN_METHOD, "Invalid method name: '"+fname+"'"); + oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return true; + } + (this->*(pfn->second))(seqid, iprot, oprot, callContext); + return true; +} + +void ReplicationCoordinatorProcessor::process_getServicerAddress(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ReplicationCoordinator.getServicerAddress", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ReplicationCoordinator.getServicerAddress"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ReplicationCoordinator.getServicerAddress"); + } + + ReplicationCoordinator_getServicerAddress_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ReplicationCoordinator.getServicerAddress", bytes); + } + + ReplicationCoordinator_getServicerAddress_result result; + try { + iface_->getServicerAddress(result.success, args.remoteTableId, args.credentials); + result.__isset.success = true; + } catch (ReplicationCoordinatorException &e) { + result.e = e; + result.__isset.e = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ReplicationCoordinator.getServicerAddress"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getServicerAddress", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ReplicationCoordinator.getServicerAddress"); + } + + oprot->writeMessageBegin("getServicerAddress", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ReplicationCoordinator.getServicerAddress", bytes); + } +} + +std::shared_ptr< ::apache::thrift::TProcessor > ReplicationCoordinatorProcessorFactory::getProcessor(const ::apache::thrift::TConnectionInfo& connInfo) { + ::apache::thrift::ReleaseHandler< ReplicationCoordinatorIfFactory > cleanup(handlerFactory_); + std::shared_ptr< ReplicationCoordinatorIf > handler(handlerFactory_->getHandler(connInfo), cleanup); + std::shared_ptr< ::apache::thrift::TProcessor > processor(new ReplicationCoordinatorProcessor(handler)); + return processor; +} + +void ReplicationCoordinatorConcurrentClient::getServicerAddress(std::string& _return, const std::string& remoteTableId, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t seqid = send_getServicerAddress(remoteTableId, credentials); + recv_getServicerAddress(_return, seqid); +} + +int32_t ReplicationCoordinatorConcurrentClient::send_getServicerAddress(const std::string& remoteTableId, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("getServicerAddress", ::apache::thrift::protocol::T_CALL, cseqid); + + ReplicationCoordinator_getServicerAddress_pargs args; + args.remoteTableId = &remoteTableId; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ReplicationCoordinatorConcurrentClient::recv_getServicerAddress(std::string& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getServicerAddress") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ReplicationCoordinator_getServicerAddress_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.e) { + sentry.commit(); + throw result.e; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getServicerAddress failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +}}}}}} // namespace + diff --git a/src/data/extern/thriftv2/ReplicationServicer.cpp b/src/data/extern/thriftv2/ReplicationServicer.cpp new file mode 100644 index 00000000..5a509ed5 --- /dev/null +++ b/src/data/extern/thriftv2/ReplicationServicer.cpp @@ -0,0 +1,936 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "data/extern/thriftv2/ReplicationServicer.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace replication { namespace thrift { + + +ReplicationServicer_replicateLog_args::~ReplicationServicer_replicateLog_args() throw() { +} + + +uint32_t ReplicationServicer_replicateLog_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->remoteTableId); + this->__isset.remoteTableId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->data.read(iprot); + this->__isset.data = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ReplicationServicer_replicateLog_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ReplicationServicer_replicateLog_args"); + + xfer += oprot->writeFieldBegin("remoteTableId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->remoteTableId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("data", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->data.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ReplicationServicer_replicateLog_pargs::~ReplicationServicer_replicateLog_pargs() throw() { +} + + +uint32_t ReplicationServicer_replicateLog_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ReplicationServicer_replicateLog_pargs"); + + xfer += oprot->writeFieldBegin("remoteTableId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->remoteTableId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("data", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->data)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ReplicationServicer_replicateLog_result::~ReplicationServicer_replicateLog_result() throw() { +} + + +uint32_t ReplicationServicer_replicateLog_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->e.read(iprot); + this->__isset.e = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ReplicationServicer_replicateLog_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ReplicationServicer_replicateLog_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I64, 0); + xfer += oprot->writeI64(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.e) { + xfer += oprot->writeFieldBegin("e", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->e.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ReplicationServicer_replicateLog_presult::~ReplicationServicer_replicateLog_presult() throw() { +} + + +uint32_t ReplicationServicer_replicateLog_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->e.read(iprot); + this->__isset.e = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ReplicationServicer_replicateKeyValues_args::~ReplicationServicer_replicateKeyValues_args() throw() { +} + + +uint32_t ReplicationServicer_replicateKeyValues_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->remoteTableId); + this->__isset.remoteTableId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->data.read(iprot); + this->__isset.data = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ReplicationServicer_replicateKeyValues_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ReplicationServicer_replicateKeyValues_args"); + + xfer += oprot->writeFieldBegin("remoteTableId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->remoteTableId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("data", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->data.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ReplicationServicer_replicateKeyValues_pargs::~ReplicationServicer_replicateKeyValues_pargs() throw() { +} + + +uint32_t ReplicationServicer_replicateKeyValues_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ReplicationServicer_replicateKeyValues_pargs"); + + xfer += oprot->writeFieldBegin("remoteTableId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->remoteTableId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("data", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->data)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ReplicationServicer_replicateKeyValues_result::~ReplicationServicer_replicateKeyValues_result() throw() { +} + + +uint32_t ReplicationServicer_replicateKeyValues_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->e.read(iprot); + this->__isset.e = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ReplicationServicer_replicateKeyValues_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ReplicationServicer_replicateKeyValues_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I64, 0); + xfer += oprot->writeI64(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.e) { + xfer += oprot->writeFieldBegin("e", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->e.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ReplicationServicer_replicateKeyValues_presult::~ReplicationServicer_replicateKeyValues_presult() throw() { +} + + +uint32_t ReplicationServicer_replicateKeyValues_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->e.read(iprot); + this->__isset.e = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +int64_t ReplicationServicerClient::replicateLog(const std::string& remoteTableId, const WalEdits& data, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + send_replicateLog(remoteTableId, data, credentials); + return recv_replicateLog(); +} + +void ReplicationServicerClient::send_replicateLog(const std::string& remoteTableId, const WalEdits& data, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("replicateLog", ::apache::thrift::protocol::T_CALL, cseqid); + + ReplicationServicer_replicateLog_pargs args; + args.remoteTableId = &remoteTableId; + args.data = &data; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +int64_t ReplicationServicerClient::recv_replicateLog() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("replicateLog") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + int64_t _return; + ReplicationServicer_replicateLog_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.e) { + throw result.e; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "replicateLog failed: unknown result"); +} + +int64_t ReplicationServicerClient::replicateKeyValues(const std::string& remoteTableId, const KeyValues& data, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + send_replicateKeyValues(remoteTableId, data, credentials); + return recv_replicateKeyValues(); +} + +void ReplicationServicerClient::send_replicateKeyValues(const std::string& remoteTableId, const KeyValues& data, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("replicateKeyValues", ::apache::thrift::protocol::T_CALL, cseqid); + + ReplicationServicer_replicateKeyValues_pargs args; + args.remoteTableId = &remoteTableId; + args.data = &data; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +int64_t ReplicationServicerClient::recv_replicateKeyValues() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("replicateKeyValues") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + int64_t _return; + ReplicationServicer_replicateKeyValues_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.e) { + throw result.e; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "replicateKeyValues failed: unknown result"); +} + +bool ReplicationServicerProcessor::dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext) { + ProcessMap::iterator pfn; + pfn = processMap_.find(fname); + if (pfn == processMap_.end()) { + iprot->skip(::apache::thrift::protocol::T_STRUCT); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + ::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::UNKNOWN_METHOD, "Invalid method name: '"+fname+"'"); + oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return true; + } + (this->*(pfn->second))(seqid, iprot, oprot, callContext); + return true; +} + +void ReplicationServicerProcessor::process_replicateLog(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ReplicationServicer.replicateLog", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ReplicationServicer.replicateLog"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ReplicationServicer.replicateLog"); + } + + ReplicationServicer_replicateLog_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ReplicationServicer.replicateLog", bytes); + } + + ReplicationServicer_replicateLog_result result; + try { + result.success = iface_->replicateLog(args.remoteTableId, args.data, args.credentials); + result.__isset.success = true; + } catch (RemoteReplicationException &e) { + result.e = e; + result.__isset.e = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ReplicationServicer.replicateLog"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("replicateLog", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ReplicationServicer.replicateLog"); + } + + oprot->writeMessageBegin("replicateLog", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ReplicationServicer.replicateLog", bytes); + } +} + +void ReplicationServicerProcessor::process_replicateKeyValues(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ReplicationServicer.replicateKeyValues", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ReplicationServicer.replicateKeyValues"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ReplicationServicer.replicateKeyValues"); + } + + ReplicationServicer_replicateKeyValues_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ReplicationServicer.replicateKeyValues", bytes); + } + + ReplicationServicer_replicateKeyValues_result result; + try { + result.success = iface_->replicateKeyValues(args.remoteTableId, args.data, args.credentials); + result.__isset.success = true; + } catch (RemoteReplicationException &e) { + result.e = e; + result.__isset.e = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ReplicationServicer.replicateKeyValues"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("replicateKeyValues", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ReplicationServicer.replicateKeyValues"); + } + + oprot->writeMessageBegin("replicateKeyValues", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ReplicationServicer.replicateKeyValues", bytes); + } +} + +std::shared_ptr< ::apache::thrift::TProcessor > ReplicationServicerProcessorFactory::getProcessor(const ::apache::thrift::TConnectionInfo& connInfo) { + ::apache::thrift::ReleaseHandler< ReplicationServicerIfFactory > cleanup(handlerFactory_); + std::shared_ptr< ReplicationServicerIf > handler(handlerFactory_->getHandler(connInfo), cleanup); + std::shared_ptr< ::apache::thrift::TProcessor > processor(new ReplicationServicerProcessor(handler)); + return processor; +} + +int64_t ReplicationServicerConcurrentClient::replicateLog(const std::string& remoteTableId, const WalEdits& data, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t seqid = send_replicateLog(remoteTableId, data, credentials); + return recv_replicateLog(seqid); +} + +int32_t ReplicationServicerConcurrentClient::send_replicateLog(const std::string& remoteTableId, const WalEdits& data, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("replicateLog", ::apache::thrift::protocol::T_CALL, cseqid); + + ReplicationServicer_replicateLog_pargs args; + args.remoteTableId = &remoteTableId; + args.data = &data; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +int64_t ReplicationServicerConcurrentClient::recv_replicateLog(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("replicateLog") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + int64_t _return; + ReplicationServicer_replicateLog_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.e) { + sentry.commit(); + throw result.e; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "replicateLog failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +int64_t ReplicationServicerConcurrentClient::replicateKeyValues(const std::string& remoteTableId, const KeyValues& data, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t seqid = send_replicateKeyValues(remoteTableId, data, credentials); + return recv_replicateKeyValues(seqid); +} + +int32_t ReplicationServicerConcurrentClient::send_replicateKeyValues(const std::string& remoteTableId, const KeyValues& data, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("replicateKeyValues", ::apache::thrift::protocol::T_CALL, cseqid); + + ReplicationServicer_replicateKeyValues_pargs args; + args.remoteTableId = &remoteTableId; + args.data = &data; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +int64_t ReplicationServicerConcurrentClient::recv_replicateKeyValues(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("replicateKeyValues") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + int64_t _return; + ReplicationServicer_replicateKeyValues_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.e) { + sentry.commit(); + throw result.e; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "replicateKeyValues failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +}}}}}} // namespace + diff --git a/src/data/extern/thriftv2/TabletClientService.cpp b/src/data/extern/thriftv2/TabletClientService.cpp new file mode 100644 index 00000000..fbb51491 --- /dev/null +++ b/src/data/extern/thriftv2/TabletClientService.cpp @@ -0,0 +1,14917 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "data/extern/thriftv2/TabletClientService.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace tabletserver { namespace thrift { + + +TabletClientService_startScan_args::~TabletClientService_startScan_args() throw() { +} + + +uint32_t TabletClientService_startScan_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 11: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->extent.read(iprot); + this->__isset.extent = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->range.read(iprot); + this->__isset.range = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->columns.clear(); + uint32_t _size118; + ::apache::thrift::protocol::TType _etype121; + xfer += iprot->readListBegin(_etype121, _size118); + this->columns.resize(_size118); + uint32_t _i122; + for (_i122 = 0; _i122 < _size118; ++_i122) + { + xfer += this->columns[_i122].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.columns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->batchSize); + this->__isset.batchSize = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->ssiList.clear(); + uint32_t _size123; + ::apache::thrift::protocol::TType _etype126; + xfer += iprot->readListBegin(_etype126, _size123); + this->ssiList.resize(_size123); + uint32_t _i127; + for (_i127 = 0; _i127 < _size123; ++_i127) + { + xfer += this->ssiList[_i127].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.ssiList = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->ssio.clear(); + uint32_t _size128; + ::apache::thrift::protocol::TType _ktype129; + ::apache::thrift::protocol::TType _vtype130; + xfer += iprot->readMapBegin(_ktype129, _vtype130, _size128); + uint32_t _i132; + for (_i132 = 0; _i132 < _size128; ++_i132) + { + std::string _key133; + xfer += iprot->readString(_key133); + std::map & _val134 = this->ssio[_key133]; + { + _val134.clear(); + uint32_t _size135; + ::apache::thrift::protocol::TType _ktype136; + ::apache::thrift::protocol::TType _vtype137; + xfer += iprot->readMapBegin(_ktype136, _vtype137, _size135); + uint32_t _i139; + for (_i139 = 0; _i139 < _size135; ++_i139) + { + std::string _key140; + xfer += iprot->readString(_key140); + std::string& _val141 = _val134[_key140]; + xfer += iprot->readString(_val141); + } + xfer += iprot->readMapEnd(); + } + } + xfer += iprot->readMapEnd(); + } + this->__isset.ssio = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->authorizations.clear(); + uint32_t _size142; + ::apache::thrift::protocol::TType _etype145; + xfer += iprot->readListBegin(_etype145, _size142); + this->authorizations.resize(_size142); + uint32_t _i146; + for (_i146 = 0; _i146 < _size142; ++_i146) + { + xfer += iprot->readBinary(this->authorizations[_i146]); + } + xfer += iprot->readListEnd(); + } + this->__isset.authorizations = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 9: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->waitForWrites); + this->__isset.waitForWrites = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 10: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isolated); + this->__isset.isolated = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 12: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->readaheadThreshold); + this->__isset.readaheadThreshold = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 13: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->samplerConfig.read(iprot); + this->__isset.samplerConfig = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 14: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->batchTimeOut); + this->__isset.batchTimeOut = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 15: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->classLoaderContext); + this->__isset.classLoaderContext = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 16: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->executionHints.clear(); + uint32_t _size147; + ::apache::thrift::protocol::TType _ktype148; + ::apache::thrift::protocol::TType _vtype149; + xfer += iprot->readMapBegin(_ktype148, _vtype149, _size147); + uint32_t _i151; + for (_i151 = 0; _i151 < _size147; ++_i151) + { + std::string _key152; + xfer += iprot->readString(_key152); + std::string& _val153 = this->executionHints[_key152]; + xfer += iprot->readString(_val153); + } + xfer += iprot->readMapEnd(); + } + this->__isset.executionHints = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_startScan_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_startScan_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("extent", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->extent.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("range", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->range.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->columns.size())); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> ::const_iterator _iter154; + for (_iter154 = this->columns.begin(); _iter154 != this->columns.end(); ++_iter154) + { + xfer += (*_iter154).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("batchSize", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32(this->batchSize); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ssiList", ::apache::thrift::protocol::T_LIST, 6); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->ssiList.size())); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> ::const_iterator _iter155; + for (_iter155 = this->ssiList.begin(); _iter155 != this->ssiList.end(); ++_iter155) + { + xfer += (*_iter155).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ssio", ::apache::thrift::protocol::T_MAP, 7); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_MAP, static_cast(this->ssio.size())); + std::map > ::const_iterator _iter156; + for (_iter156 = this->ssio.begin(); _iter156 != this->ssio.end(); ++_iter156) + { + xfer += oprot->writeString(_iter156->first); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(_iter156->second.size())); + std::map ::const_iterator _iter157; + for (_iter157 = _iter156->second.begin(); _iter157 != _iter156->second.end(); ++_iter157) + { + xfer += oprot->writeString(_iter157->first); + xfer += oprot->writeString(_iter157->second); + } + xfer += oprot->writeMapEnd(); + } + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("authorizations", ::apache::thrift::protocol::T_LIST, 8); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->authorizations.size())); + std::vector ::const_iterator _iter158; + for (_iter158 = this->authorizations.begin(); _iter158 != this->authorizations.end(); ++_iter158) + { + xfer += oprot->writeBinary((*_iter158)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("waitForWrites", ::apache::thrift::protocol::T_BOOL, 9); + xfer += oprot->writeBool(this->waitForWrites); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("isolated", ::apache::thrift::protocol::T_BOOL, 10); + xfer += oprot->writeBool(this->isolated); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 11); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("readaheadThreshold", ::apache::thrift::protocol::T_I64, 12); + xfer += oprot->writeI64(this->readaheadThreshold); + xfer += oprot->writeFieldEnd(); + + if (!this->samplerConfig.className.empty()){ + xfer += oprot->writeFieldBegin("samplerConfig", ::apache::thrift::protocol::T_STRUCT, 13); + xfer += this->samplerConfig.write(oprot); + xfer += oprot->writeFieldEnd(); + } + + xfer += oprot->writeFieldBegin("batchTimeOut", ::apache::thrift::protocol::T_I64, 14); + xfer += oprot->writeI64(this->batchTimeOut); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("classLoaderContext", ::apache::thrift::protocol::T_STRING, 15); + xfer += oprot->writeString(this->classLoaderContext); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("executionHints", ::apache::thrift::protocol::T_MAP, 16); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->executionHints.size())); + std::map ::const_iterator _iter159; + for (_iter159 = this->executionHints.begin(); _iter159 != this->executionHints.end(); ++_iter159) + { + xfer += oprot->writeString(_iter159->first); + xfer += oprot->writeString(_iter159->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_startScan_pargs::~TabletClientService_startScan_pargs() throw() { +} + + +uint32_t TabletClientService_startScan_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_startScan_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("extent", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->extent)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("range", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->range)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->columns)).size())); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> ::const_iterator _iter160; + for (_iter160 = (*(this->columns)).begin(); _iter160 != (*(this->columns)).end(); ++_iter160) + { + xfer += (*_iter160).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("batchSize", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32((*(this->batchSize))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ssiList", ::apache::thrift::protocol::T_LIST, 6); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->ssiList)).size())); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> ::const_iterator _iter161; + for (_iter161 = (*(this->ssiList)).begin(); _iter161 != (*(this->ssiList)).end(); ++_iter161) + { + xfer += (*_iter161).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ssio", ::apache::thrift::protocol::T_MAP, 7); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_MAP, static_cast((*(this->ssio)).size())); + std::map > ::const_iterator _iter162; + for (_iter162 = (*(this->ssio)).begin(); _iter162 != (*(this->ssio)).end(); ++_iter162) + { + xfer += oprot->writeString(_iter162->first); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(_iter162->second.size())); + std::map ::const_iterator _iter163; + for (_iter163 = _iter162->second.begin(); _iter163 != _iter162->second.end(); ++_iter163) + { + xfer += oprot->writeString(_iter163->first); + xfer += oprot->writeString(_iter163->second); + } + xfer += oprot->writeMapEnd(); + } + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("authorizations", ::apache::thrift::protocol::T_LIST, 8); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->authorizations)).size())); + std::vector ::const_iterator _iter164; + for (_iter164 = (*(this->authorizations)).begin(); _iter164 != (*(this->authorizations)).end(); ++_iter164) + { + xfer += oprot->writeBinary((*_iter164)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("waitForWrites", ::apache::thrift::protocol::T_BOOL, 9); + xfer += oprot->writeBool((*(this->waitForWrites))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("isolated", ::apache::thrift::protocol::T_BOOL, 10); + xfer += oprot->writeBool((*(this->isolated))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 11); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("readaheadThreshold", ::apache::thrift::protocol::T_I64, 12); + xfer += oprot->writeI64((*(this->readaheadThreshold))); + xfer += oprot->writeFieldEnd(); + + if (! (*(this->samplerConfig)).empty()){ + xfer += oprot->writeFieldBegin("samplerConfig", ::apache::thrift::protocol::T_STRUCT, 13); + xfer += (*(this->samplerConfig)).write(oprot); + xfer += oprot->writeFieldEnd(); + } + + xfer += oprot->writeFieldBegin("batchTimeOut", ::apache::thrift::protocol::T_I64, 14); + xfer += oprot->writeI64((*(this->batchTimeOut))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("classLoaderContext", ::apache::thrift::protocol::T_STRING, 15); + xfer += oprot->writeString((*(this->classLoaderContext))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("executionHints", ::apache::thrift::protocol::T_MAP, 16); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->executionHints)).size())); + std::map ::const_iterator _iter165; + for (_iter165 = (*(this->executionHints)).begin(); _iter165 != (*(this->executionHints)).end(); ++_iter165) + { + xfer += oprot->writeString(_iter165->first); + xfer += oprot->writeString(_iter165->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_startScan_result::~TabletClientService_startScan_result() throw() { +} + + +uint32_t TabletClientService_startScan_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->nste.read(iprot); + this->__isset.nste = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tmfe.read(iprot); + this->__isset.tmfe = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tsnpe.read(iprot); + this->__isset.tsnpe = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_startScan_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("TabletClientService_startScan_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.nste) { + xfer += oprot->writeFieldBegin("nste", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->nste.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tmfe) { + xfer += oprot->writeFieldBegin("tmfe", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->tmfe.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tsnpe) { + xfer += oprot->writeFieldBegin("tsnpe", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->tsnpe.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_startScan_presult::~TabletClientService_startScan_presult() throw() { +} + + +uint32_t TabletClientService_startScan_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->nste.read(iprot); + this->__isset.nste = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tmfe.read(iprot); + this->__isset.tmfe = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tsnpe.read(iprot); + this->__isset.tsnpe = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +TabletClientService_continueScan_args::~TabletClientService_continueScan_args() throw() { +} + + +uint32_t TabletClientService_continueScan_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->scanID); + this->__isset.scanID = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_continueScan_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_continueScan_args"); + + xfer += oprot->writeFieldBegin("scanID", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->scanID); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_continueScan_pargs::~TabletClientService_continueScan_pargs() throw() { +} + + +uint32_t TabletClientService_continueScan_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_continueScan_pargs"); + + xfer += oprot->writeFieldBegin("scanID", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64((*(this->scanID))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_continueScan_result::~TabletClientService_continueScan_result() throw() { +} + + +uint32_t TabletClientService_continueScan_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->nssi.read(iprot); + this->__isset.nssi = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->nste.read(iprot); + this->__isset.nste = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tmfe.read(iprot); + this->__isset.tmfe = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tsnpe.read(iprot); + this->__isset.tsnpe = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_continueScan_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("TabletClientService_continueScan_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.nssi) { + xfer += oprot->writeFieldBegin("nssi", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->nssi.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.nste) { + xfer += oprot->writeFieldBegin("nste", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->nste.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tmfe) { + xfer += oprot->writeFieldBegin("tmfe", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->tmfe.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tsnpe) { + xfer += oprot->writeFieldBegin("tsnpe", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->tsnpe.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_continueScan_presult::~TabletClientService_continueScan_presult() throw() { +} + + +uint32_t TabletClientService_continueScan_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->nssi.read(iprot); + this->__isset.nssi = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->nste.read(iprot); + this->__isset.nste = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tmfe.read(iprot); + this->__isset.tmfe = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tsnpe.read(iprot); + this->__isset.tsnpe = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +TabletClientService_closeScan_args::~TabletClientService_closeScan_args() throw() { +} + + +uint32_t TabletClientService_closeScan_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->scanID); + this->__isset.scanID = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_closeScan_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_closeScan_args"); + + xfer += oprot->writeFieldBegin("scanID", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->scanID); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_closeScan_pargs::~TabletClientService_closeScan_pargs() throw() { +} + + +uint32_t TabletClientService_closeScan_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_closeScan_pargs"); + + xfer += oprot->writeFieldBegin("scanID", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64((*(this->scanID))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_startMultiScan_args::~TabletClientService_startMultiScan_args() throw() { +} + + +uint32_t TabletClientService_startMultiScan_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 8: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->batch.clear(); + uint32_t _size166; + ::apache::thrift::protocol::TType _ktype167; + ::apache::thrift::protocol::TType _vtype168; + xfer += iprot->readMapBegin(_ktype167, _vtype168, _size166); + uint32_t _i170; + for (_i170 = 0; _i170 < _size166; ++_i170) + { + ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent _key171; + xfer += _key171.read(iprot); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TRange> & _val172 = this->batch[_key171]; + { + _val172.clear(); + uint32_t _size173; + ::apache::thrift::protocol::TType _etype176; + xfer += iprot->readListBegin(_etype176, _size173); + _val172.resize(_size173); + uint32_t _i177; + for (_i177 = 0; _i177 < _size173; ++_i177) + { + xfer += _val172[_i177].read(iprot); + } + xfer += iprot->readListEnd(); + } + } + xfer += iprot->readMapEnd(); + } + this->__isset.batch = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->columns.clear(); + uint32_t _size178; + ::apache::thrift::protocol::TType _etype181; + xfer += iprot->readListBegin(_etype181, _size178); + this->columns.resize(_size178); + uint32_t _i182; + for (_i182 = 0; _i182 < _size178; ++_i182) + { + xfer += this->columns[_i182].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.columns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->ssiList.clear(); + uint32_t _size183; + ::apache::thrift::protocol::TType _etype186; + xfer += iprot->readListBegin(_etype186, _size183); + this->ssiList.resize(_size183); + uint32_t _i187; + for (_i187 = 0; _i187 < _size183; ++_i187) + { + xfer += this->ssiList[_i187].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.ssiList = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->ssio.clear(); + uint32_t _size188; + ::apache::thrift::protocol::TType _ktype189; + ::apache::thrift::protocol::TType _vtype190; + xfer += iprot->readMapBegin(_ktype189, _vtype190, _size188); + uint32_t _i192; + for (_i192 = 0; _i192 < _size188; ++_i192) + { + std::string _key193; + xfer += iprot->readString(_key193); + std::map & _val194 = this->ssio[_key193]; + { + _val194.clear(); + uint32_t _size195; + ::apache::thrift::protocol::TType _ktype196; + ::apache::thrift::protocol::TType _vtype197; + xfer += iprot->readMapBegin(_ktype196, _vtype197, _size195); + uint32_t _i199; + for (_i199 = 0; _i199 < _size195; ++_i199) + { + std::string _key200; + xfer += iprot->readString(_key200); + std::string& _val201 = _val194[_key200]; + xfer += iprot->readString(_val201); + } + xfer += iprot->readMapEnd(); + } + } + xfer += iprot->readMapEnd(); + } + this->__isset.ssio = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->authorizations.clear(); + uint32_t _size202; + ::apache::thrift::protocol::TType _etype205; + xfer += iprot->readListBegin(_etype205, _size202); + this->authorizations.resize(_size202); + uint32_t _i206; + for (_i206 = 0; _i206 < _size202; ++_i206) + { + xfer += iprot->readBinary(this->authorizations[_i206]); + } + xfer += iprot->readListEnd(); + } + this->__isset.authorizations = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->waitForWrites); + this->__isset.waitForWrites = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 9: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->samplerConfig.read(iprot); + this->__isset.samplerConfig = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 10: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->batchTimeOut); + this->__isset.batchTimeOut = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 11: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->classLoaderContext); + this->__isset.classLoaderContext = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 12: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->executionHints.clear(); + uint32_t _size207; + ::apache::thrift::protocol::TType _ktype208; + ::apache::thrift::protocol::TType _vtype209; + xfer += iprot->readMapBegin(_ktype208, _vtype209, _size207); + uint32_t _i211; + for (_i211 = 0; _i211 < _size207; ++_i211) + { + std::string _key212; + xfer += iprot->readString(_key212); + std::string& _val213 = this->executionHints[_key212]; + xfer += iprot->readString(_val213); + } + xfer += iprot->readMapEnd(); + } + this->__isset.executionHints = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_startMultiScan_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_startMultiScan_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("batch", ::apache::thrift::protocol::T_MAP, 2); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRUCT, ::apache::thrift::protocol::T_LIST, static_cast(this->batch.size())); + std::map< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent, std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TRange> > ::const_iterator _iter214; + for (_iter214 = this->batch.begin(); _iter214 != this->batch.end(); ++_iter214) + { + xfer += _iter214->first.write(oprot); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(_iter214->second.size())); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TRange> ::const_iterator _iter215; + for (_iter215 = _iter214->second.begin(); _iter215 != _iter214->second.end(); ++_iter215) + { + xfer += (*_iter215).write(oprot); + } + xfer += oprot->writeListEnd(); + } + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->columns.size())); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> ::const_iterator _iter216; + for (_iter216 = this->columns.begin(); _iter216 != this->columns.end(); ++_iter216) + { + xfer += (*_iter216).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ssiList", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->ssiList.size())); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> ::const_iterator _iter217; + for (_iter217 = this->ssiList.begin(); _iter217 != this->ssiList.end(); ++_iter217) + { + xfer += (*_iter217).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ssio", ::apache::thrift::protocol::T_MAP, 5); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_MAP, static_cast(this->ssio.size())); + std::map > ::const_iterator _iter218; + for (_iter218 = this->ssio.begin(); _iter218 != this->ssio.end(); ++_iter218) + { + xfer += oprot->writeString(_iter218->first); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(_iter218->second.size())); + std::map ::const_iterator _iter219; + for (_iter219 = _iter218->second.begin(); _iter219 != _iter218->second.end(); ++_iter219) + { + xfer += oprot->writeString(_iter219->first); + xfer += oprot->writeString(_iter219->second); + } + xfer += oprot->writeMapEnd(); + } + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("authorizations", ::apache::thrift::protocol::T_LIST, 6); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->authorizations.size())); + std::vector ::const_iterator _iter220; + for (_iter220 = this->authorizations.begin(); _iter220 != this->authorizations.end(); ++_iter220) + { + xfer += oprot->writeBinary((*_iter220)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("waitForWrites", ::apache::thrift::protocol::T_BOOL, 7); + xfer += oprot->writeBool(this->waitForWrites); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 8); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + if (!this->samplerConfig.empty()){ + xfer += oprot->writeFieldBegin("samplerConfig", ::apache::thrift::protocol::T_STRUCT, 9); + xfer += this->samplerConfig.write(oprot); + xfer += oprot->writeFieldEnd(); + } + + xfer += oprot->writeFieldBegin("batchTimeOut", ::apache::thrift::protocol::T_I64, 10); + xfer += oprot->writeI64(this->batchTimeOut); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("classLoaderContext", ::apache::thrift::protocol::T_STRING, 11); + xfer += oprot->writeString(this->classLoaderContext); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("executionHints", ::apache::thrift::protocol::T_MAP, 12); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->executionHints.size())); + std::map ::const_iterator _iter221; + for (_iter221 = this->executionHints.begin(); _iter221 != this->executionHints.end(); ++_iter221) + { + xfer += oprot->writeString(_iter221->first); + xfer += oprot->writeString(_iter221->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_startMultiScan_pargs::~TabletClientService_startMultiScan_pargs() throw() { +} + + +uint32_t TabletClientService_startMultiScan_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_startMultiScan_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("batch", ::apache::thrift::protocol::T_MAP, 2); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRUCT, ::apache::thrift::protocol::T_LIST, static_cast((*(this->batch)).size())); + std::map< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent, std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TRange> > ::const_iterator _iter222; + for (_iter222 = (*(this->batch)).begin(); _iter222 != (*(this->batch)).end(); ++_iter222) + { + xfer += _iter222->first.write(oprot); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(_iter222->second.size())); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TRange> ::const_iterator _iter223; + for (_iter223 = _iter222->second.begin(); _iter223 != _iter222->second.end(); ++_iter223) + { + xfer += (*_iter223).write(oprot); + } + xfer += oprot->writeListEnd(); + } + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->columns)).size())); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> ::const_iterator _iter224; + for (_iter224 = (*(this->columns)).begin(); _iter224 != (*(this->columns)).end(); ++_iter224) + { + xfer += (*_iter224).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ssiList", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->ssiList)).size())); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> ::const_iterator _iter225; + for (_iter225 = (*(this->ssiList)).begin(); _iter225 != (*(this->ssiList)).end(); ++_iter225) + { + xfer += (*_iter225).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ssio", ::apache::thrift::protocol::T_MAP, 5); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_MAP, static_cast((*(this->ssio)).size())); + std::map > ::const_iterator _iter226; + for (_iter226 = (*(this->ssio)).begin(); _iter226 != (*(this->ssio)).end(); ++_iter226) + { + xfer += oprot->writeString(_iter226->first); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(_iter226->second.size())); + std::map ::const_iterator _iter227; + for (_iter227 = _iter226->second.begin(); _iter227 != _iter226->second.end(); ++_iter227) + { + xfer += oprot->writeString(_iter227->first); + xfer += oprot->writeString(_iter227->second); + } + xfer += oprot->writeMapEnd(); + } + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("authorizations", ::apache::thrift::protocol::T_LIST, 6); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->authorizations)).size())); + std::vector ::const_iterator _iter228; + for (_iter228 = (*(this->authorizations)).begin(); _iter228 != (*(this->authorizations)).end(); ++_iter228) + { + xfer += oprot->writeBinary((*_iter228)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("waitForWrites", ::apache::thrift::protocol::T_BOOL, 7); + xfer += oprot->writeBool((*(this->waitForWrites))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 8); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + if (!(*(this->samplerConfig)).empty()){ + xfer += oprot->writeFieldBegin("samplerConfig", ::apache::thrift::protocol::T_STRUCT, 9); + xfer += (*(this->samplerConfig)).write(oprot); + xfer += oprot->writeFieldEnd(); + } + + xfer += oprot->writeFieldBegin("batchTimeOut", ::apache::thrift::protocol::T_I64, 10); + xfer += oprot->writeI64((*(this->batchTimeOut))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("classLoaderContext", ::apache::thrift::protocol::T_STRING, 11); + xfer += oprot->writeString((*(this->classLoaderContext))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("executionHints", ::apache::thrift::protocol::T_MAP, 12); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->executionHints)).size())); + std::map ::const_iterator _iter229; + for (_iter229 = (*(this->executionHints)).begin(); _iter229 != (*(this->executionHints)).end(); ++_iter229) + { + xfer += oprot->writeString(_iter229->first); + xfer += oprot->writeString(_iter229->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_startMultiScan_result::~TabletClientService_startMultiScan_result() throw() { +} + + +uint32_t TabletClientService_startMultiScan_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tsnpe.read(iprot); + this->__isset.tsnpe = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_startMultiScan_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("TabletClientService_startMultiScan_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tsnpe) { + xfer += oprot->writeFieldBegin("tsnpe", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tsnpe.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_startMultiScan_presult::~TabletClientService_startMultiScan_presult() throw() { +} + + +uint32_t TabletClientService_startMultiScan_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tsnpe.read(iprot); + this->__isset.tsnpe = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +TabletClientService_continueMultiScan_args::~TabletClientService_continueMultiScan_args() throw() { +} + + +uint32_t TabletClientService_continueMultiScan_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->scanID); + this->__isset.scanID = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_continueMultiScan_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_continueMultiScan_args"); + + xfer += oprot->writeFieldBegin("scanID", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->scanID); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_continueMultiScan_pargs::~TabletClientService_continueMultiScan_pargs() throw() { +} + + +uint32_t TabletClientService_continueMultiScan_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_continueMultiScan_pargs"); + + xfer += oprot->writeFieldBegin("scanID", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64((*(this->scanID))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_continueMultiScan_result::~TabletClientService_continueMultiScan_result() throw() { +} + + +uint32_t TabletClientService_continueMultiScan_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->nssi.read(iprot); + this->__isset.nssi = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tsnpe.read(iprot); + this->__isset.tsnpe = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_continueMultiScan_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("TabletClientService_continueMultiScan_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.nssi) { + xfer += oprot->writeFieldBegin("nssi", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->nssi.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tsnpe) { + xfer += oprot->writeFieldBegin("tsnpe", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tsnpe.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_continueMultiScan_presult::~TabletClientService_continueMultiScan_presult() throw() { +} + + +uint32_t TabletClientService_continueMultiScan_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->nssi.read(iprot); + this->__isset.nssi = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tsnpe.read(iprot); + this->__isset.tsnpe = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +TabletClientService_closeMultiScan_args::~TabletClientService_closeMultiScan_args() throw() { +} + + +uint32_t TabletClientService_closeMultiScan_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->scanID); + this->__isset.scanID = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_closeMultiScan_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_closeMultiScan_args"); + + xfer += oprot->writeFieldBegin("scanID", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->scanID); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_closeMultiScan_pargs::~TabletClientService_closeMultiScan_pargs() throw() { +} + + +uint32_t TabletClientService_closeMultiScan_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_closeMultiScan_pargs"); + + xfer += oprot->writeFieldBegin("scanID", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64((*(this->scanID))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_closeMultiScan_result::~TabletClientService_closeMultiScan_result() throw() { +} + + +uint32_t TabletClientService_closeMultiScan_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->nssi.read(iprot); + this->__isset.nssi = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_closeMultiScan_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("TabletClientService_closeMultiScan_result"); + + if (this->__isset.nssi) { + xfer += oprot->writeFieldBegin("nssi", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->nssi.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_closeMultiScan_presult::~TabletClientService_closeMultiScan_presult() throw() { +} + + +uint32_t TabletClientService_closeMultiScan_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->nssi.read(iprot); + this->__isset.nssi = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +TabletClientService_startUpdate_args::~TabletClientService_startUpdate_args() throw() { +} + + +uint32_t TabletClientService_startUpdate_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast230; + xfer += iprot->readI32(ecast230); + this->durability = (TDurability::type)ecast230; + this->__isset.durability = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_startUpdate_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_startUpdate_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("durability", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)this->durability); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_startUpdate_pargs::~TabletClientService_startUpdate_pargs() throw() { +} + + +uint32_t TabletClientService_startUpdate_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_startUpdate_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("durability", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)(*(this->durability))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_startUpdate_result::~TabletClientService_startUpdate_result() throw() { +} + + +uint32_t TabletClientService_startUpdate_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_startUpdate_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("TabletClientService_startUpdate_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I64, 0); + xfer += oprot->writeI64(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_startUpdate_presult::~TabletClientService_startUpdate_presult() throw() { +} + + +uint32_t TabletClientService_startUpdate_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +TabletClientService_applyUpdates_args::~TabletClientService_applyUpdates_args() throw() { +} + + +uint32_t TabletClientService_applyUpdates_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->updateID); + this->__isset.updateID = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->keyExtent.read(iprot); + this->__isset.keyExtent = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->mutations.clear(); + uint32_t _size231; + ::apache::thrift::protocol::TType _etype234; + xfer += iprot->readListBegin(_etype234, _size231); + this->mutations.resize(_size231); + uint32_t _i235; + for (_i235 = 0; _i235 < _size231; ++_i235) + { + xfer += this->mutations[_i235].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.mutations = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_applyUpdates_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_applyUpdates_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("updateID", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->updateID); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("keyExtent", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->keyExtent.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("mutations", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->mutations.size())); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TMutation> ::const_iterator _iter236; + for (_iter236 = this->mutations.begin(); _iter236 != this->mutations.end(); ++_iter236) + { + xfer += (*_iter236).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_applyUpdates_pargs::~TabletClientService_applyUpdates_pargs() throw() { +} + + +uint32_t TabletClientService_applyUpdates_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_applyUpdates_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("updateID", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64((*(this->updateID))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("keyExtent", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->keyExtent)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("mutations", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->mutations)).size())); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TMutation> ::const_iterator _iter237; + for (_iter237 = (*(this->mutations)).begin(); _iter237 != (*(this->mutations)).end(); ++_iter237) + { + xfer += (*_iter237).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_closeUpdate_args::~TabletClientService_closeUpdate_args() throw() { +} + + +uint32_t TabletClientService_closeUpdate_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->updateID); + this->__isset.updateID = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_closeUpdate_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_closeUpdate_args"); + + xfer += oprot->writeFieldBegin("updateID", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->updateID); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_closeUpdate_pargs::~TabletClientService_closeUpdate_pargs() throw() { +} + + +uint32_t TabletClientService_closeUpdate_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_closeUpdate_pargs"); + + xfer += oprot->writeFieldBegin("updateID", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64((*(this->updateID))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_closeUpdate_result::~TabletClientService_closeUpdate_result() throw() { +} + + +uint32_t TabletClientService_closeUpdate_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->nssi.read(iprot); + this->__isset.nssi = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_closeUpdate_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("TabletClientService_closeUpdate_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.nssi) { + xfer += oprot->writeFieldBegin("nssi", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->nssi.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_closeUpdate_presult::~TabletClientService_closeUpdate_presult() throw() { +} + + +uint32_t TabletClientService_closeUpdate_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->nssi.read(iprot); + this->__isset.nssi = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +TabletClientService_update_args::~TabletClientService_update_args() throw() { +} + + +uint32_t TabletClientService_update_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->keyExtent.read(iprot); + this->__isset.keyExtent = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->mutation.read(iprot); + this->__isset.mutation = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast238; + xfer += iprot->readI32(ecast238); + this->durability = (TDurability::type)ecast238; + this->__isset.durability = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_update_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_update_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("keyExtent", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->keyExtent.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("mutation", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->mutation.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("durability", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32((int32_t)this->durability); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_update_pargs::~TabletClientService_update_pargs() throw() { +} + + +uint32_t TabletClientService_update_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_update_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("keyExtent", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->keyExtent)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("mutation", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->mutation)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("durability", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32((int32_t)(*(this->durability))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_update_result::~TabletClientService_update_result() throw() { +} + + +uint32_t TabletClientService_update_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->nste.read(iprot); + this->__isset.nste = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->cve.read(iprot); + this->__isset.cve = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_update_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("TabletClientService_update_result"); + + if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.nste) { + xfer += oprot->writeFieldBegin("nste", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->nste.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.cve) { + xfer += oprot->writeFieldBegin("cve", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->cve.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_update_presult::~TabletClientService_update_presult() throw() { +} + + +uint32_t TabletClientService_update_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->nste.read(iprot); + this->__isset.nste = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->cve.read(iprot); + this->__isset.cve = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +TabletClientService_startConditionalUpdate_args::~TabletClientService_startConditionalUpdate_args() throw() { +} + + +uint32_t TabletClientService_startConditionalUpdate_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->authorizations.clear(); + uint32_t _size239; + ::apache::thrift::protocol::TType _etype242; + xfer += iprot->readListBegin(_etype242, _size239); + this->authorizations.resize(_size239); + uint32_t _i243; + for (_i243 = 0; _i243 < _size239; ++_i243) + { + xfer += iprot->readBinary(this->authorizations[_i243]); + } + xfer += iprot->readListEnd(); + } + this->__isset.authorizations = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableID); + this->__isset.tableID = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast244; + xfer += iprot->readI32(ecast244); + this->durability = (TDurability::type)ecast244; + this->__isset.durability = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->classLoaderContext); + this->__isset.classLoaderContext = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_startConditionalUpdate_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_startConditionalUpdate_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("authorizations", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->authorizations.size())); + std::vector ::const_iterator _iter245; + for (_iter245 = this->authorizations.begin(); _iter245 != this->authorizations.end(); ++_iter245) + { + xfer += oprot->writeBinary((*_iter245)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableID", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->tableID); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("durability", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32((int32_t)this->durability); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("classLoaderContext", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->classLoaderContext); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_startConditionalUpdate_pargs::~TabletClientService_startConditionalUpdate_pargs() throw() { +} + + +uint32_t TabletClientService_startConditionalUpdate_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_startConditionalUpdate_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("authorizations", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->authorizations)).size())); + std::vector ::const_iterator _iter246; + for (_iter246 = (*(this->authorizations)).begin(); _iter246 != (*(this->authorizations)).end(); ++_iter246) + { + xfer += oprot->writeBinary((*_iter246)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableID", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->tableID))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("durability", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32((int32_t)(*(this->durability))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("classLoaderContext", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString((*(this->classLoaderContext))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_startConditionalUpdate_result::~TabletClientService_startConditionalUpdate_result() throw() { +} + + +uint32_t TabletClientService_startConditionalUpdate_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_startConditionalUpdate_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("TabletClientService_startConditionalUpdate_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_startConditionalUpdate_presult::~TabletClientService_startConditionalUpdate_presult() throw() { +} + + +uint32_t TabletClientService_startConditionalUpdate_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +TabletClientService_conditionalUpdate_args::~TabletClientService_conditionalUpdate_args() throw() { +} + + +uint32_t TabletClientService_conditionalUpdate_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->sessID); + this->__isset.sessID = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->mutations.clear(); + uint32_t _size247; + ::apache::thrift::protocol::TType _ktype248; + ::apache::thrift::protocol::TType _vtype249; + xfer += iprot->readMapBegin(_ktype248, _vtype249, _size247); + uint32_t _i251; + for (_i251 = 0; _i251 < _size247; ++_i251) + { + ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent _key252; + xfer += _key252.read(iprot); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TConditionalMutation> & _val253 = this->mutations[_key252]; + { + _val253.clear(); + uint32_t _size254; + ::apache::thrift::protocol::TType _etype257; + xfer += iprot->readListBegin(_etype257, _size254); + _val253.resize(_size254); + uint32_t _i258; + for (_i258 = 0; _i258 < _size254; ++_i258) + { + xfer += _val253[_i258].read(iprot); + } + xfer += iprot->readListEnd(); + } + } + xfer += iprot->readMapEnd(); + } + this->__isset.mutations = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->symbols.clear(); + uint32_t _size259; + ::apache::thrift::protocol::TType _etype262; + xfer += iprot->readListBegin(_etype262, _size259); + this->symbols.resize(_size259); + uint32_t _i263; + for (_i263 = 0; _i263 < _size259; ++_i263) + { + xfer += iprot->readString(this->symbols[_i263]); + } + xfer += iprot->readListEnd(); + } + this->__isset.symbols = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_conditionalUpdate_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_conditionalUpdate_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("sessID", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->sessID); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("mutations", ::apache::thrift::protocol::T_MAP, 3); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRUCT, ::apache::thrift::protocol::T_LIST, static_cast(this->mutations.size())); + std::map< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent, std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TConditionalMutation> > ::const_iterator _iter264; + for (_iter264 = this->mutations.begin(); _iter264 != this->mutations.end(); ++_iter264) + { + xfer += _iter264->first.write(oprot); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(_iter264->second.size())); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TConditionalMutation> ::const_iterator _iter265; + for (_iter265 = _iter264->second.begin(); _iter265 != _iter264->second.end(); ++_iter265) + { + xfer += (*_iter265).write(oprot); + } + xfer += oprot->writeListEnd(); + } + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("symbols", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->symbols.size())); + std::vector ::const_iterator _iter266; + for (_iter266 = this->symbols.begin(); _iter266 != this->symbols.end(); ++_iter266) + { + xfer += oprot->writeString((*_iter266)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_conditionalUpdate_pargs::~TabletClientService_conditionalUpdate_pargs() throw() { +} + + +uint32_t TabletClientService_conditionalUpdate_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_conditionalUpdate_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("sessID", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64((*(this->sessID))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("mutations", ::apache::thrift::protocol::T_MAP, 3); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRUCT, ::apache::thrift::protocol::T_LIST, static_cast((*(this->mutations)).size())); + std::map< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent, std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TConditionalMutation> > ::const_iterator _iter267; + for (_iter267 = (*(this->mutations)).begin(); _iter267 != (*(this->mutations)).end(); ++_iter267) + { + xfer += _iter267->first.write(oprot); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(_iter267->second.size())); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TConditionalMutation> ::const_iterator _iter268; + for (_iter268 = _iter267->second.begin(); _iter268 != _iter267->second.end(); ++_iter268) + { + xfer += (*_iter268).write(oprot); + } + xfer += oprot->writeListEnd(); + } + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("symbols", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->symbols)).size())); + std::vector ::const_iterator _iter269; + for (_iter269 = (*(this->symbols)).begin(); _iter269 != (*(this->symbols)).end(); ++_iter269) + { + xfer += oprot->writeString((*_iter269)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_conditionalUpdate_result::~TabletClientService_conditionalUpdate_result() throw() { +} + + +uint32_t TabletClientService_conditionalUpdate_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size270; + ::apache::thrift::protocol::TType _etype273; + xfer += iprot->readListBegin(_etype273, _size270); + this->success.resize(_size270); + uint32_t _i274; + for (_i274 = 0; _i274 < _size270; ++_i274) + { + xfer += this->success[_i274].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->nssi.read(iprot); + this->__isset.nssi = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_conditionalUpdate_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("TabletClientService_conditionalUpdate_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TCMResult> ::const_iterator _iter275; + for (_iter275 = this->success.begin(); _iter275 != this->success.end(); ++_iter275) + { + xfer += (*_iter275).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.nssi) { + xfer += oprot->writeFieldBegin("nssi", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->nssi.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_conditionalUpdate_presult::~TabletClientService_conditionalUpdate_presult() throw() { +} + + +uint32_t TabletClientService_conditionalUpdate_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size276; + ::apache::thrift::protocol::TType _etype279; + xfer += iprot->readListBegin(_etype279, _size276); + (*(this->success)).resize(_size276); + uint32_t _i280; + for (_i280 = 0; _i280 < _size276; ++_i280) + { + xfer += (*(this->success))[_i280].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->nssi.read(iprot); + this->__isset.nssi = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +TabletClientService_invalidateConditionalUpdate_args::~TabletClientService_invalidateConditionalUpdate_args() throw() { +} + + +uint32_t TabletClientService_invalidateConditionalUpdate_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->sessID); + this->__isset.sessID = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_invalidateConditionalUpdate_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_invalidateConditionalUpdate_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("sessID", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->sessID); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_invalidateConditionalUpdate_pargs::~TabletClientService_invalidateConditionalUpdate_pargs() throw() { +} + + +uint32_t TabletClientService_invalidateConditionalUpdate_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_invalidateConditionalUpdate_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("sessID", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64((*(this->sessID))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_invalidateConditionalUpdate_result::~TabletClientService_invalidateConditionalUpdate_result() throw() { +} + + +uint32_t TabletClientService_invalidateConditionalUpdate_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_invalidateConditionalUpdate_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("TabletClientService_invalidateConditionalUpdate_result"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_invalidateConditionalUpdate_presult::~TabletClientService_invalidateConditionalUpdate_presult() throw() { +} + + +uint32_t TabletClientService_invalidateConditionalUpdate_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +TabletClientService_closeConditionalUpdate_args::~TabletClientService_closeConditionalUpdate_args() throw() { +} + + +uint32_t TabletClientService_closeConditionalUpdate_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->sessID); + this->__isset.sessID = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_closeConditionalUpdate_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_closeConditionalUpdate_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("sessID", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->sessID); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_closeConditionalUpdate_pargs::~TabletClientService_closeConditionalUpdate_pargs() throw() { +} + + +uint32_t TabletClientService_closeConditionalUpdate_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_closeConditionalUpdate_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("sessID", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64((*(this->sessID))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_bulkImport_args::~TabletClientService_bulkImport_args() throw() { +} + + +uint32_t TabletClientService_bulkImport_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->tid); + this->__isset.tid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->files.clear(); + uint32_t _size281; + ::apache::thrift::protocol::TType _ktype282; + ::apache::thrift::protocol::TType _vtype283; + xfer += iprot->readMapBegin(_ktype282, _vtype283, _size281); + uint32_t _i285; + for (_i285 = 0; _i285 < _size281; ++_i285) + { + ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent _key286; + xfer += _key286.read(iprot); + std::map & _val287 = this->files[_key286]; + { + _val287.clear(); + uint32_t _size288; + ::apache::thrift::protocol::TType _ktype289; + ::apache::thrift::protocol::TType _vtype290; + xfer += iprot->readMapBegin(_ktype289, _vtype290, _size288); + uint32_t _i292; + for (_i292 = 0; _i292 < _size288; ++_i292) + { + std::string _key293; + xfer += iprot->readString(_key293); + ::org::apache::accumulov2::core::dataImpl::thrift::MapFileInfo& _val294 = _val287[_key293]; + xfer += _val294.read(iprot); + } + xfer += iprot->readMapEnd(); + } + } + xfer += iprot->readMapEnd(); + } + this->__isset.files = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->setTime); + this->__isset.setTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_bulkImport_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_bulkImport_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("files", ::apache::thrift::protocol::T_MAP, 2); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRUCT, ::apache::thrift::protocol::T_MAP, static_cast(this->files.size())); + std::map< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent, std::map > ::const_iterator _iter295; + for (_iter295 = this->files.begin(); _iter295 != this->files.end(); ++_iter295) + { + xfer += _iter295->first.write(oprot); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRUCT, static_cast(_iter295->second.size())); + std::map ::const_iterator _iter296; + for (_iter296 = _iter295->second.begin(); _iter296 != _iter295->second.end(); ++_iter296) + { + xfer += oprot->writeString(_iter296->first); + xfer += _iter296->second.write(oprot); + } + xfer += oprot->writeMapEnd(); + } + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tid", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->tid); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("setTime", ::apache::thrift::protocol::T_BOOL, 5); + xfer += oprot->writeBool(this->setTime); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_bulkImport_pargs::~TabletClientService_bulkImport_pargs() throw() { +} + + +uint32_t TabletClientService_bulkImport_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_bulkImport_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("files", ::apache::thrift::protocol::T_MAP, 2); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRUCT, ::apache::thrift::protocol::T_MAP, static_cast((*(this->files)).size())); + std::map< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent, std::map > ::const_iterator _iter297; + for (_iter297 = (*(this->files)).begin(); _iter297 != (*(this->files)).end(); ++_iter297) + { + xfer += _iter297->first.write(oprot); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRUCT, static_cast(_iter297->second.size())); + std::map ::const_iterator _iter298; + for (_iter298 = _iter297->second.begin(); _iter298 != _iter297->second.end(); ++_iter298) + { + xfer += oprot->writeString(_iter298->first); + xfer += _iter298->second.write(oprot); + } + xfer += oprot->writeMapEnd(); + } + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tid", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64((*(this->tid))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("setTime", ::apache::thrift::protocol::T_BOOL, 5); + xfer += oprot->writeBool((*(this->setTime))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_bulkImport_result::~TabletClientService_bulkImport_result() throw() { +} + + +uint32_t TabletClientService_bulkImport_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size299; + ::apache::thrift::protocol::TType _etype302; + xfer += iprot->readListBegin(_etype302, _size299); + this->success.resize(_size299); + uint32_t _i303; + for (_i303 = 0; _i303 < _size299; ++_i303) + { + xfer += this->success[_i303].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_bulkImport_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("TabletClientService_bulkImport_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent> ::const_iterator _iter304; + for (_iter304 = this->success.begin(); _iter304 != this->success.end(); ++_iter304) + { + xfer += (*_iter304).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_bulkImport_presult::~TabletClientService_bulkImport_presult() throw() { +} + + +uint32_t TabletClientService_bulkImport_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size305; + ::apache::thrift::protocol::TType _etype308; + xfer += iprot->readListBegin(_etype308, _size305); + (*(this->success)).resize(_size305); + uint32_t _i309; + for (_i309 = 0; _i309 < _size305; ++_i309) + { + xfer += (*(this->success))[_i309].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +TabletClientService_loadFiles_args::~TabletClientService_loadFiles_args() throw() { +} + + +uint32_t TabletClientService_loadFiles_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->tid); + this->__isset.tid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dir); + this->__isset.dir = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->files.clear(); + uint32_t _size310; + ::apache::thrift::protocol::TType _ktype311; + ::apache::thrift::protocol::TType _vtype312; + xfer += iprot->readMapBegin(_ktype311, _vtype312, _size310); + uint32_t _i314; + for (_i314 = 0; _i314 < _size310; ++_i314) + { + ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent _key315; + xfer += _key315.read(iprot); + std::map & _val316 = this->files[_key315]; + { + _val316.clear(); + uint32_t _size317; + ::apache::thrift::protocol::TType _ktype318; + ::apache::thrift::protocol::TType _vtype319; + xfer += iprot->readMapBegin(_ktype318, _vtype319, _size317); + uint32_t _i321; + for (_i321 = 0; _i321 < _size317; ++_i321) + { + std::string _key322; + xfer += iprot->readString(_key322); + ::org::apache::accumulov2::core::dataImpl::thrift::MapFileInfo& _val323 = _val316[_key322]; + xfer += _val323.read(iprot); + } + xfer += iprot->readMapEnd(); + } + } + xfer += iprot->readMapEnd(); + } + this->__isset.files = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->setTime); + this->__isset.setTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_loadFiles_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_loadFiles_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tid", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->tid); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("dir", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->dir); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("files", ::apache::thrift::protocol::T_MAP, 5); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRUCT, ::apache::thrift::protocol::T_MAP, static_cast(this->files.size())); + std::map< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent, std::map > ::const_iterator _iter324; + for (_iter324 = this->files.begin(); _iter324 != this->files.end(); ++_iter324) + { + xfer += _iter324->first.write(oprot); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRUCT, static_cast(_iter324->second.size())); + std::map ::const_iterator _iter325; + for (_iter325 = _iter324->second.begin(); _iter325 != _iter324->second.end(); ++_iter325) + { + xfer += oprot->writeString(_iter325->first); + xfer += _iter325->second.write(oprot); + } + xfer += oprot->writeMapEnd(); + } + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("setTime", ::apache::thrift::protocol::T_BOOL, 6); + xfer += oprot->writeBool(this->setTime); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_loadFiles_pargs::~TabletClientService_loadFiles_pargs() throw() { +} + + +uint32_t TabletClientService_loadFiles_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_loadFiles_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tid", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64((*(this->tid))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("dir", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->dir))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("files", ::apache::thrift::protocol::T_MAP, 5); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRUCT, ::apache::thrift::protocol::T_MAP, static_cast((*(this->files)).size())); + std::map< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent, std::map > ::const_iterator _iter326; + for (_iter326 = (*(this->files)).begin(); _iter326 != (*(this->files)).end(); ++_iter326) + { + xfer += _iter326->first.write(oprot); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRUCT, static_cast(_iter326->second.size())); + std::map ::const_iterator _iter327; + for (_iter327 = _iter326->second.begin(); _iter327 != _iter326->second.end(); ++_iter327) + { + xfer += oprot->writeString(_iter327->first); + xfer += _iter327->second.write(oprot); + } + xfer += oprot->writeMapEnd(); + } + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("setTime", ::apache::thrift::protocol::T_BOOL, 6); + xfer += oprot->writeBool((*(this->setTime))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_splitTablet_args::~TabletClientService_splitTablet_args() throw() { +} + + +uint32_t TabletClientService_splitTablet_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->extent.read(iprot); + this->__isset.extent = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->splitPoint); + this->__isset.splitPoint = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_splitTablet_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_splitTablet_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("extent", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->extent.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("splitPoint", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary(this->splitPoint); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_splitTablet_pargs::~TabletClientService_splitTablet_pargs() throw() { +} + + +uint32_t TabletClientService_splitTablet_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_splitTablet_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("extent", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->extent)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("splitPoint", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary((*(this->splitPoint))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_splitTablet_result::~TabletClientService_splitTablet_result() throw() { +} + + +uint32_t TabletClientService_splitTablet_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->nste.read(iprot); + this->__isset.nste = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_splitTablet_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("TabletClientService_splitTablet_result"); + + if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.nste) { + xfer += oprot->writeFieldBegin("nste", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->nste.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_splitTablet_presult::~TabletClientService_splitTablet_presult() throw() { +} + + +uint32_t TabletClientService_splitTablet_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->nste.read(iprot); + this->__isset.nste = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +TabletClientService_loadTablet_args::~TabletClientService_loadTablet_args() throw() { +} + + +uint32_t TabletClientService_loadTablet_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->lock); + this->__isset.lock = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->extent.read(iprot); + this->__isset.extent = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_loadTablet_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_loadTablet_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("extent", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->extent.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("lock", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->lock); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_loadTablet_pargs::~TabletClientService_loadTablet_pargs() throw() { +} + + +uint32_t TabletClientService_loadTablet_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_loadTablet_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("extent", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->extent)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("lock", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->lock))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_unloadTablet_args::~TabletClientService_unloadTablet_args() throw() { +} + + +uint32_t TabletClientService_unloadTablet_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->lock); + this->__isset.lock = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->extent.read(iprot); + this->__isset.extent = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast328; + xfer += iprot->readI32(ecast328); + this->goal = (TUnloadTabletGoal::type)ecast328; + this->__isset.goal = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->requestTime); + this->__isset.requestTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_unloadTablet_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_unloadTablet_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("extent", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->extent.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("lock", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->lock); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("goal", ::apache::thrift::protocol::T_I32, 6); + xfer += oprot->writeI32((int32_t)this->goal); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("requestTime", ::apache::thrift::protocol::T_I64, 7); + xfer += oprot->writeI64(this->requestTime); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_unloadTablet_pargs::~TabletClientService_unloadTablet_pargs() throw() { +} + + +uint32_t TabletClientService_unloadTablet_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_unloadTablet_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("extent", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->extent)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("lock", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->lock))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("goal", ::apache::thrift::protocol::T_I32, 6); + xfer += oprot->writeI32((int32_t)(*(this->goal))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("requestTime", ::apache::thrift::protocol::T_I64, 7); + xfer += oprot->writeI64((*(this->requestTime))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_flush_args::~TabletClientService_flush_args() throw() { +} + + +uint32_t TabletClientService_flush_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->lock); + this->__isset.lock = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableId); + this->__isset.tableId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->startRow); + this->__isset.startRow = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->endRow); + this->__isset.endRow = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_flush_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_flush_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableId", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tableId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("lock", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->lock); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("startRow", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeBinary(this->startRow); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("endRow", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeBinary(this->endRow); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_flush_pargs::~TabletClientService_flush_pargs() throw() { +} + + +uint32_t TabletClientService_flush_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_flush_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableId", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tableId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("lock", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->lock))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("startRow", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeBinary((*(this->startRow))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("endRow", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeBinary((*(this->endRow))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_flushTablet_args::~TabletClientService_flushTablet_args() throw() { +} + + +uint32_t TabletClientService_flushTablet_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->lock); + this->__isset.lock = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->extent.read(iprot); + this->__isset.extent = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_flushTablet_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_flushTablet_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("lock", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->lock); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("extent", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->extent.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_flushTablet_pargs::~TabletClientService_flushTablet_pargs() throw() { +} + + +uint32_t TabletClientService_flushTablet_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_flushTablet_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("lock", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->lock))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("extent", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += (*(this->extent)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_chop_args::~TabletClientService_chop_args() throw() { +} + + +uint32_t TabletClientService_chop_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->lock); + this->__isset.lock = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->extent.read(iprot); + this->__isset.extent = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_chop_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_chop_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("lock", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->lock); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("extent", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->extent.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_chop_pargs::~TabletClientService_chop_pargs() throw() { +} + + +uint32_t TabletClientService_chop_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_chop_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("lock", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->lock))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("extent", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += (*(this->extent)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_compact_args::~TabletClientService_compact_args() throw() { +} + + +uint32_t TabletClientService_compact_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->lock); + this->__isset.lock = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableId); + this->__isset.tableId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->startRow); + this->__isset.startRow = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->endRow); + this->__isset.endRow = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_compact_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_compact_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("lock", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->lock); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableId", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->tableId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("startRow", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeBinary(this->startRow); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("endRow", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeBinary(this->endRow); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_compact_pargs::~TabletClientService_compact_pargs() throw() { +} + + +uint32_t TabletClientService_compact_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_compact_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("lock", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->lock))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableId", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->tableId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("startRow", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeBinary((*(this->startRow))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("endRow", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeBinary((*(this->endRow))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_getTabletServerStatus_args::~TabletClientService_getTabletServerStatus_args() throw() { +} + + +uint32_t TabletClientService_getTabletServerStatus_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_getTabletServerStatus_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_getTabletServerStatus_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_getTabletServerStatus_pargs::~TabletClientService_getTabletServerStatus_pargs() throw() { +} + + +uint32_t TabletClientService_getTabletServerStatus_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_getTabletServerStatus_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_getTabletServerStatus_result::~TabletClientService_getTabletServerStatus_result() throw() { +} + + +uint32_t TabletClientService_getTabletServerStatus_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_getTabletServerStatus_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("TabletClientService_getTabletServerStatus_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_getTabletServerStatus_presult::~TabletClientService_getTabletServerStatus_presult() throw() { +} + + +uint32_t TabletClientService_getTabletServerStatus_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +TabletClientService_getTabletStats_args::~TabletClientService_getTabletStats_args() throw() { +} + + +uint32_t TabletClientService_getTabletStats_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableId); + this->__isset.tableId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_getTabletStats_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_getTabletStats_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableId", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tableId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_getTabletStats_pargs::~TabletClientService_getTabletStats_pargs() throw() { +} + + +uint32_t TabletClientService_getTabletStats_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_getTabletStats_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableId", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tableId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_getTabletStats_result::~TabletClientService_getTabletStats_result() throw() { +} + + +uint32_t TabletClientService_getTabletStats_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size329; + ::apache::thrift::protocol::TType _etype332; + xfer += iprot->readListBegin(_etype332, _size329); + this->success.resize(_size329); + uint32_t _i333; + for (_i333 = 0; _i333 < _size329; ++_i333) + { + xfer += this->success[_i333].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_getTabletStats_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("TabletClientService_getTabletStats_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter334; + for (_iter334 = this->success.begin(); _iter334 != this->success.end(); ++_iter334) + { + xfer += (*_iter334).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_getTabletStats_presult::~TabletClientService_getTabletStats_presult() throw() { +} + + +uint32_t TabletClientService_getTabletStats_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size335; + ::apache::thrift::protocol::TType _etype338; + xfer += iprot->readListBegin(_etype338, _size335); + (*(this->success)).resize(_size335); + uint32_t _i339; + for (_i339 = 0; _i339 < _size335; ++_i339) + { + xfer += (*(this->success))[_i339].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +TabletClientService_getHistoricalStats_args::~TabletClientService_getHistoricalStats_args() throw() { +} + + +uint32_t TabletClientService_getHistoricalStats_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_getHistoricalStats_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_getHistoricalStats_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_getHistoricalStats_pargs::~TabletClientService_getHistoricalStats_pargs() throw() { +} + + +uint32_t TabletClientService_getHistoricalStats_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_getHistoricalStats_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_getHistoricalStats_result::~TabletClientService_getHistoricalStats_result() throw() { +} + + +uint32_t TabletClientService_getHistoricalStats_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_getHistoricalStats_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("TabletClientService_getHistoricalStats_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_getHistoricalStats_presult::~TabletClientService_getHistoricalStats_presult() throw() { +} + + +uint32_t TabletClientService_getHistoricalStats_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +TabletClientService_halt_args::~TabletClientService_halt_args() throw() { +} + + +uint32_t TabletClientService_halt_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->lock); + this->__isset.lock = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_halt_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_halt_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("lock", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->lock); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_halt_pargs::~TabletClientService_halt_pargs() throw() { +} + + +uint32_t TabletClientService_halt_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_halt_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("lock", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->lock))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_halt_result::~TabletClientService_halt_result() throw() { +} + + +uint32_t TabletClientService_halt_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_halt_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("TabletClientService_halt_result"); + + if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_halt_presult::~TabletClientService_halt_presult() throw() { +} + + +uint32_t TabletClientService_halt_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +TabletClientService_fastHalt_args::~TabletClientService_fastHalt_args() throw() { +} + + +uint32_t TabletClientService_fastHalt_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->lock); + this->__isset.lock = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_fastHalt_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_fastHalt_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("lock", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->lock); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_fastHalt_pargs::~TabletClientService_fastHalt_pargs() throw() { +} + + +uint32_t TabletClientService_fastHalt_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_fastHalt_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("lock", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->lock))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_getActiveScans_args::~TabletClientService_getActiveScans_args() throw() { +} + + +uint32_t TabletClientService_getActiveScans_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_getActiveScans_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_getActiveScans_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_getActiveScans_pargs::~TabletClientService_getActiveScans_pargs() throw() { +} + + +uint32_t TabletClientService_getActiveScans_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_getActiveScans_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_getActiveScans_result::~TabletClientService_getActiveScans_result() throw() { +} + + +uint32_t TabletClientService_getActiveScans_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size340; + ::apache::thrift::protocol::TType _etype343; + xfer += iprot->readListBegin(_etype343, _size340); + this->success.resize(_size340); + uint32_t _i344; + for (_i344 = 0; _i344 < _size340; ++_i344) + { + xfer += this->success[_i344].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_getActiveScans_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("TabletClientService_getActiveScans_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter345; + for (_iter345 = this->success.begin(); _iter345 != this->success.end(); ++_iter345) + { + xfer += (*_iter345).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_getActiveScans_presult::~TabletClientService_getActiveScans_presult() throw() { +} + + +uint32_t TabletClientService_getActiveScans_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size346; + ::apache::thrift::protocol::TType _etype349; + xfer += iprot->readListBegin(_etype349, _size346); + (*(this->success)).resize(_size346); + uint32_t _i350; + for (_i350 = 0; _i350 < _size346; ++_i350) + { + xfer += (*(this->success))[_i350].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +TabletClientService_getActiveCompactions_args::~TabletClientService_getActiveCompactions_args() throw() { +} + + +uint32_t TabletClientService_getActiveCompactions_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_getActiveCompactions_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_getActiveCompactions_args"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_getActiveCompactions_pargs::~TabletClientService_getActiveCompactions_pargs() throw() { +} + + +uint32_t TabletClientService_getActiveCompactions_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_getActiveCompactions_pargs"); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_getActiveCompactions_result::~TabletClientService_getActiveCompactions_result() throw() { +} + + +uint32_t TabletClientService_getActiveCompactions_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size351; + ::apache::thrift::protocol::TType _etype354; + xfer += iprot->readListBegin(_etype354, _size351); + this->success.resize(_size351); + uint32_t _i355; + for (_i355 = 0; _i355 < _size351; ++_i355) + { + xfer += this->success[_i355].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_getActiveCompactions_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("TabletClientService_getActiveCompactions_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter356; + for (_iter356 = this->success.begin(); _iter356 != this->success.end(); ++_iter356) + { + xfer += (*_iter356).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_getActiveCompactions_presult::~TabletClientService_getActiveCompactions_presult() throw() { +} + + +uint32_t TabletClientService_getActiveCompactions_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size357; + ::apache::thrift::protocol::TType _etype360; + xfer += iprot->readListBegin(_etype360, _size357); + (*(this->success)).resize(_size357); + uint32_t _i361; + for (_i361 = 0; _i361 < _size357; ++_i361) + { + xfer += (*(this->success))[_i361].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +TabletClientService_removeLogs_args::~TabletClientService_removeLogs_args() throw() { +} + + +uint32_t TabletClientService_removeLogs_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->filenames.clear(); + uint32_t _size362; + ::apache::thrift::protocol::TType _etype365; + xfer += iprot->readListBegin(_etype365, _size362); + this->filenames.resize(_size362); + uint32_t _i366; + for (_i366 = 0; _i366 < _size362; ++_i366) + { + xfer += iprot->readString(this->filenames[_i366]); + } + xfer += iprot->readListEnd(); + } + this->__isset.filenames = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_removeLogs_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_removeLogs_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("filenames", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->filenames.size())); + std::vector ::const_iterator _iter367; + for (_iter367 = this->filenames.begin(); _iter367 != this->filenames.end(); ++_iter367) + { + xfer += oprot->writeString((*_iter367)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_removeLogs_pargs::~TabletClientService_removeLogs_pargs() throw() { +} + + +uint32_t TabletClientService_removeLogs_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_removeLogs_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("filenames", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->filenames)).size())); + std::vector ::const_iterator _iter368; + for (_iter368 = (*(this->filenames)).begin(); _iter368 != (*(this->filenames)).end(); ++_iter368) + { + xfer += oprot->writeString((*_iter368)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_getActiveLogs_args::~TabletClientService_getActiveLogs_args() throw() { +} + + +uint32_t TabletClientService_getActiveLogs_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_getActiveLogs_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_getActiveLogs_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_getActiveLogs_pargs::~TabletClientService_getActiveLogs_pargs() throw() { +} + + +uint32_t TabletClientService_getActiveLogs_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_getActiveLogs_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_getActiveLogs_result::~TabletClientService_getActiveLogs_result() throw() { +} + + +uint32_t TabletClientService_getActiveLogs_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size369; + ::apache::thrift::protocol::TType _etype372; + xfer += iprot->readListBegin(_etype372, _size369); + this->success.resize(_size369); + uint32_t _i373; + for (_i373 = 0; _i373 < _size369; ++_i373) + { + xfer += iprot->readString(this->success[_i373]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_getActiveLogs_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("TabletClientService_getActiveLogs_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::vector ::const_iterator _iter374; + for (_iter374 = this->success.begin(); _iter374 != this->success.end(); ++_iter374) + { + xfer += oprot->writeString((*_iter374)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_getActiveLogs_presult::~TabletClientService_getActiveLogs_presult() throw() { +} + + +uint32_t TabletClientService_getActiveLogs_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size375; + ::apache::thrift::protocol::TType _etype378; + xfer += iprot->readListBegin(_etype378, _size375); + (*(this->success)).resize(_size375); + uint32_t _i379; + for (_i379 = 0; _i379 < _size375; ++_i379) + { + xfer += iprot->readString((*(this->success))[_i379]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +TabletClientService_startGetSummaries_args::~TabletClientService_startGetSummaries_args() throw() { +} + + +uint32_t TabletClientService_startGetSummaries_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->request.read(iprot); + this->__isset.request = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_startGetSummaries_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_startGetSummaries_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->request.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_startGetSummaries_pargs::~TabletClientService_startGetSummaries_pargs() throw() { +} + + +uint32_t TabletClientService_startGetSummaries_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_startGetSummaries_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->request)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_startGetSummaries_result::~TabletClientService_startGetSummaries_result() throw() { +} + + +uint32_t TabletClientService_startGetSummaries_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_startGetSummaries_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("TabletClientService_startGetSummaries_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.tope) { + xfer += oprot->writeFieldBegin("tope", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->tope.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_startGetSummaries_presult::~TabletClientService_startGetSummaries_presult() throw() { +} + + +uint32_t TabletClientService_startGetSummaries_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tope.read(iprot); + this->__isset.tope = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +TabletClientService_startGetSummariesForPartition_args::~TabletClientService_startGetSummariesForPartition_args() throw() { +} + + +uint32_t TabletClientService_startGetSummariesForPartition_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->request.read(iprot); + this->__isset.request = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->modulus); + this->__isset.modulus = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->remainder); + this->__isset.remainder = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_startGetSummariesForPartition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_startGetSummariesForPartition_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->request.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("modulus", ::apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeI32(this->modulus); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("remainder", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32(this->remainder); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_startGetSummariesForPartition_pargs::~TabletClientService_startGetSummariesForPartition_pargs() throw() { +} + + +uint32_t TabletClientService_startGetSummariesForPartition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_startGetSummariesForPartition_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->request)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("modulus", ::apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeI32((*(this->modulus))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("remainder", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32((*(this->remainder))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_startGetSummariesForPartition_result::~TabletClientService_startGetSummariesForPartition_result() throw() { +} + + +uint32_t TabletClientService_startGetSummariesForPartition_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_startGetSummariesForPartition_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("TabletClientService_startGetSummariesForPartition_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_startGetSummariesForPartition_presult::~TabletClientService_startGetSummariesForPartition_presult() throw() { +} + + +uint32_t TabletClientService_startGetSummariesForPartition_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +TabletClientService_startGetSummariesFromFiles_args::~TabletClientService_startGetSummariesFromFiles_args() throw() { +} + + +uint32_t TabletClientService_startGetSummariesFromFiles_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->credentials.read(iprot); + this->__isset.credentials = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->request.read(iprot); + this->__isset.request = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->files.clear(); + uint32_t _size380; + ::apache::thrift::protocol::TType _ktype381; + ::apache::thrift::protocol::TType _vtype382; + xfer += iprot->readMapBegin(_ktype381, _vtype382, _size380); + uint32_t _i384; + for (_i384 = 0; _i384 < _size380; ++_i384) + { + std::string _key385; + xfer += iprot->readString(_key385); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TRowRange> & _val386 = this->files[_key385]; + { + _val386.clear(); + uint32_t _size387; + ::apache::thrift::protocol::TType _etype390; + xfer += iprot->readListBegin(_etype390, _size387); + _val386.resize(_size387); + uint32_t _i391; + for (_i391 = 0; _i391 < _size387; ++_i391) + { + xfer += _val386[_i391].read(iprot); + } + xfer += iprot->readListEnd(); + } + } + xfer += iprot->readMapEnd(); + } + this->__isset.files = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_startGetSummariesFromFiles_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_startGetSummariesFromFiles_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->credentials.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->request.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("files", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, static_cast(this->files.size())); + std::map > ::const_iterator _iter392; + for (_iter392 = this->files.begin(); _iter392 != this->files.end(); ++_iter392) + { + xfer += oprot->writeString(_iter392->first); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(_iter392->second.size())); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TRowRange> ::const_iterator _iter393; + for (_iter393 = _iter392->second.begin(); _iter393 != _iter392->second.end(); ++_iter393) + { + xfer += (*_iter393).write(oprot); + } + xfer += oprot->writeListEnd(); + } + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_startGetSummariesFromFiles_pargs::~TabletClientService_startGetSummariesFromFiles_pargs() throw() { +} + + +uint32_t TabletClientService_startGetSummariesFromFiles_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_startGetSummariesFromFiles_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("credentials", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->credentials)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->request)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("files", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, static_cast((*(this->files)).size())); + std::map > ::const_iterator _iter394; + for (_iter394 = (*(this->files)).begin(); _iter394 != (*(this->files)).end(); ++_iter394) + { + xfer += oprot->writeString(_iter394->first); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(_iter394->second.size())); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TRowRange> ::const_iterator _iter395; + for (_iter395 = _iter394->second.begin(); _iter395 != _iter394->second.end(); ++_iter395) + { + xfer += (*_iter395).write(oprot); + } + xfer += oprot->writeListEnd(); + } + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_startGetSummariesFromFiles_result::~TabletClientService_startGetSummariesFromFiles_result() throw() { +} + + +uint32_t TabletClientService_startGetSummariesFromFiles_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_startGetSummariesFromFiles_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("TabletClientService_startGetSummariesFromFiles_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.sec) { + xfer += oprot->writeFieldBegin("sec", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->sec.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_startGetSummariesFromFiles_presult::~TabletClientService_startGetSummariesFromFiles_presult() throw() { +} + + +uint32_t TabletClientService_startGetSummariesFromFiles_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sec.read(iprot); + this->__isset.sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +TabletClientService_contiuneGetSummaries_args::~TabletClientService_contiuneGetSummaries_args() throw() { +} + + +uint32_t TabletClientService_contiuneGetSummaries_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tinfo.read(iprot); + this->__isset.tinfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->sessionId); + this->__isset.sessionId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_contiuneGetSummaries_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_contiuneGetSummaries_args"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tinfo.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("sessionId", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->sessionId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_contiuneGetSummaries_pargs::~TabletClientService_contiuneGetSummaries_pargs() throw() { +} + + +uint32_t TabletClientService_contiuneGetSummaries_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletClientService_contiuneGetSummaries_pargs"); + + xfer += oprot->writeFieldBegin("tinfo", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tinfo)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("sessionId", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64((*(this->sessionId))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_contiuneGetSummaries_result::~TabletClientService_contiuneGetSummaries_result() throw() { +} + + +uint32_t TabletClientService_contiuneGetSummaries_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->nssi.read(iprot); + this->__isset.nssi = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletClientService_contiuneGetSummaries_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("TabletClientService_contiuneGetSummaries_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.nssi) { + xfer += oprot->writeFieldBegin("nssi", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->nssi.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +TabletClientService_contiuneGetSummaries_presult::~TabletClientService_contiuneGetSummaries_presult() throw() { +} + + +uint32_t TabletClientService_contiuneGetSummaries_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->nssi.read(iprot); + this->__isset.nssi = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +void TabletClientServiceClient::startScan( ::org::apache::accumulov2::core::dataImpl::thrift::InitialScan& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const ::org::apache::accumulov2::core::dataImpl::thrift::TRange& range, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & columns, const int32_t batchSize, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & ssiList, const std::map > & ssio, const std::vector & authorizations, const bool waitForWrites, const bool isolated, const int64_t readaheadThreshold, const TSamplerConfiguration& samplerConfig, const int64_t batchTimeOut, const std::string& classLoaderContext, const std::map & executionHints) +{ + send_startScan(tinfo, credentials, extent, range, columns, batchSize, ssiList, ssio, authorizations, waitForWrites, isolated, readaheadThreshold, samplerConfig, batchTimeOut, classLoaderContext, executionHints); + recv_startScan(_return); +} + +void TabletClientServiceClient::send_startScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const ::org::apache::accumulov2::core::dataImpl::thrift::TRange& range, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & columns, const int32_t batchSize, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & ssiList, const std::map > & ssio, const std::vector & authorizations, const bool waitForWrites, const bool isolated, const int64_t readaheadThreshold, const TSamplerConfiguration& samplerConfig, const int64_t batchTimeOut, const std::string& classLoaderContext, const std::map & executionHints) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("startScan", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_startScan_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.extent = &extent; + args.range = ⦥ + args.columns = &columns; + args.batchSize = &batchSize; + args.ssiList = &ssiList; + args.ssio = &ssio; + args.authorizations = &authorizations; + args.waitForWrites = &waitForWrites; + args.isolated = &isolated; + args.readaheadThreshold = &readaheadThreshold; + args.samplerConfig = &samplerConfig; + args.batchTimeOut = &batchTimeOut; + args.classLoaderContext = &classLoaderContext; + args.executionHints = &executionHints; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::recv_startScan( ::org::apache::accumulov2::core::dataImpl::thrift::InitialScan& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("startScan") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + TabletClientService_startScan_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.nste) { + throw result.nste; + } + if (result.__isset.tmfe) { + throw result.tmfe; + } + if (result.__isset.tsnpe) { + throw result.tsnpe; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "startScan failed: unknown result"); +} + +void TabletClientServiceClient::continueScan( ::org::apache::accumulov2::core::dataImpl::thrift::ScanResult& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID) +{ + send_continueScan(tinfo, scanID); + recv_continueScan(_return); +} + +void TabletClientServiceClient::send_continueScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("continueScan", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_continueScan_pargs args; + args.tinfo = &tinfo; + args.scanID = &scanID; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::recv_continueScan( ::org::apache::accumulov2::core::dataImpl::thrift::ScanResult& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("continueScan") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + TabletClientService_continueScan_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.nssi) { + throw result.nssi; + } + if (result.__isset.nste) { + throw result.nste; + } + if (result.__isset.tmfe) { + throw result.tmfe; + } + if (result.__isset.tsnpe) { + throw result.tsnpe; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "continueScan failed: unknown result"); +} + +void TabletClientServiceClient::closeScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID) +{ + send_closeScan(tinfo, scanID); +} + +void TabletClientServiceClient::send_closeScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("closeScan", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + TabletClientService_closeScan_pargs args; + args.tinfo = &tinfo; + args.scanID = &scanID; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::startMultiScan( ::org::apache::accumulov2::core::dataImpl::thrift::InitialMultiScan& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanBatch& batch, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & columns, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & ssiList, const std::map > & ssio, const std::vector & authorizations, const bool waitForWrites, const TSamplerConfiguration& samplerConfig, const int64_t batchTimeOut, const std::string& classLoaderContext, const std::map & executionHints) +{ + send_startMultiScan(tinfo, credentials, batch, columns, ssiList, ssio, authorizations, waitForWrites, samplerConfig, batchTimeOut, classLoaderContext, executionHints); + recv_startMultiScan(_return); +} + +void TabletClientServiceClient::send_startMultiScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanBatch& batch, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & columns, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & ssiList, const std::map > & ssio, const std::vector & authorizations, const bool waitForWrites, const TSamplerConfiguration& samplerConfig, const int64_t batchTimeOut, const std::string& classLoaderContext, const std::map & executionHints) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("startMultiScan", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_startMultiScan_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.batch = &batch; + args.columns = &columns; + args.ssiList = &ssiList; + args.ssio = &ssio; + args.authorizations = &authorizations; + args.waitForWrites = &waitForWrites; + args.samplerConfig = &samplerConfig; + args.batchTimeOut = &batchTimeOut; + args.classLoaderContext = &classLoaderContext; + args.executionHints = &executionHints; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::recv_startMultiScan( ::org::apache::accumulov2::core::dataImpl::thrift::InitialMultiScan& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("startMultiScan") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + TabletClientService_startMultiScan_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tsnpe) { + throw result.tsnpe; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "startMultiScan failed: unknown result"); +} + +void TabletClientServiceClient::continueMultiScan( ::org::apache::accumulov2::core::dataImpl::thrift::MultiScanResult& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID) +{ + send_continueMultiScan(tinfo, scanID); + recv_continueMultiScan(_return); +} + +void TabletClientServiceClient::send_continueMultiScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("continueMultiScan", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_continueMultiScan_pargs args; + args.tinfo = &tinfo; + args.scanID = &scanID; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::recv_continueMultiScan( ::org::apache::accumulov2::core::dataImpl::thrift::MultiScanResult& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("continueMultiScan") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + TabletClientService_continueMultiScan_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.nssi) { + throw result.nssi; + } + if (result.__isset.tsnpe) { + throw result.tsnpe; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "continueMultiScan failed: unknown result"); +} + +void TabletClientServiceClient::closeMultiScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID) +{ + send_closeMultiScan(tinfo, scanID); + recv_closeMultiScan(); +} + +void TabletClientServiceClient::send_closeMultiScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("closeMultiScan", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_closeMultiScan_pargs args; + args.tinfo = &tinfo; + args.scanID = &scanID; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::recv_closeMultiScan() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("closeMultiScan") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + TabletClientService_closeMultiScan_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.nssi) { + throw result.nssi; + } + return; +} + + ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID TabletClientServiceClient::startUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const TDurability::type durability) +{ + send_startUpdate(tinfo, credentials, durability); + return recv_startUpdate(); +} + +void TabletClientServiceClient::send_startUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const TDurability::type durability) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("startUpdate", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_startUpdate_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.durability = &durability; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + + ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID TabletClientServiceClient::recv_startUpdate() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("startUpdate") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID _return; + TabletClientService_startUpdate_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.sec) { + throw result.sec; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "startUpdate failed: unknown result"); +} + +void TabletClientServiceClient::applyUpdates(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID updateID, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& keyExtent, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TMutation> & mutations) +{ + send_applyUpdates(tinfo, updateID, keyExtent, mutations); +} + +void TabletClientServiceClient::send_applyUpdates(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID updateID, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& keyExtent, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TMutation> & mutations) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("applyUpdates", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + TabletClientService_applyUpdates_pargs args; + args.tinfo = &tinfo; + args.updateID = &updateID; + args.keyExtent = &keyExtent; + args.mutations = &mutations; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::closeUpdate( ::org::apache::accumulov2::core::dataImpl::thrift::UpdateErrors& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID updateID) +{ + send_closeUpdate(tinfo, updateID); + recv_closeUpdate(_return); +} + +void TabletClientServiceClient::send_closeUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID updateID) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("closeUpdate", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_closeUpdate_pargs args; + args.tinfo = &tinfo; + args.updateID = &updateID; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::recv_closeUpdate( ::org::apache::accumulov2::core::dataImpl::thrift::UpdateErrors& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("closeUpdate") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + TabletClientService_closeUpdate_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.nssi) { + throw result.nssi; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "closeUpdate failed: unknown result"); +} + +void TabletClientServiceClient::update(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& keyExtent, const ::org::apache::accumulov2::core::dataImpl::thrift::TMutation& mutation, const TDurability::type durability) +{ + send_update(tinfo, credentials, keyExtent, mutation, durability); + recv_update(); +} + +void TabletClientServiceClient::send_update(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& keyExtent, const ::org::apache::accumulov2::core::dataImpl::thrift::TMutation& mutation, const TDurability::type durability) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("update", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_update_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.keyExtent = &keyExtent; + args.mutation = &mutation; + args.durability = &durability; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::recv_update() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("update") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + TabletClientService_update_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.nste) { + throw result.nste; + } + if (result.__isset.cve) { + throw result.cve; + } + return; +} + +void TabletClientServiceClient::startConditionalUpdate( ::org::apache::accumulov2::core::dataImpl::thrift::TConditionalSession& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::vector & authorizations, const std::string& tableID, const TDurability::type durability, const std::string& classLoaderContext) +{ + send_startConditionalUpdate(tinfo, credentials, authorizations, tableID, durability, classLoaderContext); + recv_startConditionalUpdate(_return); +} + +void TabletClientServiceClient::send_startConditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::vector & authorizations, const std::string& tableID, const TDurability::type durability, const std::string& classLoaderContext) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("startConditionalUpdate", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_startConditionalUpdate_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.authorizations = &authorizations; + args.tableID = &tableID; + args.durability = &durability; + args.classLoaderContext = &classLoaderContext; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::recv_startConditionalUpdate( ::org::apache::accumulov2::core::dataImpl::thrift::TConditionalSession& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("startConditionalUpdate") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + TabletClientService_startConditionalUpdate_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.sec) { + throw result.sec; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "startConditionalUpdate failed: unknown result"); +} + +void TabletClientServiceClient::conditionalUpdate(std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TCMResult> & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID, const ::org::apache::accumulov2::core::dataImpl::thrift::CMBatch& mutations, const std::vector & symbols) +{ + send_conditionalUpdate(tinfo, sessID, mutations, symbols); + recv_conditionalUpdate(_return); +} + +void TabletClientServiceClient::send_conditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID, const ::org::apache::accumulov2::core::dataImpl::thrift::CMBatch& mutations, const std::vector & symbols) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("conditionalUpdate", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_conditionalUpdate_pargs args; + args.tinfo = &tinfo; + args.sessID = &sessID; + args.mutations = &mutations; + args.symbols = &symbols; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::recv_conditionalUpdate(std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TCMResult> & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("conditionalUpdate") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + TabletClientService_conditionalUpdate_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.nssi) { + throw result.nssi; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "conditionalUpdate failed: unknown result"); +} + +void TabletClientServiceClient::invalidateConditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID) +{ + send_invalidateConditionalUpdate(tinfo, sessID); + recv_invalidateConditionalUpdate(); +} + +void TabletClientServiceClient::send_invalidateConditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("invalidateConditionalUpdate", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_invalidateConditionalUpdate_pargs args; + args.tinfo = &tinfo; + args.sessID = &sessID; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::recv_invalidateConditionalUpdate() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("invalidateConditionalUpdate") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + TabletClientService_invalidateConditionalUpdate_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + return; +} + +void TabletClientServiceClient::closeConditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID) +{ + send_closeConditionalUpdate(tinfo, sessID); +} + +void TabletClientServiceClient::send_closeConditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("closeConditionalUpdate", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + TabletClientService_closeConditionalUpdate_pargs args; + args.tinfo = &tinfo; + args.sessID = &sessID; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::bulkImport(std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent> & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const ::org::apache::accumulov2::core::dataImpl::thrift::TabletFiles& files, const bool setTime) +{ + send_bulkImport(tinfo, credentials, tid, files, setTime); + recv_bulkImport(_return); +} + +void TabletClientServiceClient::send_bulkImport(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const ::org::apache::accumulov2::core::dataImpl::thrift::TabletFiles& files, const bool setTime) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("bulkImport", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_bulkImport_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.tid = &tid; + args.files = &files; + args.setTime = &setTime; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::recv_bulkImport(std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent> & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("bulkImport") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + TabletClientService_bulkImport_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.sec) { + throw result.sec; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "bulkImport failed: unknown result"); +} + +void TabletClientServiceClient::loadFiles(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const std::string& dir, const std::map< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent, std::map > & files, const bool setTime) +{ + send_loadFiles(tinfo, credentials, tid, dir, files, setTime); +} + +void TabletClientServiceClient::send_loadFiles(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const std::string& dir, const std::map< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent, std::map > & files, const bool setTime) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("loadFiles", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + TabletClientService_loadFiles_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.tid = &tid; + args.dir = &dir; + args.files = &files; + args.setTime = &setTime; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::splitTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const std::string& splitPoint) +{ + send_splitTablet(tinfo, credentials, extent, splitPoint); + recv_splitTablet(); +} + +void TabletClientServiceClient::send_splitTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const std::string& splitPoint) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("splitTablet", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_splitTablet_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.extent = &extent; + args.splitPoint = &splitPoint; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::recv_splitTablet() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("splitTablet") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + TabletClientService_splitTablet_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.nste) { + throw result.nste; + } + return; +} + +void TabletClientServiceClient::loadTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent) +{ + send_loadTablet(tinfo, credentials, lock, extent); +} + +void TabletClientServiceClient::send_loadTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("loadTablet", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + TabletClientService_loadTablet_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.lock = &lock; + args.extent = &extent; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::unloadTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const TUnloadTabletGoal::type goal, const int64_t requestTime) +{ + send_unloadTablet(tinfo, credentials, lock, extent, goal, requestTime); +} + +void TabletClientServiceClient::send_unloadTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const TUnloadTabletGoal::type goal, const int64_t requestTime) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("unloadTablet", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + TabletClientService_unloadTablet_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.lock = &lock; + args.extent = &extent; + args.goal = &goal; + args.requestTime = &requestTime; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::flush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const std::string& tableId, const std::string& startRow, const std::string& endRow) +{ + send_flush(tinfo, credentials, lock, tableId, startRow, endRow); +} + +void TabletClientServiceClient::send_flush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const std::string& tableId, const std::string& startRow, const std::string& endRow) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("flush", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + TabletClientService_flush_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.lock = &lock; + args.tableId = &tableId; + args.startRow = &startRow; + args.endRow = &endRow; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::flushTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent) +{ + send_flushTablet(tinfo, credentials, lock, extent); +} + +void TabletClientServiceClient::send_flushTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("flushTablet", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + TabletClientService_flushTablet_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.lock = &lock; + args.extent = &extent; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::chop(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent) +{ + send_chop(tinfo, credentials, lock, extent); +} + +void TabletClientServiceClient::send_chop(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("chop", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + TabletClientService_chop_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.lock = &lock; + args.extent = &extent; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::compact(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const std::string& tableId, const std::string& startRow, const std::string& endRow) +{ + send_compact(tinfo, credentials, lock, tableId, startRow, endRow); +} + +void TabletClientServiceClient::send_compact(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const std::string& tableId, const std::string& startRow, const std::string& endRow) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("compact", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + TabletClientService_compact_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.lock = &lock; + args.tableId = &tableId; + args.startRow = &startRow; + args.endRow = &endRow; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::getTabletServerStatus( ::org::apache::accumulov2::core::master::thrift::TabletServerStatus& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + send_getTabletServerStatus(tinfo, credentials); + recv_getTabletServerStatus(_return); +} + +void TabletClientServiceClient::send_getTabletServerStatus(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getTabletServerStatus", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_getTabletServerStatus_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::recv_getTabletServerStatus( ::org::apache::accumulov2::core::master::thrift::TabletServerStatus& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getTabletServerStatus") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + TabletClientService_getTabletServerStatus_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.sec) { + throw result.sec; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getTabletServerStatus failed: unknown result"); +} + +void TabletClientServiceClient::getTabletStats(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableId) +{ + send_getTabletStats(tinfo, credentials, tableId); + recv_getTabletStats(_return); +} + +void TabletClientServiceClient::send_getTabletStats(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableId) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getTabletStats", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_getTabletStats_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.tableId = &tableId; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::recv_getTabletStats(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getTabletStats") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + TabletClientService_getTabletStats_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.sec) { + throw result.sec; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getTabletStats failed: unknown result"); +} + +void TabletClientServiceClient::getHistoricalStats(TabletStats& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + send_getHistoricalStats(tinfo, credentials); + recv_getHistoricalStats(_return); +} + +void TabletClientServiceClient::send_getHistoricalStats(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getHistoricalStats", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_getHistoricalStats_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::recv_getHistoricalStats(TabletStats& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getHistoricalStats") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + TabletClientService_getHistoricalStats_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.sec) { + throw result.sec; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getHistoricalStats failed: unknown result"); +} + +void TabletClientServiceClient::halt(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock) +{ + send_halt(tinfo, credentials, lock); + recv_halt(); +} + +void TabletClientServiceClient::send_halt(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("halt", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_halt_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.lock = &lock; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::recv_halt() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("halt") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + TabletClientService_halt_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + throw result.sec; + } + return; +} + +void TabletClientServiceClient::fastHalt(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock) +{ + send_fastHalt(tinfo, credentials, lock); +} + +void TabletClientServiceClient::send_fastHalt(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("fastHalt", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + TabletClientService_fastHalt_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.lock = &lock; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::getActiveScans(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + send_getActiveScans(tinfo, credentials); + recv_getActiveScans(_return); +} + +void TabletClientServiceClient::send_getActiveScans(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getActiveScans", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_getActiveScans_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::recv_getActiveScans(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getActiveScans") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + TabletClientService_getActiveScans_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.sec) { + throw result.sec; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getActiveScans failed: unknown result"); +} + +void TabletClientServiceClient::getActiveCompactions(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + send_getActiveCompactions(tinfo, credentials); + recv_getActiveCompactions(_return); +} + +void TabletClientServiceClient::send_getActiveCompactions(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getActiveCompactions", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_getActiveCompactions_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::recv_getActiveCompactions(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getActiveCompactions") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + TabletClientService_getActiveCompactions_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.sec) { + throw result.sec; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getActiveCompactions failed: unknown result"); +} + +void TabletClientServiceClient::removeLogs(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::vector & filenames) +{ + send_removeLogs(tinfo, credentials, filenames); +} + +void TabletClientServiceClient::send_removeLogs(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::vector & filenames) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("removeLogs", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + TabletClientService_removeLogs_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.filenames = &filenames; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::getActiveLogs(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + send_getActiveLogs(tinfo, credentials); + recv_getActiveLogs(_return); +} + +void TabletClientServiceClient::send_getActiveLogs(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getActiveLogs", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_getActiveLogs_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::recv_getActiveLogs(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getActiveLogs") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + TabletClientService_getActiveLogs_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getActiveLogs failed: unknown result"); +} + +void TabletClientServiceClient::startGetSummaries( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request) +{ + send_startGetSummaries(tinfo, credentials, request); + recv_startGetSummaries(_return); +} + +void TabletClientServiceClient::send_startGetSummaries(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("startGetSummaries", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_startGetSummaries_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::recv_startGetSummaries( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("startGetSummaries") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + TabletClientService_startGetSummaries_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.sec) { + throw result.sec; + } + if (result.__isset.tope) { + throw result.tope; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "startGetSummaries failed: unknown result"); +} + +void TabletClientServiceClient::startGetSummariesForPartition( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request, const int32_t modulus, const int32_t remainder) +{ + send_startGetSummariesForPartition(tinfo, credentials, request, modulus, remainder); + recv_startGetSummariesForPartition(_return); +} + +void TabletClientServiceClient::send_startGetSummariesForPartition(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request, const int32_t modulus, const int32_t remainder) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("startGetSummariesForPartition", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_startGetSummariesForPartition_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.request = &request; + args.modulus = &modulus; + args.remainder = &remainder; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::recv_startGetSummariesForPartition( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("startGetSummariesForPartition") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + TabletClientService_startGetSummariesForPartition_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.sec) { + throw result.sec; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "startGetSummariesForPartition failed: unknown result"); +} + +void TabletClientServiceClient::startGetSummariesFromFiles( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request, const std::map > & files) +{ + send_startGetSummariesFromFiles(tinfo, credentials, request, files); + recv_startGetSummariesFromFiles(_return); +} + +void TabletClientServiceClient::send_startGetSummariesFromFiles(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request, const std::map > & files) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("startGetSummariesFromFiles", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_startGetSummariesFromFiles_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.request = &request; + args.files = &files; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::recv_startGetSummariesFromFiles( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("startGetSummariesFromFiles") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + TabletClientService_startGetSummariesFromFiles_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.sec) { + throw result.sec; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "startGetSummariesFromFiles failed: unknown result"); +} + +void TabletClientServiceClient::contiuneGetSummaries( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const int64_t sessionId) +{ + send_contiuneGetSummaries(tinfo, sessionId); + recv_contiuneGetSummaries(_return); +} + +void TabletClientServiceClient::send_contiuneGetSummaries(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const int64_t sessionId) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("contiuneGetSummaries", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_contiuneGetSummaries_pargs args; + args.tinfo = &tinfo; + args.sessionId = &sessionId; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void TabletClientServiceClient::recv_contiuneGetSummaries( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("contiuneGetSummaries") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + TabletClientService_contiuneGetSummaries_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.nssi) { + throw result.nssi; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "contiuneGetSummaries failed: unknown result"); +} + +bool TabletClientServiceProcessor::dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext) { + ProcessMap::iterator pfn; + pfn = processMap_.find(fname); + if (pfn == processMap_.end()) { + return ::org::apache::accumulov2::core::clientImpl::thrift::ClientServiceProcessor::dispatchCall(iprot, oprot, fname, seqid, callContext); + } + (this->*(pfn->second))(seqid, iprot, oprot, callContext); + return true; +} + +void TabletClientServiceProcessor::process_startScan(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.startScan", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.startScan"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.startScan"); + } + + TabletClientService_startScan_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.startScan", bytes); + } + + TabletClientService_startScan_result result; + try { + iface_->startScan(result.success, args.tinfo, args.credentials, args.extent, args.range, args.columns, args.batchSize, args.ssiList, args.ssio, args.authorizations, args.waitForWrites, args.isolated, args.readaheadThreshold, args.samplerConfig, args.batchTimeOut, args.classLoaderContext, args.executionHints); + result.__isset.success = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (NotServingTabletException &nste) { + result.nste = nste; + result.__isset.nste = true; + } catch (TooManyFilesException &tmfe) { + result.tmfe = tmfe; + result.__isset.tmfe = true; + } catch (TSampleNotPresentException &tsnpe) { + result.tsnpe = tsnpe; + result.__isset.tsnpe = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.startScan"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("startScan", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "TabletClientService.startScan"); + } + + oprot->writeMessageBegin("startScan", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "TabletClientService.startScan", bytes); + } +} + +void TabletClientServiceProcessor::process_continueScan(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.continueScan", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.continueScan"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.continueScan"); + } + + TabletClientService_continueScan_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.continueScan", bytes); + } + + TabletClientService_continueScan_result result; + try { + iface_->continueScan(result.success, args.tinfo, args.scanID); + result.__isset.success = true; + } catch (NoSuchScanIDException &nssi) { + result.nssi = nssi; + result.__isset.nssi = true; + } catch (NotServingTabletException &nste) { + result.nste = nste; + result.__isset.nste = true; + } catch (TooManyFilesException &tmfe) { + result.tmfe = tmfe; + result.__isset.tmfe = true; + } catch (TSampleNotPresentException &tsnpe) { + result.tsnpe = tsnpe; + result.__isset.tsnpe = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.continueScan"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("continueScan", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "TabletClientService.continueScan"); + } + + oprot->writeMessageBegin("continueScan", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "TabletClientService.continueScan", bytes); + } +} + +void TabletClientServiceProcessor::process_closeScan(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.closeScan", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.closeScan"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.closeScan"); + } + + TabletClientService_closeScan_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.closeScan", bytes); + } + + try { + iface_->closeScan(args.tinfo, args.scanID); + } catch (const std::exception&) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.closeScan"); + } + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->asyncComplete(ctx, "TabletClientService.closeScan"); + } + + return; +} + +void TabletClientServiceProcessor::process_startMultiScan(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.startMultiScan", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.startMultiScan"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.startMultiScan"); + } + + TabletClientService_startMultiScan_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.startMultiScan", bytes); + } + + TabletClientService_startMultiScan_result result; + try { + iface_->startMultiScan(result.success, args.tinfo, args.credentials, args.batch, args.columns, args.ssiList, args.ssio, args.authorizations, args.waitForWrites, args.samplerConfig, args.batchTimeOut, args.classLoaderContext, args.executionHints); + result.__isset.success = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (TSampleNotPresentException &tsnpe) { + result.tsnpe = tsnpe; + result.__isset.tsnpe = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.startMultiScan"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("startMultiScan", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "TabletClientService.startMultiScan"); + } + + oprot->writeMessageBegin("startMultiScan", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "TabletClientService.startMultiScan", bytes); + } +} + +void TabletClientServiceProcessor::process_continueMultiScan(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.continueMultiScan", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.continueMultiScan"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.continueMultiScan"); + } + + TabletClientService_continueMultiScan_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.continueMultiScan", bytes); + } + + TabletClientService_continueMultiScan_result result; + try { + iface_->continueMultiScan(result.success, args.tinfo, args.scanID); + result.__isset.success = true; + } catch (NoSuchScanIDException &nssi) { + result.nssi = nssi; + result.__isset.nssi = true; + } catch (TSampleNotPresentException &tsnpe) { + result.tsnpe = tsnpe; + result.__isset.tsnpe = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.continueMultiScan"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("continueMultiScan", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "TabletClientService.continueMultiScan"); + } + + oprot->writeMessageBegin("continueMultiScan", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "TabletClientService.continueMultiScan", bytes); + } +} + +void TabletClientServiceProcessor::process_closeMultiScan(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.closeMultiScan", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.closeMultiScan"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.closeMultiScan"); + } + + TabletClientService_closeMultiScan_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.closeMultiScan", bytes); + } + + TabletClientService_closeMultiScan_result result; + try { + iface_->closeMultiScan(args.tinfo, args.scanID); + } catch (NoSuchScanIDException &nssi) { + result.nssi = nssi; + result.__isset.nssi = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.closeMultiScan"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("closeMultiScan", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "TabletClientService.closeMultiScan"); + } + + oprot->writeMessageBegin("closeMultiScan", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "TabletClientService.closeMultiScan", bytes); + } +} + +void TabletClientServiceProcessor::process_startUpdate(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.startUpdate", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.startUpdate"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.startUpdate"); + } + + TabletClientService_startUpdate_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.startUpdate", bytes); + } + + TabletClientService_startUpdate_result result; + try { + result.success = iface_->startUpdate(args.tinfo, args.credentials, args.durability); + result.__isset.success = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.startUpdate"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("startUpdate", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "TabletClientService.startUpdate"); + } + + oprot->writeMessageBegin("startUpdate", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "TabletClientService.startUpdate", bytes); + } +} + +void TabletClientServiceProcessor::process_applyUpdates(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.applyUpdates", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.applyUpdates"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.applyUpdates"); + } + + TabletClientService_applyUpdates_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.applyUpdates", bytes); + } + + try { + iface_->applyUpdates(args.tinfo, args.updateID, args.keyExtent, args.mutations); + } catch (const std::exception&) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.applyUpdates"); + } + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->asyncComplete(ctx, "TabletClientService.applyUpdates"); + } + + return; +} + +void TabletClientServiceProcessor::process_closeUpdate(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.closeUpdate", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.closeUpdate"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.closeUpdate"); + } + + TabletClientService_closeUpdate_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.closeUpdate", bytes); + } + + TabletClientService_closeUpdate_result result; + try { + iface_->closeUpdate(result.success, args.tinfo, args.updateID); + result.__isset.success = true; + } catch (NoSuchScanIDException &nssi) { + result.nssi = nssi; + result.__isset.nssi = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.closeUpdate"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("closeUpdate", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "TabletClientService.closeUpdate"); + } + + oprot->writeMessageBegin("closeUpdate", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "TabletClientService.closeUpdate", bytes); + } +} + +void TabletClientServiceProcessor::process_update(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.update", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.update"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.update"); + } + + TabletClientService_update_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.update", bytes); + } + + TabletClientService_update_result result; + try { + iface_->update(args.tinfo, args.credentials, args.keyExtent, args.mutation, args.durability); + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (NotServingTabletException &nste) { + result.nste = nste; + result.__isset.nste = true; + } catch (ConstraintViolationException &cve) { + result.cve = cve; + result.__isset.cve = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.update"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("update", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "TabletClientService.update"); + } + + oprot->writeMessageBegin("update", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "TabletClientService.update", bytes); + } +} + +void TabletClientServiceProcessor::process_startConditionalUpdate(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.startConditionalUpdate", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.startConditionalUpdate"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.startConditionalUpdate"); + } + + TabletClientService_startConditionalUpdate_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.startConditionalUpdate", bytes); + } + + TabletClientService_startConditionalUpdate_result result; + try { + iface_->startConditionalUpdate(result.success, args.tinfo, args.credentials, args.authorizations, args.tableID, args.durability, args.classLoaderContext); + result.__isset.success = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.startConditionalUpdate"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("startConditionalUpdate", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "TabletClientService.startConditionalUpdate"); + } + + oprot->writeMessageBegin("startConditionalUpdate", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "TabletClientService.startConditionalUpdate", bytes); + } +} + +void TabletClientServiceProcessor::process_conditionalUpdate(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.conditionalUpdate", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.conditionalUpdate"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.conditionalUpdate"); + } + + TabletClientService_conditionalUpdate_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.conditionalUpdate", bytes); + } + + TabletClientService_conditionalUpdate_result result; + try { + iface_->conditionalUpdate(result.success, args.tinfo, args.sessID, args.mutations, args.symbols); + result.__isset.success = true; + } catch (NoSuchScanIDException &nssi) { + result.nssi = nssi; + result.__isset.nssi = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.conditionalUpdate"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("conditionalUpdate", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "TabletClientService.conditionalUpdate"); + } + + oprot->writeMessageBegin("conditionalUpdate", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "TabletClientService.conditionalUpdate", bytes); + } +} + +void TabletClientServiceProcessor::process_invalidateConditionalUpdate(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.invalidateConditionalUpdate", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.invalidateConditionalUpdate"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.invalidateConditionalUpdate"); + } + + TabletClientService_invalidateConditionalUpdate_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.invalidateConditionalUpdate", bytes); + } + + TabletClientService_invalidateConditionalUpdate_result result; + try { + iface_->invalidateConditionalUpdate(args.tinfo, args.sessID); + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.invalidateConditionalUpdate"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("invalidateConditionalUpdate", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "TabletClientService.invalidateConditionalUpdate"); + } + + oprot->writeMessageBegin("invalidateConditionalUpdate", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "TabletClientService.invalidateConditionalUpdate", bytes); + } +} + +void TabletClientServiceProcessor::process_closeConditionalUpdate(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.closeConditionalUpdate", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.closeConditionalUpdate"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.closeConditionalUpdate"); + } + + TabletClientService_closeConditionalUpdate_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.closeConditionalUpdate", bytes); + } + + try { + iface_->closeConditionalUpdate(args.tinfo, args.sessID); + } catch (const std::exception&) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.closeConditionalUpdate"); + } + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->asyncComplete(ctx, "TabletClientService.closeConditionalUpdate"); + } + + return; +} + +void TabletClientServiceProcessor::process_bulkImport(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.bulkImport", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.bulkImport"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.bulkImport"); + } + + TabletClientService_bulkImport_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.bulkImport", bytes); + } + + TabletClientService_bulkImport_result result; + try { + iface_->bulkImport(result.success, args.tinfo, args.credentials, args.tid, args.files, args.setTime); + result.__isset.success = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.bulkImport"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("bulkImport", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "TabletClientService.bulkImport"); + } + + oprot->writeMessageBegin("bulkImport", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "TabletClientService.bulkImport", bytes); + } +} + +void TabletClientServiceProcessor::process_loadFiles(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.loadFiles", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.loadFiles"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.loadFiles"); + } + + TabletClientService_loadFiles_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.loadFiles", bytes); + } + + try { + iface_->loadFiles(args.tinfo, args.credentials, args.tid, args.dir, args.files, args.setTime); + } catch (const std::exception&) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.loadFiles"); + } + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->asyncComplete(ctx, "TabletClientService.loadFiles"); + } + + return; +} + +void TabletClientServiceProcessor::process_splitTablet(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.splitTablet", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.splitTablet"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.splitTablet"); + } + + TabletClientService_splitTablet_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.splitTablet", bytes); + } + + TabletClientService_splitTablet_result result; + try { + iface_->splitTablet(args.tinfo, args.credentials, args.extent, args.splitPoint); + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (NotServingTabletException &nste) { + result.nste = nste; + result.__isset.nste = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.splitTablet"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("splitTablet", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "TabletClientService.splitTablet"); + } + + oprot->writeMessageBegin("splitTablet", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "TabletClientService.splitTablet", bytes); + } +} + +void TabletClientServiceProcessor::process_loadTablet(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.loadTablet", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.loadTablet"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.loadTablet"); + } + + TabletClientService_loadTablet_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.loadTablet", bytes); + } + + try { + iface_->loadTablet(args.tinfo, args.credentials, args.lock, args.extent); + } catch (const std::exception&) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.loadTablet"); + } + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->asyncComplete(ctx, "TabletClientService.loadTablet"); + } + + return; +} + +void TabletClientServiceProcessor::process_unloadTablet(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.unloadTablet", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.unloadTablet"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.unloadTablet"); + } + + TabletClientService_unloadTablet_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.unloadTablet", bytes); + } + + try { + iface_->unloadTablet(args.tinfo, args.credentials, args.lock, args.extent, args.goal, args.requestTime); + } catch (const std::exception&) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.unloadTablet"); + } + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->asyncComplete(ctx, "TabletClientService.unloadTablet"); + } + + return; +} + +void TabletClientServiceProcessor::process_flush(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.flush", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.flush"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.flush"); + } + + TabletClientService_flush_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.flush", bytes); + } + + try { + iface_->flush(args.tinfo, args.credentials, args.lock, args.tableId, args.startRow, args.endRow); + } catch (const std::exception&) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.flush"); + } + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->asyncComplete(ctx, "TabletClientService.flush"); + } + + return; +} + +void TabletClientServiceProcessor::process_flushTablet(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.flushTablet", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.flushTablet"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.flushTablet"); + } + + TabletClientService_flushTablet_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.flushTablet", bytes); + } + + try { + iface_->flushTablet(args.tinfo, args.credentials, args.lock, args.extent); + } catch (const std::exception&) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.flushTablet"); + } + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->asyncComplete(ctx, "TabletClientService.flushTablet"); + } + + return; +} + +void TabletClientServiceProcessor::process_chop(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.chop", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.chop"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.chop"); + } + + TabletClientService_chop_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.chop", bytes); + } + + try { + iface_->chop(args.tinfo, args.credentials, args.lock, args.extent); + } catch (const std::exception&) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.chop"); + } + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->asyncComplete(ctx, "TabletClientService.chop"); + } + + return; +} + +void TabletClientServiceProcessor::process_compact(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.compact", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.compact"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.compact"); + } + + TabletClientService_compact_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.compact", bytes); + } + + try { + iface_->compact(args.tinfo, args.credentials, args.lock, args.tableId, args.startRow, args.endRow); + } catch (const std::exception&) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.compact"); + } + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->asyncComplete(ctx, "TabletClientService.compact"); + } + + return; +} + +void TabletClientServiceProcessor::process_getTabletServerStatus(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.getTabletServerStatus", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.getTabletServerStatus"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.getTabletServerStatus"); + } + + TabletClientService_getTabletServerStatus_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.getTabletServerStatus", bytes); + } + + TabletClientService_getTabletServerStatus_result result; + try { + iface_->getTabletServerStatus(result.success, args.tinfo, args.credentials); + result.__isset.success = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.getTabletServerStatus"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getTabletServerStatus", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "TabletClientService.getTabletServerStatus"); + } + + oprot->writeMessageBegin("getTabletServerStatus", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "TabletClientService.getTabletServerStatus", bytes); + } +} + +void TabletClientServiceProcessor::process_getTabletStats(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.getTabletStats", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.getTabletStats"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.getTabletStats"); + } + + TabletClientService_getTabletStats_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.getTabletStats", bytes); + } + + TabletClientService_getTabletStats_result result; + try { + iface_->getTabletStats(result.success, args.tinfo, args.credentials, args.tableId); + result.__isset.success = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.getTabletStats"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getTabletStats", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "TabletClientService.getTabletStats"); + } + + oprot->writeMessageBegin("getTabletStats", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "TabletClientService.getTabletStats", bytes); + } +} + +void TabletClientServiceProcessor::process_getHistoricalStats(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.getHistoricalStats", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.getHistoricalStats"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.getHistoricalStats"); + } + + TabletClientService_getHistoricalStats_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.getHistoricalStats", bytes); + } + + TabletClientService_getHistoricalStats_result result; + try { + iface_->getHistoricalStats(result.success, args.tinfo, args.credentials); + result.__isset.success = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.getHistoricalStats"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getHistoricalStats", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "TabletClientService.getHistoricalStats"); + } + + oprot->writeMessageBegin("getHistoricalStats", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "TabletClientService.getHistoricalStats", bytes); + } +} + +void TabletClientServiceProcessor::process_halt(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.halt", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.halt"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.halt"); + } + + TabletClientService_halt_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.halt", bytes); + } + + TabletClientService_halt_result result; + try { + iface_->halt(args.tinfo, args.credentials, args.lock); + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.halt"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("halt", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "TabletClientService.halt"); + } + + oprot->writeMessageBegin("halt", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "TabletClientService.halt", bytes); + } +} + +void TabletClientServiceProcessor::process_fastHalt(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.fastHalt", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.fastHalt"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.fastHalt"); + } + + TabletClientService_fastHalt_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.fastHalt", bytes); + } + + try { + iface_->fastHalt(args.tinfo, args.credentials, args.lock); + } catch (const std::exception&) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.fastHalt"); + } + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->asyncComplete(ctx, "TabletClientService.fastHalt"); + } + + return; +} + +void TabletClientServiceProcessor::process_getActiveScans(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.getActiveScans", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.getActiveScans"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.getActiveScans"); + } + + TabletClientService_getActiveScans_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.getActiveScans", bytes); + } + + TabletClientService_getActiveScans_result result; + try { + iface_->getActiveScans(result.success, args.tinfo, args.credentials); + result.__isset.success = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.getActiveScans"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getActiveScans", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "TabletClientService.getActiveScans"); + } + + oprot->writeMessageBegin("getActiveScans", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "TabletClientService.getActiveScans", bytes); + } +} + +void TabletClientServiceProcessor::process_getActiveCompactions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.getActiveCompactions", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.getActiveCompactions"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.getActiveCompactions"); + } + + TabletClientService_getActiveCompactions_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.getActiveCompactions", bytes); + } + + TabletClientService_getActiveCompactions_result result; + try { + iface_->getActiveCompactions(result.success, args.tinfo, args.credentials); + result.__isset.success = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.getActiveCompactions"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getActiveCompactions", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "TabletClientService.getActiveCompactions"); + } + + oprot->writeMessageBegin("getActiveCompactions", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "TabletClientService.getActiveCompactions", bytes); + } +} + +void TabletClientServiceProcessor::process_removeLogs(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.removeLogs", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.removeLogs"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.removeLogs"); + } + + TabletClientService_removeLogs_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.removeLogs", bytes); + } + + try { + iface_->removeLogs(args.tinfo, args.credentials, args.filenames); + } catch (const std::exception&) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.removeLogs"); + } + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->asyncComplete(ctx, "TabletClientService.removeLogs"); + } + + return; +} + +void TabletClientServiceProcessor::process_getActiveLogs(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.getActiveLogs", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.getActiveLogs"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.getActiveLogs"); + } + + TabletClientService_getActiveLogs_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.getActiveLogs", bytes); + } + + TabletClientService_getActiveLogs_result result; + try { + iface_->getActiveLogs(result.success, args.tinfo, args.credentials); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.getActiveLogs"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getActiveLogs", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "TabletClientService.getActiveLogs"); + } + + oprot->writeMessageBegin("getActiveLogs", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "TabletClientService.getActiveLogs", bytes); + } +} + +void TabletClientServiceProcessor::process_startGetSummaries(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.startGetSummaries", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.startGetSummaries"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.startGetSummaries"); + } + + TabletClientService_startGetSummaries_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.startGetSummaries", bytes); + } + + TabletClientService_startGetSummaries_result result; + try { + iface_->startGetSummaries(result.success, args.tinfo, args.credentials, args.request); + result.__isset.success = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftTableOperationException &tope) { + result.tope = tope; + result.__isset.tope = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.startGetSummaries"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("startGetSummaries", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "TabletClientService.startGetSummaries"); + } + + oprot->writeMessageBegin("startGetSummaries", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "TabletClientService.startGetSummaries", bytes); + } +} + +void TabletClientServiceProcessor::process_startGetSummariesForPartition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.startGetSummariesForPartition", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.startGetSummariesForPartition"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.startGetSummariesForPartition"); + } + + TabletClientService_startGetSummariesForPartition_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.startGetSummariesForPartition", bytes); + } + + TabletClientService_startGetSummariesForPartition_result result; + try { + iface_->startGetSummariesForPartition(result.success, args.tinfo, args.credentials, args.request, args.modulus, args.remainder); + result.__isset.success = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.startGetSummariesForPartition"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("startGetSummariesForPartition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "TabletClientService.startGetSummariesForPartition"); + } + + oprot->writeMessageBegin("startGetSummariesForPartition", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "TabletClientService.startGetSummariesForPartition", bytes); + } +} + +void TabletClientServiceProcessor::process_startGetSummariesFromFiles(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.startGetSummariesFromFiles", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.startGetSummariesFromFiles"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.startGetSummariesFromFiles"); + } + + TabletClientService_startGetSummariesFromFiles_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.startGetSummariesFromFiles", bytes); + } + + TabletClientService_startGetSummariesFromFiles_result result; + try { + iface_->startGetSummariesFromFiles(result.success, args.tinfo, args.credentials, args.request, args.files); + result.__isset.success = true; + } catch ( ::org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &sec) { + result.sec = sec; + result.__isset.sec = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.startGetSummariesFromFiles"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("startGetSummariesFromFiles", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "TabletClientService.startGetSummariesFromFiles"); + } + + oprot->writeMessageBegin("startGetSummariesFromFiles", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "TabletClientService.startGetSummariesFromFiles", bytes); + } +} + +void TabletClientServiceProcessor::process_contiuneGetSummaries(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("TabletClientService.contiuneGetSummaries", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TabletClientService.contiuneGetSummaries"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "TabletClientService.contiuneGetSummaries"); + } + + TabletClientService_contiuneGetSummaries_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "TabletClientService.contiuneGetSummaries", bytes); + } + + TabletClientService_contiuneGetSummaries_result result; + try { + iface_->contiuneGetSummaries(result.success, args.tinfo, args.sessionId); + result.__isset.success = true; + } catch (NoSuchScanIDException &nssi) { + result.nssi = nssi; + result.__isset.nssi = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "TabletClientService.contiuneGetSummaries"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("contiuneGetSummaries", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "TabletClientService.contiuneGetSummaries"); + } + + oprot->writeMessageBegin("contiuneGetSummaries", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "TabletClientService.contiuneGetSummaries", bytes); + } +} + +std::shared_ptr< ::apache::thrift::TProcessor > TabletClientServiceProcessorFactory::getProcessor(const ::apache::thrift::TConnectionInfo& connInfo) { + ::apache::thrift::ReleaseHandler< TabletClientServiceIfFactory > cleanup(handlerFactory_); + std::shared_ptr< TabletClientServiceIf > handler(handlerFactory_->getHandler(connInfo), cleanup); + std::shared_ptr< ::apache::thrift::TProcessor > processor(new TabletClientServiceProcessor(handler)); + return processor; +} + +void TabletClientServiceConcurrentClient::startScan( ::org::apache::accumulov2::core::dataImpl::thrift::InitialScan& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const ::org::apache::accumulov2::core::dataImpl::thrift::TRange& range, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & columns, const int32_t batchSize, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & ssiList, const std::map > & ssio, const std::vector & authorizations, const bool waitForWrites, const bool isolated, const int64_t readaheadThreshold, const TSamplerConfiguration& samplerConfig, const int64_t batchTimeOut, const std::string& classLoaderContext, const std::map & executionHints) +{ + int32_t seqid = send_startScan(tinfo, credentials, extent, range, columns, batchSize, ssiList, ssio, authorizations, waitForWrites, isolated, readaheadThreshold, samplerConfig, batchTimeOut, classLoaderContext, executionHints); + recv_startScan(_return, seqid); +} + +int32_t TabletClientServiceConcurrentClient::send_startScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const ::org::apache::accumulov2::core::dataImpl::thrift::TRange& range, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & columns, const int32_t batchSize, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & ssiList, const std::map > & ssio, const std::vector & authorizations, const bool waitForWrites, const bool isolated, const int64_t readaheadThreshold, const TSamplerConfiguration& samplerConfig, const int64_t batchTimeOut, const std::string& classLoaderContext, const std::map & executionHints) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("startScan", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_startScan_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.extent = &extent; + args.range = ⦥ + args.columns = &columns; + args.batchSize = &batchSize; + args.ssiList = &ssiList; + args.ssio = &ssio; + args.authorizations = &authorizations; + args.waitForWrites = &waitForWrites; + args.isolated = &isolated; + args.readaheadThreshold = &readaheadThreshold; + args.samplerConfig = &samplerConfig; + args.batchTimeOut = &batchTimeOut; + args.classLoaderContext = &classLoaderContext; + args.executionHints = &executionHints; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void TabletClientServiceConcurrentClient::recv_startScan( ::org::apache::accumulov2::core::dataImpl::thrift::InitialScan& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("startScan") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + TabletClientService_startScan_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.nste) { + sentry.commit(); + throw result.nste; + } + if (result.__isset.tmfe) { + sentry.commit(); + throw result.tmfe; + } + if (result.__isset.tsnpe) { + sentry.commit(); + throw result.tsnpe; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "startScan failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void TabletClientServiceConcurrentClient::continueScan( ::org::apache::accumulov2::core::dataImpl::thrift::ScanResult& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID) +{ + int32_t seqid = send_continueScan(tinfo, scanID); + recv_continueScan(_return, seqid); +} + +int32_t TabletClientServiceConcurrentClient::send_continueScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("continueScan", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_continueScan_pargs args; + args.tinfo = &tinfo; + args.scanID = &scanID; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void TabletClientServiceConcurrentClient::recv_continueScan( ::org::apache::accumulov2::core::dataImpl::thrift::ScanResult& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("continueScan") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + TabletClientService_continueScan_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.nssi) { + sentry.commit(); + throw result.nssi; + } + if (result.__isset.nste) { + sentry.commit(); + throw result.nste; + } + if (result.__isset.tmfe) { + sentry.commit(); + throw result.tmfe; + } + if (result.__isset.tsnpe) { + sentry.commit(); + throw result.tsnpe; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "continueScan failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void TabletClientServiceConcurrentClient::closeScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID) +{ + send_closeScan(tinfo, scanID); +} + +void TabletClientServiceConcurrentClient::send_closeScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID) +{ + int32_t cseqid = 0; + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("closeScan", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + TabletClientService_closeScan_pargs args; + args.tinfo = &tinfo; + args.scanID = &scanID; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); +} + +void TabletClientServiceConcurrentClient::startMultiScan( ::org::apache::accumulov2::core::dataImpl::thrift::InitialMultiScan& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanBatch& batch, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & columns, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & ssiList, const std::map > & ssio, const std::vector & authorizations, const bool waitForWrites, const TSamplerConfiguration& samplerConfig, const int64_t batchTimeOut, const std::string& classLoaderContext, const std::map & executionHints) +{ + int32_t seqid = send_startMultiScan(tinfo, credentials, batch, columns, ssiList, ssio, authorizations, waitForWrites, samplerConfig, batchTimeOut, classLoaderContext, executionHints); + recv_startMultiScan(_return, seqid); +} + +int32_t TabletClientServiceConcurrentClient::send_startMultiScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanBatch& batch, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & columns, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & ssiList, const std::map > & ssio, const std::vector & authorizations, const bool waitForWrites, const TSamplerConfiguration& samplerConfig, const int64_t batchTimeOut, const std::string& classLoaderContext, const std::map & executionHints) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("startMultiScan", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_startMultiScan_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.batch = &batch; + args.columns = &columns; + args.ssiList = &ssiList; + args.ssio = &ssio; + args.authorizations = &authorizations; + args.waitForWrites = &waitForWrites; + args.samplerConfig = &samplerConfig; + args.batchTimeOut = &batchTimeOut; + args.classLoaderContext = &classLoaderContext; + args.executionHints = &executionHints; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void TabletClientServiceConcurrentClient::recv_startMultiScan( ::org::apache::accumulov2::core::dataImpl::thrift::InitialMultiScan& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("startMultiScan") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + TabletClientService_startMultiScan_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tsnpe) { + sentry.commit(); + throw result.tsnpe; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "startMultiScan failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void TabletClientServiceConcurrentClient::continueMultiScan( ::org::apache::accumulov2::core::dataImpl::thrift::MultiScanResult& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID) +{ + int32_t seqid = send_continueMultiScan(tinfo, scanID); + recv_continueMultiScan(_return, seqid); +} + +int32_t TabletClientServiceConcurrentClient::send_continueMultiScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("continueMultiScan", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_continueMultiScan_pargs args; + args.tinfo = &tinfo; + args.scanID = &scanID; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void TabletClientServiceConcurrentClient::recv_continueMultiScan( ::org::apache::accumulov2::core::dataImpl::thrift::MultiScanResult& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("continueMultiScan") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + TabletClientService_continueMultiScan_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.nssi) { + sentry.commit(); + throw result.nssi; + } + if (result.__isset.tsnpe) { + sentry.commit(); + throw result.tsnpe; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "continueMultiScan failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void TabletClientServiceConcurrentClient::closeMultiScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID) +{ + int32_t seqid = send_closeMultiScan(tinfo, scanID); + recv_closeMultiScan(seqid); +} + +int32_t TabletClientServiceConcurrentClient::send_closeMultiScan(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::ScanID scanID) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("closeMultiScan", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_closeMultiScan_pargs args; + args.tinfo = &tinfo; + args.scanID = &scanID; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void TabletClientServiceConcurrentClient::recv_closeMultiScan(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("closeMultiScan") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + TabletClientService_closeMultiScan_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.nssi) { + sentry.commit(); + throw result.nssi; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + + ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID TabletClientServiceConcurrentClient::startUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const TDurability::type durability) +{ + int32_t seqid = send_startUpdate(tinfo, credentials, durability); + return recv_startUpdate(seqid); +} + +int32_t TabletClientServiceConcurrentClient::send_startUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const TDurability::type durability) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("startUpdate", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_startUpdate_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.durability = &durability; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + + ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID TabletClientServiceConcurrentClient::recv_startUpdate(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("startUpdate") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID _return; + TabletClientService_startUpdate_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "startUpdate failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void TabletClientServiceConcurrentClient::applyUpdates(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID updateID, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& keyExtent, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TMutation> & mutations) +{ + send_applyUpdates(tinfo, updateID, keyExtent, mutations); +} + +void TabletClientServiceConcurrentClient::send_applyUpdates(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID updateID, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& keyExtent, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TMutation> & mutations) +{ + int32_t cseqid = 0; + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("applyUpdates", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + TabletClientService_applyUpdates_pargs args; + args.tinfo = &tinfo; + args.updateID = &updateID; + args.keyExtent = &keyExtent; + args.mutations = &mutations; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); +} + +void TabletClientServiceConcurrentClient::closeUpdate( ::org::apache::accumulov2::core::dataImpl::thrift::UpdateErrors& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID updateID) +{ + int32_t seqid = send_closeUpdate(tinfo, updateID); + recv_closeUpdate(_return, seqid); +} + +int32_t TabletClientServiceConcurrentClient::send_closeUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID updateID) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("closeUpdate", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_closeUpdate_pargs args; + args.tinfo = &tinfo; + args.updateID = &updateID; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void TabletClientServiceConcurrentClient::recv_closeUpdate( ::org::apache::accumulov2::core::dataImpl::thrift::UpdateErrors& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("closeUpdate") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + TabletClientService_closeUpdate_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.nssi) { + sentry.commit(); + throw result.nssi; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "closeUpdate failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void TabletClientServiceConcurrentClient::update(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& keyExtent, const ::org::apache::accumulov2::core::dataImpl::thrift::TMutation& mutation, const TDurability::type durability) +{ + int32_t seqid = send_update(tinfo, credentials, keyExtent, mutation, durability); + recv_update(seqid); +} + +int32_t TabletClientServiceConcurrentClient::send_update(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& keyExtent, const ::org::apache::accumulov2::core::dataImpl::thrift::TMutation& mutation, const TDurability::type durability) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("update", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_update_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.keyExtent = &keyExtent; + args.mutation = &mutation; + args.durability = &durability; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void TabletClientServiceConcurrentClient::recv_update(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("update") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + TabletClientService_update_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.nste) { + sentry.commit(); + throw result.nste; + } + if (result.__isset.cve) { + sentry.commit(); + throw result.cve; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void TabletClientServiceConcurrentClient::startConditionalUpdate( ::org::apache::accumulov2::core::dataImpl::thrift::TConditionalSession& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::vector & authorizations, const std::string& tableID, const TDurability::type durability, const std::string& classLoaderContext) +{ + int32_t seqid = send_startConditionalUpdate(tinfo, credentials, authorizations, tableID, durability, classLoaderContext); + recv_startConditionalUpdate(_return, seqid); +} + +int32_t TabletClientServiceConcurrentClient::send_startConditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::vector & authorizations, const std::string& tableID, const TDurability::type durability, const std::string& classLoaderContext) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("startConditionalUpdate", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_startConditionalUpdate_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.authorizations = &authorizations; + args.tableID = &tableID; + args.durability = &durability; + args.classLoaderContext = &classLoaderContext; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void TabletClientServiceConcurrentClient::recv_startConditionalUpdate( ::org::apache::accumulov2::core::dataImpl::thrift::TConditionalSession& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("startConditionalUpdate") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + TabletClientService_startConditionalUpdate_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "startConditionalUpdate failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void TabletClientServiceConcurrentClient::conditionalUpdate(std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TCMResult> & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID, const ::org::apache::accumulov2::core::dataImpl::thrift::CMBatch& mutations, const std::vector & symbols) +{ + int32_t seqid = send_conditionalUpdate(tinfo, sessID, mutations, symbols); + recv_conditionalUpdate(_return, seqid); +} + +int32_t TabletClientServiceConcurrentClient::send_conditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID, const ::org::apache::accumulov2::core::dataImpl::thrift::CMBatch& mutations, const std::vector & symbols) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("conditionalUpdate", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_conditionalUpdate_pargs args; + args.tinfo = &tinfo; + args.sessID = &sessID; + args.mutations = &mutations; + args.symbols = &symbols; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void TabletClientServiceConcurrentClient::recv_conditionalUpdate(std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TCMResult> & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("conditionalUpdate") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + TabletClientService_conditionalUpdate_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.nssi) { + sentry.commit(); + throw result.nssi; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "conditionalUpdate failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void TabletClientServiceConcurrentClient::invalidateConditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID) +{ + int32_t seqid = send_invalidateConditionalUpdate(tinfo, sessID); + recv_invalidateConditionalUpdate(seqid); +} + +int32_t TabletClientServiceConcurrentClient::send_invalidateConditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("invalidateConditionalUpdate", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_invalidateConditionalUpdate_pargs args; + args.tinfo = &tinfo; + args.sessID = &sessID; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void TabletClientServiceConcurrentClient::recv_invalidateConditionalUpdate(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("invalidateConditionalUpdate") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + TabletClientService_invalidateConditionalUpdate_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void TabletClientServiceConcurrentClient::closeConditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID) +{ + send_closeConditionalUpdate(tinfo, sessID); +} + +void TabletClientServiceConcurrentClient::send_closeConditionalUpdate(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::dataImpl::thrift::UpdateID sessID) +{ + int32_t cseqid = 0; + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("closeConditionalUpdate", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + TabletClientService_closeConditionalUpdate_pargs args; + args.tinfo = &tinfo; + args.sessID = &sessID; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); +} + +void TabletClientServiceConcurrentClient::bulkImport(std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent> & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const ::org::apache::accumulov2::core::dataImpl::thrift::TabletFiles& files, const bool setTime) +{ + int32_t seqid = send_bulkImport(tinfo, credentials, tid, files, setTime); + recv_bulkImport(_return, seqid); +} + +int32_t TabletClientServiceConcurrentClient::send_bulkImport(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const ::org::apache::accumulov2::core::dataImpl::thrift::TabletFiles& files, const bool setTime) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("bulkImport", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_bulkImport_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.tid = &tid; + args.files = &files; + args.setTime = &setTime; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void TabletClientServiceConcurrentClient::recv_bulkImport(std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent> & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("bulkImport") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + TabletClientService_bulkImport_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "bulkImport failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void TabletClientServiceConcurrentClient::loadFiles(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const std::string& dir, const std::map< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent, std::map > & files, const bool setTime) +{ + send_loadFiles(tinfo, credentials, tid, dir, files, setTime); +} + +void TabletClientServiceConcurrentClient::send_loadFiles(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const int64_t tid, const std::string& dir, const std::map< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent, std::map > & files, const bool setTime) +{ + int32_t cseqid = 0; + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("loadFiles", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + TabletClientService_loadFiles_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.tid = &tid; + args.dir = &dir; + args.files = &files; + args.setTime = &setTime; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); +} + +void TabletClientServiceConcurrentClient::splitTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const std::string& splitPoint) +{ + int32_t seqid = send_splitTablet(tinfo, credentials, extent, splitPoint); + recv_splitTablet(seqid); +} + +int32_t TabletClientServiceConcurrentClient::send_splitTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const std::string& splitPoint) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("splitTablet", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_splitTablet_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.extent = &extent; + args.splitPoint = &splitPoint; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void TabletClientServiceConcurrentClient::recv_splitTablet(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("splitTablet") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + TabletClientService_splitTablet_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.nste) { + sentry.commit(); + throw result.nste; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void TabletClientServiceConcurrentClient::loadTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent) +{ + send_loadTablet(tinfo, credentials, lock, extent); +} + +void TabletClientServiceConcurrentClient::send_loadTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent) +{ + int32_t cseqid = 0; + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("loadTablet", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + TabletClientService_loadTablet_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.lock = &lock; + args.extent = &extent; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); +} + +void TabletClientServiceConcurrentClient::unloadTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const TUnloadTabletGoal::type goal, const int64_t requestTime) +{ + send_unloadTablet(tinfo, credentials, lock, extent, goal, requestTime); +} + +void TabletClientServiceConcurrentClient::send_unloadTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, const TUnloadTabletGoal::type goal, const int64_t requestTime) +{ + int32_t cseqid = 0; + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("unloadTablet", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + TabletClientService_unloadTablet_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.lock = &lock; + args.extent = &extent; + args.goal = &goal; + args.requestTime = &requestTime; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); +} + +void TabletClientServiceConcurrentClient::flush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const std::string& tableId, const std::string& startRow, const std::string& endRow) +{ + send_flush(tinfo, credentials, lock, tableId, startRow, endRow); +} + +void TabletClientServiceConcurrentClient::send_flush(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const std::string& tableId, const std::string& startRow, const std::string& endRow) +{ + int32_t cseqid = 0; + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("flush", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + TabletClientService_flush_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.lock = &lock; + args.tableId = &tableId; + args.startRow = &startRow; + args.endRow = &endRow; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); +} + +void TabletClientServiceConcurrentClient::flushTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent) +{ + send_flushTablet(tinfo, credentials, lock, extent); +} + +void TabletClientServiceConcurrentClient::send_flushTablet(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent) +{ + int32_t cseqid = 0; + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("flushTablet", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + TabletClientService_flushTablet_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.lock = &lock; + args.extent = &extent; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); +} + +void TabletClientServiceConcurrentClient::chop(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent) +{ + send_chop(tinfo, credentials, lock, extent); +} + +void TabletClientServiceConcurrentClient::send_chop(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent) +{ + int32_t cseqid = 0; + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("chop", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + TabletClientService_chop_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.lock = &lock; + args.extent = &extent; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); +} + +void TabletClientServiceConcurrentClient::compact(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const std::string& tableId, const std::string& startRow, const std::string& endRow) +{ + send_compact(tinfo, credentials, lock, tableId, startRow, endRow); +} + +void TabletClientServiceConcurrentClient::send_compact(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock, const std::string& tableId, const std::string& startRow, const std::string& endRow) +{ + int32_t cseqid = 0; + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("compact", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + TabletClientService_compact_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.lock = &lock; + args.tableId = &tableId; + args.startRow = &startRow; + args.endRow = &endRow; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); +} + +void TabletClientServiceConcurrentClient::getTabletServerStatus( ::org::apache::accumulov2::core::master::thrift::TabletServerStatus& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t seqid = send_getTabletServerStatus(tinfo, credentials); + recv_getTabletServerStatus(_return, seqid); +} + +int32_t TabletClientServiceConcurrentClient::send_getTabletServerStatus(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("getTabletServerStatus", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_getTabletServerStatus_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void TabletClientServiceConcurrentClient::recv_getTabletServerStatus( ::org::apache::accumulov2::core::master::thrift::TabletServerStatus& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getTabletServerStatus") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + TabletClientService_getTabletServerStatus_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getTabletServerStatus failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void TabletClientServiceConcurrentClient::getTabletStats(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableId) +{ + int32_t seqid = send_getTabletStats(tinfo, credentials, tableId); + recv_getTabletStats(_return, seqid); +} + +int32_t TabletClientServiceConcurrentClient::send_getTabletStats(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& tableId) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("getTabletStats", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_getTabletStats_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.tableId = &tableId; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void TabletClientServiceConcurrentClient::recv_getTabletStats(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getTabletStats") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + TabletClientService_getTabletStats_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getTabletStats failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void TabletClientServiceConcurrentClient::getHistoricalStats(TabletStats& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t seqid = send_getHistoricalStats(tinfo, credentials); + recv_getHistoricalStats(_return, seqid); +} + +int32_t TabletClientServiceConcurrentClient::send_getHistoricalStats(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("getHistoricalStats", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_getHistoricalStats_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void TabletClientServiceConcurrentClient::recv_getHistoricalStats(TabletStats& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getHistoricalStats") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + TabletClientService_getHistoricalStats_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getHistoricalStats failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void TabletClientServiceConcurrentClient::halt(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock) +{ + int32_t seqid = send_halt(tinfo, credentials, lock); + recv_halt(seqid); +} + +int32_t TabletClientServiceConcurrentClient::send_halt(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("halt", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_halt_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.lock = &lock; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void TabletClientServiceConcurrentClient::recv_halt(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("halt") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + TabletClientService_halt_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void TabletClientServiceConcurrentClient::fastHalt(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock) +{ + send_fastHalt(tinfo, credentials, lock); +} + +void TabletClientServiceConcurrentClient::send_fastHalt(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::string& lock) +{ + int32_t cseqid = 0; + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("fastHalt", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + TabletClientService_fastHalt_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.lock = &lock; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); +} + +void TabletClientServiceConcurrentClient::getActiveScans(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t seqid = send_getActiveScans(tinfo, credentials); + recv_getActiveScans(_return, seqid); +} + +int32_t TabletClientServiceConcurrentClient::send_getActiveScans(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("getActiveScans", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_getActiveScans_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void TabletClientServiceConcurrentClient::recv_getActiveScans(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getActiveScans") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + TabletClientService_getActiveScans_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getActiveScans failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void TabletClientServiceConcurrentClient::getActiveCompactions(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t seqid = send_getActiveCompactions(tinfo, credentials); + recv_getActiveCompactions(_return, seqid); +} + +int32_t TabletClientServiceConcurrentClient::send_getActiveCompactions(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("getActiveCompactions", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_getActiveCompactions_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void TabletClientServiceConcurrentClient::recv_getActiveCompactions(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getActiveCompactions") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + TabletClientService_getActiveCompactions_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getActiveCompactions failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void TabletClientServiceConcurrentClient::removeLogs(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::vector & filenames) +{ + send_removeLogs(tinfo, credentials, filenames); +} + +void TabletClientServiceConcurrentClient::send_removeLogs(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const std::vector & filenames) +{ + int32_t cseqid = 0; + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("removeLogs", ::apache::thrift::protocol::T_ONEWAY, cseqid); + + TabletClientService_removeLogs_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.filenames = &filenames; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); +} + +void TabletClientServiceConcurrentClient::getActiveLogs(std::vector & _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t seqid = send_getActiveLogs(tinfo, credentials); + recv_getActiveLogs(_return, seqid); +} + +int32_t TabletClientServiceConcurrentClient::send_getActiveLogs(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("getActiveLogs", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_getActiveLogs_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void TabletClientServiceConcurrentClient::recv_getActiveLogs(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getActiveLogs") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + TabletClientService_getActiveLogs_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getActiveLogs failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void TabletClientServiceConcurrentClient::startGetSummaries( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request) +{ + int32_t seqid = send_startGetSummaries(tinfo, credentials, request); + recv_startGetSummaries(_return, seqid); +} + +int32_t TabletClientServiceConcurrentClient::send_startGetSummaries(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("startGetSummaries", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_startGetSummaries_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void TabletClientServiceConcurrentClient::recv_startGetSummaries( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("startGetSummaries") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + TabletClientService_startGetSummaries_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + if (result.__isset.tope) { + sentry.commit(); + throw result.tope; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "startGetSummaries failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void TabletClientServiceConcurrentClient::startGetSummariesForPartition( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request, const int32_t modulus, const int32_t remainder) +{ + int32_t seqid = send_startGetSummariesForPartition(tinfo, credentials, request, modulus, remainder); + recv_startGetSummariesForPartition(_return, seqid); +} + +int32_t TabletClientServiceConcurrentClient::send_startGetSummariesForPartition(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request, const int32_t modulus, const int32_t remainder) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("startGetSummariesForPartition", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_startGetSummariesForPartition_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.request = &request; + args.modulus = &modulus; + args.remainder = &remainder; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void TabletClientServiceConcurrentClient::recv_startGetSummariesForPartition( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("startGetSummariesForPartition") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + TabletClientService_startGetSummariesForPartition_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "startGetSummariesForPartition failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void TabletClientServiceConcurrentClient::startGetSummariesFromFiles( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request, const std::map > & files) +{ + int32_t seqid = send_startGetSummariesFromFiles(tinfo, credentials, request, files); + recv_startGetSummariesFromFiles(_return, seqid); +} + +int32_t TabletClientServiceConcurrentClient::send_startGetSummariesFromFiles(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, const ::org::apache::accumulov2::core::dataImpl::thrift::TSummaryRequest& request, const std::map > & files) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("startGetSummariesFromFiles", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_startGetSummariesFromFiles_pargs args; + args.tinfo = &tinfo; + args.credentials = &credentials; + args.request = &request; + args.files = &files; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void TabletClientServiceConcurrentClient::recv_startGetSummariesFromFiles( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("startGetSummariesFromFiles") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + TabletClientService_startGetSummariesFromFiles_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.sec) { + sentry.commit(); + throw result.sec; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "startGetSummariesFromFiles failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void TabletClientServiceConcurrentClient::contiuneGetSummaries( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const int64_t sessionId) +{ + int32_t seqid = send_contiuneGetSummaries(tinfo, sessionId); + recv_contiuneGetSummaries(_return, seqid); +} + +int32_t TabletClientServiceConcurrentClient::send_contiuneGetSummaries(const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, const int64_t sessionId) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("contiuneGetSummaries", ::apache::thrift::protocol::T_CALL, cseqid); + + TabletClientService_contiuneGetSummaries_pargs args; + args.tinfo = &tinfo; + args.sessionId = &sessionId; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void TabletClientServiceConcurrentClient::recv_contiuneGetSummaries( ::org::apache::accumulov2::core::dataImpl::thrift::TSummaries& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("contiuneGetSummaries") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + TabletClientService_contiuneGetSummaries_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.nssi) { + sentry.commit(); + throw result.nssi; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "contiuneGetSummaries failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +}}}}}} // namespace + diff --git a/src/data/extern/thriftv2/client_constants.cpp b/src/data/extern/thriftv2/client_constants.cpp new file mode 100644 index 00000000..28d9703b --- /dev/null +++ b/src/data/extern/thriftv2/client_constants.cpp @@ -0,0 +1,17 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "data/extern/thriftv2/client_constants.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace clientImpl { namespace thrift { + +const clientConstants g_client_constants; + +clientConstants::clientConstants() { +} + +}}}}}} // namespace + diff --git a/src/data/extern/thriftv2/client_types.cpp b/src/data/extern/thriftv2/client_types.cpp new file mode 100644 index 00000000..c7395eeb --- /dev/null +++ b/src/data/extern/thriftv2/client_types.cpp @@ -0,0 +1,705 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "data/extern/thriftv2/client_types.h" + +#include +#include + +#include + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace clientImpl { namespace thrift { + +int _kTableOperationValues[] = { + TableOperation::CREATE, + TableOperation::DELETE, + TableOperation::RENAME, + TableOperation::SET_PROPERTY, + TableOperation::REMOVE_PROPERTY, + TableOperation::OFFLINE, + TableOperation::ONLINE, + TableOperation::FLUSH, + TableOperation::PERMISSION, + TableOperation::CLONE, + TableOperation::MERGE, + TableOperation::DELETE_RANGE, + TableOperation::BULK_IMPORT, + TableOperation::COMPACT, + TableOperation::IMPORT, + TableOperation::EXPORT, + TableOperation::COMPACT_CANCEL +}; +const char* _kTableOperationNames[] = { + "CREATE", + "DELETE", + "RENAME", + "SET_PROPERTY", + "REMOVE_PROPERTY", + "OFFLINE", + "ONLINE", + "FLUSH", + "PERMISSION", + "CLONE", + "MERGE", + "DELETE_RANGE", + "BULK_IMPORT", + "COMPACT", + "IMPORT", + "EXPORT", + "COMPACT_CANCEL" +}; +const std::map _TableOperation_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(17, _kTableOperationValues, _kTableOperationNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +std::ostream& operator<<(std::ostream& out, const TableOperation::type& val) { + std::map::const_iterator it = _TableOperation_VALUES_TO_NAMES.find(val); + if (it != _TableOperation_VALUES_TO_NAMES.end()) { + out << it->second; + } else { + out << static_cast(val); + } + return out; +} + +int _kTableOperationExceptionTypeValues[] = { + TableOperationExceptionType::EXISTS, + TableOperationExceptionType::NOTFOUND, + TableOperationExceptionType::OFFLINE, + TableOperationExceptionType::BULK_BAD_INPUT_DIRECTORY, + TableOperationExceptionType::BULK_BAD_ERROR_DIRECTORY, + TableOperationExceptionType::BAD_RANGE, + TableOperationExceptionType::OTHER, + TableOperationExceptionType::NAMESPACE_EXISTS, + TableOperationExceptionType::NAMESPACE_NOTFOUND, + TableOperationExceptionType::INVALID_NAME, + TableOperationExceptionType::BULK_BAD_LOAD_MAPPING, + TableOperationExceptionType::BULK_CONCURRENT_MERGE +}; +const char* _kTableOperationExceptionTypeNames[] = { + "EXISTS", + "NOTFOUND", + "OFFLINE", + "BULK_BAD_INPUT_DIRECTORY", + "BULK_BAD_ERROR_DIRECTORY", + "BAD_RANGE", + "OTHER", + "NAMESPACE_EXISTS", + "NAMESPACE_NOTFOUND", + "INVALID_NAME", + "BULK_BAD_LOAD_MAPPING", + "BULK_CONCURRENT_MERGE" +}; +const std::map _TableOperationExceptionType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(12, _kTableOperationExceptionTypeValues, _kTableOperationExceptionTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +std::ostream& operator<<(std::ostream& out, const TableOperationExceptionType::type& val) { + std::map::const_iterator it = _TableOperationExceptionType_VALUES_TO_NAMES.find(val); + if (it != _TableOperationExceptionType_VALUES_TO_NAMES.end()) { + out << it->second; + } else { + out << static_cast(val); + } + return out; +} + +int _kConfigurationTypeValues[] = { + ConfigurationType::CURRENT, + ConfigurationType::SITE, + ConfigurationType::DEFAULT +}; +const char* _kConfigurationTypeNames[] = { + "CURRENT", + "SITE", + "DEFAULT" +}; +const std::map _ConfigurationType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kConfigurationTypeValues, _kConfigurationTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +std::ostream& operator<<(std::ostream& out, const ConfigurationType::type& val) { + std::map::const_iterator it = _ConfigurationType_VALUES_TO_NAMES.find(val); + if (it != _ConfigurationType_VALUES_TO_NAMES.end()) { + out << it->second; + } else { + out << static_cast(val); + } + return out; +} + +int _kSecurityErrorCodeValues[] = { + SecurityErrorCode::DEFAULT_SECURITY_ERROR, + SecurityErrorCode::BAD_CREDENTIALS, + SecurityErrorCode::PERMISSION_DENIED, + SecurityErrorCode::USER_DOESNT_EXIST, + SecurityErrorCode::CONNECTION_ERROR, + SecurityErrorCode::USER_EXISTS, + SecurityErrorCode::GRANT_INVALID, + SecurityErrorCode::BAD_AUTHORIZATIONS, + SecurityErrorCode::INVALID_INSTANCEID, + SecurityErrorCode::TABLE_DOESNT_EXIST, + SecurityErrorCode::UNSUPPORTED_OPERATION, + SecurityErrorCode::INVALID_TOKEN, + SecurityErrorCode::AUTHENTICATOR_FAILED, + SecurityErrorCode::AUTHORIZOR_FAILED, + SecurityErrorCode::PERMISSIONHANDLER_FAILED, + SecurityErrorCode::TOKEN_EXPIRED, + SecurityErrorCode::SERIALIZATION_ERROR, + SecurityErrorCode::INSUFFICIENT_PROPERTIES, + SecurityErrorCode::NAMESPACE_DOESNT_EXIST +}; +const char* _kSecurityErrorCodeNames[] = { + "DEFAULT_SECURITY_ERROR", + "BAD_CREDENTIALS", + "PERMISSION_DENIED", + "USER_DOESNT_EXIST", + "CONNECTION_ERROR", + "USER_EXISTS", + "GRANT_INVALID", + "BAD_AUTHORIZATIONS", + "INVALID_INSTANCEID", + "TABLE_DOESNT_EXIST", + "UNSUPPORTED_OPERATION", + "INVALID_TOKEN", + "AUTHENTICATOR_FAILED", + "AUTHORIZOR_FAILED", + "PERMISSIONHANDLER_FAILED", + "TOKEN_EXPIRED", + "SERIALIZATION_ERROR", + "INSUFFICIENT_PROPERTIES", + "NAMESPACE_DOESNT_EXIST" +}; +const std::map _SecurityErrorCode_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(19, _kSecurityErrorCodeValues, _kSecurityErrorCodeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +std::ostream& operator<<(std::ostream& out, const SecurityErrorCode::type& val) { + std::map::const_iterator it = _SecurityErrorCode_VALUES_TO_NAMES.find(val); + if (it != _SecurityErrorCode_VALUES_TO_NAMES.end()) { + out << it->second; + } else { + out << static_cast(val); + } + return out; +} + + +ThriftSecurityException::~ThriftSecurityException() throw() { +} + + +void ThriftSecurityException::__set_user(const std::string& val) { + this->user = val; +} + +void ThriftSecurityException::__set_code(const SecurityErrorCode::type val) { + this->code = val; +} +std::ostream& operator<<(std::ostream& out, const ThriftSecurityException& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t ThriftSecurityException::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user); + this->__isset.user = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast0; + xfer += iprot->readI32(ecast0); + this->code = (SecurityErrorCode::type)ecast0; + this->__isset.code = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftSecurityException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftSecurityException"); + + xfer += oprot->writeFieldBegin("user", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->user); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("code", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->code); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ThriftSecurityException &a, ThriftSecurityException &b) { + using ::std::swap; + swap(a.user, b.user); + swap(a.code, b.code); + swap(a.__isset, b.__isset); +} + +ThriftSecurityException::ThriftSecurityException(const ThriftSecurityException& other1) : TException() { + user = other1.user; + code = other1.code; + __isset = other1.__isset; +} +ThriftSecurityException& ThriftSecurityException::operator=(const ThriftSecurityException& other2) { + user = other2.user; + code = other2.code; + __isset = other2.__isset; + return *this; +} +void ThriftSecurityException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ThriftSecurityException("; + out << "user=" << to_string(user); + out << ", " << "code=" << to_string(code); + out << ")"; +} + +const char* ThriftSecurityException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: ThriftSecurityException"; + } +} + + +ThriftTableOperationException::~ThriftTableOperationException() throw() { +} + + +void ThriftTableOperationException::__set_tableId(const std::string& val) { + this->tableId = val; +} + +void ThriftTableOperationException::__set_tableName(const std::string& val) { + this->tableName = val; +} + +void ThriftTableOperationException::__set_op(const TableOperation::type val) { + this->op = val; +} + +void ThriftTableOperationException::__set_type(const TableOperationExceptionType::type val) { + this->type = val; +} + +void ThriftTableOperationException::__set_description(const std::string& val) { + this->description = val; +} +std::ostream& operator<<(std::ostream& out, const ThriftTableOperationException& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t ThriftTableOperationException::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableId); + this->__isset.tableId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast3; + xfer += iprot->readI32(ecast3); + this->op = (TableOperation::type)ecast3; + this->__isset.op = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast4; + xfer += iprot->readI32(ecast4); + this->type = (TableOperationExceptionType::type)ecast4; + this->__isset.type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->description); + this->__isset.description = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftTableOperationException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftTableOperationException"); + + xfer += oprot->writeFieldBegin("tableId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->tableId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tableName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("op", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)this->op); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeI32((int32_t)this->type); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("description", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->description); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ThriftTableOperationException &a, ThriftTableOperationException &b) { + using ::std::swap; + swap(a.tableId, b.tableId); + swap(a.tableName, b.tableName); + swap(a.op, b.op); + swap(a.type, b.type); + swap(a.description, b.description); + swap(a.__isset, b.__isset); +} + +ThriftTableOperationException::ThriftTableOperationException(const ThriftTableOperationException& other5) : TException() { + tableId = other5.tableId; + tableName = other5.tableName; + op = other5.op; + type = other5.type; + description = other5.description; + __isset = other5.__isset; +} +ThriftTableOperationException& ThriftTableOperationException::operator=(const ThriftTableOperationException& other6) { + tableId = other6.tableId; + tableName = other6.tableName; + op = other6.op; + type = other6.type; + description = other6.description; + __isset = other6.__isset; + return *this; +} +void ThriftTableOperationException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ThriftTableOperationException("; + out << "tableId=" << to_string(tableId); + out << ", " << "tableName=" << to_string(tableName); + out << ", " << "op=" << to_string(op); + out << ", " << "type=" << to_string(type); + out << ", " << "description=" << to_string(description); + out << ")"; +} + +const char* ThriftTableOperationException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: ThriftTableOperationException"; + } +} + + +ThriftNotActiveServiceException::~ThriftNotActiveServiceException() throw() { +} + +std::ostream& operator<<(std::ostream& out, const ThriftNotActiveServiceException& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t ThriftNotActiveServiceException::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftNotActiveServiceException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftNotActiveServiceException"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ThriftNotActiveServiceException &a, ThriftNotActiveServiceException &b) { + using ::std::swap; + (void) a; + (void) b; +} + +ThriftNotActiveServiceException::ThriftNotActiveServiceException(const ThriftNotActiveServiceException& other7) : TException() { + (void) other7; +} +ThriftNotActiveServiceException& ThriftNotActiveServiceException::operator=(const ThriftNotActiveServiceException& other8) { + (void) other8; + return *this; +} +void ThriftNotActiveServiceException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ThriftNotActiveServiceException("; + out << ")"; +} + +const char* ThriftNotActiveServiceException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: ThriftNotActiveServiceException"; + } +} + + +TDiskUsage::~TDiskUsage() throw() { +} + + +void TDiskUsage::__set_tables(const std::vector & val) { + this->tables = val; +} + +void TDiskUsage::__set_usage(const int64_t val) { + this->usage = val; +} +std::ostream& operator<<(std::ostream& out, const TDiskUsage& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TDiskUsage::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->tables.clear(); + uint32_t _size9; + ::apache::thrift::protocol::TType _etype12; + xfer += iprot->readListBegin(_etype12, _size9); + this->tables.resize(_size9); + uint32_t _i13; + for (_i13 = 0; _i13 < _size9; ++_i13) + { + xfer += iprot->readString(this->tables[_i13]); + } + xfer += iprot->readListEnd(); + } + this->__isset.tables = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->usage); + this->__isset.usage = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TDiskUsage::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TDiskUsage"); + + xfer += oprot->writeFieldBegin("tables", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->tables.size())); + std::vector ::const_iterator _iter14; + for (_iter14 = this->tables.begin(); _iter14 != this->tables.end(); ++_iter14) + { + xfer += oprot->writeString((*_iter14)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("usage", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->usage); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TDiskUsage &a, TDiskUsage &b) { + using ::std::swap; + swap(a.tables, b.tables); + swap(a.usage, b.usage); + swap(a.__isset, b.__isset); +} + +TDiskUsage::TDiskUsage(const TDiskUsage& other15) { + tables = other15.tables; + usage = other15.usage; + __isset = other15.__isset; +} +TDiskUsage& TDiskUsage::operator=(const TDiskUsage& other16) { + tables = other16.tables; + usage = other16.usage; + __isset = other16.__isset; + return *this; +} +void TDiskUsage::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TDiskUsage("; + out << "tables=" << to_string(tables); + out << ", " << "usage=" << to_string(usage); + out << ")"; +} + +}}}}}} // namespace diff --git a/src/data/extern/thriftv2/data_constants.cpp b/src/data/extern/thriftv2/data_constants.cpp new file mode 100644 index 00000000..6ba4171a --- /dev/null +++ b/src/data/extern/thriftv2/data_constants.cpp @@ -0,0 +1,17 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "data/extern/thriftv2/data_constants.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace dataImpl { namespace thrift { + +const dataConstants g_data_constants; + +dataConstants::dataConstants() { +} + +}}}}}} // namespace + diff --git a/src/data/extern/thriftv2/data_types.cpp b/src/data/extern/thriftv2/data_types.cpp new file mode 100644 index 00000000..5b8707ed --- /dev/null +++ b/src/data/extern/thriftv2/data_types.cpp @@ -0,0 +1,3672 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "data/extern/thriftv2/data_types.h" + +#include +#include + +#include + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace dataImpl { namespace thrift { + +int _kTCMStatusValues[] = { + TCMStatus::ACCEPTED, + TCMStatus::REJECTED, + TCMStatus::VIOLATED, + TCMStatus::IGNORED +}; +const char* _kTCMStatusNames[] = { + "ACCEPTED", + "REJECTED", + "VIOLATED", + "IGNORED" +}; +const std::map _TCMStatus_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _kTCMStatusValues, _kTCMStatusNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +std::ostream& operator<<(std::ostream& out, const TCMStatus::type& val) { + std::map::const_iterator it = _TCMStatus_VALUES_TO_NAMES.find(val); + if (it != _TCMStatus_VALUES_TO_NAMES.end()) { + out << it->second; + } else { + out << static_cast(val); + } + return out; +} + + +TKey::~TKey() throw() { +} + + +void TKey::__set_row(const std::string& val) { + this->row = val; +} + +void TKey::__set_colFamily(const std::string& val) { + this->colFamily = val; +} + +void TKey::__set_colQualifier(const std::string& val) { + this->colQualifier = val; +} + +void TKey::__set_colVisibility(const std::string& val) { + this->colVisibility = val; +} + +void TKey::__set_timestamp(const int64_t val) { + this->timestamp = val; +} +std::ostream& operator<<(std::ostream& out, const TKey& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TKey::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->row); + this->__isset.row = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->colFamily); + this->__isset.colFamily = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->colQualifier); + this->__isset.colQualifier = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->colVisibility); + this->__isset.colVisibility = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->timestamp); + this->__isset.timestamp = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TKey::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TKey"); + + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->row); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("colFamily", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->colFamily); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("colQualifier", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary(this->colQualifier); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("colVisibility", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeBinary(this->colVisibility); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64(this->timestamp); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TKey &a, TKey &b) { + using ::std::swap; + swap(a.row, b.row); + swap(a.colFamily, b.colFamily); + swap(a.colQualifier, b.colQualifier); + swap(a.colVisibility, b.colVisibility); + swap(a.timestamp, b.timestamp); + swap(a.__isset, b.__isset); +} + +TKey::TKey(const TKey& other0) { + row = other0.row; + colFamily = other0.colFamily; + colQualifier = other0.colQualifier; + colVisibility = other0.colVisibility; + timestamp = other0.timestamp; + __isset = other0.__isset; +} +TKey& TKey::operator=(const TKey& other1) { + row = other1.row; + colFamily = other1.colFamily; + colQualifier = other1.colQualifier; + colVisibility = other1.colVisibility; + timestamp = other1.timestamp; + __isset = other1.__isset; + return *this; +} +void TKey::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TKey("; + out << "row=" << to_string(row); + out << ", " << "colFamily=" << to_string(colFamily); + out << ", " << "colQualifier=" << to_string(colQualifier); + out << ", " << "colVisibility=" << to_string(colVisibility); + out << ", " << "timestamp=" << to_string(timestamp); + out << ")"; +} + + +TColumn::~TColumn() throw() { +} + + +void TColumn::__set_columnFamily(const std::string& val) { + this->columnFamily = val; +} + +void TColumn::__set_columnQualifier(const std::string& val) { + this->columnQualifier = val; +} + +void TColumn::__set_columnVisibility(const std::string& val) { + this->columnVisibility = val; +} +std::ostream& operator<<(std::ostream& out, const TColumn& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TColumn::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->columnFamily); + this->__isset.columnFamily = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->columnQualifier); + this->__isset.columnQualifier = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->columnVisibility); + this->__isset.columnVisibility = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TColumn::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TColumn"); + + if (!this->columnFamily.empty()){ + xfer += oprot->writeFieldBegin("columnFamily", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->columnFamily); + xfer += oprot->writeFieldEnd(); + } + + if (!this->columnQualifier.empty()){ + xfer += oprot->writeFieldBegin("columnQualifier", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->columnQualifier); + xfer += oprot->writeFieldEnd(); + } + + if (!this->columnVisibility.empty()){ + xfer += oprot->writeFieldBegin("columnVisibility", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary(this->columnVisibility); + xfer += oprot->writeFieldEnd(); + } + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TColumn &a, TColumn &b) { + using ::std::swap; + swap(a.columnFamily, b.columnFamily); + swap(a.columnQualifier, b.columnQualifier); + swap(a.columnVisibility, b.columnVisibility); + swap(a.__isset, b.__isset); +} + +TColumn::TColumn(const TColumn& other2) { + columnFamily = other2.columnFamily; + columnQualifier = other2.columnQualifier; + columnVisibility = other2.columnVisibility; + __isset = other2.__isset; +} +TColumn& TColumn::operator=(const TColumn& other3) { + columnFamily = other3.columnFamily; + columnQualifier = other3.columnQualifier; + columnVisibility = other3.columnVisibility; + __isset = other3.__isset; + return *this; +} +void TColumn::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TColumn("; + out << "columnFamily=" << to_string(columnFamily); + out << ", " << "columnQualifier=" << to_string(columnQualifier); + out << ", " << "columnVisibility=" << to_string(columnVisibility); + out << ")"; +} + + +TMutation::~TMutation() throw() { +} + + +void TMutation::__set_row(const std::string& val) { + this->row = val; +} + +void TMutation::__set_data(const std::string& val) { + this->data = val; +} + +void TMutation::__set_values(const std::vector & val) { + this->values = val; +} + +void TMutation::__set_entries(const int32_t val) { + this->entries = val; +} + +void TMutation::__set_sources(const std::vector & val) { + this->sources = val; +__isset.sources = true; +} +std::ostream& operator<<(std::ostream& out, const TMutation& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TMutation::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->row); + this->__isset.row = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->data); + this->__isset.data = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->values.clear(); + uint32_t _size4; + ::apache::thrift::protocol::TType _etype7; + xfer += iprot->readListBegin(_etype7, _size4); + this->values.resize(_size4); + uint32_t _i8; + for (_i8 = 0; _i8 < _size4; ++_i8) + { + xfer += iprot->readBinary(this->values[_i8]); + } + xfer += iprot->readListEnd(); + } + this->__isset.values = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->entries); + this->__isset.entries = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->sources.clear(); + uint32_t _size9; + ::apache::thrift::protocol::TType _etype12; + xfer += iprot->readListBegin(_etype12, _size9); + this->sources.resize(_size9); + uint32_t _i13; + for (_i13 = 0; _i13 < _size9; ++_i13) + { + xfer += iprot->readString(this->sources[_i13]); + } + xfer += iprot->readListEnd(); + } + this->__isset.sources = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TMutation::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TMutation"); + + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->row); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("data", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->data); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("values", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->values.size())); + std::vector ::const_iterator _iter14; + for (_iter14 = this->values.begin(); _iter14 != this->values.end(); ++_iter14) + { + xfer += oprot->writeBinary((*_iter14)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("entries", ::apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeI32(this->entries); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.sources) { + xfer += oprot->writeFieldBegin("sources", ::apache::thrift::protocol::T_LIST, 5); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->sources.size())); + std::vector ::const_iterator _iter15; + for (_iter15 = this->sources.begin(); _iter15 != this->sources.end(); ++_iter15) + { + xfer += oprot->writeString((*_iter15)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TMutation &a, TMutation &b) { + using ::std::swap; + swap(a.row, b.row); + swap(a.data, b.data); + swap(a.values, b.values); + swap(a.entries, b.entries); + swap(a.sources, b.sources); + swap(a.__isset, b.__isset); +} + +TMutation::TMutation(const TMutation& other16) { + row = other16.row; + data = other16.data; + values = other16.values; + entries = other16.entries; + sources = other16.sources; + __isset = other16.__isset; +} +TMutation& TMutation::operator=(const TMutation& other17) { + row = other17.row; + data = other17.data; + values = other17.values; + entries = other17.entries; + sources = other17.sources; + __isset = other17.__isset; + return *this; +} +void TMutation::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TMutation("; + out << "row=" << to_string(row); + out << ", " << "data=" << to_string(data); + out << ", " << "values=" << to_string(values); + out << ", " << "entries=" << to_string(entries); + out << ", " << "sources="; (__isset.sources ? (out << to_string(sources)) : (out << "")); + out << ")"; +} + + +TKeyExtent::~TKeyExtent() throw() { +} + + +void TKeyExtent::__set_table(const std::string& val) { + this->table = val; +} + +void TKeyExtent::__set_endRow(const std::string& val) { + this->endRow = val; +} + +void TKeyExtent::__set_prevEndRow(const std::string& val) { + this->prevEndRow = val; +} +std::ostream& operator<<(std::ostream& out, const TKeyExtent& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TKeyExtent::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->table); + this->__isset.table = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->endRow); + this->__isset.endRow = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->prevEndRow); + this->__isset.prevEndRow = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TKeyExtent::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TKeyExtent"); + + xfer += oprot->writeFieldBegin("table", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->table); + xfer += oprot->writeFieldEnd(); + + if (!this->endRow.empty()){ + xfer += oprot->writeFieldBegin("endRow", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->endRow); + xfer += oprot->writeFieldEnd(); + } + + if (!this->prevEndRow.empty()){ + xfer += oprot->writeFieldBegin("prevEndRow", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary(this->prevEndRow); + xfer += oprot->writeFieldEnd(); + } + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TKeyExtent &a, TKeyExtent &b) { + using ::std::swap; + swap(a.table, b.table); + swap(a.endRow, b.endRow); + swap(a.prevEndRow, b.prevEndRow); + swap(a.__isset, b.__isset); +} + +TKeyExtent::TKeyExtent(const TKeyExtent& other18) { + table = other18.table; + endRow = other18.endRow; + prevEndRow = other18.prevEndRow; + __isset = other18.__isset; +} +TKeyExtent& TKeyExtent::operator=(const TKeyExtent& other19) { + table = other19.table; + endRow = other19.endRow; + prevEndRow = other19.prevEndRow; + __isset = other19.__isset; + return *this; +} +void TKeyExtent::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TKeyExtent("; + out << "table=" << to_string(table); + out << ", " << "endRow=" << to_string(endRow); + out << ", " << "prevEndRow=" << to_string(prevEndRow); + out << ")"; +} + + +TKeyValue::~TKeyValue() throw() { +} + + +void TKeyValue::__set_key(const TKey& val) { + this->key = val; +} + +void TKeyValue::__set_value(const std::string& val) { + this->value = val; +} +std::ostream& operator<<(std::ostream& out, const TKeyValue& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TKeyValue::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->key.read(iprot); + this->__isset.key = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->value); + this->__isset.value = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TKeyValue::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TKeyValue"); + + xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->key.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->value); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TKeyValue &a, TKeyValue &b) { + using ::std::swap; + swap(a.key, b.key); + swap(a.value, b.value); + swap(a.__isset, b.__isset); +} + +TKeyValue::TKeyValue(const TKeyValue& other20) { + key = other20.key; + value = other20.value; + __isset = other20.__isset; +} +TKeyValue& TKeyValue::operator=(const TKeyValue& other21) { + key = other21.key; + value = other21.value; + __isset = other21.__isset; + return *this; +} +void TKeyValue::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TKeyValue("; + out << "key=" << to_string(key); + out << ", " << "value=" << to_string(value); + out << ")"; +} + + +ScanResult::~ScanResult() throw() { +} + + +void ScanResult::__set_results(const std::vector & val) { + this->results = val; +} + +void ScanResult::__set_more(const bool val) { + this->more = val; +} +std::ostream& operator<<(std::ostream& out, const ScanResult& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t ScanResult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->results.clear(); + uint32_t _size22; + ::apache::thrift::protocol::TType _etype25; + xfer += iprot->readListBegin(_etype25, _size22); + this->results.resize(_size22); + uint32_t _i26; + for (_i26 = 0; _i26 < _size22; ++_i26) + { + xfer += this->results[_i26].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.results = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->more); + this->__isset.more = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ScanResult::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ScanResult"); + + xfer += oprot->writeFieldBegin("results", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->results.size())); + std::vector ::const_iterator _iter27; + for (_iter27 = this->results.begin(); _iter27 != this->results.end(); ++_iter27) + { + xfer += (*_iter27).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("more", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->more); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ScanResult &a, ScanResult &b) { + using ::std::swap; + swap(a.results, b.results); + swap(a.more, b.more); + swap(a.__isset, b.__isset); +} + +ScanResult::ScanResult(const ScanResult& other28) { + results = other28.results; + more = other28.more; + __isset = other28.__isset; +} +ScanResult& ScanResult::operator=(const ScanResult& other29) { + results = other29.results; + more = other29.more; + __isset = other29.__isset; + return *this; +} +void ScanResult::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ScanResult("; + out << "results=" << to_string(results); + out << ", " << "more=" << to_string(more); + out << ")"; +} + + +TRange::~TRange() throw() { +} + + +void TRange::__set_start(const TKey& val) { + this->start = val; +} + +void TRange::__set_stop(const TKey& val) { + this->stop = val; +} + +void TRange::__set_startKeyInclusive(const bool val) { + this->startKeyInclusive = val; +} + +void TRange::__set_stopKeyInclusive(const bool val) { + this->stopKeyInclusive = val; +} + +void TRange::__set_infiniteStartKey(const bool val) { + this->infiniteStartKey = val; +} + +void TRange::__set_infiniteStopKey(const bool val) { + this->infiniteStopKey = val; +} +std::ostream& operator<<(std::ostream& out, const TRange& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TRange::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->start.read(iprot); + this->__isset.start = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->stop.read(iprot); + this->__isset.stop = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->startKeyInclusive); + this->__isset.startKeyInclusive = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->stopKeyInclusive); + this->__isset.stopKeyInclusive = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->infiniteStartKey); + this->__isset.infiniteStartKey = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->infiniteStopKey); + this->__isset.infiniteStopKey = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TRange::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TRange"); + + xfer += oprot->writeFieldBegin("start", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->start.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("stop", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->stop.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("startKeyInclusive", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->startKeyInclusive); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("stopKeyInclusive", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool(this->stopKeyInclusive); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("infiniteStartKey", ::apache::thrift::protocol::T_BOOL, 5); + xfer += oprot->writeBool(this->infiniteStartKey); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("infiniteStopKey", ::apache::thrift::protocol::T_BOOL, 6); + xfer += oprot->writeBool(this->infiniteStopKey); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TRange &a, TRange &b) { + using ::std::swap; + swap(a.start, b.start); + swap(a.stop, b.stop); + swap(a.startKeyInclusive, b.startKeyInclusive); + swap(a.stopKeyInclusive, b.stopKeyInclusive); + swap(a.infiniteStartKey, b.infiniteStartKey); + swap(a.infiniteStopKey, b.infiniteStopKey); + swap(a.__isset, b.__isset); +} + +TRange::TRange(const TRange& other30) { + start = other30.start; + stop = other30.stop; + startKeyInclusive = other30.startKeyInclusive; + stopKeyInclusive = other30.stopKeyInclusive; + infiniteStartKey = other30.infiniteStartKey; + infiniteStopKey = other30.infiniteStopKey; + __isset = other30.__isset; +} +TRange& TRange::operator=(const TRange& other31) { + start = other31.start; + stop = other31.stop; + startKeyInclusive = other31.startKeyInclusive; + stopKeyInclusive = other31.stopKeyInclusive; + infiniteStartKey = other31.infiniteStartKey; + infiniteStopKey = other31.infiniteStopKey; + __isset = other31.__isset; + return *this; +} +void TRange::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TRange("; + out << "start=" << to_string(start); + out << ", " << "stop=" << to_string(stop); + out << ", " << "startKeyInclusive=" << to_string(startKeyInclusive); + out << ", " << "stopKeyInclusive=" << to_string(stopKeyInclusive); + out << ", " << "infiniteStartKey=" << to_string(infiniteStartKey); + out << ", " << "infiniteStopKey=" << to_string(infiniteStopKey); + out << ")"; +} + + +MultiScanResult::~MultiScanResult() throw() { +} + + +void MultiScanResult::__set_results(const std::vector & val) { + this->results = val; +} + +void MultiScanResult::__set_failures(const ScanBatch& val) { + this->failures = val; +} + +void MultiScanResult::__set_fullScans(const std::vector & val) { + this->fullScans = val; +} + +void MultiScanResult::__set_partScan(const TKeyExtent& val) { + this->partScan = val; +} + +void MultiScanResult::__set_partNextKey(const TKey& val) { + this->partNextKey = val; +} + +void MultiScanResult::__set_partNextKeyInclusive(const bool val) { + this->partNextKeyInclusive = val; +} + +void MultiScanResult::__set_more(const bool val) { + this->more = val; +} +std::ostream& operator<<(std::ostream& out, const MultiScanResult& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t MultiScanResult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->results.clear(); + uint32_t _size32; + ::apache::thrift::protocol::TType _etype35; + xfer += iprot->readListBegin(_etype35, _size32); + this->results.resize(_size32); + uint32_t _i36; + for (_i36 = 0; _i36 < _size32; ++_i36) + { + xfer += this->results[_i36].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.results = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->failures.clear(); + uint32_t _size37; + ::apache::thrift::protocol::TType _ktype38; + ::apache::thrift::protocol::TType _vtype39; + xfer += iprot->readMapBegin(_ktype38, _vtype39, _size37); + uint32_t _i41; + for (_i41 = 0; _i41 < _size37; ++_i41) + { + TKeyExtent _key42; + xfer += _key42.read(iprot); + std::vector & _val43 = this->failures[_key42]; + { + _val43.clear(); + uint32_t _size44; + ::apache::thrift::protocol::TType _etype47; + xfer += iprot->readListBegin(_etype47, _size44); + _val43.resize(_size44); + uint32_t _i48; + for (_i48 = 0; _i48 < _size44; ++_i48) + { + xfer += _val43[_i48].read(iprot); + } + xfer += iprot->readListEnd(); + } + } + xfer += iprot->readMapEnd(); + } + this->__isset.failures = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->fullScans.clear(); + uint32_t _size49; + ::apache::thrift::protocol::TType _etype52; + xfer += iprot->readListBegin(_etype52, _size49); + this->fullScans.resize(_size49); + uint32_t _i53; + for (_i53 = 0; _i53 < _size49; ++_i53) + { + xfer += this->fullScans[_i53].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.fullScans = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->partScan.read(iprot); + this->__isset.partScan = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->partNextKey.read(iprot); + this->__isset.partNextKey = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->partNextKeyInclusive); + this->__isset.partNextKeyInclusive = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->more); + this->__isset.more = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MultiScanResult::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MultiScanResult"); + + xfer += oprot->writeFieldBegin("results", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->results.size())); + std::vector ::const_iterator _iter54; + for (_iter54 = this->results.begin(); _iter54 != this->results.end(); ++_iter54) + { + xfer += (*_iter54).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("failures", ::apache::thrift::protocol::T_MAP, 2); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRUCT, ::apache::thrift::protocol::T_LIST, static_cast(this->failures.size())); + std::map > ::const_iterator _iter55; + for (_iter55 = this->failures.begin(); _iter55 != this->failures.end(); ++_iter55) + { + xfer += _iter55->first.write(oprot); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(_iter55->second.size())); + std::vector ::const_iterator _iter56; + for (_iter56 = _iter55->second.begin(); _iter56 != _iter55->second.end(); ++_iter56) + { + xfer += (*_iter56).write(oprot); + } + xfer += oprot->writeListEnd(); + } + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("fullScans", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->fullScans.size())); + std::vector ::const_iterator _iter57; + for (_iter57 = this->fullScans.begin(); _iter57 != this->fullScans.end(); ++_iter57) + { + xfer += (*_iter57).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("partScan", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->partScan.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("partNextKey", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->partNextKey.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("partNextKeyInclusive", ::apache::thrift::protocol::T_BOOL, 6); + xfer += oprot->writeBool(this->partNextKeyInclusive); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("more", ::apache::thrift::protocol::T_BOOL, 7); + xfer += oprot->writeBool(this->more); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(MultiScanResult &a, MultiScanResult &b) { + using ::std::swap; + swap(a.results, b.results); + swap(a.failures, b.failures); + swap(a.fullScans, b.fullScans); + swap(a.partScan, b.partScan); + swap(a.partNextKey, b.partNextKey); + swap(a.partNextKeyInclusive, b.partNextKeyInclusive); + swap(a.more, b.more); + swap(a.__isset, b.__isset); +} + +MultiScanResult::MultiScanResult(const MultiScanResult& other58) { + results = other58.results; + failures = other58.failures; + fullScans = other58.fullScans; + partScan = other58.partScan; + partNextKey = other58.partNextKey; + partNextKeyInclusive = other58.partNextKeyInclusive; + more = other58.more; + __isset = other58.__isset; +} +MultiScanResult& MultiScanResult::operator=(const MultiScanResult& other59) { + results = other59.results; + failures = other59.failures; + fullScans = other59.fullScans; + partScan = other59.partScan; + partNextKey = other59.partNextKey; + partNextKeyInclusive = other59.partNextKeyInclusive; + more = other59.more; + __isset = other59.__isset; + return *this; +} +void MultiScanResult::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "MultiScanResult("; + out << "results=" << to_string(results); + out << ", " << "failures=" << to_string(failures); + out << ", " << "fullScans=" << to_string(fullScans); + out << ", " << "partScan=" << to_string(partScan); + out << ", " << "partNextKey=" << to_string(partNextKey); + out << ", " << "partNextKeyInclusive=" << to_string(partNextKeyInclusive); + out << ", " << "more=" << to_string(more); + out << ")"; +} + + +InitialScan::~InitialScan() throw() { +} + + +void InitialScan::__set_scanID(const ScanID val) { + this->scanID = val; +} + +void InitialScan::__set_result(const ScanResult& val) { + this->result = val; +} +std::ostream& operator<<(std::ostream& out, const InitialScan& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t InitialScan::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->scanID); + this->__isset.scanID = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->result.read(iprot); + this->__isset.result = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t InitialScan::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("InitialScan"); + + xfer += oprot->writeFieldBegin("scanID", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->scanID); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("result", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->result.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(InitialScan &a, InitialScan &b) { + using ::std::swap; + swap(a.scanID, b.scanID); + swap(a.result, b.result); + swap(a.__isset, b.__isset); +} + +InitialScan::InitialScan(const InitialScan& other60) { + scanID = other60.scanID; + result = other60.result; + __isset = other60.__isset; +} +InitialScan& InitialScan::operator=(const InitialScan& other61) { + scanID = other61.scanID; + result = other61.result; + __isset = other61.__isset; + return *this; +} +void InitialScan::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "InitialScan("; + out << "scanID=" << to_string(scanID); + out << ", " << "result=" << to_string(result); + out << ")"; +} + + +InitialMultiScan::~InitialMultiScan() throw() { +} + + +void InitialMultiScan::__set_scanID(const ScanID val) { + this->scanID = val; +} + +void InitialMultiScan::__set_result(const MultiScanResult& val) { + this->result = val; +} +std::ostream& operator<<(std::ostream& out, const InitialMultiScan& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t InitialMultiScan::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->scanID); + this->__isset.scanID = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->result.read(iprot); + this->__isset.result = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t InitialMultiScan::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("InitialMultiScan"); + + xfer += oprot->writeFieldBegin("scanID", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->scanID); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("result", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->result.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(InitialMultiScan &a, InitialMultiScan &b) { + using ::std::swap; + swap(a.scanID, b.scanID); + swap(a.result, b.result); + swap(a.__isset, b.__isset); +} + +InitialMultiScan::InitialMultiScan(const InitialMultiScan& other62) { + scanID = other62.scanID; + result = other62.result; + __isset = other62.__isset; +} +InitialMultiScan& InitialMultiScan::operator=(const InitialMultiScan& other63) { + scanID = other63.scanID; + result = other63.result; + __isset = other63.__isset; + return *this; +} +void InitialMultiScan::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "InitialMultiScan("; + out << "scanID=" << to_string(scanID); + out << ", " << "result=" << to_string(result); + out << ")"; +} + + +IterInfo::~IterInfo() throw() { +} + + +void IterInfo::__set_priority(const int32_t val) { + this->priority = val; +} + +void IterInfo::__set_className(const std::string& val) { + this->className = val; +} + +void IterInfo::__set_iterName(const std::string& val) { + this->iterName = val; +} +std::ostream& operator<<(std::ostream& out, const IterInfo& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t IterInfo::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->priority); + this->__isset.priority = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->className); + this->__isset.className = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->iterName); + this->__isset.iterName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t IterInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("IterInfo"); + + xfer += oprot->writeFieldBegin("priority", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32(this->priority); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("className", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->className); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("iterName", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->iterName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(IterInfo &a, IterInfo &b) { + using ::std::swap; + swap(a.priority, b.priority); + swap(a.className, b.className); + swap(a.iterName, b.iterName); + swap(a.__isset, b.__isset); +} + +IterInfo::IterInfo(const IterInfo& other64) { + priority = other64.priority; + className = other64.className; + iterName = other64.iterName; + __isset = other64.__isset; +} +IterInfo& IterInfo::operator=(const IterInfo& other65) { + priority = other65.priority; + className = other65.className; + iterName = other65.iterName; + __isset = other65.__isset; + return *this; +} +void IterInfo::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "IterInfo("; + out << "priority=" << to_string(priority); + out << ", " << "className=" << to_string(className); + out << ", " << "iterName=" << to_string(iterName); + out << ")"; +} + + +TConstraintViolationSummary::~TConstraintViolationSummary() throw() { +} + + +void TConstraintViolationSummary::__set_constrainClass(const std::string& val) { + this->constrainClass = val; +} + +void TConstraintViolationSummary::__set_violationCode(const int16_t val) { + this->violationCode = val; +} + +void TConstraintViolationSummary::__set_violationDescription(const std::string& val) { + this->violationDescription = val; +} + +void TConstraintViolationSummary::__set_numberOfViolatingMutations(const int64_t val) { + this->numberOfViolatingMutations = val; +} +std::ostream& operator<<(std::ostream& out, const TConstraintViolationSummary& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TConstraintViolationSummary::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->constrainClass); + this->__isset.constrainClass = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->violationCode); + this->__isset.violationCode = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->violationDescription); + this->__isset.violationDescription = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numberOfViolatingMutations); + this->__isset.numberOfViolatingMutations = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TConstraintViolationSummary::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TConstraintViolationSummary"); + + xfer += oprot->writeFieldBegin("constrainClass", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->constrainClass); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("violationCode", ::apache::thrift::protocol::T_I16, 2); + xfer += oprot->writeI16(this->violationCode); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("violationDescription", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->violationDescription); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("numberOfViolatingMutations", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->numberOfViolatingMutations); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TConstraintViolationSummary &a, TConstraintViolationSummary &b) { + using ::std::swap; + swap(a.constrainClass, b.constrainClass); + swap(a.violationCode, b.violationCode); + swap(a.violationDescription, b.violationDescription); + swap(a.numberOfViolatingMutations, b.numberOfViolatingMutations); + swap(a.__isset, b.__isset); +} + +TConstraintViolationSummary::TConstraintViolationSummary(const TConstraintViolationSummary& other66) { + constrainClass = other66.constrainClass; + violationCode = other66.violationCode; + violationDescription = other66.violationDescription; + numberOfViolatingMutations = other66.numberOfViolatingMutations; + __isset = other66.__isset; +} +TConstraintViolationSummary& TConstraintViolationSummary::operator=(const TConstraintViolationSummary& other67) { + constrainClass = other67.constrainClass; + violationCode = other67.violationCode; + violationDescription = other67.violationDescription; + numberOfViolatingMutations = other67.numberOfViolatingMutations; + __isset = other67.__isset; + return *this; +} +void TConstraintViolationSummary::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TConstraintViolationSummary("; + out << "constrainClass=" << to_string(constrainClass); + out << ", " << "violationCode=" << to_string(violationCode); + out << ", " << "violationDescription=" << to_string(violationDescription); + out << ", " << "numberOfViolatingMutations=" << to_string(numberOfViolatingMutations); + out << ")"; +} + + +UpdateErrors::~UpdateErrors() throw() { +} + + +void UpdateErrors::__set_failedExtents(const std::map & val) { + this->failedExtents = val; +} + +void UpdateErrors::__set_violationSummaries(const std::vector & val) { + this->violationSummaries = val; +} + +void UpdateErrors::__set_authorizationFailures(const std::map & val) { + this->authorizationFailures = val; +} +std::ostream& operator<<(std::ostream& out, const UpdateErrors& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t UpdateErrors::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->failedExtents.clear(); + uint32_t _size68; + ::apache::thrift::protocol::TType _ktype69; + ::apache::thrift::protocol::TType _vtype70; + xfer += iprot->readMapBegin(_ktype69, _vtype70, _size68); + uint32_t _i72; + for (_i72 = 0; _i72 < _size68; ++_i72) + { + TKeyExtent _key73; + xfer += _key73.read(iprot); + int64_t& _val74 = this->failedExtents[_key73]; + xfer += iprot->readI64(_val74); + } + xfer += iprot->readMapEnd(); + } + this->__isset.failedExtents = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->violationSummaries.clear(); + uint32_t _size75; + ::apache::thrift::protocol::TType _etype78; + xfer += iprot->readListBegin(_etype78, _size75); + this->violationSummaries.resize(_size75); + uint32_t _i79; + for (_i79 = 0; _i79 < _size75; ++_i79) + { + xfer += this->violationSummaries[_i79].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.violationSummaries = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->authorizationFailures.clear(); + uint32_t _size80; + ::apache::thrift::protocol::TType _ktype81; + ::apache::thrift::protocol::TType _vtype82; + xfer += iprot->readMapBegin(_ktype81, _vtype82, _size80); + uint32_t _i84; + for (_i84 = 0; _i84 < _size80; ++_i84) + { + TKeyExtent _key85; + xfer += _key85.read(iprot); + ::org::apache::accumulov2::core::clientImpl::thrift::SecurityErrorCode::type& _val86 = this->authorizationFailures[_key85]; + int32_t ecast87; + xfer += iprot->readI32(ecast87); + _val86 = ( ::org::apache::accumulov2::core::clientImpl::thrift::SecurityErrorCode::type)ecast87; + } + xfer += iprot->readMapEnd(); + } + this->__isset.authorizationFailures = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t UpdateErrors::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("UpdateErrors"); + + xfer += oprot->writeFieldBegin("failedExtents", ::apache::thrift::protocol::T_MAP, 1); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRUCT, ::apache::thrift::protocol::T_I64, static_cast(this->failedExtents.size())); + std::map ::const_iterator _iter88; + for (_iter88 = this->failedExtents.begin(); _iter88 != this->failedExtents.end(); ++_iter88) + { + xfer += _iter88->first.write(oprot); + xfer += oprot->writeI64(_iter88->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("violationSummaries", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->violationSummaries.size())); + std::vector ::const_iterator _iter89; + for (_iter89 = this->violationSummaries.begin(); _iter89 != this->violationSummaries.end(); ++_iter89) + { + xfer += (*_iter89).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("authorizationFailures", ::apache::thrift::protocol::T_MAP, 3); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRUCT, ::apache::thrift::protocol::T_I32, static_cast(this->authorizationFailures.size())); + std::map ::const_iterator _iter90; + for (_iter90 = this->authorizationFailures.begin(); _iter90 != this->authorizationFailures.end(); ++_iter90) + { + xfer += _iter90->first.write(oprot); + xfer += oprot->writeI32((int32_t)_iter90->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(UpdateErrors &a, UpdateErrors &b) { + using ::std::swap; + swap(a.failedExtents, b.failedExtents); + swap(a.violationSummaries, b.violationSummaries); + swap(a.authorizationFailures, b.authorizationFailures); + swap(a.__isset, b.__isset); +} + +UpdateErrors::UpdateErrors(const UpdateErrors& other91) { + failedExtents = other91.failedExtents; + violationSummaries = other91.violationSummaries; + authorizationFailures = other91.authorizationFailures; + __isset = other91.__isset; +} +UpdateErrors& UpdateErrors::operator=(const UpdateErrors& other92) { + failedExtents = other92.failedExtents; + violationSummaries = other92.violationSummaries; + authorizationFailures = other92.authorizationFailures; + __isset = other92.__isset; + return *this; +} +void UpdateErrors::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "UpdateErrors("; + out << "failedExtents=" << to_string(failedExtents); + out << ", " << "violationSummaries=" << to_string(violationSummaries); + out << ", " << "authorizationFailures=" << to_string(authorizationFailures); + out << ")"; +} + + +TCMResult::~TCMResult() throw() { +} + + +void TCMResult::__set_cmid(const int64_t val) { + this->cmid = val; +} + +void TCMResult::__set_status(const TCMStatus::type val) { + this->status = val; +} +std::ostream& operator<<(std::ostream& out, const TCMResult& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TCMResult::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->cmid); + this->__isset.cmid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast93; + xfer += iprot->readI32(ecast93); + this->status = (TCMStatus::type)ecast93; + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TCMResult::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TCMResult"); + + xfer += oprot->writeFieldBegin("cmid", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->cmid); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->status); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TCMResult &a, TCMResult &b) { + using ::std::swap; + swap(a.cmid, b.cmid); + swap(a.status, b.status); + swap(a.__isset, b.__isset); +} + +TCMResult::TCMResult(const TCMResult& other94) { + cmid = other94.cmid; + status = other94.status; + __isset = other94.__isset; +} +TCMResult& TCMResult::operator=(const TCMResult& other95) { + cmid = other95.cmid; + status = other95.status; + __isset = other95.__isset; + return *this; +} +void TCMResult::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TCMResult("; + out << "cmid=" << to_string(cmid); + out << ", " << "status=" << to_string(status); + out << ")"; +} + + +MapFileInfo::~MapFileInfo() throw() { +} + + +void MapFileInfo::__set_estimatedSize(const int64_t val) { + this->estimatedSize = val; +} +std::ostream& operator<<(std::ostream& out, const MapFileInfo& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t MapFileInfo::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->estimatedSize); + this->__isset.estimatedSize = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MapFileInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MapFileInfo"); + + xfer += oprot->writeFieldBegin("estimatedSize", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->estimatedSize); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(MapFileInfo &a, MapFileInfo &b) { + using ::std::swap; + swap(a.estimatedSize, b.estimatedSize); + swap(a.__isset, b.__isset); +} + +MapFileInfo::MapFileInfo(const MapFileInfo& other96) { + estimatedSize = other96.estimatedSize; + __isset = other96.__isset; +} +MapFileInfo& MapFileInfo::operator=(const MapFileInfo& other97) { + estimatedSize = other97.estimatedSize; + __isset = other97.__isset; + return *this; +} +void MapFileInfo::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "MapFileInfo("; + out << "estimatedSize=" << to_string(estimatedSize); + out << ")"; +} + + +TCondition::~TCondition() throw() { +} + + +void TCondition::__set_cf(const std::string& val) { + this->cf = val; +} + +void TCondition::__set_cq(const std::string& val) { + this->cq = val; +} + +void TCondition::__set_cv(const std::string& val) { + this->cv = val; +} + +void TCondition::__set_ts(const int64_t val) { + this->ts = val; +} + +void TCondition::__set_hasTimestamp(const bool val) { + this->hasTimestamp = val; +} + +void TCondition::__set_val(const std::string& val) { + this->val = val; +} + +void TCondition::__set_iterators(const std::string& val) { + this->iterators = val; +} +std::ostream& operator<<(std::ostream& out, const TCondition& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TCondition::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->cf); + this->__isset.cf = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->cq); + this->__isset.cq = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->cv); + this->__isset.cv = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->ts); + this->__isset.ts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->hasTimestamp); + this->__isset.hasTimestamp = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->val); + this->__isset.val = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->iterators); + this->__isset.iterators = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TCondition::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TCondition"); + + xfer += oprot->writeFieldBegin("cf", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->cf); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("cq", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->cq); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("cv", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary(this->cv); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ts", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->ts); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("hasTimestamp", ::apache::thrift::protocol::T_BOOL, 5); + xfer += oprot->writeBool(this->hasTimestamp); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("val", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeBinary(this->val); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("iterators", ::apache::thrift::protocol::T_STRING, 7); + xfer += oprot->writeBinary(this->iterators); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TCondition &a, TCondition &b) { + using ::std::swap; + swap(a.cf, b.cf); + swap(a.cq, b.cq); + swap(a.cv, b.cv); + swap(a.ts, b.ts); + swap(a.hasTimestamp, b.hasTimestamp); + swap(a.val, b.val); + swap(a.iterators, b.iterators); + swap(a.__isset, b.__isset); +} + +TCondition::TCondition(const TCondition& other98) { + cf = other98.cf; + cq = other98.cq; + cv = other98.cv; + ts = other98.ts; + hasTimestamp = other98.hasTimestamp; + val = other98.val; + iterators = other98.iterators; + __isset = other98.__isset; +} +TCondition& TCondition::operator=(const TCondition& other99) { + cf = other99.cf; + cq = other99.cq; + cv = other99.cv; + ts = other99.ts; + hasTimestamp = other99.hasTimestamp; + val = other99.val; + iterators = other99.iterators; + __isset = other99.__isset; + return *this; +} +void TCondition::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TCondition("; + out << "cf=" << to_string(cf); + out << ", " << "cq=" << to_string(cq); + out << ", " << "cv=" << to_string(cv); + out << ", " << "ts=" << to_string(ts); + out << ", " << "hasTimestamp=" << to_string(hasTimestamp); + out << ", " << "val=" << to_string(val); + out << ", " << "iterators=" << to_string(iterators); + out << ")"; +} + + +TConditionalMutation::~TConditionalMutation() throw() { +} + + +void TConditionalMutation::__set_conditions(const std::vector & val) { + this->conditions = val; +} + +void TConditionalMutation::__set_mutation(const TMutation& val) { + this->mutation = val; +} + +void TConditionalMutation::__set_id(const int64_t val) { + this->id = val; +} +std::ostream& operator<<(std::ostream& out, const TConditionalMutation& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TConditionalMutation::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->conditions.clear(); + uint32_t _size100; + ::apache::thrift::protocol::TType _etype103; + xfer += iprot->readListBegin(_etype103, _size100); + this->conditions.resize(_size100); + uint32_t _i104; + for (_i104 = 0; _i104 < _size100; ++_i104) + { + xfer += this->conditions[_i104].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.conditions = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->mutation.read(iprot); + this->__isset.mutation = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->id); + this->__isset.id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TConditionalMutation::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TConditionalMutation"); + + xfer += oprot->writeFieldBegin("conditions", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->conditions.size())); + std::vector ::const_iterator _iter105; + for (_iter105 = this->conditions.begin(); _iter105 != this->conditions.end(); ++_iter105) + { + xfer += (*_iter105).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("mutation", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->mutation.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("id", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->id); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TConditionalMutation &a, TConditionalMutation &b) { + using ::std::swap; + swap(a.conditions, b.conditions); + swap(a.mutation, b.mutation); + swap(a.id, b.id); + swap(a.__isset, b.__isset); +} + +TConditionalMutation::TConditionalMutation(const TConditionalMutation& other106) { + conditions = other106.conditions; + mutation = other106.mutation; + id = other106.id; + __isset = other106.__isset; +} +TConditionalMutation& TConditionalMutation::operator=(const TConditionalMutation& other107) { + conditions = other107.conditions; + mutation = other107.mutation; + id = other107.id; + __isset = other107.__isset; + return *this; +} +void TConditionalMutation::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TConditionalMutation("; + out << "conditions=" << to_string(conditions); + out << ", " << "mutation=" << to_string(mutation); + out << ", " << "id=" << to_string(id); + out << ")"; +} + + +TConditionalSession::~TConditionalSession() throw() { +} + + +void TConditionalSession::__set_sessionId(const int64_t val) { + this->sessionId = val; +} + +void TConditionalSession::__set_tserverLock(const std::string& val) { + this->tserverLock = val; +} + +void TConditionalSession::__set_ttl(const int64_t val) { + this->ttl = val; +} +std::ostream& operator<<(std::ostream& out, const TConditionalSession& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TConditionalSession::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->sessionId); + this->__isset.sessionId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tserverLock); + this->__isset.tserverLock = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->ttl); + this->__isset.ttl = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TConditionalSession::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TConditionalSession"); + + xfer += oprot->writeFieldBegin("sessionId", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->sessionId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tserverLock", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tserverLock); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ttl", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->ttl); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TConditionalSession &a, TConditionalSession &b) { + using ::std::swap; + swap(a.sessionId, b.sessionId); + swap(a.tserverLock, b.tserverLock); + swap(a.ttl, b.ttl); + swap(a.__isset, b.__isset); +} + +TConditionalSession::TConditionalSession(const TConditionalSession& other108) { + sessionId = other108.sessionId; + tserverLock = other108.tserverLock; + ttl = other108.ttl; + __isset = other108.__isset; +} +TConditionalSession& TConditionalSession::operator=(const TConditionalSession& other109) { + sessionId = other109.sessionId; + tserverLock = other109.tserverLock; + ttl = other109.ttl; + __isset = other109.__isset; + return *this; +} +void TConditionalSession::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TConditionalSession("; + out << "sessionId=" << to_string(sessionId); + out << ", " << "tserverLock=" << to_string(tserverLock); + out << ", " << "ttl=" << to_string(ttl); + out << ")"; +} + + +TSummarizerConfiguration::~TSummarizerConfiguration() throw() { +} + + +void TSummarizerConfiguration::__set_classname(const std::string& val) { + this->classname = val; +} + +void TSummarizerConfiguration::__set_options(const std::map & val) { + this->options = val; +} + +void TSummarizerConfiguration::__set_configId(const std::string& val) { + this->configId = val; +} +std::ostream& operator<<(std::ostream& out, const TSummarizerConfiguration& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TSummarizerConfiguration::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->classname); + this->__isset.classname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->options.clear(); + uint32_t _size110; + ::apache::thrift::protocol::TType _ktype111; + ::apache::thrift::protocol::TType _vtype112; + xfer += iprot->readMapBegin(_ktype111, _vtype112, _size110); + uint32_t _i114; + for (_i114 = 0; _i114 < _size110; ++_i114) + { + std::string _key115; + xfer += iprot->readString(_key115); + std::string& _val116 = this->options[_key115]; + xfer += iprot->readString(_val116); + } + xfer += iprot->readMapEnd(); + } + this->__isset.options = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->configId); + this->__isset.configId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TSummarizerConfiguration::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TSummarizerConfiguration"); + + xfer += oprot->writeFieldBegin("classname", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->classname); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("options", ::apache::thrift::protocol::T_MAP, 2); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->options.size())); + std::map ::const_iterator _iter117; + for (_iter117 = this->options.begin(); _iter117 != this->options.end(); ++_iter117) + { + xfer += oprot->writeString(_iter117->first); + xfer += oprot->writeString(_iter117->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("configId", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->configId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TSummarizerConfiguration &a, TSummarizerConfiguration &b) { + using ::std::swap; + swap(a.classname, b.classname); + swap(a.options, b.options); + swap(a.configId, b.configId); + swap(a.__isset, b.__isset); +} + +TSummarizerConfiguration::TSummarizerConfiguration(const TSummarizerConfiguration& other118) { + classname = other118.classname; + options = other118.options; + configId = other118.configId; + __isset = other118.__isset; +} +TSummarizerConfiguration& TSummarizerConfiguration::operator=(const TSummarizerConfiguration& other119) { + classname = other119.classname; + options = other119.options; + configId = other119.configId; + __isset = other119.__isset; + return *this; +} +void TSummarizerConfiguration::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TSummarizerConfiguration("; + out << "classname=" << to_string(classname); + out << ", " << "options=" << to_string(options); + out << ", " << "configId=" << to_string(configId); + out << ")"; +} + + +TSummary::~TSummary() throw() { +} + + +void TSummary::__set_summary(const std::map & val) { + this->summary = val; +} + +void TSummary::__set_config(const TSummarizerConfiguration& val) { + this->config = val; +} + +void TSummary::__set_filesContaining(const int64_t val) { + this->filesContaining = val; +} + +void TSummary::__set_filesExceeding(const int64_t val) { + this->filesExceeding = val; +} + +void TSummary::__set_filesLarge(const int64_t val) { + this->filesLarge = val; +} +std::ostream& operator<<(std::ostream& out, const TSummary& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TSummary::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->summary.clear(); + uint32_t _size120; + ::apache::thrift::protocol::TType _ktype121; + ::apache::thrift::protocol::TType _vtype122; + xfer += iprot->readMapBegin(_ktype121, _vtype122, _size120); + uint32_t _i124; + for (_i124 = 0; _i124 < _size120; ++_i124) + { + std::string _key125; + xfer += iprot->readString(_key125); + int64_t& _val126 = this->summary[_key125]; + xfer += iprot->readI64(_val126); + } + xfer += iprot->readMapEnd(); + } + this->__isset.summary = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->config.read(iprot); + this->__isset.config = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->filesContaining); + this->__isset.filesContaining = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->filesExceeding); + this->__isset.filesExceeding = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->filesLarge); + this->__isset.filesLarge = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TSummary::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TSummary"); + + xfer += oprot->writeFieldBegin("summary", ::apache::thrift::protocol::T_MAP, 1); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_I64, static_cast(this->summary.size())); + std::map ::const_iterator _iter127; + for (_iter127 = this->summary.begin(); _iter127 != this->summary.end(); ++_iter127) + { + xfer += oprot->writeString(_iter127->first); + xfer += oprot->writeI64(_iter127->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("config", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->config.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("filesContaining", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->filesContaining); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("filesExceeding", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->filesExceeding); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("filesLarge", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64(this->filesLarge); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TSummary &a, TSummary &b) { + using ::std::swap; + swap(a.summary, b.summary); + swap(a.config, b.config); + swap(a.filesContaining, b.filesContaining); + swap(a.filesExceeding, b.filesExceeding); + swap(a.filesLarge, b.filesLarge); + swap(a.__isset, b.__isset); +} + +TSummary::TSummary(const TSummary& other128) { + summary = other128.summary; + config = other128.config; + filesContaining = other128.filesContaining; + filesExceeding = other128.filesExceeding; + filesLarge = other128.filesLarge; + __isset = other128.__isset; +} +TSummary& TSummary::operator=(const TSummary& other129) { + summary = other129.summary; + config = other129.config; + filesContaining = other129.filesContaining; + filesExceeding = other129.filesExceeding; + filesLarge = other129.filesLarge; + __isset = other129.__isset; + return *this; +} +void TSummary::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TSummary("; + out << "summary=" << to_string(summary); + out << ", " << "config=" << to_string(config); + out << ", " << "filesContaining=" << to_string(filesContaining); + out << ", " << "filesExceeding=" << to_string(filesExceeding); + out << ", " << "filesLarge=" << to_string(filesLarge); + out << ")"; +} + + +TSummaries::~TSummaries() throw() { +} + + +void TSummaries::__set_finished(const bool val) { + this->finished = val; +} + +void TSummaries::__set_sessionId(const int64_t val) { + this->sessionId = val; +} + +void TSummaries::__set_totalFiles(const int64_t val) { + this->totalFiles = val; +} + +void TSummaries::__set_deletedFiles(const int64_t val) { + this->deletedFiles = val; +} + +void TSummaries::__set_summaries(const std::vector & val) { + this->summaries = val; +} +std::ostream& operator<<(std::ostream& out, const TSummaries& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TSummaries::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->finished); + this->__isset.finished = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->sessionId); + this->__isset.sessionId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->totalFiles); + this->__isset.totalFiles = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->deletedFiles); + this->__isset.deletedFiles = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->summaries.clear(); + uint32_t _size130; + ::apache::thrift::protocol::TType _etype133; + xfer += iprot->readListBegin(_etype133, _size130); + this->summaries.resize(_size130); + uint32_t _i134; + for (_i134 = 0; _i134 < _size130; ++_i134) + { + xfer += this->summaries[_i134].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.summaries = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TSummaries::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TSummaries"); + + xfer += oprot->writeFieldBegin("finished", ::apache::thrift::protocol::T_BOOL, 1); + xfer += oprot->writeBool(this->finished); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("sessionId", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->sessionId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("totalFiles", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->totalFiles); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("deletedFiles", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->deletedFiles); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("summaries", ::apache::thrift::protocol::T_LIST, 5); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->summaries.size())); + std::vector ::const_iterator _iter135; + for (_iter135 = this->summaries.begin(); _iter135 != this->summaries.end(); ++_iter135) + { + xfer += (*_iter135).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TSummaries &a, TSummaries &b) { + using ::std::swap; + swap(a.finished, b.finished); + swap(a.sessionId, b.sessionId); + swap(a.totalFiles, b.totalFiles); + swap(a.deletedFiles, b.deletedFiles); + swap(a.summaries, b.summaries); + swap(a.__isset, b.__isset); +} + +TSummaries::TSummaries(const TSummaries& other136) { + finished = other136.finished; + sessionId = other136.sessionId; + totalFiles = other136.totalFiles; + deletedFiles = other136.deletedFiles; + summaries = other136.summaries; + __isset = other136.__isset; +} +TSummaries& TSummaries::operator=(const TSummaries& other137) { + finished = other137.finished; + sessionId = other137.sessionId; + totalFiles = other137.totalFiles; + deletedFiles = other137.deletedFiles; + summaries = other137.summaries; + __isset = other137.__isset; + return *this; +} +void TSummaries::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TSummaries("; + out << "finished=" << to_string(finished); + out << ", " << "sessionId=" << to_string(sessionId); + out << ", " << "totalFiles=" << to_string(totalFiles); + out << ", " << "deletedFiles=" << to_string(deletedFiles); + out << ", " << "summaries=" << to_string(summaries); + out << ")"; +} + + +TRowRange::~TRowRange() throw() { +} + + +void TRowRange::__set_startRow(const std::string& val) { + this->startRow = val; +} + +void TRowRange::__set_endRow(const std::string& val) { + this->endRow = val; +} +std::ostream& operator<<(std::ostream& out, const TRowRange& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TRowRange::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->startRow); + this->__isset.startRow = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->endRow); + this->__isset.endRow = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TRowRange::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TRowRange"); + + xfer += oprot->writeFieldBegin("startRow", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->startRow); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("endRow", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->endRow); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TRowRange &a, TRowRange &b) { + using ::std::swap; + swap(a.startRow, b.startRow); + swap(a.endRow, b.endRow); + swap(a.__isset, b.__isset); +} + +TRowRange::TRowRange(const TRowRange& other138) { + startRow = other138.startRow; + endRow = other138.endRow; + __isset = other138.__isset; +} +TRowRange& TRowRange::operator=(const TRowRange& other139) { + startRow = other139.startRow; + endRow = other139.endRow; + __isset = other139.__isset; + return *this; +} +void TRowRange::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TRowRange("; + out << "startRow=" << to_string(startRow); + out << ", " << "endRow=" << to_string(endRow); + out << ")"; +} + + +TSummaryRequest::~TSummaryRequest() throw() { +} + + +void TSummaryRequest::__set_tableId(const std::string& val) { + this->tableId = val; +} + +void TSummaryRequest::__set_bounds(const TRowRange& val) { + this->bounds = val; +} + +void TSummaryRequest::__set_summarizers(const std::vector & val) { + this->summarizers = val; +} + +void TSummaryRequest::__set_summarizerPattern(const std::string& val) { + this->summarizerPattern = val; +} +std::ostream& operator<<(std::ostream& out, const TSummaryRequest& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TSummaryRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableId); + this->__isset.tableId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->bounds.read(iprot); + this->__isset.bounds = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->summarizers.clear(); + uint32_t _size140; + ::apache::thrift::protocol::TType _etype143; + xfer += iprot->readListBegin(_etype143, _size140); + this->summarizers.resize(_size140); + uint32_t _i144; + for (_i144 = 0; _i144 < _size140; ++_i144) + { + xfer += this->summarizers[_i144].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.summarizers = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->summarizerPattern); + this->__isset.summarizerPattern = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TSummaryRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TSummaryRequest"); + + xfer += oprot->writeFieldBegin("tableId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->tableId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("bounds", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->bounds.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("summarizers", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->summarizers.size())); + std::vector ::const_iterator _iter145; + for (_iter145 = this->summarizers.begin(); _iter145 != this->summarizers.end(); ++_iter145) + { + xfer += (*_iter145).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("summarizerPattern", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->summarizerPattern); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TSummaryRequest &a, TSummaryRequest &b) { + using ::std::swap; + swap(a.tableId, b.tableId); + swap(a.bounds, b.bounds); + swap(a.summarizers, b.summarizers); + swap(a.summarizerPattern, b.summarizerPattern); + swap(a.__isset, b.__isset); +} + +TSummaryRequest::TSummaryRequest(const TSummaryRequest& other146) { + tableId = other146.tableId; + bounds = other146.bounds; + summarizers = other146.summarizers; + summarizerPattern = other146.summarizerPattern; + __isset = other146.__isset; +} +TSummaryRequest& TSummaryRequest::operator=(const TSummaryRequest& other147) { + tableId = other147.tableId; + bounds = other147.bounds; + summarizers = other147.summarizers; + summarizerPattern = other147.summarizerPattern; + __isset = other147.__isset; + return *this; +} +void TSummaryRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TSummaryRequest("; + out << "tableId=" << to_string(tableId); + out << ", " << "bounds=" << to_string(bounds); + out << ", " << "summarizers=" << to_string(summarizers); + out << ", " << "summarizerPattern=" << to_string(summarizerPattern); + out << ")"; +} + +}}}}}} // namespace diff --git a/src/data/extern/thriftv2/gc_constants.cpp b/src/data/extern/thriftv2/gc_constants.cpp new file mode 100644 index 00000000..3d32ae3f --- /dev/null +++ b/src/data/extern/thriftv2/gc_constants.cpp @@ -0,0 +1,17 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "data/extern/thriftv2/gc_constants.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace gc { namespace thrift { + +const gcConstants g_gc_constants; + +gcConstants::gcConstants() { +} + +}}}}}} // namespace + diff --git a/src/data/extern/thriftv2/gc_types.cpp b/src/data/extern/thriftv2/gc_types.cpp new file mode 100644 index 00000000..07af1e5e --- /dev/null +++ b/src/data/extern/thriftv2/gc_types.cpp @@ -0,0 +1,360 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "data/extern/thriftv2/gc_types.h" + +#include +#include + +#include + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace gc { namespace thrift { + + +GcCycleStats::~GcCycleStats() throw() { +} + + +void GcCycleStats::__set_started(const int64_t val) { + this->started = val; +} + +void GcCycleStats::__set_finished(const int64_t val) { + this->finished = val; +} + +void GcCycleStats::__set_candidates(const int64_t val) { + this->candidates = val; +} + +void GcCycleStats::__set_inUse(const int64_t val) { + this->inUse = val; +} + +void GcCycleStats::__set_deleted(const int64_t val) { + this->deleted = val; +} + +void GcCycleStats::__set_errors(const int64_t val) { + this->errors = val; +} +std::ostream& operator<<(std::ostream& out, const GcCycleStats& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t GcCycleStats::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->started); + this->__isset.started = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->finished); + this->__isset.finished = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->candidates); + this->__isset.candidates = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->inUse); + this->__isset.inUse = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->deleted); + this->__isset.deleted = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->errors); + this->__isset.errors = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t GcCycleStats::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("GcCycleStats"); + + xfer += oprot->writeFieldBegin("started", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->started); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("finished", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->finished); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("candidates", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->candidates); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("inUse", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->inUse); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("deleted", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64(this->deleted); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("errors", ::apache::thrift::protocol::T_I64, 6); + xfer += oprot->writeI64(this->errors); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(GcCycleStats &a, GcCycleStats &b) { + using ::std::swap; + swap(a.started, b.started); + swap(a.finished, b.finished); + swap(a.candidates, b.candidates); + swap(a.inUse, b.inUse); + swap(a.deleted, b.deleted); + swap(a.errors, b.errors); + swap(a.__isset, b.__isset); +} + +GcCycleStats::GcCycleStats(const GcCycleStats& other0) { + started = other0.started; + finished = other0.finished; + candidates = other0.candidates; + inUse = other0.inUse; + deleted = other0.deleted; + errors = other0.errors; + __isset = other0.__isset; +} +GcCycleStats& GcCycleStats::operator=(const GcCycleStats& other1) { + started = other1.started; + finished = other1.finished; + candidates = other1.candidates; + inUse = other1.inUse; + deleted = other1.deleted; + errors = other1.errors; + __isset = other1.__isset; + return *this; +} +void GcCycleStats::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "GcCycleStats("; + out << "started=" << to_string(started); + out << ", " << "finished=" << to_string(finished); + out << ", " << "candidates=" << to_string(candidates); + out << ", " << "inUse=" << to_string(inUse); + out << ", " << "deleted=" << to_string(deleted); + out << ", " << "errors=" << to_string(errors); + out << ")"; +} + + +GCStatus::~GCStatus() throw() { +} + + +void GCStatus::__set_last(const GcCycleStats& val) { + this->last = val; +} + +void GCStatus::__set_lastLog(const GcCycleStats& val) { + this->lastLog = val; +} + +void GCStatus::__set_current(const GcCycleStats& val) { + this->current = val; +} + +void GCStatus::__set_currentLog(const GcCycleStats& val) { + this->currentLog = val; +} +std::ostream& operator<<(std::ostream& out, const GCStatus& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t GCStatus::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->last.read(iprot); + this->__isset.last = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->lastLog.read(iprot); + this->__isset.lastLog = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->current.read(iprot); + this->__isset.current = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->currentLog.read(iprot); + this->__isset.currentLog = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t GCStatus::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("GCStatus"); + + xfer += oprot->writeFieldBegin("last", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->last.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("lastLog", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->lastLog.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("current", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->current.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("currentLog", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->currentLog.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(GCStatus &a, GCStatus &b) { + using ::std::swap; + swap(a.last, b.last); + swap(a.lastLog, b.lastLog); + swap(a.current, b.current); + swap(a.currentLog, b.currentLog); + swap(a.__isset, b.__isset); +} + +GCStatus::GCStatus(const GCStatus& other2) { + last = other2.last; + lastLog = other2.lastLog; + current = other2.current; + currentLog = other2.currentLog; + __isset = other2.__isset; +} +GCStatus& GCStatus::operator=(const GCStatus& other3) { + last = other3.last; + lastLog = other3.lastLog; + current = other3.current; + currentLog = other3.currentLog; + __isset = other3.__isset; + return *this; +} +void GCStatus::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "GCStatus("; + out << "last=" << to_string(last); + out << ", " << "lastLog=" << to_string(lastLog); + out << ", " << "current=" << to_string(current); + out << ", " << "currentLog=" << to_string(currentLog); + out << ")"; +} + +}}}}}} // namespace diff --git a/src/data/extern/thriftv2/master_constants.cpp b/src/data/extern/thriftv2/master_constants.cpp new file mode 100644 index 00000000..240139b6 --- /dev/null +++ b/src/data/extern/thriftv2/master_constants.cpp @@ -0,0 +1,17 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "data/extern/thriftv2/master_constants.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace master { namespace thrift { + +const masterConstants g_master_constants; + +masterConstants::masterConstants() { +} + +}}}}}} // namespace + diff --git a/src/data/extern/thriftv2/master_types.cpp b/src/data/extern/thriftv2/master_types.cpp new file mode 100644 index 00000000..eb6a9637 --- /dev/null +++ b/src/data/extern/thriftv2/master_types.cpp @@ -0,0 +1,2074 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "data/extern/thriftv2/master_types.h" + +#include +#include + +#include + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace master { namespace thrift { + +int _kBulkImportStateValues[] = { + BulkImportState::INITIAL, + BulkImportState::MOVING, + BulkImportState::PROCESSING, + BulkImportState::ASSIGNING, + BulkImportState::LOADING, + BulkImportState::COPY_FILES, + BulkImportState::CLEANUP +}; +const char* _kBulkImportStateNames[] = { + "INITIAL", + "MOVING", + "PROCESSING", + "ASSIGNING", + "LOADING", + "COPY_FILES", + "CLEANUP" +}; +const std::map _BulkImportState_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(7, _kBulkImportStateValues, _kBulkImportStateNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +std::ostream& operator<<(std::ostream& out, const BulkImportState::type& val) { + std::map::const_iterator it = _BulkImportState_VALUES_TO_NAMES.find(val); + if (it != _BulkImportState_VALUES_TO_NAMES.end()) { + out << it->second; + } else { + out << static_cast(val); + } + return out; +} + +int _kMasterStateValues[] = { + MasterState::INITIAL, + MasterState::HAVE_LOCK, + MasterState::SAFE_MODE, + MasterState::NORMAL, + MasterState::UNLOAD_METADATA_TABLETS, + MasterState::UNLOAD_ROOT_TABLET, + MasterState::STOP +}; +const char* _kMasterStateNames[] = { + "INITIAL", + "HAVE_LOCK", + "SAFE_MODE", + "NORMAL", + "UNLOAD_METADATA_TABLETS", + "UNLOAD_ROOT_TABLET", + "STOP" +}; +const std::map _MasterState_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(7, _kMasterStateValues, _kMasterStateNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +std::ostream& operator<<(std::ostream& out, const MasterState::type& val) { + std::map::const_iterator it = _MasterState_VALUES_TO_NAMES.find(val); + if (it != _MasterState_VALUES_TO_NAMES.end()) { + out << it->second; + } else { + out << static_cast(val); + } + return out; +} + +int _kMasterGoalStateValues[] = { + MasterGoalState::CLEAN_STOP, + MasterGoalState::SAFE_MODE, + MasterGoalState::NORMAL +}; +const char* _kMasterGoalStateNames[] = { + "CLEAN_STOP", + "SAFE_MODE", + "NORMAL" +}; +const std::map _MasterGoalState_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kMasterGoalStateValues, _kMasterGoalStateNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +std::ostream& operator<<(std::ostream& out, const MasterGoalState::type& val) { + std::map::const_iterator it = _MasterGoalState_VALUES_TO_NAMES.find(val); + if (it != _MasterGoalState_VALUES_TO_NAMES.end()) { + out << it->second; + } else { + out << static_cast(val); + } + return out; +} + +int _kTabletLoadStateValues[] = { + TabletLoadState::LOADED, + TabletLoadState::LOAD_FAILURE, + TabletLoadState::UNLOADED, + TabletLoadState::UNLOAD_FAILURE_NOT_SERVING, + TabletLoadState::UNLOAD_ERROR, + TabletLoadState::CHOPPED +}; +const char* _kTabletLoadStateNames[] = { + "LOADED", + "LOAD_FAILURE", + "UNLOADED", + "UNLOAD_FAILURE_NOT_SERVING", + "UNLOAD_ERROR", + "CHOPPED" +}; +const std::map _TabletLoadState_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(6, _kTabletLoadStateValues, _kTabletLoadStateNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +std::ostream& operator<<(std::ostream& out, const TabletLoadState::type& val) { + std::map::const_iterator it = _TabletLoadState_VALUES_TO_NAMES.find(val); + if (it != _TabletLoadState_VALUES_TO_NAMES.end()) { + out << it->second; + } else { + out << static_cast(val); + } + return out; +} + +int _kFateOperationValues[] = { + FateOperation::TABLE_CREATE, + FateOperation::TABLE_CLONE, + FateOperation::TABLE_DELETE, + FateOperation::TABLE_RENAME, + FateOperation::TABLE_ONLINE, + FateOperation::TABLE_OFFLINE, + FateOperation::TABLE_MERGE, + FateOperation::TABLE_DELETE_RANGE, + FateOperation::TABLE_BULK_IMPORT, + FateOperation::TABLE_COMPACT, + FateOperation::TABLE_IMPORT, + FateOperation::TABLE_EXPORT, + FateOperation::TABLE_CANCEL_COMPACT, + FateOperation::NAMESPACE_CREATE, + FateOperation::NAMESPACE_DELETE, + FateOperation::NAMESPACE_RENAME, + FateOperation::TABLE_BULK_IMPORT2 +}; +const char* _kFateOperationNames[] = { + "TABLE_CREATE", + "TABLE_CLONE", + "TABLE_DELETE", + "TABLE_RENAME", + "TABLE_ONLINE", + "TABLE_OFFLINE", + "TABLE_MERGE", + "TABLE_DELETE_RANGE", + "TABLE_BULK_IMPORT", + "TABLE_COMPACT", + "TABLE_IMPORT", + "TABLE_EXPORT", + "TABLE_CANCEL_COMPACT", + "NAMESPACE_CREATE", + "NAMESPACE_DELETE", + "NAMESPACE_RENAME", + "TABLE_BULK_IMPORT2" +}; +const std::map _FateOperation_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(17, _kFateOperationValues, _kFateOperationNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +std::ostream& operator<<(std::ostream& out, const FateOperation::type& val) { + std::map::const_iterator it = _FateOperation_VALUES_TO_NAMES.find(val); + if (it != _FateOperation_VALUES_TO_NAMES.end()) { + out << it->second; + } else { + out << static_cast(val); + } + return out; +} + + +Compacting::~Compacting() throw() { +} + + +void Compacting::__set_running(const int32_t val) { + this->running = val; +} + +void Compacting::__set_queued(const int32_t val) { + this->queued = val; +} +std::ostream& operator<<(std::ostream& out, const Compacting& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t Compacting::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->running); + this->__isset.running = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->queued); + this->__isset.queued = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Compacting::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("Compacting"); + + xfer += oprot->writeFieldBegin("running", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32(this->running); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("queued", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->queued); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(Compacting &a, Compacting &b) { + using ::std::swap; + swap(a.running, b.running); + swap(a.queued, b.queued); + swap(a.__isset, b.__isset); +} + +Compacting::Compacting(const Compacting& other0) { + running = other0.running; + queued = other0.queued; + __isset = other0.__isset; +} +Compacting& Compacting::operator=(const Compacting& other1) { + running = other1.running; + queued = other1.queued; + __isset = other1.__isset; + return *this; +} +void Compacting::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "Compacting("; + out << "running=" << to_string(running); + out << ", " << "queued=" << to_string(queued); + out << ")"; +} + + +TableInfo::~TableInfo() throw() { +} + + +void TableInfo::__set_recs(const int64_t val) { + this->recs = val; +} + +void TableInfo::__set_recsInMemory(const int64_t val) { + this->recsInMemory = val; +} + +void TableInfo::__set_tablets(const int32_t val) { + this->tablets = val; +} + +void TableInfo::__set_onlineTablets(const int32_t val) { + this->onlineTablets = val; +} + +void TableInfo::__set_ingestRate(const double val) { + this->ingestRate = val; +} + +void TableInfo::__set_ingestByteRate(const double val) { + this->ingestByteRate = val; +} + +void TableInfo::__set_queryRate(const double val) { + this->queryRate = val; +} + +void TableInfo::__set_queryByteRate(const double val) { + this->queryByteRate = val; +} + +void TableInfo::__set_minors(const Compacting& val) { + this->minors = val; +} + +void TableInfo::__set_majors(const Compacting& val) { + this->majors = val; +} + +void TableInfo::__set_scans(const Compacting& val) { + this->scans = val; +} + +void TableInfo::__set_scanRate(const double val) { + this->scanRate = val; +} +std::ostream& operator<<(std::ostream& out, const TableInfo& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TableInfo::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->recs); + this->__isset.recs = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->recsInMemory); + this->__isset.recsInMemory = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->tablets); + this->__isset.tablets = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->onlineTablets); + this->__isset.onlineTablets = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->ingestRate); + this->__isset.ingestRate = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->ingestByteRate); + this->__isset.ingestByteRate = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->queryRate); + this->__isset.queryRate = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->queryByteRate); + this->__isset.queryByteRate = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 9: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->minors.read(iprot); + this->__isset.minors = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 10: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->majors.read(iprot); + this->__isset.majors = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 11: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->scans.read(iprot); + this->__isset.scans = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 12: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->scanRate); + this->__isset.scanRate = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TableInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TableInfo"); + + xfer += oprot->writeFieldBegin("recs", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->recs); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("recsInMemory", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->recsInMemory); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tablets", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->tablets); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("onlineTablets", ::apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeI32(this->onlineTablets); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ingestRate", ::apache::thrift::protocol::T_DOUBLE, 5); + xfer += oprot->writeDouble(this->ingestRate); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ingestByteRate", ::apache::thrift::protocol::T_DOUBLE, 6); + xfer += oprot->writeDouble(this->ingestByteRate); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("queryRate", ::apache::thrift::protocol::T_DOUBLE, 7); + xfer += oprot->writeDouble(this->queryRate); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("queryByteRate", ::apache::thrift::protocol::T_DOUBLE, 8); + xfer += oprot->writeDouble(this->queryByteRate); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("minors", ::apache::thrift::protocol::T_STRUCT, 9); + xfer += this->minors.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("majors", ::apache::thrift::protocol::T_STRUCT, 10); + xfer += this->majors.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("scans", ::apache::thrift::protocol::T_STRUCT, 11); + xfer += this->scans.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("scanRate", ::apache::thrift::protocol::T_DOUBLE, 12); + xfer += oprot->writeDouble(this->scanRate); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TableInfo &a, TableInfo &b) { + using ::std::swap; + swap(a.recs, b.recs); + swap(a.recsInMemory, b.recsInMemory); + swap(a.tablets, b.tablets); + swap(a.onlineTablets, b.onlineTablets); + swap(a.ingestRate, b.ingestRate); + swap(a.ingestByteRate, b.ingestByteRate); + swap(a.queryRate, b.queryRate); + swap(a.queryByteRate, b.queryByteRate); + swap(a.minors, b.minors); + swap(a.majors, b.majors); + swap(a.scans, b.scans); + swap(a.scanRate, b.scanRate); + swap(a.__isset, b.__isset); +} + +TableInfo::TableInfo(const TableInfo& other2) { + recs = other2.recs; + recsInMemory = other2.recsInMemory; + tablets = other2.tablets; + onlineTablets = other2.onlineTablets; + ingestRate = other2.ingestRate; + ingestByteRate = other2.ingestByteRate; + queryRate = other2.queryRate; + queryByteRate = other2.queryByteRate; + minors = other2.minors; + majors = other2.majors; + scans = other2.scans; + scanRate = other2.scanRate; + __isset = other2.__isset; +} +TableInfo& TableInfo::operator=(const TableInfo& other3) { + recs = other3.recs; + recsInMemory = other3.recsInMemory; + tablets = other3.tablets; + onlineTablets = other3.onlineTablets; + ingestRate = other3.ingestRate; + ingestByteRate = other3.ingestByteRate; + queryRate = other3.queryRate; + queryByteRate = other3.queryByteRate; + minors = other3.minors; + majors = other3.majors; + scans = other3.scans; + scanRate = other3.scanRate; + __isset = other3.__isset; + return *this; +} +void TableInfo::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TableInfo("; + out << "recs=" << to_string(recs); + out << ", " << "recsInMemory=" << to_string(recsInMemory); + out << ", " << "tablets=" << to_string(tablets); + out << ", " << "onlineTablets=" << to_string(onlineTablets); + out << ", " << "ingestRate=" << to_string(ingestRate); + out << ", " << "ingestByteRate=" << to_string(ingestByteRate); + out << ", " << "queryRate=" << to_string(queryRate); + out << ", " << "queryByteRate=" << to_string(queryByteRate); + out << ", " << "minors=" << to_string(minors); + out << ", " << "majors=" << to_string(majors); + out << ", " << "scans=" << to_string(scans); + out << ", " << "scanRate=" << to_string(scanRate); + out << ")"; +} + + +RecoveryStatus::~RecoveryStatus() throw() { +} + + +void RecoveryStatus::__set_name(const std::string& val) { + this->name = val; +} + +void RecoveryStatus::__set_runtime(const int32_t val) { + this->runtime = val; +} + +void RecoveryStatus::__set_progress(const double val) { + this->progress = val; +} +std::ostream& operator<<(std::ostream& out, const RecoveryStatus& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t RecoveryStatus::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->runtime); + this->__isset.runtime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->progress); + this->__isset.progress = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t RecoveryStatus::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("RecoveryStatus"); + + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("runtime", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32(this->runtime); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("progress", ::apache::thrift::protocol::T_DOUBLE, 6); + xfer += oprot->writeDouble(this->progress); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(RecoveryStatus &a, RecoveryStatus &b) { + using ::std::swap; + swap(a.name, b.name); + swap(a.runtime, b.runtime); + swap(a.progress, b.progress); + swap(a.__isset, b.__isset); +} + +RecoveryStatus::RecoveryStatus(const RecoveryStatus& other4) { + name = other4.name; + runtime = other4.runtime; + progress = other4.progress; + __isset = other4.__isset; +} +RecoveryStatus& RecoveryStatus::operator=(const RecoveryStatus& other5) { + name = other5.name; + runtime = other5.runtime; + progress = other5.progress; + __isset = other5.__isset; + return *this; +} +void RecoveryStatus::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "RecoveryStatus("; + out << "name=" << to_string(name); + out << ", " << "runtime=" << to_string(runtime); + out << ", " << "progress=" << to_string(progress); + out << ")"; +} + + +BulkImportStatus::~BulkImportStatus() throw() { +} + + +void BulkImportStatus::__set_startTime(const int64_t val) { + this->startTime = val; +} + +void BulkImportStatus::__set_filename(const std::string& val) { + this->filename = val; +} + +void BulkImportStatus::__set_state(const BulkImportState::type val) { + this->state = val; +} +std::ostream& operator<<(std::ostream& out, const BulkImportStatus& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t BulkImportStatus::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->startTime); + this->__isset.startTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->filename); + this->__isset.filename = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast6; + xfer += iprot->readI32(ecast6); + this->state = (BulkImportState::type)ecast6; + this->__isset.state = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t BulkImportStatus::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("BulkImportStatus"); + + xfer += oprot->writeFieldBegin("startTime", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->startTime); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("filename", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->filename); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)this->state); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(BulkImportStatus &a, BulkImportStatus &b) { + using ::std::swap; + swap(a.startTime, b.startTime); + swap(a.filename, b.filename); + swap(a.state, b.state); + swap(a.__isset, b.__isset); +} + +BulkImportStatus::BulkImportStatus(const BulkImportStatus& other7) { + startTime = other7.startTime; + filename = other7.filename; + state = other7.state; + __isset = other7.__isset; +} +BulkImportStatus& BulkImportStatus::operator=(const BulkImportStatus& other8) { + startTime = other8.startTime; + filename = other8.filename; + state = other8.state; + __isset = other8.__isset; + return *this; +} +void BulkImportStatus::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "BulkImportStatus("; + out << "startTime=" << to_string(startTime); + out << ", " << "filename=" << to_string(filename); + out << ", " << "state=" << to_string(state); + out << ")"; +} + + +TabletServerStatus::~TabletServerStatus() throw() { +} + + +void TabletServerStatus::__set_tableMap(const std::map & val) { + this->tableMap = val; +} + +void TabletServerStatus::__set_lastContact(const int64_t val) { + this->lastContact = val; +} + +void TabletServerStatus::__set_name(const std::string& val) { + this->name = val; +} + +void TabletServerStatus::__set_osLoad(const double val) { + this->osLoad = val; +} + +void TabletServerStatus::__set_holdTime(const int64_t val) { + this->holdTime = val; +} + +void TabletServerStatus::__set_lookups(const int64_t val) { + this->lookups = val; +} + +void TabletServerStatus::__set_indexCacheHits(const int64_t val) { + this->indexCacheHits = val; +} + +void TabletServerStatus::__set_indexCacheRequest(const int64_t val) { + this->indexCacheRequest = val; +} + +void TabletServerStatus::__set_dataCacheHits(const int64_t val) { + this->dataCacheHits = val; +} + +void TabletServerStatus::__set_dataCacheRequest(const int64_t val) { + this->dataCacheRequest = val; +} + +void TabletServerStatus::__set_logSorts(const std::vector & val) { + this->logSorts = val; +} + +void TabletServerStatus::__set_flushs(const int64_t val) { + this->flushs = val; +} + +void TabletServerStatus::__set_syncs(const int64_t val) { + this->syncs = val; +} + +void TabletServerStatus::__set_bulkImports(const std::vector & val) { + this->bulkImports = val; +} + +void TabletServerStatus::__set_version(const std::string& val) { + this->version = val; +} + +void TabletServerStatus::__set_responseTime(const int64_t val) { + this->responseTime = val; +} +std::ostream& operator<<(std::ostream& out, const TabletServerStatus& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TabletServerStatus::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->tableMap.clear(); + uint32_t _size9; + ::apache::thrift::protocol::TType _ktype10; + ::apache::thrift::protocol::TType _vtype11; + xfer += iprot->readMapBegin(_ktype10, _vtype11, _size9); + uint32_t _i13; + for (_i13 = 0; _i13 < _size9; ++_i13) + { + std::string _key14; + xfer += iprot->readString(_key14); + TableInfo& _val15 = this->tableMap[_key14]; + xfer += _val15.read(iprot); + } + xfer += iprot->readMapEnd(); + } + this->__isset.tableMap = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->lastContact); + this->__isset.lastContact = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->osLoad); + this->__isset.osLoad = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->holdTime); + this->__isset.holdTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->lookups); + this->__isset.lookups = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 10: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->indexCacheHits); + this->__isset.indexCacheHits = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 11: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->indexCacheRequest); + this->__isset.indexCacheRequest = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 12: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->dataCacheHits); + this->__isset.dataCacheHits = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 13: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->dataCacheRequest); + this->__isset.dataCacheRequest = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 14: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->logSorts.clear(); + uint32_t _size16; + ::apache::thrift::protocol::TType _etype19; + xfer += iprot->readListBegin(_etype19, _size16); + this->logSorts.resize(_size16); + uint32_t _i20; + for (_i20 = 0; _i20 < _size16; ++_i20) + { + xfer += this->logSorts[_i20].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.logSorts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 15: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->flushs); + this->__isset.flushs = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 16: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->syncs); + this->__isset.syncs = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 17: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->bulkImports.clear(); + uint32_t _size21; + ::apache::thrift::protocol::TType _etype24; + xfer += iprot->readListBegin(_etype24, _size21); + this->bulkImports.resize(_size21); + uint32_t _i25; + for (_i25 = 0; _i25 < _size21; ++_i25) + { + xfer += this->bulkImports[_i25].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.bulkImports = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 19: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->version); + this->__isset.version = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 18: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->responseTime); + this->__isset.responseTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletServerStatus::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletServerStatus"); + + xfer += oprot->writeFieldBegin("tableMap", ::apache::thrift::protocol::T_MAP, 1); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRUCT, static_cast(this->tableMap.size())); + std::map ::const_iterator _iter26; + for (_iter26 = this->tableMap.begin(); _iter26 != this->tableMap.end(); ++_iter26) + { + xfer += oprot->writeString(_iter26->first); + xfer += _iter26->second.write(oprot); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("lastContact", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->lastContact); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("osLoad", ::apache::thrift::protocol::T_DOUBLE, 5); + xfer += oprot->writeDouble(this->osLoad); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("holdTime", ::apache::thrift::protocol::T_I64, 7); + xfer += oprot->writeI64(this->holdTime); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("lookups", ::apache::thrift::protocol::T_I64, 8); + xfer += oprot->writeI64(this->lookups); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("indexCacheHits", ::apache::thrift::protocol::T_I64, 10); + xfer += oprot->writeI64(this->indexCacheHits); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("indexCacheRequest", ::apache::thrift::protocol::T_I64, 11); + xfer += oprot->writeI64(this->indexCacheRequest); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("dataCacheHits", ::apache::thrift::protocol::T_I64, 12); + xfer += oprot->writeI64(this->dataCacheHits); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("dataCacheRequest", ::apache::thrift::protocol::T_I64, 13); + xfer += oprot->writeI64(this->dataCacheRequest); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("logSorts", ::apache::thrift::protocol::T_LIST, 14); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->logSorts.size())); + std::vector ::const_iterator _iter27; + for (_iter27 = this->logSorts.begin(); _iter27 != this->logSorts.end(); ++_iter27) + { + xfer += (*_iter27).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("flushs", ::apache::thrift::protocol::T_I64, 15); + xfer += oprot->writeI64(this->flushs); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("syncs", ::apache::thrift::protocol::T_I64, 16); + xfer += oprot->writeI64(this->syncs); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("bulkImports", ::apache::thrift::protocol::T_LIST, 17); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->bulkImports.size())); + std::vector ::const_iterator _iter28; + for (_iter28 = this->bulkImports.begin(); _iter28 != this->bulkImports.end(); ++_iter28) + { + xfer += (*_iter28).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("responseTime", ::apache::thrift::protocol::T_I64, 18); + xfer += oprot->writeI64(this->responseTime); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("version", ::apache::thrift::protocol::T_STRING, 19); + xfer += oprot->writeString(this->version); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TabletServerStatus &a, TabletServerStatus &b) { + using ::std::swap; + swap(a.tableMap, b.tableMap); + swap(a.lastContact, b.lastContact); + swap(a.name, b.name); + swap(a.osLoad, b.osLoad); + swap(a.holdTime, b.holdTime); + swap(a.lookups, b.lookups); + swap(a.indexCacheHits, b.indexCacheHits); + swap(a.indexCacheRequest, b.indexCacheRequest); + swap(a.dataCacheHits, b.dataCacheHits); + swap(a.dataCacheRequest, b.dataCacheRequest); + swap(a.logSorts, b.logSorts); + swap(a.flushs, b.flushs); + swap(a.syncs, b.syncs); + swap(a.bulkImports, b.bulkImports); + swap(a.version, b.version); + swap(a.responseTime, b.responseTime); + swap(a.__isset, b.__isset); +} + +TabletServerStatus::TabletServerStatus(const TabletServerStatus& other29) { + tableMap = other29.tableMap; + lastContact = other29.lastContact; + name = other29.name; + osLoad = other29.osLoad; + holdTime = other29.holdTime; + lookups = other29.lookups; + indexCacheHits = other29.indexCacheHits; + indexCacheRequest = other29.indexCacheRequest; + dataCacheHits = other29.dataCacheHits; + dataCacheRequest = other29.dataCacheRequest; + logSorts = other29.logSorts; + flushs = other29.flushs; + syncs = other29.syncs; + bulkImports = other29.bulkImports; + version = other29.version; + responseTime = other29.responseTime; + __isset = other29.__isset; +} +TabletServerStatus& TabletServerStatus::operator=(const TabletServerStatus& other30) { + tableMap = other30.tableMap; + lastContact = other30.lastContact; + name = other30.name; + osLoad = other30.osLoad; + holdTime = other30.holdTime; + lookups = other30.lookups; + indexCacheHits = other30.indexCacheHits; + indexCacheRequest = other30.indexCacheRequest; + dataCacheHits = other30.dataCacheHits; + dataCacheRequest = other30.dataCacheRequest; + logSorts = other30.logSorts; + flushs = other30.flushs; + syncs = other30.syncs; + bulkImports = other30.bulkImports; + version = other30.version; + responseTime = other30.responseTime; + __isset = other30.__isset; + return *this; +} +void TabletServerStatus::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TabletServerStatus("; + out << "tableMap=" << to_string(tableMap); + out << ", " << "lastContact=" << to_string(lastContact); + out << ", " << "name=" << to_string(name); + out << ", " << "osLoad=" << to_string(osLoad); + out << ", " << "holdTime=" << to_string(holdTime); + out << ", " << "lookups=" << to_string(lookups); + out << ", " << "indexCacheHits=" << to_string(indexCacheHits); + out << ", " << "indexCacheRequest=" << to_string(indexCacheRequest); + out << ", " << "dataCacheHits=" << to_string(dataCacheHits); + out << ", " << "dataCacheRequest=" << to_string(dataCacheRequest); + out << ", " << "logSorts=" << to_string(logSorts); + out << ", " << "flushs=" << to_string(flushs); + out << ", " << "syncs=" << to_string(syncs); + out << ", " << "bulkImports=" << to_string(bulkImports); + out << ", " << "version=" << to_string(version); + out << ", " << "responseTime=" << to_string(responseTime); + out << ")"; +} + + +DeadServer::~DeadServer() throw() { +} + + +void DeadServer::__set_server(const std::string& val) { + this->server = val; +} + +void DeadServer::__set_lastStatus(const int64_t val) { + this->lastStatus = val; +} + +void DeadServer::__set_status(const std::string& val) { + this->status = val; +} +std::ostream& operator<<(std::ostream& out, const DeadServer& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t DeadServer::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->server); + this->__isset.server = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->lastStatus); + this->__isset.lastStatus = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->status); + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t DeadServer::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("DeadServer"); + + xfer += oprot->writeFieldBegin("server", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->server); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("lastStatus", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->lastStatus); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->status); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(DeadServer &a, DeadServer &b) { + using ::std::swap; + swap(a.server, b.server); + swap(a.lastStatus, b.lastStatus); + swap(a.status, b.status); + swap(a.__isset, b.__isset); +} + +DeadServer::DeadServer(const DeadServer& other31) { + server = other31.server; + lastStatus = other31.lastStatus; + status = other31.status; + __isset = other31.__isset; +} +DeadServer& DeadServer::operator=(const DeadServer& other32) { + server = other32.server; + lastStatus = other32.lastStatus; + status = other32.status; + __isset = other32.__isset; + return *this; +} +void DeadServer::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "DeadServer("; + out << "server=" << to_string(server); + out << ", " << "lastStatus=" << to_string(lastStatus); + out << ", " << "status=" << to_string(status); + out << ")"; +} + + +MasterMonitorInfo::~MasterMonitorInfo() throw() { +} + + +void MasterMonitorInfo::__set_tableMap(const std::map & val) { + this->tableMap = val; +} + +void MasterMonitorInfo::__set_tServerInfo(const std::vector & val) { + this->tServerInfo = val; +} + +void MasterMonitorInfo::__set_badTServers(const std::map & val) { + this->badTServers = val; +} + +void MasterMonitorInfo::__set_state(const MasterState::type val) { + this->state = val; +} + +void MasterMonitorInfo::__set_goalState(const MasterGoalState::type val) { + this->goalState = val; +} + +void MasterMonitorInfo::__set_unassignedTablets(const int32_t val) { + this->unassignedTablets = val; +} + +void MasterMonitorInfo::__set_serversShuttingDown(const std::set & val) { + this->serversShuttingDown = val; +} + +void MasterMonitorInfo::__set_deadTabletServers(const std::vector & val) { + this->deadTabletServers = val; +} + +void MasterMonitorInfo::__set_bulkImports(const std::vector & val) { + this->bulkImports = val; +} +std::ostream& operator<<(std::ostream& out, const MasterMonitorInfo& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t MasterMonitorInfo::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->tableMap.clear(); + uint32_t _size33; + ::apache::thrift::protocol::TType _ktype34; + ::apache::thrift::protocol::TType _vtype35; + xfer += iprot->readMapBegin(_ktype34, _vtype35, _size33); + uint32_t _i37; + for (_i37 = 0; _i37 < _size33; ++_i37) + { + std::string _key38; + xfer += iprot->readString(_key38); + TableInfo& _val39 = this->tableMap[_key38]; + xfer += _val39.read(iprot); + } + xfer += iprot->readMapEnd(); + } + this->__isset.tableMap = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->tServerInfo.clear(); + uint32_t _size40; + ::apache::thrift::protocol::TType _etype43; + xfer += iprot->readListBegin(_etype43, _size40); + this->tServerInfo.resize(_size40); + uint32_t _i44; + for (_i44 = 0; _i44 < _size40; ++_i44) + { + xfer += this->tServerInfo[_i44].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.tServerInfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->badTServers.clear(); + uint32_t _size45; + ::apache::thrift::protocol::TType _ktype46; + ::apache::thrift::protocol::TType _vtype47; + xfer += iprot->readMapBegin(_ktype46, _vtype47, _size45); + uint32_t _i49; + for (_i49 = 0; _i49 < _size45; ++_i49) + { + std::string _key50; + xfer += iprot->readString(_key50); + int8_t& _val51 = this->badTServers[_key50]; + xfer += iprot->readByte(_val51); + } + xfer += iprot->readMapEnd(); + } + this->__isset.badTServers = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast52; + xfer += iprot->readI32(ecast52); + this->state = (MasterState::type)ecast52; + this->__isset.state = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast53; + xfer += iprot->readI32(ecast53); + this->goalState = (MasterGoalState::type)ecast53; + this->__isset.goalState = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->unassignedTablets); + this->__isset.unassignedTablets = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 9: + if (ftype == ::apache::thrift::protocol::T_SET) { + { + this->serversShuttingDown.clear(); + uint32_t _size54; + ::apache::thrift::protocol::TType _etype57; + xfer += iprot->readSetBegin(_etype57, _size54); + uint32_t _i58; + for (_i58 = 0; _i58 < _size54; ++_i58) + { + std::string _elem59; + xfer += iprot->readString(_elem59); + this->serversShuttingDown.insert(_elem59); + } + xfer += iprot->readSetEnd(); + } + this->__isset.serversShuttingDown = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 10: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->deadTabletServers.clear(); + uint32_t _size60; + ::apache::thrift::protocol::TType _etype63; + xfer += iprot->readListBegin(_etype63, _size60); + this->deadTabletServers.resize(_size60); + uint32_t _i64; + for (_i64 = 0; _i64 < _size60; ++_i64) + { + xfer += this->deadTabletServers[_i64].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.deadTabletServers = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 11: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->bulkImports.clear(); + uint32_t _size65; + ::apache::thrift::protocol::TType _etype68; + xfer += iprot->readListBegin(_etype68, _size65); + this->bulkImports.resize(_size65); + uint32_t _i69; + for (_i69 = 0; _i69 < _size65; ++_i69) + { + xfer += this->bulkImports[_i69].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.bulkImports = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MasterMonitorInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MasterMonitorInfo"); + + xfer += oprot->writeFieldBegin("tableMap", ::apache::thrift::protocol::T_MAP, 1); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRUCT, static_cast(this->tableMap.size())); + std::map ::const_iterator _iter70; + for (_iter70 = this->tableMap.begin(); _iter70 != this->tableMap.end(); ++_iter70) + { + xfer += oprot->writeString(_iter70->first); + xfer += _iter70->second.write(oprot); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tServerInfo", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->tServerInfo.size())); + std::vector ::const_iterator _iter71; + for (_iter71 = this->tServerInfo.begin(); _iter71 != this->tServerInfo.end(); ++_iter71) + { + xfer += (*_iter71).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("badTServers", ::apache::thrift::protocol::T_MAP, 3); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_BYTE, static_cast(this->badTServers.size())); + std::map ::const_iterator _iter72; + for (_iter72 = this->badTServers.begin(); _iter72 != this->badTServers.end(); ++_iter72) + { + xfer += oprot->writeString(_iter72->first); + xfer += oprot->writeByte(_iter72->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_I32, 6); + xfer += oprot->writeI32((int32_t)this->state); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("unassignedTablets", ::apache::thrift::protocol::T_I32, 7); + xfer += oprot->writeI32(this->unassignedTablets); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("goalState", ::apache::thrift::protocol::T_I32, 8); + xfer += oprot->writeI32((int32_t)this->goalState); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("serversShuttingDown", ::apache::thrift::protocol::T_SET, 9); + { + xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_STRING, static_cast(this->serversShuttingDown.size())); + std::set ::const_iterator _iter73; + for (_iter73 = this->serversShuttingDown.begin(); _iter73 != this->serversShuttingDown.end(); ++_iter73) + { + xfer += oprot->writeString((*_iter73)); + } + xfer += oprot->writeSetEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("deadTabletServers", ::apache::thrift::protocol::T_LIST, 10); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->deadTabletServers.size())); + std::vector ::const_iterator _iter74; + for (_iter74 = this->deadTabletServers.begin(); _iter74 != this->deadTabletServers.end(); ++_iter74) + { + xfer += (*_iter74).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("bulkImports", ::apache::thrift::protocol::T_LIST, 11); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->bulkImports.size())); + std::vector ::const_iterator _iter75; + for (_iter75 = this->bulkImports.begin(); _iter75 != this->bulkImports.end(); ++_iter75) + { + xfer += (*_iter75).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(MasterMonitorInfo &a, MasterMonitorInfo &b) { + using ::std::swap; + swap(a.tableMap, b.tableMap); + swap(a.tServerInfo, b.tServerInfo); + swap(a.badTServers, b.badTServers); + swap(a.state, b.state); + swap(a.goalState, b.goalState); + swap(a.unassignedTablets, b.unassignedTablets); + swap(a.serversShuttingDown, b.serversShuttingDown); + swap(a.deadTabletServers, b.deadTabletServers); + swap(a.bulkImports, b.bulkImports); + swap(a.__isset, b.__isset); +} + +MasterMonitorInfo::MasterMonitorInfo(const MasterMonitorInfo& other76) { + tableMap = other76.tableMap; + tServerInfo = other76.tServerInfo; + badTServers = other76.badTServers; + state = other76.state; + goalState = other76.goalState; + unassignedTablets = other76.unassignedTablets; + serversShuttingDown = other76.serversShuttingDown; + deadTabletServers = other76.deadTabletServers; + bulkImports = other76.bulkImports; + __isset = other76.__isset; +} +MasterMonitorInfo& MasterMonitorInfo::operator=(const MasterMonitorInfo& other77) { + tableMap = other77.tableMap; + tServerInfo = other77.tServerInfo; + badTServers = other77.badTServers; + state = other77.state; + goalState = other77.goalState; + unassignedTablets = other77.unassignedTablets; + serversShuttingDown = other77.serversShuttingDown; + deadTabletServers = other77.deadTabletServers; + bulkImports = other77.bulkImports; + __isset = other77.__isset; + return *this; +} +void MasterMonitorInfo::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "MasterMonitorInfo("; + out << "tableMap=" << to_string(tableMap); + out << ", " << "tServerInfo=" << to_string(tServerInfo); + out << ", " << "badTServers=" << to_string(badTServers); + out << ", " << "state=" << to_string(state); + out << ", " << "goalState=" << to_string(goalState); + out << ", " << "unassignedTablets=" << to_string(unassignedTablets); + out << ", " << "serversShuttingDown=" << to_string(serversShuttingDown); + out << ", " << "deadTabletServers=" << to_string(deadTabletServers); + out << ", " << "bulkImports=" << to_string(bulkImports); + out << ")"; +} + + +TabletSplit::~TabletSplit() throw() { +} + + +void TabletSplit::__set_oldTablet(const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& val) { + this->oldTablet = val; +} + +void TabletSplit::__set_newTablets(const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent> & val) { + this->newTablets = val; +} +std::ostream& operator<<(std::ostream& out, const TabletSplit& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TabletSplit::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->oldTablet.read(iprot); + this->__isset.oldTablet = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->newTablets.clear(); + uint32_t _size78; + ::apache::thrift::protocol::TType _etype81; + xfer += iprot->readListBegin(_etype81, _size78); + this->newTablets.resize(_size78); + uint32_t _i82; + for (_i82 = 0; _i82 < _size78; ++_i82) + { + xfer += this->newTablets[_i82].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.newTablets = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletSplit::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletSplit"); + + xfer += oprot->writeFieldBegin("oldTablet", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->oldTablet.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("newTablets", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->newTablets.size())); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent> ::const_iterator _iter83; + for (_iter83 = this->newTablets.begin(); _iter83 != this->newTablets.end(); ++_iter83) + { + xfer += (*_iter83).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TabletSplit &a, TabletSplit &b) { + using ::std::swap; + swap(a.oldTablet, b.oldTablet); + swap(a.newTablets, b.newTablets); + swap(a.__isset, b.__isset); +} + +TabletSplit::TabletSplit(const TabletSplit& other84) { + oldTablet = other84.oldTablet; + newTablets = other84.newTablets; + __isset = other84.__isset; +} +TabletSplit& TabletSplit::operator=(const TabletSplit& other85) { + oldTablet = other85.oldTablet; + newTablets = other85.newTablets; + __isset = other85.__isset; + return *this; +} +void TabletSplit::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TabletSplit("; + out << "oldTablet=" << to_string(oldTablet); + out << ", " << "newTablets=" << to_string(newTablets); + out << ")"; +} + + +RecoveryException::~RecoveryException() throw() { +} + + +void RecoveryException::__set_why(const std::string& val) { + this->why = val; +} +std::ostream& operator<<(std::ostream& out, const RecoveryException& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t RecoveryException::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->why); + this->__isset.why = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t RecoveryException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("RecoveryException"); + + xfer += oprot->writeFieldBegin("why", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->why); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(RecoveryException &a, RecoveryException &b) { + using ::std::swap; + swap(a.why, b.why); + swap(a.__isset, b.__isset); +} + +RecoveryException::RecoveryException(const RecoveryException& other86) : TException() { + why = other86.why; + __isset = other86.__isset; +} +RecoveryException& RecoveryException::operator=(const RecoveryException& other87) { + why = other87.why; + __isset = other87.__isset; + return *this; +} +void RecoveryException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "RecoveryException("; + out << "why=" << to_string(why); + out << ")"; +} + +const char* RecoveryException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: RecoveryException"; + } +} + +}}}}}} // namespace diff --git a/src/data/extern/thriftv2/replication_constants.cpp b/src/data/extern/thriftv2/replication_constants.cpp new file mode 100644 index 00000000..8f59cda5 --- /dev/null +++ b/src/data/extern/thriftv2/replication_constants.cpp @@ -0,0 +1,17 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "data/extern/thriftv2/replication_constants.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace replication { namespace thrift { + +const replicationConstants g_replication_constants; + +replicationConstants::replicationConstants() { +} + +}}}}}} // namespace + diff --git a/src/data/extern/thriftv2/replication_types.cpp b/src/data/extern/thriftv2/replication_types.cpp new file mode 100644 index 00000000..b592ac05 --- /dev/null +++ b/src/data/extern/thriftv2/replication_types.cpp @@ -0,0 +1,538 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "data/extern/thriftv2/replication_types.h" + +#include +#include + +#include + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace replication { namespace thrift { + +int _kRemoteReplicationErrorCodeValues[] = { + RemoteReplicationErrorCode::COULD_NOT_DESERIALIZE, + RemoteReplicationErrorCode::COULD_NOT_APPLY, + RemoteReplicationErrorCode::TABLE_DOES_NOT_EXIST, + RemoteReplicationErrorCode::CANNOT_AUTHENTICATE, + RemoteReplicationErrorCode::CANNOT_INSTANTIATE_REPLAYER +}; +const char* _kRemoteReplicationErrorCodeNames[] = { + "COULD_NOT_DESERIALIZE", + "COULD_NOT_APPLY", + "TABLE_DOES_NOT_EXIST", + "CANNOT_AUTHENTICATE", + "CANNOT_INSTANTIATE_REPLAYER" +}; +const std::map _RemoteReplicationErrorCode_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kRemoteReplicationErrorCodeValues, _kRemoteReplicationErrorCodeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +std::ostream& operator<<(std::ostream& out, const RemoteReplicationErrorCode::type& val) { + std::map::const_iterator it = _RemoteReplicationErrorCode_VALUES_TO_NAMES.find(val); + if (it != _RemoteReplicationErrorCode_VALUES_TO_NAMES.end()) { + out << it->second; + } else { + out << static_cast(val); + } + return out; +} + +int _kReplicationCoordinatorErrorCodeValues[] = { + ReplicationCoordinatorErrorCode::NO_AVAILABLE_SERVERS, + ReplicationCoordinatorErrorCode::SERVICE_CONFIGURATION_UNAVAILABLE, + ReplicationCoordinatorErrorCode::CANNOT_AUTHENTICATE +}; +const char* _kReplicationCoordinatorErrorCodeNames[] = { + "NO_AVAILABLE_SERVERS", + "SERVICE_CONFIGURATION_UNAVAILABLE", + "CANNOT_AUTHENTICATE" +}; +const std::map _ReplicationCoordinatorErrorCode_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kReplicationCoordinatorErrorCodeValues, _kReplicationCoordinatorErrorCodeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +std::ostream& operator<<(std::ostream& out, const ReplicationCoordinatorErrorCode::type& val) { + std::map::const_iterator it = _ReplicationCoordinatorErrorCode_VALUES_TO_NAMES.find(val); + if (it != _ReplicationCoordinatorErrorCode_VALUES_TO_NAMES.end()) { + out << it->second; + } else { + out << static_cast(val); + } + return out; +} + + +WalEdits::~WalEdits() throw() { +} + + +void WalEdits::__set_edits(const std::vector & val) { + this->edits = val; +} +std::ostream& operator<<(std::ostream& out, const WalEdits& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t WalEdits::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->edits.clear(); + uint32_t _size0; + ::apache::thrift::protocol::TType _etype3; + xfer += iprot->readListBegin(_etype3, _size0); + this->edits.resize(_size0); + uint32_t _i4; + for (_i4 = 0; _i4 < _size0; ++_i4) + { + xfer += iprot->readBinary(this->edits[_i4]); + } + xfer += iprot->readListEnd(); + } + this->__isset.edits = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t WalEdits::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("WalEdits"); + + xfer += oprot->writeFieldBegin("edits", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->edits.size())); + std::vector ::const_iterator _iter5; + for (_iter5 = this->edits.begin(); _iter5 != this->edits.end(); ++_iter5) + { + xfer += oprot->writeBinary((*_iter5)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(WalEdits &a, WalEdits &b) { + using ::std::swap; + swap(a.edits, b.edits); + swap(a.__isset, b.__isset); +} + +WalEdits::WalEdits(const WalEdits& other6) { + edits = other6.edits; + __isset = other6.__isset; +} +WalEdits& WalEdits::operator=(const WalEdits& other7) { + edits = other7.edits; + __isset = other7.__isset; + return *this; +} +void WalEdits::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "WalEdits("; + out << "edits=" << to_string(edits); + out << ")"; +} + + +KeyValues::~KeyValues() throw() { +} + + +void KeyValues::__set_keyValues(const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyValue> & val) { + this->keyValues = val; +} +std::ostream& operator<<(std::ostream& out, const KeyValues& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t KeyValues::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->keyValues.clear(); + uint32_t _size8; + ::apache::thrift::protocol::TType _etype11; + xfer += iprot->readListBegin(_etype11, _size8); + this->keyValues.resize(_size8); + uint32_t _i12; + for (_i12 = 0; _i12 < _size8; ++_i12) + { + xfer += this->keyValues[_i12].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.keyValues = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t KeyValues::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("KeyValues"); + + xfer += oprot->writeFieldBegin("keyValues", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->keyValues.size())); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyValue> ::const_iterator _iter13; + for (_iter13 = this->keyValues.begin(); _iter13 != this->keyValues.end(); ++_iter13) + { + xfer += (*_iter13).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(KeyValues &a, KeyValues &b) { + using ::std::swap; + swap(a.keyValues, b.keyValues); + swap(a.__isset, b.__isset); +} + +KeyValues::KeyValues(const KeyValues& other14) { + keyValues = other14.keyValues; + __isset = other14.__isset; +} +KeyValues& KeyValues::operator=(const KeyValues& other15) { + keyValues = other15.keyValues; + __isset = other15.__isset; + return *this; +} +void KeyValues::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "KeyValues("; + out << "keyValues=" << to_string(keyValues); + out << ")"; +} + + +ReplicationCoordinatorException::~ReplicationCoordinatorException() throw() { +} + + +void ReplicationCoordinatorException::__set_code(const ReplicationCoordinatorErrorCode::type val) { + this->code = val; +} + +void ReplicationCoordinatorException::__set_reason(const std::string& val) { + this->reason = val; +} +std::ostream& operator<<(std::ostream& out, const ReplicationCoordinatorException& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t ReplicationCoordinatorException::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast16; + xfer += iprot->readI32(ecast16); + this->code = (ReplicationCoordinatorErrorCode::type)ecast16; + this->__isset.code = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->reason); + this->__isset.reason = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ReplicationCoordinatorException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ReplicationCoordinatorException"); + + xfer += oprot->writeFieldBegin("code", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((int32_t)this->code); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("reason", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->reason); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ReplicationCoordinatorException &a, ReplicationCoordinatorException &b) { + using ::std::swap; + swap(a.code, b.code); + swap(a.reason, b.reason); + swap(a.__isset, b.__isset); +} + +ReplicationCoordinatorException::ReplicationCoordinatorException(const ReplicationCoordinatorException& other17) : TException() { + code = other17.code; + reason = other17.reason; + __isset = other17.__isset; +} +ReplicationCoordinatorException& ReplicationCoordinatorException::operator=(const ReplicationCoordinatorException& other18) { + code = other18.code; + reason = other18.reason; + __isset = other18.__isset; + return *this; +} +void ReplicationCoordinatorException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ReplicationCoordinatorException("; + out << "code=" << to_string(code); + out << ", " << "reason=" << to_string(reason); + out << ")"; +} + +const char* ReplicationCoordinatorException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: ReplicationCoordinatorException"; + } +} + + +RemoteReplicationException::~RemoteReplicationException() throw() { +} + + +void RemoteReplicationException::__set_code(const RemoteReplicationErrorCode::type val) { + this->code = val; +} + +void RemoteReplicationException::__set_reason(const std::string& val) { + this->reason = val; +} +std::ostream& operator<<(std::ostream& out, const RemoteReplicationException& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t RemoteReplicationException::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast19; + xfer += iprot->readI32(ecast19); + this->code = (RemoteReplicationErrorCode::type)ecast19; + this->__isset.code = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->reason); + this->__isset.reason = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t RemoteReplicationException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("RemoteReplicationException"); + + xfer += oprot->writeFieldBegin("code", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((int32_t)this->code); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("reason", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->reason); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(RemoteReplicationException &a, RemoteReplicationException &b) { + using ::std::swap; + swap(a.code, b.code); + swap(a.reason, b.reason); + swap(a.__isset, b.__isset); +} + +RemoteReplicationException::RemoteReplicationException(const RemoteReplicationException& other20) : TException() { + code = other20.code; + reason = other20.reason; + __isset = other20.__isset; +} +RemoteReplicationException& RemoteReplicationException::operator=(const RemoteReplicationException& other21) { + code = other21.code; + reason = other21.reason; + __isset = other21.__isset; + return *this; +} +void RemoteReplicationException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "RemoteReplicationException("; + out << "code=" << to_string(code); + out << ", " << "reason=" << to_string(reason); + out << ")"; +} + +const char* RemoteReplicationException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: RemoteReplicationException"; + } +} + +}}}}}} // namespace diff --git a/src/data/extern/thriftv2/security_constants.cpp b/src/data/extern/thriftv2/security_constants.cpp new file mode 100644 index 00000000..232f8cda --- /dev/null +++ b/src/data/extern/thriftv2/security_constants.cpp @@ -0,0 +1,17 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "data/extern/thriftv2/security_constants.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace securityImpl { namespace thrift { + +const securityConstants g_security_constants; + +securityConstants::securityConstants() { +} + +}}}}}} // namespace + diff --git a/src/data/extern/thriftv2/security_types.cpp b/src/data/extern/thriftv2/security_types.cpp new file mode 100644 index 00000000..b4f2761b --- /dev/null +++ b/src/data/extern/thriftv2/security_types.cpp @@ -0,0 +1,712 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "data/extern/thriftv2/security_types.h" + +#include +#include + +#include + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace securityImpl { namespace thrift { + + +TCredentials::~TCredentials() throw() { +} + + +void TCredentials::__set_principal(const std::string& val) { + this->principal = val; +} + +void TCredentials::__set_tokenClassName(const std::string& val) { + this->tokenClassName = val; +} + +void TCredentials::__set_token(const std::string& val) { + this->token = val; +} + +void TCredentials::__set_instanceId(const std::string& val) { + this->instanceId = val; +} +std::ostream& operator<<(std::ostream& out, const TCredentials& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TCredentials::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal); + this->__isset.principal = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tokenClassName); + this->__isset.tokenClassName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->token); + this->__isset.token = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->instanceId); + this->__isset.instanceId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TCredentials::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TCredentials"); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->principal); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tokenClassName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tokenClassName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("token", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary(this->token); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->instanceId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TCredentials &a, TCredentials &b) { + using ::std::swap; + swap(a.principal, b.principal); + swap(a.tokenClassName, b.tokenClassName); + swap(a.token, b.token); + swap(a.instanceId, b.instanceId); + swap(a.__isset, b.__isset); +} + +TCredentials::TCredentials(const TCredentials& other0) { + principal = other0.principal; + tokenClassName = other0.tokenClassName; + token = other0.token; + instanceId = other0.instanceId; + __isset = other0.__isset; +} +TCredentials& TCredentials::operator=(const TCredentials& other1) { + principal = other1.principal; + tokenClassName = other1.tokenClassName; + token = other1.token; + instanceId = other1.instanceId; + __isset = other1.__isset; + return *this; +} +void TCredentials::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TCredentials("; + out << "principal=" << to_string(principal); + out << ", " << "tokenClassName=" << to_string(tokenClassName); + out << ", " << "token=" << to_string(token); + out << ", " << "instanceId=" << to_string(instanceId); + out << ")"; +} + + +TAuthenticationTokenIdentifier::~TAuthenticationTokenIdentifier() throw() { +} + + +void TAuthenticationTokenIdentifier::__set_principal(const std::string& val) { + this->principal = val; +} + +void TAuthenticationTokenIdentifier::__set_keyId(const int32_t val) { + this->keyId = val; +__isset.keyId = true; +} + +void TAuthenticationTokenIdentifier::__set_issueDate(const int64_t val) { + this->issueDate = val; +__isset.issueDate = true; +} + +void TAuthenticationTokenIdentifier::__set_expirationDate(const int64_t val) { + this->expirationDate = val; +__isset.expirationDate = true; +} + +void TAuthenticationTokenIdentifier::__set_instanceId(const std::string& val) { + this->instanceId = val; +__isset.instanceId = true; +} +std::ostream& operator<<(std::ostream& out, const TAuthenticationTokenIdentifier& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TAuthenticationTokenIdentifier::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal); + this->__isset.principal = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->keyId); + this->__isset.keyId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->issueDate); + this->__isset.issueDate = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->expirationDate); + this->__isset.expirationDate = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->instanceId); + this->__isset.instanceId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TAuthenticationTokenIdentifier::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TAuthenticationTokenIdentifier"); + + xfer += oprot->writeFieldBegin("principal", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->principal); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.keyId) { + xfer += oprot->writeFieldBegin("keyId", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->keyId); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.issueDate) { + xfer += oprot->writeFieldBegin("issueDate", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->issueDate); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.expirationDate) { + xfer += oprot->writeFieldBegin("expirationDate", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->expirationDate); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.instanceId) { + xfer += oprot->writeFieldBegin("instanceId", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->instanceId); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TAuthenticationTokenIdentifier &a, TAuthenticationTokenIdentifier &b) { + using ::std::swap; + swap(a.principal, b.principal); + swap(a.keyId, b.keyId); + swap(a.issueDate, b.issueDate); + swap(a.expirationDate, b.expirationDate); + swap(a.instanceId, b.instanceId); + swap(a.__isset, b.__isset); +} + +TAuthenticationTokenIdentifier::TAuthenticationTokenIdentifier(const TAuthenticationTokenIdentifier& other2) { + principal = other2.principal; + keyId = other2.keyId; + issueDate = other2.issueDate; + expirationDate = other2.expirationDate; + instanceId = other2.instanceId; + __isset = other2.__isset; +} +TAuthenticationTokenIdentifier& TAuthenticationTokenIdentifier::operator=(const TAuthenticationTokenIdentifier& other3) { + principal = other3.principal; + keyId = other3.keyId; + issueDate = other3.issueDate; + expirationDate = other3.expirationDate; + instanceId = other3.instanceId; + __isset = other3.__isset; + return *this; +} +void TAuthenticationTokenIdentifier::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TAuthenticationTokenIdentifier("; + out << "principal=" << to_string(principal); + out << ", " << "keyId="; (__isset.keyId ? (out << to_string(keyId)) : (out << "")); + out << ", " << "issueDate="; (__isset.issueDate ? (out << to_string(issueDate)) : (out << "")); + out << ", " << "expirationDate="; (__isset.expirationDate ? (out << to_string(expirationDate)) : (out << "")); + out << ", " << "instanceId="; (__isset.instanceId ? (out << to_string(instanceId)) : (out << "")); + out << ")"; +} + + +TAuthenticationKey::~TAuthenticationKey() throw() { +} + + +void TAuthenticationKey::__set_secret(const std::string& val) { + this->secret = val; +} + +void TAuthenticationKey::__set_keyId(const int32_t val) { + this->keyId = val; +__isset.keyId = true; +} + +void TAuthenticationKey::__set_expirationDate(const int64_t val) { + this->expirationDate = val; +__isset.expirationDate = true; +} + +void TAuthenticationKey::__set_creationDate(const int64_t val) { + this->creationDate = val; +__isset.creationDate = true; +} +std::ostream& operator<<(std::ostream& out, const TAuthenticationKey& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TAuthenticationKey::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->secret); + this->__isset.secret = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->keyId); + this->__isset.keyId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->expirationDate); + this->__isset.expirationDate = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->creationDate); + this->__isset.creationDate = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TAuthenticationKey::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TAuthenticationKey"); + + xfer += oprot->writeFieldBegin("secret", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->secret); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.keyId) { + xfer += oprot->writeFieldBegin("keyId", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->keyId); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.expirationDate) { + xfer += oprot->writeFieldBegin("expirationDate", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->expirationDate); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.creationDate) { + xfer += oprot->writeFieldBegin("creationDate", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->creationDate); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TAuthenticationKey &a, TAuthenticationKey &b) { + using ::std::swap; + swap(a.secret, b.secret); + swap(a.keyId, b.keyId); + swap(a.expirationDate, b.expirationDate); + swap(a.creationDate, b.creationDate); + swap(a.__isset, b.__isset); +} + +TAuthenticationKey::TAuthenticationKey(const TAuthenticationKey& other4) { + secret = other4.secret; + keyId = other4.keyId; + expirationDate = other4.expirationDate; + creationDate = other4.creationDate; + __isset = other4.__isset; +} +TAuthenticationKey& TAuthenticationKey::operator=(const TAuthenticationKey& other5) { + secret = other5.secret; + keyId = other5.keyId; + expirationDate = other5.expirationDate; + creationDate = other5.creationDate; + __isset = other5.__isset; + return *this; +} +void TAuthenticationKey::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TAuthenticationKey("; + out << "secret=" << to_string(secret); + out << ", " << "keyId="; (__isset.keyId ? (out << to_string(keyId)) : (out << "")); + out << ", " << "expirationDate="; (__isset.expirationDate ? (out << to_string(expirationDate)) : (out << "")); + out << ", " << "creationDate="; (__isset.creationDate ? (out << to_string(creationDate)) : (out << "")); + out << ")"; +} + + +TDelegationToken::~TDelegationToken() throw() { +} + + +void TDelegationToken::__set_password(const std::string& val) { + this->password = val; +} + +void TDelegationToken::__set_identifier(const TAuthenticationTokenIdentifier& val) { + this->identifier = val; +} +std::ostream& operator<<(std::ostream& out, const TDelegationToken& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TDelegationToken::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->password); + this->__isset.password = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->identifier.read(iprot); + this->__isset.identifier = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TDelegationToken::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TDelegationToken"); + + xfer += oprot->writeFieldBegin("password", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->password); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("identifier", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->identifier.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TDelegationToken &a, TDelegationToken &b) { + using ::std::swap; + swap(a.password, b.password); + swap(a.identifier, b.identifier); + swap(a.__isset, b.__isset); +} + +TDelegationToken::TDelegationToken(const TDelegationToken& other6) { + password = other6.password; + identifier = other6.identifier; + __isset = other6.__isset; +} +TDelegationToken& TDelegationToken::operator=(const TDelegationToken& other7) { + password = other7.password; + identifier = other7.identifier; + __isset = other7.__isset; + return *this; +} +void TDelegationToken::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TDelegationToken("; + out << "password=" << to_string(password); + out << ", " << "identifier=" << to_string(identifier); + out << ")"; +} + + +TDelegationTokenConfig::~TDelegationTokenConfig() throw() { +} + + +void TDelegationTokenConfig::__set_lifetime(const int64_t val) { + this->lifetime = val; +__isset.lifetime = true; +} +std::ostream& operator<<(std::ostream& out, const TDelegationTokenConfig& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TDelegationTokenConfig::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->lifetime); + this->__isset.lifetime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TDelegationTokenConfig::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TDelegationTokenConfig"); + + if (this->__isset.lifetime) { + xfer += oprot->writeFieldBegin("lifetime", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->lifetime); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TDelegationTokenConfig &a, TDelegationTokenConfig &b) { + using ::std::swap; + swap(a.lifetime, b.lifetime); + swap(a.__isset, b.__isset); +} + +TDelegationTokenConfig::TDelegationTokenConfig(const TDelegationTokenConfig& other8) { + lifetime = other8.lifetime; + __isset = other8.__isset; +} +TDelegationTokenConfig& TDelegationTokenConfig::operator=(const TDelegationTokenConfig& other9) { + lifetime = other9.lifetime; + __isset = other9.__isset; + return *this; +} +void TDelegationTokenConfig::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TDelegationTokenConfig("; + out << "lifetime="; (__isset.lifetime ? (out << to_string(lifetime)) : (out << "")); + out << ")"; +} + +}}}}}} // namespace diff --git a/src/data/extern/thriftv2/tabletserver_constants.cpp b/src/data/extern/thriftv2/tabletserver_constants.cpp new file mode 100644 index 00000000..fad8fe70 --- /dev/null +++ b/src/data/extern/thriftv2/tabletserver_constants.cpp @@ -0,0 +1,17 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "data/extern/thriftv2/tabletserver_constants.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace tabletserver { namespace thrift { + +const tabletserverConstants g_tabletserver_constants; + +tabletserverConstants::tabletserverConstants() { +} + +}}}}}} // namespace + diff --git a/src/data/extern/thriftv2/tabletserver_types.cpp b/src/data/extern/thriftv2/tabletserver_types.cpp new file mode 100644 index 00000000..33924426 --- /dev/null +++ b/src/data/extern/thriftv2/tabletserver_types.cpp @@ -0,0 +1,2410 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "data/extern/thriftv2/tabletserver_types.h" + +#include +#include + +#include + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace tabletserver { namespace thrift { + +int _kScanTypeValues[] = { + ScanType::SINGLE, + ScanType::BATCH +}; +const char* _kScanTypeNames[] = { + "SINGLE", + "BATCH" +}; +const std::map _ScanType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kScanTypeValues, _kScanTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +std::ostream& operator<<(std::ostream& out, const ScanType::type& val) { + std::map::const_iterator it = _ScanType_VALUES_TO_NAMES.find(val); + if (it != _ScanType_VALUES_TO_NAMES.end()) { + out << it->second; + } else { + out << static_cast(val); + } + return out; +} + +int _kScanStateValues[] = { + ScanState::IDLE, + ScanState::RUNNING, + ScanState::QUEUED +}; +const char* _kScanStateNames[] = { + "IDLE", + "RUNNING", + "QUEUED" +}; +const std::map _ScanState_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kScanStateValues, _kScanStateNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +std::ostream& operator<<(std::ostream& out, const ScanState::type& val) { + std::map::const_iterator it = _ScanState_VALUES_TO_NAMES.find(val); + if (it != _ScanState_VALUES_TO_NAMES.end()) { + out << it->second; + } else { + out << static_cast(val); + } + return out; +} + +int _kCompactionTypeValues[] = { + CompactionType::MINOR, + CompactionType::MERGE, + CompactionType::MAJOR, + CompactionType::FULL +}; +const char* _kCompactionTypeNames[] = { + "MINOR", + "MERGE", + "MAJOR", + "FULL" +}; +const std::map _CompactionType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _kCompactionTypeValues, _kCompactionTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +std::ostream& operator<<(std::ostream& out, const CompactionType::type& val) { + std::map::const_iterator it = _CompactionType_VALUES_TO_NAMES.find(val); + if (it != _CompactionType_VALUES_TO_NAMES.end()) { + out << it->second; + } else { + out << static_cast(val); + } + return out; +} + +int _kCompactionReasonValues[] = { + CompactionReason::USER, + CompactionReason::SYSTEM, + CompactionReason::CHOP, + CompactionReason::IDLE, + CompactionReason::CLOSE +}; +const char* _kCompactionReasonNames[] = { + "USER", + "SYSTEM", + "CHOP", + "IDLE", + "CLOSE" +}; +const std::map _CompactionReason_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kCompactionReasonValues, _kCompactionReasonNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +std::ostream& operator<<(std::ostream& out, const CompactionReason::type& val) { + std::map::const_iterator it = _CompactionReason_VALUES_TO_NAMES.find(val); + if (it != _CompactionReason_VALUES_TO_NAMES.end()) { + out << it->second; + } else { + out << static_cast(val); + } + return out; +} + +int _kTDurabilityValues[] = { + TDurability::DEFAULT, + TDurability::SYNC, + TDurability::FLUSH, + TDurability::LOG, + TDurability::NONE +}; +const char* _kTDurabilityNames[] = { + "DEFAULT", + "SYNC", + "FLUSH", + "LOG", + "NONE" +}; +const std::map _TDurability_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kTDurabilityValues, _kTDurabilityNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +std::ostream& operator<<(std::ostream& out, const TDurability::type& val) { + std::map::const_iterator it = _TDurability_VALUES_TO_NAMES.find(val); + if (it != _TDurability_VALUES_TO_NAMES.end()) { + out << it->second; + } else { + out << static_cast(val); + } + return out; +} + +int _kTUnloadTabletGoalValues[] = { + TUnloadTabletGoal::UNKNOWN, + TUnloadTabletGoal::UNASSIGNED, + TUnloadTabletGoal::SUSPENDED, + TUnloadTabletGoal::DELETED +}; +const char* _kTUnloadTabletGoalNames[] = { + "UNKNOWN", + "UNASSIGNED", + "SUSPENDED", + "DELETED" +}; +const std::map _TUnloadTabletGoal_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _kTUnloadTabletGoalValues, _kTUnloadTabletGoalNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +std::ostream& operator<<(std::ostream& out, const TUnloadTabletGoal::type& val) { + std::map::const_iterator it = _TUnloadTabletGoal_VALUES_TO_NAMES.find(val); + if (it != _TUnloadTabletGoal_VALUES_TO_NAMES.end()) { + out << it->second; + } else { + out << static_cast(val); + } + return out; +} + + +NotServingTabletException::~NotServingTabletException() throw() { +} + + +void NotServingTabletException::__set_extent(const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& val) { + this->extent = val; +} +std::ostream& operator<<(std::ostream& out, const NotServingTabletException& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t NotServingTabletException::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->extent.read(iprot); + this->__isset.extent = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t NotServingTabletException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("NotServingTabletException"); + + xfer += oprot->writeFieldBegin("extent", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->extent.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(NotServingTabletException &a, NotServingTabletException &b) { + using ::std::swap; + swap(a.extent, b.extent); + swap(a.__isset, b.__isset); +} + +NotServingTabletException::NotServingTabletException(const NotServingTabletException& other0) : TException() { + extent = other0.extent; + __isset = other0.__isset; +} +NotServingTabletException& NotServingTabletException::operator=(const NotServingTabletException& other1) { + extent = other1.extent; + __isset = other1.__isset; + return *this; +} +void NotServingTabletException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "NotServingTabletException("; + out << "extent=" << to_string(extent); + out << ")"; +} + +const char* NotServingTabletException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: NotServingTabletException"; + } +} + + +TooManyFilesException::~TooManyFilesException() throw() { +} + + +void TooManyFilesException::__set_extent(const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& val) { + this->extent = val; +} +std::ostream& operator<<(std::ostream& out, const TooManyFilesException& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TooManyFilesException::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->extent.read(iprot); + this->__isset.extent = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TooManyFilesException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TooManyFilesException"); + + xfer += oprot->writeFieldBegin("extent", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->extent.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TooManyFilesException &a, TooManyFilesException &b) { + using ::std::swap; + swap(a.extent, b.extent); + swap(a.__isset, b.__isset); +} + +TooManyFilesException::TooManyFilesException(const TooManyFilesException& other2) : TException() { + extent = other2.extent; + __isset = other2.__isset; +} +TooManyFilesException& TooManyFilesException::operator=(const TooManyFilesException& other3) { + extent = other3.extent; + __isset = other3.__isset; + return *this; +} +void TooManyFilesException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TooManyFilesException("; + out << "extent=" << to_string(extent); + out << ")"; +} + +const char* TooManyFilesException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: TooManyFilesException"; + } +} + + +TSampleNotPresentException::~TSampleNotPresentException() throw() { +} + + +void TSampleNotPresentException::__set_extent(const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& val) { + this->extent = val; +} +std::ostream& operator<<(std::ostream& out, const TSampleNotPresentException& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TSampleNotPresentException::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->extent.read(iprot); + this->__isset.extent = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TSampleNotPresentException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TSampleNotPresentException"); + + xfer += oprot->writeFieldBegin("extent", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->extent.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TSampleNotPresentException &a, TSampleNotPresentException &b) { + using ::std::swap; + swap(a.extent, b.extent); + swap(a.__isset, b.__isset); +} + +TSampleNotPresentException::TSampleNotPresentException(const TSampleNotPresentException& other4) : TException() { + extent = other4.extent; + __isset = other4.__isset; +} +TSampleNotPresentException& TSampleNotPresentException::operator=(const TSampleNotPresentException& other5) { + extent = other5.extent; + __isset = other5.__isset; + return *this; +} +void TSampleNotPresentException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TSampleNotPresentException("; + out << "extent=" << to_string(extent); + out << ")"; +} + +const char* TSampleNotPresentException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: TSampleNotPresentException"; + } +} + + +NoSuchScanIDException::~NoSuchScanIDException() throw() { +} + +std::ostream& operator<<(std::ostream& out, const NoSuchScanIDException& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t NoSuchScanIDException::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t NoSuchScanIDException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("NoSuchScanIDException"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(NoSuchScanIDException &a, NoSuchScanIDException &b) { + using ::std::swap; + (void) a; + (void) b; +} + +NoSuchScanIDException::NoSuchScanIDException(const NoSuchScanIDException& other6) : TException() { + (void) other6; +} +NoSuchScanIDException& NoSuchScanIDException::operator=(const NoSuchScanIDException& other7) { + (void) other7; + return *this; +} +void NoSuchScanIDException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "NoSuchScanIDException("; + out << ")"; +} + +const char* NoSuchScanIDException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: NoSuchScanIDException"; + } +} + + +ConstraintViolationException::~ConstraintViolationException() throw() { +} + + +void ConstraintViolationException::__set_violationSummaries(const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TConstraintViolationSummary> & val) { + this->violationSummaries = val; +} +std::ostream& operator<<(std::ostream& out, const ConstraintViolationException& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t ConstraintViolationException::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->violationSummaries.clear(); + uint32_t _size8; + ::apache::thrift::protocol::TType _etype11; + xfer += iprot->readListBegin(_etype11, _size8); + this->violationSummaries.resize(_size8); + uint32_t _i12; + for (_i12 = 0; _i12 < _size8; ++_i12) + { + xfer += this->violationSummaries[_i12].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.violationSummaries = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ConstraintViolationException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ConstraintViolationException"); + + xfer += oprot->writeFieldBegin("violationSummaries", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->violationSummaries.size())); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TConstraintViolationSummary> ::const_iterator _iter13; + for (_iter13 = this->violationSummaries.begin(); _iter13 != this->violationSummaries.end(); ++_iter13) + { + xfer += (*_iter13).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ConstraintViolationException &a, ConstraintViolationException &b) { + using ::std::swap; + swap(a.violationSummaries, b.violationSummaries); + swap(a.__isset, b.__isset); +} + +ConstraintViolationException::ConstraintViolationException(const ConstraintViolationException& other14) : TException() { + violationSummaries = other14.violationSummaries; + __isset = other14.__isset; +} +ConstraintViolationException& ConstraintViolationException::operator=(const ConstraintViolationException& other15) { + violationSummaries = other15.violationSummaries; + __isset = other15.__isset; + return *this; +} +void ConstraintViolationException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ConstraintViolationException("; + out << "violationSummaries=" << to_string(violationSummaries); + out << ")"; +} + +const char* ConstraintViolationException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: ConstraintViolationException"; + } +} + + +ActionStats::~ActionStats() throw() { +} + + +void ActionStats::__set_status(const int32_t val) { + this->status = val; +} + +void ActionStats::__set_elapsed(const double val) { + this->elapsed = val; +} + +void ActionStats::__set_num(const int32_t val) { + this->num = val; +} + +void ActionStats::__set_count(const int64_t val) { + this->count = val; +} + +void ActionStats::__set_sumDev(const double val) { + this->sumDev = val; +} + +void ActionStats::__set_fail(const int32_t val) { + this->fail = val; +} + +void ActionStats::__set_queueTime(const double val) { + this->queueTime = val; +} + +void ActionStats::__set_queueSumDev(const double val) { + this->queueSumDev = val; +} +std::ostream& operator<<(std::ostream& out, const ActionStats& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t ActionStats::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->status); + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->elapsed); + this->__isset.elapsed = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->num); + this->__isset.num = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->count); + this->__isset.count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->sumDev); + this->__isset.sumDev = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->fail); + this->__isset.fail = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->queueTime); + this->__isset.queueTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->queueSumDev); + this->__isset.queueSumDev = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ActionStats::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ActionStats"); + + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32(this->status); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("elapsed", ::apache::thrift::protocol::T_DOUBLE, 2); + xfer += oprot->writeDouble(this->elapsed); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("num", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->num); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("count", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->count); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("sumDev", ::apache::thrift::protocol::T_DOUBLE, 5); + xfer += oprot->writeDouble(this->sumDev); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("fail", ::apache::thrift::protocol::T_I32, 6); + xfer += oprot->writeI32(this->fail); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("queueTime", ::apache::thrift::protocol::T_DOUBLE, 7); + xfer += oprot->writeDouble(this->queueTime); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("queueSumDev", ::apache::thrift::protocol::T_DOUBLE, 8); + xfer += oprot->writeDouble(this->queueSumDev); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ActionStats &a, ActionStats &b) { + using ::std::swap; + swap(a.status, b.status); + swap(a.elapsed, b.elapsed); + swap(a.num, b.num); + swap(a.count, b.count); + swap(a.sumDev, b.sumDev); + swap(a.fail, b.fail); + swap(a.queueTime, b.queueTime); + swap(a.queueSumDev, b.queueSumDev); + swap(a.__isset, b.__isset); +} + +ActionStats::ActionStats(const ActionStats& other16) { + status = other16.status; + elapsed = other16.elapsed; + num = other16.num; + count = other16.count; + sumDev = other16.sumDev; + fail = other16.fail; + queueTime = other16.queueTime; + queueSumDev = other16.queueSumDev; + __isset = other16.__isset; +} +ActionStats& ActionStats::operator=(const ActionStats& other17) { + status = other17.status; + elapsed = other17.elapsed; + num = other17.num; + count = other17.count; + sumDev = other17.sumDev; + fail = other17.fail; + queueTime = other17.queueTime; + queueSumDev = other17.queueSumDev; + __isset = other17.__isset; + return *this; +} +void ActionStats::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ActionStats("; + out << "status=" << to_string(status); + out << ", " << "elapsed=" << to_string(elapsed); + out << ", " << "num=" << to_string(num); + out << ", " << "count=" << to_string(count); + out << ", " << "sumDev=" << to_string(sumDev); + out << ", " << "fail=" << to_string(fail); + out << ", " << "queueTime=" << to_string(queueTime); + out << ", " << "queueSumDev=" << to_string(queueSumDev); + out << ")"; +} + + +TabletStats::~TabletStats() throw() { +} + + +void TabletStats::__set_extent(const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& val) { + this->extent = val; +} + +void TabletStats::__set_majors(const ActionStats& val) { + this->majors = val; +} + +void TabletStats::__set_minors(const ActionStats& val) { + this->minors = val; +} + +void TabletStats::__set_splits(const ActionStats& val) { + this->splits = val; +} + +void TabletStats::__set_numEntries(const int64_t val) { + this->numEntries = val; +} + +void TabletStats::__set_ingestRate(const double val) { + this->ingestRate = val; +} + +void TabletStats::__set_queryRate(const double val) { + this->queryRate = val; +} + +void TabletStats::__set_splitCreationTime(const int64_t val) { + this->splitCreationTime = val; +} +std::ostream& operator<<(std::ostream& out, const TabletStats& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TabletStats::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->extent.read(iprot); + this->__isset.extent = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->majors.read(iprot); + this->__isset.majors = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->minors.read(iprot); + this->__isset.minors = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->splits.read(iprot); + this->__isset.splits = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numEntries); + this->__isset.numEntries = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->ingestRate); + this->__isset.ingestRate = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->queryRate); + this->__isset.queryRate = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->splitCreationTime); + this->__isset.splitCreationTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TabletStats::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TabletStats"); + + xfer += oprot->writeFieldBegin("extent", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->extent.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("majors", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->majors.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("minors", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->minors.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("splits", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->splits.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("numEntries", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64(this->numEntries); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ingestRate", ::apache::thrift::protocol::T_DOUBLE, 6); + xfer += oprot->writeDouble(this->ingestRate); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("queryRate", ::apache::thrift::protocol::T_DOUBLE, 7); + xfer += oprot->writeDouble(this->queryRate); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("splitCreationTime", ::apache::thrift::protocol::T_I64, 8); + xfer += oprot->writeI64(this->splitCreationTime); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TabletStats &a, TabletStats &b) { + using ::std::swap; + swap(a.extent, b.extent); + swap(a.majors, b.majors); + swap(a.minors, b.minors); + swap(a.splits, b.splits); + swap(a.numEntries, b.numEntries); + swap(a.ingestRate, b.ingestRate); + swap(a.queryRate, b.queryRate); + swap(a.splitCreationTime, b.splitCreationTime); + swap(a.__isset, b.__isset); +} + +TabletStats::TabletStats(const TabletStats& other18) { + extent = other18.extent; + majors = other18.majors; + minors = other18.minors; + splits = other18.splits; + numEntries = other18.numEntries; + ingestRate = other18.ingestRate; + queryRate = other18.queryRate; + splitCreationTime = other18.splitCreationTime; + __isset = other18.__isset; +} +TabletStats& TabletStats::operator=(const TabletStats& other19) { + extent = other19.extent; + majors = other19.majors; + minors = other19.minors; + splits = other19.splits; + numEntries = other19.numEntries; + ingestRate = other19.ingestRate; + queryRate = other19.queryRate; + splitCreationTime = other19.splitCreationTime; + __isset = other19.__isset; + return *this; +} +void TabletStats::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TabletStats("; + out << "extent=" << to_string(extent); + out << ", " << "majors=" << to_string(majors); + out << ", " << "minors=" << to_string(minors); + out << ", " << "splits=" << to_string(splits); + out << ", " << "numEntries=" << to_string(numEntries); + out << ", " << "ingestRate=" << to_string(ingestRate); + out << ", " << "queryRate=" << to_string(queryRate); + out << ", " << "splitCreationTime=" << to_string(splitCreationTime); + out << ")"; +} + + +ActiveScan::~ActiveScan() throw() { +} + + +void ActiveScan::__set_client(const std::string& val) { + this->client = val; +} + +void ActiveScan::__set_user(const std::string& val) { + this->user = val; +} + +void ActiveScan::__set_tableId(const std::string& val) { + this->tableId = val; +} + +void ActiveScan::__set_age(const int64_t val) { + this->age = val; +} + +void ActiveScan::__set_idleTime(const int64_t val) { + this->idleTime = val; +} + +void ActiveScan::__set_type(const ScanType::type val) { + this->type = val; +} + +void ActiveScan::__set_state(const ScanState::type val) { + this->state = val; +} + +void ActiveScan::__set_extent(const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& val) { + this->extent = val; +} + +void ActiveScan::__set_columns(const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & val) { + this->columns = val; +} + +void ActiveScan::__set_ssiList(const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & val) { + this->ssiList = val; +} + +void ActiveScan::__set_ssio(const std::map > & val) { + this->ssio = val; +} + +void ActiveScan::__set_authorizations(const std::vector & val) { + this->authorizations = val; +} + +void ActiveScan::__set_scanId(const int64_t val) { + this->scanId = val; +__isset.scanId = true; +} + +void ActiveScan::__set_classLoaderContext(const std::string& val) { + this->classLoaderContext = val; +} +std::ostream& operator<<(std::ostream& out, const ActiveScan& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t ActiveScan::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->client); + this->__isset.client = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user); + this->__isset.user = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableId); + this->__isset.tableId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->age); + this->__isset.age = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->idleTime); + this->__isset.idleTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast20; + xfer += iprot->readI32(ecast20); + this->type = (ScanType::type)ecast20; + this->__isset.type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast21; + xfer += iprot->readI32(ecast21); + this->state = (ScanState::type)ecast21; + this->__isset.state = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 9: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->extent.read(iprot); + this->__isset.extent = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 10: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->columns.clear(); + uint32_t _size22; + ::apache::thrift::protocol::TType _etype25; + xfer += iprot->readListBegin(_etype25, _size22); + this->columns.resize(_size22); + uint32_t _i26; + for (_i26 = 0; _i26 < _size22; ++_i26) + { + xfer += this->columns[_i26].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.columns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 11: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->ssiList.clear(); + uint32_t _size27; + ::apache::thrift::protocol::TType _etype30; + xfer += iprot->readListBegin(_etype30, _size27); + this->ssiList.resize(_size27); + uint32_t _i31; + for (_i31 = 0; _i31 < _size27; ++_i31) + { + xfer += this->ssiList[_i31].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.ssiList = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 12: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->ssio.clear(); + uint32_t _size32; + ::apache::thrift::protocol::TType _ktype33; + ::apache::thrift::protocol::TType _vtype34; + xfer += iprot->readMapBegin(_ktype33, _vtype34, _size32); + uint32_t _i36; + for (_i36 = 0; _i36 < _size32; ++_i36) + { + std::string _key37; + xfer += iprot->readString(_key37); + std::map & _val38 = this->ssio[_key37]; + { + _val38.clear(); + uint32_t _size39; + ::apache::thrift::protocol::TType _ktype40; + ::apache::thrift::protocol::TType _vtype41; + xfer += iprot->readMapBegin(_ktype40, _vtype41, _size39); + uint32_t _i43; + for (_i43 = 0; _i43 < _size39; ++_i43) + { + std::string _key44; + xfer += iprot->readString(_key44); + std::string& _val45 = _val38[_key44]; + xfer += iprot->readString(_val45); + } + xfer += iprot->readMapEnd(); + } + } + xfer += iprot->readMapEnd(); + } + this->__isset.ssio = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 13: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->authorizations.clear(); + uint32_t _size46; + ::apache::thrift::protocol::TType _etype49; + xfer += iprot->readListBegin(_etype49, _size46); + this->authorizations.resize(_size46); + uint32_t _i50; + for (_i50 = 0; _i50 < _size46; ++_i50) + { + xfer += iprot->readBinary(this->authorizations[_i50]); + } + xfer += iprot->readListEnd(); + } + this->__isset.authorizations = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 14: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->scanId); + this->__isset.scanId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 15: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->classLoaderContext); + this->__isset.classLoaderContext = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ActiveScan::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ActiveScan"); + + xfer += oprot->writeFieldBegin("client", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->client); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("user", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->user); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableId", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->tableId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("age", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64(this->age); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("idleTime", ::apache::thrift::protocol::T_I64, 6); + xfer += oprot->writeI64(this->idleTime); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 7); + xfer += oprot->writeI32((int32_t)this->type); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_I32, 8); + xfer += oprot->writeI32((int32_t)this->state); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("extent", ::apache::thrift::protocol::T_STRUCT, 9); + xfer += this->extent.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 10); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->columns.size())); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> ::const_iterator _iter51; + for (_iter51 = this->columns.begin(); _iter51 != this->columns.end(); ++_iter51) + { + xfer += (*_iter51).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ssiList", ::apache::thrift::protocol::T_LIST, 11); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->ssiList.size())); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> ::const_iterator _iter52; + for (_iter52 = this->ssiList.begin(); _iter52 != this->ssiList.end(); ++_iter52) + { + xfer += (*_iter52).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ssio", ::apache::thrift::protocol::T_MAP, 12); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_MAP, static_cast(this->ssio.size())); + std::map > ::const_iterator _iter53; + for (_iter53 = this->ssio.begin(); _iter53 != this->ssio.end(); ++_iter53) + { + xfer += oprot->writeString(_iter53->first); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(_iter53->second.size())); + std::map ::const_iterator _iter54; + for (_iter54 = _iter53->second.begin(); _iter54 != _iter53->second.end(); ++_iter54) + { + xfer += oprot->writeString(_iter54->first); + xfer += oprot->writeString(_iter54->second); + } + xfer += oprot->writeMapEnd(); + } + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("authorizations", ::apache::thrift::protocol::T_LIST, 13); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->authorizations.size())); + std::vector ::const_iterator _iter55; + for (_iter55 = this->authorizations.begin(); _iter55 != this->authorizations.end(); ++_iter55) + { + xfer += oprot->writeBinary((*_iter55)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + if (this->__isset.scanId) { + xfer += oprot->writeFieldBegin("scanId", ::apache::thrift::protocol::T_I64, 14); + xfer += oprot->writeI64(this->scanId); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldBegin("classLoaderContext", ::apache::thrift::protocol::T_STRING, 15); + xfer += oprot->writeString(this->classLoaderContext); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ActiveScan &a, ActiveScan &b) { + using ::std::swap; + swap(a.client, b.client); + swap(a.user, b.user); + swap(a.tableId, b.tableId); + swap(a.age, b.age); + swap(a.idleTime, b.idleTime); + swap(a.type, b.type); + swap(a.state, b.state); + swap(a.extent, b.extent); + swap(a.columns, b.columns); + swap(a.ssiList, b.ssiList); + swap(a.ssio, b.ssio); + swap(a.authorizations, b.authorizations); + swap(a.scanId, b.scanId); + swap(a.classLoaderContext, b.classLoaderContext); + swap(a.__isset, b.__isset); +} + +ActiveScan::ActiveScan(const ActiveScan& other56) { + client = other56.client; + user = other56.user; + tableId = other56.tableId; + age = other56.age; + idleTime = other56.idleTime; + type = other56.type; + state = other56.state; + extent = other56.extent; + columns = other56.columns; + ssiList = other56.ssiList; + ssio = other56.ssio; + authorizations = other56.authorizations; + scanId = other56.scanId; + classLoaderContext = other56.classLoaderContext; + __isset = other56.__isset; +} +ActiveScan& ActiveScan::operator=(const ActiveScan& other57) { + client = other57.client; + user = other57.user; + tableId = other57.tableId; + age = other57.age; + idleTime = other57.idleTime; + type = other57.type; + state = other57.state; + extent = other57.extent; + columns = other57.columns; + ssiList = other57.ssiList; + ssio = other57.ssio; + authorizations = other57.authorizations; + scanId = other57.scanId; + classLoaderContext = other57.classLoaderContext; + __isset = other57.__isset; + return *this; +} +void ActiveScan::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ActiveScan("; + out << "client=" << to_string(client); + out << ", " << "user=" << to_string(user); + out << ", " << "tableId=" << to_string(tableId); + out << ", " << "age=" << to_string(age); + out << ", " << "idleTime=" << to_string(idleTime); + out << ", " << "type=" << to_string(type); + out << ", " << "state=" << to_string(state); + out << ", " << "extent=" << to_string(extent); + out << ", " << "columns=" << to_string(columns); + out << ", " << "ssiList=" << to_string(ssiList); + out << ", " << "ssio=" << to_string(ssio); + out << ", " << "authorizations=" << to_string(authorizations); + out << ", " << "scanId="; (__isset.scanId ? (out << to_string(scanId)) : (out << "")); + out << ", " << "classLoaderContext=" << to_string(classLoaderContext); + out << ")"; +} + + +ActiveCompaction::~ActiveCompaction() throw() { +} + + +void ActiveCompaction::__set_extent(const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& val) { + this->extent = val; +} + +void ActiveCompaction::__set_age(const int64_t val) { + this->age = val; +} + +void ActiveCompaction::__set_inputFiles(const std::vector & val) { + this->inputFiles = val; +} + +void ActiveCompaction::__set_outputFile(const std::string& val) { + this->outputFile = val; +} + +void ActiveCompaction::__set_type(const CompactionType::type val) { + this->type = val; +} + +void ActiveCompaction::__set_reason(const CompactionReason::type val) { + this->reason = val; +} + +void ActiveCompaction::__set_localityGroup(const std::string& val) { + this->localityGroup = val; +} + +void ActiveCompaction::__set_entriesRead(const int64_t val) { + this->entriesRead = val; +} + +void ActiveCompaction::__set_entriesWritten(const int64_t val) { + this->entriesWritten = val; +} + +void ActiveCompaction::__set_ssiList(const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & val) { + this->ssiList = val; +} + +void ActiveCompaction::__set_ssio(const std::map > & val) { + this->ssio = val; +} +std::ostream& operator<<(std::ostream& out, const ActiveCompaction& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t ActiveCompaction::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->extent.read(iprot); + this->__isset.extent = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->age); + this->__isset.age = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->inputFiles.clear(); + uint32_t _size58; + ::apache::thrift::protocol::TType _etype61; + xfer += iprot->readListBegin(_etype61, _size58); + this->inputFiles.resize(_size58); + uint32_t _i62; + for (_i62 = 0; _i62 < _size58; ++_i62) + { + xfer += iprot->readString(this->inputFiles[_i62]); + } + xfer += iprot->readListEnd(); + } + this->__isset.inputFiles = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->outputFile); + this->__isset.outputFile = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast63; + xfer += iprot->readI32(ecast63); + this->type = (CompactionType::type)ecast63; + this->__isset.type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast64; + xfer += iprot->readI32(ecast64); + this->reason = (CompactionReason::type)ecast64; + this->__isset.reason = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->localityGroup); + this->__isset.localityGroup = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->entriesRead); + this->__isset.entriesRead = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 9: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->entriesWritten); + this->__isset.entriesWritten = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 10: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->ssiList.clear(); + uint32_t _size65; + ::apache::thrift::protocol::TType _etype68; + xfer += iprot->readListBegin(_etype68, _size65); + this->ssiList.resize(_size65); + uint32_t _i69; + for (_i69 = 0; _i69 < _size65; ++_i69) + { + xfer += this->ssiList[_i69].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.ssiList = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 11: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->ssio.clear(); + uint32_t _size70; + ::apache::thrift::protocol::TType _ktype71; + ::apache::thrift::protocol::TType _vtype72; + xfer += iprot->readMapBegin(_ktype71, _vtype72, _size70); + uint32_t _i74; + for (_i74 = 0; _i74 < _size70; ++_i74) + { + std::string _key75; + xfer += iprot->readString(_key75); + std::map & _val76 = this->ssio[_key75]; + { + _val76.clear(); + uint32_t _size77; + ::apache::thrift::protocol::TType _ktype78; + ::apache::thrift::protocol::TType _vtype79; + xfer += iprot->readMapBegin(_ktype78, _vtype79, _size77); + uint32_t _i81; + for (_i81 = 0; _i81 < _size77; ++_i81) + { + std::string _key82; + xfer += iprot->readString(_key82); + std::string& _val83 = _val76[_key82]; + xfer += iprot->readString(_val83); + } + xfer += iprot->readMapEnd(); + } + } + xfer += iprot->readMapEnd(); + } + this->__isset.ssio = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ActiveCompaction::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ActiveCompaction"); + + xfer += oprot->writeFieldBegin("extent", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->extent.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("age", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->age); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("inputFiles", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->inputFiles.size())); + std::vector ::const_iterator _iter84; + for (_iter84 = this->inputFiles.begin(); _iter84 != this->inputFiles.end(); ++_iter84) + { + xfer += oprot->writeString((*_iter84)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("outputFile", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->outputFile); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32((int32_t)this->type); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("reason", ::apache::thrift::protocol::T_I32, 6); + xfer += oprot->writeI32((int32_t)this->reason); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("localityGroup", ::apache::thrift::protocol::T_STRING, 7); + xfer += oprot->writeString(this->localityGroup); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("entriesRead", ::apache::thrift::protocol::T_I64, 8); + xfer += oprot->writeI64(this->entriesRead); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("entriesWritten", ::apache::thrift::protocol::T_I64, 9); + xfer += oprot->writeI64(this->entriesWritten); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ssiList", ::apache::thrift::protocol::T_LIST, 10); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->ssiList.size())); + std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> ::const_iterator _iter85; + for (_iter85 = this->ssiList.begin(); _iter85 != this->ssiList.end(); ++_iter85) + { + xfer += (*_iter85).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ssio", ::apache::thrift::protocol::T_MAP, 11); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_MAP, static_cast(this->ssio.size())); + std::map > ::const_iterator _iter86; + for (_iter86 = this->ssio.begin(); _iter86 != this->ssio.end(); ++_iter86) + { + xfer += oprot->writeString(_iter86->first); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(_iter86->second.size())); + std::map ::const_iterator _iter87; + for (_iter87 = _iter86->second.begin(); _iter87 != _iter86->second.end(); ++_iter87) + { + xfer += oprot->writeString(_iter87->first); + xfer += oprot->writeString(_iter87->second); + } + xfer += oprot->writeMapEnd(); + } + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ActiveCompaction &a, ActiveCompaction &b) { + using ::std::swap; + swap(a.extent, b.extent); + swap(a.age, b.age); + swap(a.inputFiles, b.inputFiles); + swap(a.outputFile, b.outputFile); + swap(a.type, b.type); + swap(a.reason, b.reason); + swap(a.localityGroup, b.localityGroup); + swap(a.entriesRead, b.entriesRead); + swap(a.entriesWritten, b.entriesWritten); + swap(a.ssiList, b.ssiList); + swap(a.ssio, b.ssio); + swap(a.__isset, b.__isset); +} + +ActiveCompaction::ActiveCompaction(const ActiveCompaction& other88) { + extent = other88.extent; + age = other88.age; + inputFiles = other88.inputFiles; + outputFile = other88.outputFile; + type = other88.type; + reason = other88.reason; + localityGroup = other88.localityGroup; + entriesRead = other88.entriesRead; + entriesWritten = other88.entriesWritten; + ssiList = other88.ssiList; + ssio = other88.ssio; + __isset = other88.__isset; +} +ActiveCompaction& ActiveCompaction::operator=(const ActiveCompaction& other89) { + extent = other89.extent; + age = other89.age; + inputFiles = other89.inputFiles; + outputFile = other89.outputFile; + type = other89.type; + reason = other89.reason; + localityGroup = other89.localityGroup; + entriesRead = other89.entriesRead; + entriesWritten = other89.entriesWritten; + ssiList = other89.ssiList; + ssio = other89.ssio; + __isset = other89.__isset; + return *this; +} +void ActiveCompaction::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ActiveCompaction("; + out << "extent=" << to_string(extent); + out << ", " << "age=" << to_string(age); + out << ", " << "inputFiles=" << to_string(inputFiles); + out << ", " << "outputFile=" << to_string(outputFile); + out << ", " << "type=" << to_string(type); + out << ", " << "reason=" << to_string(reason); + out << ", " << "localityGroup=" << to_string(localityGroup); + out << ", " << "entriesRead=" << to_string(entriesRead); + out << ", " << "entriesWritten=" << to_string(entriesWritten); + out << ", " << "ssiList=" << to_string(ssiList); + out << ", " << "ssio=" << to_string(ssio); + out << ")"; +} + + +TIteratorSetting::~TIteratorSetting() throw() { +} + + +void TIteratorSetting::__set_priority(const int32_t val) { + this->priority = val; +} + +void TIteratorSetting::__set_name(const std::string& val) { + this->name = val; +} + +void TIteratorSetting::__set_iteratorClass(const std::string& val) { + this->iteratorClass = val; +} + +void TIteratorSetting::__set_properties(const std::map & val) { + this->properties = val; +} +std::ostream& operator<<(std::ostream& out, const TIteratorSetting& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TIteratorSetting::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->priority); + this->__isset.priority = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->iteratorClass); + this->__isset.iteratorClass = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->properties.clear(); + uint32_t _size90; + ::apache::thrift::protocol::TType _ktype91; + ::apache::thrift::protocol::TType _vtype92; + xfer += iprot->readMapBegin(_ktype91, _vtype92, _size90); + uint32_t _i94; + for (_i94 = 0; _i94 < _size90; ++_i94) + { + std::string _key95; + xfer += iprot->readString(_key95); + std::string& _val96 = this->properties[_key95]; + xfer += iprot->readString(_val96); + } + xfer += iprot->readMapEnd(); + } + this->__isset.properties = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TIteratorSetting::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TIteratorSetting"); + + xfer += oprot->writeFieldBegin("priority", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32(this->priority); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("iteratorClass", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->iteratorClass); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("properties", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->properties.size())); + std::map ::const_iterator _iter97; + for (_iter97 = this->properties.begin(); _iter97 != this->properties.end(); ++_iter97) + { + xfer += oprot->writeString(_iter97->first); + xfer += oprot->writeString(_iter97->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TIteratorSetting &a, TIteratorSetting &b) { + using ::std::swap; + swap(a.priority, b.priority); + swap(a.name, b.name); + swap(a.iteratorClass, b.iteratorClass); + swap(a.properties, b.properties); + swap(a.__isset, b.__isset); +} + +TIteratorSetting::TIteratorSetting(const TIteratorSetting& other98) { + priority = other98.priority; + name = other98.name; + iteratorClass = other98.iteratorClass; + properties = other98.properties; + __isset = other98.__isset; +} +TIteratorSetting& TIteratorSetting::operator=(const TIteratorSetting& other99) { + priority = other99.priority; + name = other99.name; + iteratorClass = other99.iteratorClass; + properties = other99.properties; + __isset = other99.__isset; + return *this; +} +void TIteratorSetting::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TIteratorSetting("; + out << "priority=" << to_string(priority); + out << ", " << "name=" << to_string(name); + out << ", " << "iteratorClass=" << to_string(iteratorClass); + out << ", " << "properties=" << to_string(properties); + out << ")"; +} + + +IteratorConfig::~IteratorConfig() throw() { +} + + +void IteratorConfig::__set_iterators(const std::vector & val) { + this->iterators = val; +} +std::ostream& operator<<(std::ostream& out, const IteratorConfig& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t IteratorConfig::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->iterators.clear(); + uint32_t _size100; + ::apache::thrift::protocol::TType _etype103; + xfer += iprot->readListBegin(_etype103, _size100); + this->iterators.resize(_size100); + uint32_t _i104; + for (_i104 = 0; _i104 < _size100; ++_i104) + { + xfer += this->iterators[_i104].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.iterators = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t IteratorConfig::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("IteratorConfig"); + + xfer += oprot->writeFieldBegin("iterators", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->iterators.size())); + std::vector ::const_iterator _iter105; + for (_iter105 = this->iterators.begin(); _iter105 != this->iterators.end(); ++_iter105) + { + xfer += (*_iter105).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(IteratorConfig &a, IteratorConfig &b) { + using ::std::swap; + swap(a.iterators, b.iterators); + swap(a.__isset, b.__isset); +} + +IteratorConfig::IteratorConfig(const IteratorConfig& other106) { + iterators = other106.iterators; + __isset = other106.__isset; +} +IteratorConfig& IteratorConfig::operator=(const IteratorConfig& other107) { + iterators = other107.iterators; + __isset = other107.__isset; + return *this; +} +void IteratorConfig::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "IteratorConfig("; + out << "iterators=" << to_string(iterators); + out << ")"; +} + + +TSamplerConfiguration::~TSamplerConfiguration() throw() { +} + + +void TSamplerConfiguration::__set_className(const std::string& val) { + this->className = val; +} + +void TSamplerConfiguration::__set_options(const std::map & val) { + this->options = val; +} +std::ostream& operator<<(std::ostream& out, const TSamplerConfiguration& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TSamplerConfiguration::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->className); + this->__isset.className = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->options.clear(); + uint32_t _size108; + ::apache::thrift::protocol::TType _ktype109; + ::apache::thrift::protocol::TType _vtype110; + xfer += iprot->readMapBegin(_ktype109, _vtype110, _size108); + uint32_t _i112; + for (_i112 = 0; _i112 < _size108; ++_i112) + { + std::string _key113; + xfer += iprot->readString(_key113); + std::string& _val114 = this->options[_key113]; + xfer += iprot->readString(_val114); + } + xfer += iprot->readMapEnd(); + } + this->__isset.options = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TSamplerConfiguration::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + // don't write unless we have a sampler + if (!this->className.empty()){ + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TSamplerConfiguration"); + + xfer += oprot->writeFieldBegin("className", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->className); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("options", ::apache::thrift::protocol::T_MAP, 2); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->options.size())); + std::map ::const_iterator _iter115; + for (_iter115 = this->options.begin(); _iter115 != this->options.end(); ++_iter115) + { + xfer += oprot->writeString(_iter115->first); + xfer += oprot->writeString(_iter115->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + } + return xfer; +} + +void swap(TSamplerConfiguration &a, TSamplerConfiguration &b) { + using ::std::swap; + swap(a.className, b.className); + swap(a.options, b.options); + swap(a.__isset, b.__isset); +} + +TSamplerConfiguration::TSamplerConfiguration(const TSamplerConfiguration& other116) { + className = other116.className; + options = other116.options; + __isset = other116.__isset; +} +TSamplerConfiguration& TSamplerConfiguration::operator=(const TSamplerConfiguration& other117) { + className = other117.className; + options = other117.options; + __isset = other117.__isset; + return *this; +} +void TSamplerConfiguration::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TSamplerConfiguration("; + out << "className=" << to_string(className); + out << ", " << "options=" << to_string(options); + out << ")"; +} + +}}}}}} // namespace diff --git a/src/data/extern/thriftv2/trace_constants.cpp b/src/data/extern/thriftv2/trace_constants.cpp new file mode 100644 index 00000000..d9b85132 --- /dev/null +++ b/src/data/extern/thriftv2/trace_constants.cpp @@ -0,0 +1,17 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "data/extern/thriftv2/trace_constants.h" + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace trace { namespace thrift { + +const traceConstants g_trace_constants; + +traceConstants::traceConstants() { +} + +}}}}}} // namespace + diff --git a/src/data/extern/thriftv2/trace_types.cpp b/src/data/extern/thriftv2/trace_types.cpp new file mode 100644 index 00000000..2a76d008 --- /dev/null +++ b/src/data/extern/thriftv2/trace_types.cpp @@ -0,0 +1,128 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "data/extern/thriftv2/trace_types.h" + +#include +#include + +#include + +namespace org { namespace apache { namespace accumulov2 { namespace core { namespace trace { namespace thrift { + + +TInfo::~TInfo() throw() { +} + + +void TInfo::__set_traceId(const int64_t val) { + this->traceId = val; +} + +void TInfo::__set_parentId(const int64_t val) { + this->parentId = val; +} +std::ostream& operator<<(std::ostream& out, const TInfo& obj) +{ + obj.printTo(out); + return out; +} + + +uint32_t TInfo::read(::apache::thrift::protocol::TProtocol* iprot) { + + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->traceId); + this->__isset.traceId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->parentId); + this->__isset.parentId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TInfo"); + + xfer += oprot->writeFieldBegin("traceId", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->traceId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("parentId", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->parentId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TInfo &a, TInfo &b) { + using ::std::swap; + swap(a.traceId, b.traceId); + swap(a.parentId, b.parentId); + swap(a.__isset, b.__isset); +} + +TInfo::TInfo(const TInfo& other0) { + traceId = other0.traceId; + parentId = other0.parentId; + __isset = other0.__isset; +} +TInfo& TInfo::operator=(const TInfo& other1) { + traceId = other1.traceId; + parentId = other1.parentId; + __isset = other1.__isset; + return *this; +} +void TInfo::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TInfo("; + out << "traceId=" << to_string(traceId); + out << ", " << "parentId=" << to_string(parentId); + out << ")"; +} + +}}}}}} // namespace diff --git a/src/examples/InsertTest.cpp b/src/examples/InsertTest.cpp index 686bf38d..1943eb81 100644 --- a/src/examples/InsertTest.cpp +++ b/src/examples/InsertTest.cpp @@ -29,7 +29,8 @@ #include "../include/data/constructs/rfile/RFile.h" #include "../include/data/constructs/compressor/compressor.h" #include "../include/data/constructs/compressor/zlibCompressor.h" - +#include "../include/logging/Logger.h" +#include "../include/logging/LoggerConfiguration.h" #include @@ -44,6 +45,7 @@ int main (int argc, char **argv) { +// logging::LoggerConfiguration::getConfiguration().enableLogging(logging::LOG_LEVEL::trace); if (argc < 5) { std::cout << "Arguments required: ./InsertTest" diff --git a/src/examples/test_base.h b/src/examples/test_base.h index b2d1be09..2c40d4d7 100644 --- a/src/examples/test_base.h +++ b/src/examples/test_base.h @@ -133,6 +133,7 @@ int run_test(std::string table, std::string instanceStr, std::string zks, std::s // close will free memory for objects given to it sink->close(); + std::cout << "initiate flush " << std::endl; if (ops->flush("a", "z", true)) { @@ -156,7 +157,7 @@ int run_test(std::string table, std::string instanceStr, std::string zks, std::s std::cout << "Removing table" << std::endl; - //ops->remove(); + ops->remove(); tables = ops->listTables(); diff --git a/src/interconnect/accumulo/AccumuloServerFacade.cpp b/src/interconnect/accumulo/AccumuloServerFacade.cpp index 5d96d4ae..3f78d496 100644 --- a/src/interconnect/accumulo/AccumuloServerFacade.cpp +++ b/src/interconnect/accumulo/AccumuloServerFacade.cpp @@ -12,454 +12,14 @@ * limitations under the License. */ #include "interconnect/accumulo/AccumuloServerFacade.h" +#include "logging/Logger.h" +#include "logging/LoggerConfiguration.h" namespace interconnect { -AccumuloServerFacade::AccumuloServerFacade() - : accumuloVersion(ACCUMULO_UNKNOWN) { -} - -Scan *AccumuloServerFacade::multiScan(ScanRequest, cclient::data::Range*> > *request) { - switch (accumuloVersion) { - case ACCUMULO_ONE: - return v1_multiScan(request); - }; - return nullptr; -} - -Scan *AccumuloServerFacade::AccumuloServerFacade::singleScan(ScanRequest, cclient::data::Range*> > *request) { - switch (accumuloVersion) { - case ACCUMULO_ONE: - return v1_singleScan(request); - }; - return nullptr; -} -Scan *AccumuloServerFacade::beginScan(ScanRequest, cclient::data::Range*> > *request) { - switch (accumuloVersion) { - case ACCUMULO_ONE: - return v1_beginScan(request); - }; - return nullptr; -} - -Scan *AccumuloServerFacade::continueScan(Scan *originalScan) { - switch (accumuloVersion) { - case ACCUMULO_ONE: - return v1_continueScan(originalScan); - }; - return nullptr; -} - -void *AccumuloServerFacade::write(cclient::data::security::AuthInfo *auth, std::map>> *request) { - - switch (accumuloVersion) { - case ACCUMULO_ONE: - return v1_write(auth, request); - }; - return nullptr; -} - -bool AccumuloServerFacade::dropUser(cclient::data::security::AuthInfo *auth, const std::string &user) { - switch (accumuloVersion) { - case ACCUMULO_ONE: - return v1_dropUser(auth, user); - - }; - return false; -} - -bool AccumuloServerFacade::changeUserPassword(cclient::data::security::AuthInfo *auth, const std::string &user, const std::string &password) { - switch (accumuloVersion) { - case ACCUMULO_ONE: - return v1_changeUserPassword(auth, user, password); - }; - return false; -} -bool AccumuloServerFacade::createUser(cclient::data::security::AuthInfo *auth, const std::string &user, const std::string &password) { - switch (accumuloVersion) { - case ACCUMULO_ONE: - return v1_createUser(auth, user, password); - }; - return false; -} - -std::map AccumuloServerFacade::getTableConfiguration(cclient::data::security::AuthInfo *auth, const std::string &table) { - - std::map ret; - - switch (accumuloVersion) { - case ACCUMULO_ONE: - ret = v1_getTableConfiguration(auth, table); - break; - }; - - return ret; -} - -cclient::data::security::Authorizations *AccumuloServerFacade::getUserAuths(cclient::data::security::AuthInfo *auth, const std::string &user) { - switch (accumuloVersion) { - case ACCUMULO_ONE: - return v1_getUserAuths(auth, user); - }; - return nullptr; -} - -void AccumuloServerFacade::changeUserAuths(cclient::data::security::AuthInfo *auth, const std::string &user, cclient::data::security::Authorizations *auths) { - switch (accumuloVersion) { - case ACCUMULO_ONE: - return v1_changeUserAuths(auth, user, auths); - break; - }; -} - -void AccumuloServerFacade::splitTablet(cclient::data::security::AuthInfo *auth, const std::shared_ptr extent, std::string split) { - switch (accumuloVersion) { - case ACCUMULO_ONE: - return v1_splitTablet(auth, extent, split); - break; - }; -} - -void AccumuloServerFacade::registerService(std::string instance, std::string clusterManagers) { - - switch (accumuloVersion) { - case ACCUMULO_ONE: - client->getZooKeepers(clusterManagers); - client->getInstanceId(instance); - break; - }; - -} - -void AccumuloServerFacade::close() { - switch (accumuloVersion) { - case ACCUMULO_ONE: - v1_close(); - break; - }; -} - -void AccumuloServerFacade::v1_close() { - if (NULL != client) { - client = NULL; - } - if (NULL != tserverClient) { - tserverClient = NULL; - } -} - -void AccumuloServerFacade::initialize(std::shared_ptr protocolPtr) { - client = std::make_unique(protocolPtr); - tserverClient = std::make_unique(protocolPtr); - accumuloVersion = ACCUMULO_ONE; -} - -std::map AccumuloServerFacade::getNamespaceConfiguration(cclient::data::security::AuthInfo *auth, const std::string &nameSpaceName) { - std::map ret; - - switch (accumuloVersion) { - case ACCUMULO_ONE: - ret = v1_getNamespaceConfiguration(auth, nameSpaceName); - break; - }; - - return ret; -} - -void AccumuloServerFacade::authenticate(cclient::data::security::AuthInfo *auth) { - switch (accumuloVersion) { - case ACCUMULO_ONE: - v1_authenticate(auth); - break; - }; -} - -void AccumuloServerFacade::v1_authenticate(cclient::data::security::AuthInfo *auth) { - - org::apache::accumulo::core::trace::thrift::TInfo tinfo; - org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); - - tinfo.parentId = 0; - tinfo.traceId = rand(); - - try { - if (!client->authenticateUser(tinfo, creds, creds)) { - throw cclient::exceptions::ClientException("Invalid username"); - } - } catch (const org::apache::accumulo::core::client::impl::thrift::ThriftSecurityException &tse) { - throw cclient::exceptions::ClientException(INVALID_USERNAME_PASSWORD); - } -} - -std::map AccumuloServerFacade::v1_getNamespaceConfiguration(cclient::data::security::AuthInfo *auth, const std::string &nameSpaceName) { - org::apache::accumulo::core::trace::thrift::TInfo tinfo; - org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); - - tinfo.parentId = 0; - tinfo.traceId = rand(); - std::map ret; - client->getNamespaceConfiguration(ret, tinfo, creds, nameSpaceName); - - return ret; -} - -Scan *AccumuloServerFacade::v1_singleScan(ScanRequest, cclient::data::Range*> > *request) { - Scan *initialScan = new Scan(); - - org::apache::accumulo::core::data::thrift::InitialScan scan; - - org::apache::accumulo::core::trace::thrift::TInfo scanId; - - scanId.parentId = 0; - scanId.traceId = rand(); - - std::vector *iters = request->getIterators(); - std::map > iterOptions; - for (auto it = iters->begin(); it != iters->end(); it++) { - auto myOptions = (*it)->getOptions(); - for (auto optIt = myOptions.begin(); optIt != myOptions.end(); optIt++) { - iterOptions[(*it)->getName()][(*optIt).first] = (*optIt).second; - } - } - - ScanIdentifier, cclient::data::Range*> *ident = request->getRangeIdentifiers()->at(0); - std::shared_ptr extent = ident->getGlobalMapping().at(0); - cclient::data::Range *range = ident->getIdentifiers(extent).at(0); - org::apache::accumulo::core::security::thrift::TCredentials creds = getOrSetCredentials(request->getCredentials()); - tserverClient->startScan(scan, scanId, creds, ThriftWrapper::convert(extent), ThriftWrapper::convert(range), ThriftWrapper::convert(request->getColumns()), 1024, ThriftWrapper::convert(iters), - iterOptions, request->getAuthorizations()->getAuthorizations(), true, false, 1024); - - org::apache::accumulo::core::data::thrift::ScanResult results = scan.result; - - std::vector > *kvs = ThriftWrapper::convert(results.results); - - initialScan->setHasMore(results.more); - - initialScan->setScanId(scan.scanID); - - initialScan->setNextResults(kvs); - - if (!results.more) { - tserverClient->closeScan(scanId, scan.scanID); - } - - delete kvs; - - return initialScan; -} - -Scan *AccumuloServerFacade::v1_multiScan(ScanRequest, cclient::data::Range*> > *request) { - Scan *initialScan = new Scan(); - - org::apache::accumulo::core::data::thrift::InitialMultiScan scan; - - org::apache::accumulo::core::trace::thrift::TInfo scanId; - - scanId.traceId = scan.scanID; - scanId.parentId = scan.scanID; - - std::vector *iters = request->getIterators(); - std::map > iterOptions; - for (auto it = iters->begin(); it != iters->end(); it++) { - auto myOptions = (*it)->getOptions(); - for (auto optIt = myOptions.begin(); optIt != myOptions.end(); optIt++) { - iterOptions[(*it)->getName()][(*optIt).first] = (*optIt).second; - } - } - - tserverClient->startMultiScan(scan, scanId, ThriftWrapper::convert(request->getCredentials()), ThriftWrapper::convert(request->getRangeIdentifiers()), ThriftWrapper::convert(request->getColumns()), - ThriftWrapper::convert(iters), iterOptions, request->getAuthorizations()->getAuthorizations(), true); - - org::apache::accumulo::core::data::thrift::MultiScanResult results = scan.result; - - std::vector > *kvs = ThriftWrapper::convert(results.results); - - initialScan->setHasMore(results.more); - - initialScan->setNextResults(kvs); - - tserverClient->closeMultiScan(scanId, scan.scanID); - - delete kvs; - - return initialScan; -} -org::apache::accumulo::core::security::thrift::TCredentials AccumuloServerFacade::getOrSetCredentials(cclient::data::security::AuthInfo *convert) { - std::lock_guard lock(mutex); - std::map::iterator it; - it = convertedMap.find(convert); - if (it != convertedMap.end()) { - return it->second; - } - - org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(convert); - convertedMap.insert(std::pair(convert, creds)); - return creds; - -} - -void AccumuloServerFacade::v1_registerService(std::string instance, std::string clusterManagers) { - client->getZooKeepers(clusterManagers); - client->getInstanceId(instance); -} - -Scan *AccumuloServerFacade::v1_beginScan(ScanRequest, cclient::data::Range*> > *request) { - Scan *initialScan = NULL; - if (request->getRangeIdentifiers()->size() > 1) { - initialScan = multiScan(request); - } else { - ScanIdentifier, cclient::data::Range*> *ident = request->getRangeIdentifiers()->at(0); - std::shared_ptr extent = ident->getGlobalMapping().at(0); - cclient::data::Range *range = ident->getIdentifiers(extent).at(0); - if (range->getStartKey() == NULL && range->getStopKey() == NULL) { - initialScan = v1_multiScan(request); - } else - initialScan = v1_singleScan(request); - - } - return initialScan; -} - -Scan *AccumuloServerFacade::v1_continueScan(Scan *originalScan) { - org::apache::accumulo::core::data::thrift::ScanResult results; - org::apache::accumulo::core::trace::thrift::TInfo tinfo; - - org::apache::accumulo::core::data::thrift::ScanID scanId = originalScan->getId(); - - tinfo.traceId = originalScan->getId() + 1; - tinfo.parentId = originalScan->getId(); - try { - tserverClient->continueScan(results, tinfo, scanId); - - std::vector > *kvs = ThriftWrapper::convert(results.results); - - if (results.more) - originalScan->setTopKey(kvs->back()->getKey()); - - originalScan->setHasMore(results.more); - - originalScan->setNextResults(kvs); - - if (!results.more) { - tinfo.traceId++; - tserverClient->closeScan(tinfo, originalScan->getId()); - } - - delete kvs; - } catch (org::apache::accumulo::core::tabletserver::thrift::NotServingTabletException &te) { - throw cclient::exceptions::NotServingException(te.what()); - } - return originalScan; -} - -void *AccumuloServerFacade::v1_write(cclient::data::security::AuthInfo *auth, std::map>> *request) { - - org::apache::accumulo::core::trace::thrift::TInfo tinfo; - org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); - - tinfo.parentId = 0; - tinfo.traceId = rand(); - org::apache::accumulo::core::data::thrift::UpdateID upId = tserverClient->startUpdate(tinfo, creds, org::apache::accumulo::core::tabletserver::thrift::TDurability::DEFAULT); - for (auto it = request->begin(); it != request->end(); it++) { - - tserverClient->applyUpdates(tinfo, upId, ThriftWrapper::convert(it->first), ThriftWrapper::convert(&it->second)); - } - tinfo.parentId = tinfo.traceId; - tinfo.traceId = tinfo.traceId + 1; - org::apache::accumulo::core::data::thrift::UpdateErrors errors; - tserverClient->closeUpdate(errors, tinfo, upId); -//@TODO return errors - return 0; -} - -bool AccumuloServerFacade::v1_dropUser(cclient::data::security::AuthInfo *auth, std::string user) { - org::apache::accumulo::core::trace::thrift::TInfo tinfo; - org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); - - tinfo.parentId = 0; - tinfo.traceId = rand(); - try { - client->dropLocalUser(tinfo, creds, user); - return true; - } catch (const org::apache::accumulo::core::client::impl::thrift::ThriftSecurityException &tse) { - // could not create the user for some reason - return false; - } -} - -bool AccumuloServerFacade::v1_changeUserPassword(cclient::data::security::AuthInfo *auth, std::string user, std::string password) { - org::apache::accumulo::core::trace::thrift::TInfo tinfo; - org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); - - tinfo.parentId = 0; - tinfo.traceId = rand(); - - try { - client->changeLocalUserPassword(tinfo, creds, user, password); - return true; - } catch (const org::apache::accumulo::core::client::impl::thrift::ThriftSecurityException &tse) { - // could not create the user for some reason - return false; - - } -} -bool AccumuloServerFacade::v1_createUser(cclient::data::security::AuthInfo *auth, std::string user, std::string password) { - org::apache::accumulo::core::trace::thrift::TInfo tinfo; - org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); - - tinfo.parentId = 0; - tinfo.traceId = rand(); - try { - client->createLocalUser(tinfo, creds, user, password); - return true; - } catch (const org::apache::accumulo::core::client::impl::thrift::ThriftSecurityException &tse) { - // could not create the user for some reason - return false; - - } - -} - -std::map AccumuloServerFacade::v1_getTableConfiguration(cclient::data::security::AuthInfo *auth, std::string table) { - org::apache::accumulo::core::trace::thrift::TInfo tinfo; - org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); - - tinfo.parentId = 0; - tinfo.traceId = rand(); - std::map ret; - client->getTableConfiguration(ret, tinfo, creds, table); - - return ret; -} - -cclient::data::security::Authorizations *AccumuloServerFacade::v1_getUserAuths(cclient::data::security::AuthInfo *auth, std::string user) { - org::apache::accumulo::core::trace::thrift::TInfo tinfo; - org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); - - tinfo.parentId = 0; - tinfo.traceId = rand(); - std::vector returnStrings; - client->getUserAuthorizations(returnStrings, tinfo, creds, user); - return new cclient::data::security::Authorizations(&returnStrings); -} - -void AccumuloServerFacade::v1_changeUserAuths(cclient::data::security::AuthInfo *auth, std::string user, cclient::data::security::Authorizations *auths) { - org::apache::accumulo::core::trace::thrift::TInfo tinfo; - org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); - - tinfo.parentId = 0; - tinfo.traceId = rand(); - client->changeAuthorizations(tinfo, creds, user, auths->getAuthorizations()); -} - -void AccumuloServerFacade::v1_splitTablet(cclient::data::security::AuthInfo *auth, std::shared_ptr extent, std::string split) { - org::apache::accumulo::core::trace::thrift::TInfo tinfo; - org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); - - org::apache::accumulo::core::data::thrift::TKeyExtent ke = ThriftWrapper::convert(extent); - tinfo.parentId = 0; - tinfo.traceId = rand(); - tserverClient->splitTablet(tinfo, creds, ke, split); +AccumuloServerFacade::AccumuloServerFacade(int version) + : accumuloVersion(version), + logger(logging::LoggerFactory::getLogger()) { } } /* namespace interconnect */ diff --git a/src/interconnect/accumulo/AccumuloServerOne.cpp b/src/interconnect/accumulo/AccumuloServerOne.cpp new file mode 100644 index 00000000..fc96a342 --- /dev/null +++ b/src/interconnect/accumulo/AccumuloServerOne.cpp @@ -0,0 +1,406 @@ +/* + * Licensed 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 "interconnect/accumulo/AccumuloServerOne.h" +#include "logging/Logger.h" +#include "logging/LoggerConfiguration.h" + +namespace interconnect { + +AccumuloServerFacadeV1::AccumuloServerFacadeV1() + : AccumuloServerFacade(ACCUMULO_ONE),logger(logging::LoggerFactory::getLogger()) { +} + +Scan *AccumuloServerFacadeV1::multiScan(ScanRequest, cclient::data::Range*> > *request) { + return v1_multiScan(request); +} + +Scan *AccumuloServerFacadeV1::AccumuloServerFacadeV1::singleScan(ScanRequest, cclient::data::Range*> > *request) { + return v1_singleScan(request); +} +Scan *AccumuloServerFacadeV1::beginScan(ScanRequest, cclient::data::Range*> > *request) { + return v1_beginScan(request); +} + +Scan *AccumuloServerFacadeV1::continueScan(Scan *originalScan) { + return v1_continueScan(originalScan); +} + +void *AccumuloServerFacadeV1::write(cclient::data::security::AuthInfo *auth, std::map>> *request) { + return v1_write(auth, request); +} + +bool AccumuloServerFacadeV1::dropUser(cclient::data::security::AuthInfo *auth, const std::string &user) { + return v1_dropUser(auth, user); +} + +bool AccumuloServerFacadeV1::changeUserPassword(cclient::data::security::AuthInfo *auth, const std::string &user, const std::string &password) { + return v1_changeUserPassword(auth, user, password); +} +bool AccumuloServerFacadeV1::createUser(cclient::data::security::AuthInfo *auth, const std::string &user, const std::string &password) { + return v1_createUser(auth, user, password); +} + +std::map AccumuloServerFacadeV1::getTableConfiguration(cclient::data::security::AuthInfo *auth, const std::string &table) { + + std::map ret; + + ret = v1_getTableConfiguration(auth, table); + + return ret; +} + +cclient::data::security::Authorizations *AccumuloServerFacadeV1::getUserAuths(cclient::data::security::AuthInfo *auth, const std::string &user) { + return v1_getUserAuths(auth, user); +} + +void AccumuloServerFacadeV1::changeUserAuths(cclient::data::security::AuthInfo *auth, const std::string &user, cclient::data::security::Authorizations *auths) { + return v1_changeUserAuths(auth, user, auths); +} + +void AccumuloServerFacadeV1::splitTablet(cclient::data::security::AuthInfo *auth, const std::shared_ptr extent, std::string split) { + return v1_splitTablet(auth, extent, split); +} + +void AccumuloServerFacadeV1::registerService(std::string instance, std::string clusterManagers) { + + client->getZooKeepers(clusterManagers); + client->getInstanceId(instance); + + +} + +void AccumuloServerFacadeV1::close() { + v1_close(); +} + +void AccumuloServerFacadeV1::v1_close() { + if (NULL != client) { + client = NULL; + } + if (NULL != tserverClient) { + tserverClient = NULL; + } +} + + +void AccumuloServerFacadeV1::initialize(std::shared_ptr protocolPtr, bool callRegistration) { + + std::string zk,cm; + client = std::make_unique(protocolPtr); + tserverClient = std::make_unique(protocolPtr); + registerService(zk,cm); +} + + +std::map AccumuloServerFacadeV1::getNamespaceConfiguration(cclient::data::security::AuthInfo *auth, const std::string &nameSpaceName) { + std::map ret; + + ret = v1_getNamespaceConfiguration(auth, nameSpaceName); + + return ret; +} + +void AccumuloServerFacadeV1::authenticate(cclient::data::security::AuthInfo *auth) { + v1_authenticate(auth); +} + +void AccumuloServerFacadeV1::v1_authenticate(cclient::data::security::AuthInfo *auth) { + + org::apache::accumulo::core::trace::thrift::TInfo tinfo; + org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); + + tinfo.parentId = 0; + tinfo.traceId = rand(); + + try { + if (!client->authenticateUser(tinfo, creds, creds)) { + throw cclient::exceptions::ClientException("Invalid username"); + } + } catch (const org::apache::accumulo::core::client::impl::thrift::ThriftSecurityException &tse) { + throw cclient::exceptions::ClientException(INVALID_USERNAME_PASSWORD); + } +} + +std::map AccumuloServerFacadeV1::v1_getNamespaceConfiguration(cclient::data::security::AuthInfo *auth, const std::string &nameSpaceName) { + org::apache::accumulo::core::trace::thrift::TInfo tinfo; + org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); + + tinfo.parentId = 0; + tinfo.traceId = rand(); + std::map ret; + client->getNamespaceConfiguration(ret, tinfo, creds, nameSpaceName); + + return ret; +} + +Scan *AccumuloServerFacadeV1::v1_singleScan(ScanRequest, cclient::data::Range*> > *request) { + Scan *initialScan = new Scan(); + + org::apache::accumulo::core::data::thrift::InitialScan scan; + + org::apache::accumulo::core::trace::thrift::TInfo scanId; + + scanId.parentId = 0; + scanId.traceId = rand(); + + std::vector *iters = request->getIterators(); + std::map > iterOptions; + for (auto it = iters->begin(); it != iters->end(); it++) { + auto myOptions = (*it)->getOptions(); + for (auto optIt = myOptions.begin(); optIt != myOptions.end(); optIt++) { + iterOptions[(*it)->getName()][(*optIt).first] = (*optIt).second; + } + } + + ScanIdentifier, cclient::data::Range*> *ident = request->getRangeIdentifiers()->at(0); + std::shared_ptr extent = ident->getGlobalMapping().at(0); + cclient::data::Range *range = ident->getIdentifiers(extent).at(0); + org::apache::accumulo::core::security::thrift::TCredentials creds = getOrSetCredentials(request->getCredentials()); + tserverClient->startScan(scan, scanId, creds, ThriftWrapper::convert(extent), ThriftWrapper::convert(range), ThriftWrapper::convert(request->getColumns()), 1024, ThriftWrapper::convert(iters), + iterOptions, request->getAuthorizations()->getAuthorizations(), true, false, 1024); + + org::apache::accumulo::core::data::thrift::ScanResult results = scan.result; + + std::vector > *kvs = ThriftWrapper::convert(results.results); + + initialScan->setHasMore(results.more); + + initialScan->setScanId(scan.scanID); + + initialScan->setNextResults(kvs); + + if (!results.more) { + tserverClient->closeScan(scanId, scan.scanID); + } + + delete kvs; + + return initialScan; +} + +Scan *AccumuloServerFacadeV1::v1_multiScan(ScanRequest, cclient::data::Range*> > *request) { + Scan *initialScan = new Scan(); + + org::apache::accumulo::core::data::thrift::InitialMultiScan scan; + + org::apache::accumulo::core::trace::thrift::TInfo scanId; + + scanId.traceId = scan.scanID; + scanId.parentId = scan.scanID; + + std::vector *iters = request->getIterators(); + std::map > iterOptions; + for (auto it = iters->begin(); it != iters->end(); it++) { + auto myOptions = (*it)->getOptions(); + for (auto optIt = myOptions.begin(); optIt != myOptions.end(); optIt++) { + iterOptions[(*it)->getName()][(*optIt).first] = (*optIt).second; + } + } + + tserverClient->startMultiScan(scan, scanId, ThriftWrapper::convert(request->getCredentials()), ThriftWrapper::convert(request->getRangeIdentifiers()), ThriftWrapper::convert(request->getColumns()), + ThriftWrapper::convert(iters), iterOptions, request->getAuthorizations()->getAuthorizations(), true); + + org::apache::accumulo::core::data::thrift::MultiScanResult results = scan.result; + + std::vector > *kvs = ThriftWrapper::convert(results.results); + + initialScan->setHasMore(results.more); + + initialScan->setNextResults(kvs); + + tserverClient->closeMultiScan(scanId, scan.scanID); + + delete kvs; + + return initialScan; +} +org::apache::accumulo::core::security::thrift::TCredentials AccumuloServerFacadeV1::getOrSetCredentials(cclient::data::security::AuthInfo *convert) { + std::lock_guard lock(mutex); + std::map::iterator it; + it = convertedMap.find(convert); + if (it != convertedMap.end()) { + return it->second; + } + + org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(convert); + convertedMap.insert(std::pair(convert, creds)); + return creds; + +} + +void AccumuloServerFacadeV1::v1_registerService(std::string instance, std::string clusterManagers) { + client->getZooKeepers(clusterManagers); + client->getInstanceId(instance); +} + +Scan *AccumuloServerFacadeV1::v1_beginScan(ScanRequest, cclient::data::Range*> > *request) { + Scan *initialScan = NULL; + if (request->getRangeIdentifiers()->size() > 1) { + initialScan = multiScan(request); + } else { + ScanIdentifier, cclient::data::Range*> *ident = request->getRangeIdentifiers()->at(0); + std::shared_ptr extent = ident->getGlobalMapping().at(0); + cclient::data::Range *range = ident->getIdentifiers(extent).at(0); + if (range->getStartKey() == NULL && range->getStopKey() == NULL) { + initialScan = v1_multiScan(request); + } else + initialScan = v1_singleScan(request); + + } + return initialScan; +} + +interconnect::Scan *AccumuloServerFacadeV1::v1_continueScan(Scan *originalScan) { + org::apache::accumulo::core::data::thrift::ScanResult results; + org::apache::accumulo::core::trace::thrift::TInfo tinfo; + + org::apache::accumulo::core::data::thrift::ScanID scanId = originalScan->getId(); + + tinfo.traceId = originalScan->getId() + 1; + tinfo.parentId = originalScan->getId(); + try { + tserverClient->continueScan(results, tinfo, scanId); + + std::vector > *kvs = ThriftWrapper::convert(results.results); + + if (results.more) + originalScan->setTopKey(kvs->back()->getKey()); + + originalScan->setHasMore(results.more); + + originalScan->setNextResults(kvs); + + if (!results.more) { + tinfo.traceId++; + tserverClient->closeScan(tinfo, originalScan->getId()); + } + + delete kvs; + } catch (org::apache::accumulo::core::tabletserver::thrift::NotServingTabletException &te) { + throw cclient::exceptions::NotServingException(te.what()); + } + return originalScan; +} + +void *AccumuloServerFacadeV1::v1_write(cclient::data::security::AuthInfo *auth, std::map>> *request) { + + org::apache::accumulo::core::trace::thrift::TInfo tinfo; + org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); + + tinfo.parentId = 0; + tinfo.traceId = rand(); + org::apache::accumulo::core::data::thrift::UpdateID upId = tserverClient->startUpdate(tinfo, creds, org::apache::accumulo::core::tabletserver::thrift::TDurability::DEFAULT); + for (auto it = request->begin(); it != request->end(); it++) { + + tserverClient->applyUpdates(tinfo, upId, ThriftWrapper::convert(it->first), ThriftWrapper::convert(&it->second)); + } + tinfo.parentId = tinfo.traceId; + tinfo.traceId = tinfo.traceId + 1; + org::apache::accumulo::core::data::thrift::UpdateErrors errors; + tserverClient->closeUpdate(errors, tinfo, upId); +//@TODO return errors + return 0; +} + +bool AccumuloServerFacadeV1::v1_dropUser(cclient::data::security::AuthInfo *auth, std::string user) { + org::apache::accumulo::core::trace::thrift::TInfo tinfo; + org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); + + tinfo.parentId = 0; + tinfo.traceId = rand(); + try { + client->dropLocalUser(tinfo, creds, user); + return true; + } catch (const org::apache::accumulo::core::client::impl::thrift::ThriftSecurityException &tse) { + // could not create the user for some reason + return false; + } +} + +bool AccumuloServerFacadeV1::v1_changeUserPassword(cclient::data::security::AuthInfo *auth, std::string user, std::string password) { + org::apache::accumulo::core::trace::thrift::TInfo tinfo; + org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); + + tinfo.parentId = 0; + tinfo.traceId = rand(); + + try { + client->changeLocalUserPassword(tinfo, creds, user, password); + return true; + } catch (const org::apache::accumulo::core::client::impl::thrift::ThriftSecurityException &tse) { + // could not create the user for some reason + return false; + + } +} +bool AccumuloServerFacadeV1::v1_createUser(cclient::data::security::AuthInfo *auth, std::string user, std::string password) { + org::apache::accumulo::core::trace::thrift::TInfo tinfo; + org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); + + tinfo.parentId = 0; + tinfo.traceId = rand(); + try { + client->createLocalUser(tinfo, creds, user, password); + return true; + } catch (const org::apache::accumulo::core::client::impl::thrift::ThriftSecurityException &tse) { + // could not create the user for some reason + return false; + + } + +} + +std::map AccumuloServerFacadeV1::v1_getTableConfiguration(cclient::data::security::AuthInfo *auth, std::string table) { + org::apache::accumulo::core::trace::thrift::TInfo tinfo; + org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); + + tinfo.parentId = 0; + tinfo.traceId = rand(); + std::map ret; + client->getTableConfiguration(ret, tinfo, creds, table); + + return ret; +} + +cclient::data::security::Authorizations *AccumuloServerFacadeV1::v1_getUserAuths(cclient::data::security::AuthInfo *auth, std::string user) { + org::apache::accumulo::core::trace::thrift::TInfo tinfo; + org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); + + tinfo.parentId = 0; + tinfo.traceId = rand(); + std::vector returnStrings; + client->getUserAuthorizations(returnStrings, tinfo, creds, user); + return new cclient::data::security::Authorizations(&returnStrings); +} + +void AccumuloServerFacadeV1::v1_changeUserAuths(cclient::data::security::AuthInfo *auth, std::string user, cclient::data::security::Authorizations *auths) { + org::apache::accumulo::core::trace::thrift::TInfo tinfo; + org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); + + tinfo.parentId = 0; + tinfo.traceId = rand(); + client->changeAuthorizations(tinfo, creds, user, auths->getAuthorizations()); +} + +void AccumuloServerFacadeV1::v1_splitTablet(cclient::data::security::AuthInfo *auth, std::shared_ptr extent, std::string split) { + org::apache::accumulo::core::trace::thrift::TInfo tinfo; + org::apache::accumulo::core::security::thrift::TCredentials creds = ThriftWrapper::convert(auth); + + org::apache::accumulo::core::data::thrift::TKeyExtent ke = ThriftWrapper::convert(extent); + tinfo.parentId = 0; + tinfo.traceId = rand(); + tserverClient->splitTablet(tinfo, creds, ke, split); +} + +} /* namespace interconnect */ diff --git a/src/interconnect/accumulo/AccumuloServerTwo.cpp b/src/interconnect/accumulo/AccumuloServerTwo.cpp new file mode 100644 index 00000000..3076a63c --- /dev/null +++ b/src/interconnect/accumulo/AccumuloServerTwo.cpp @@ -0,0 +1,441 @@ +/* + * Licensed 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 "interconnect/accumulo/AccumuloServerTwo.h" +#include "logging/Logger.h" +#include "logging/LoggerConfiguration.h" + +namespace interconnect { + +AccumuloServerFacadeV2::AccumuloServerFacadeV2() + : AccumuloServerFacade(ACCUMULO_TWO), + logger(logging::LoggerFactory::getLogger()) { +} + +Scan *AccumuloServerFacadeV2::multiScan(ScanRequest, cclient::data::Range*> > *request) { + return v2_multiScan(request); +} + +Scan *AccumuloServerFacadeV2::AccumuloServerFacadeV2::singleScan(ScanRequest, cclient::data::Range*> > *request) { + return v2_singleScan(request); +} +Scan *AccumuloServerFacadeV2::beginScan(ScanRequest, cclient::data::Range*> > *request) { + return v2_beginScan(request); +} + +Scan *AccumuloServerFacadeV2::continueScan(Scan *originalScan) { + return v2_continueScan(originalScan); +} + +void *AccumuloServerFacadeV2::write(cclient::data::security::AuthInfo *auth, std::map>> *request) { + return v2_write(auth, request); + +} + +bool AccumuloServerFacadeV2::dropUser(cclient::data::security::AuthInfo *auth, const std::string &user) { + return v2_dropUser(auth, user); +} + +bool AccumuloServerFacadeV2::changeUserPassword(cclient::data::security::AuthInfo *auth, const std::string &user, const std::string &password) { + return v2_changeUserPassword(auth, user, password); + +} +bool AccumuloServerFacadeV2::createUser(cclient::data::security::AuthInfo *auth, const std::string &user, const std::string &password) { + return v2_createUser(auth, user, password); +} + +std::map AccumuloServerFacadeV2::getTableConfiguration(cclient::data::security::AuthInfo *auth, const std::string &table) { + + std::map ret; + + ret = v2_getTableConfiguration(auth, table); + + return ret; +} + +cclient::data::security::Authorizations *AccumuloServerFacadeV2::getUserAuths(cclient::data::security::AuthInfo *auth, const std::string &user) { + return v2_getUserAuths(auth, user); +} + +void AccumuloServerFacadeV2::changeUserAuths(cclient::data::security::AuthInfo *auth, const std::string &user, cclient::data::security::Authorizations *auths) { + return v2_changeUserAuths(auth, user, auths); +} + +void AccumuloServerFacadeV2::splitTablet(cclient::data::security::AuthInfo *auth, const std::shared_ptr extent, std::string split) { + return v2_splitTablet(auth, extent, split); +} + +void AccumuloServerFacadeV2::registerService(std::string instance, std::string clusterManagers) { + + client_V2->getInstanceId(instance); + client_V2->getZooKeepers(clusterManagers); +} + +void AccumuloServerFacadeV2::close() { + v2_close(); +} + +void AccumuloServerFacadeV2::initialize(std::shared_ptr protocolPtr, bool callRegistration) { + + std::string zk, cm; + client_V2 = std::make_unique(protocolPtr); + tserverClient_V2 = std::make_unique(protocolPtr); + accumuloVersion = ACCUMULO_TWO; +} + +std::map AccumuloServerFacadeV2::getNamespaceConfiguration(cclient::data::security::AuthInfo *auth, const std::string &nameSpaceName) { + std::map ret; + + ret = v2_getNamespaceConfiguration(auth, nameSpaceName); + return ret; +} + +void AccumuloServerFacadeV2::authenticate(cclient::data::security::AuthInfo *auth) { + v2_authenticate(auth); +} + +void AccumuloServerFacadeV2::v2_authenticate(cclient::data::security::AuthInfo *auth) { + + org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + org::apache::accumulov2::core::securityImpl::thrift::TCredentials creds = ThriftV2Wrapper::convert(auth); + + tinfo.parentId = 0; + tinfo.traceId = rand(); + + try { + if (!client_V2->authenticateUser(tinfo, creds, creds)) { + throw cclient::exceptions::ClientException("Invalid username"); + } + } catch (const org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &tse) { + throw cclient::exceptions::ClientException(INVALID_USERNAME_PASSWORD); + } +} + +std::map AccumuloServerFacadeV2::v2_getNamespaceConfiguration(cclient::data::security::AuthInfo *auth, const std::string &nameSpaceName) { + org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + org::apache::accumulov2::core::securityImpl::thrift::TCredentials creds = ThriftV2Wrapper::convert(auth); + + tinfo.parentId = 0; + tinfo.traceId = rand(); + std::map ret; + client_V2->getNamespaceConfiguration(ret, tinfo, creds, nameSpaceName); + + return ret; +} + +Scan * AccumuloServerFacadeV2::v2_singleScan(ScanRequest, cclient::data::Range*> > *request) { + Scan *initialScan = new Scan(); + + org::apache::accumulov2::core::dataImpl::thrift::InitialScan scan; + + org::apache::accumulov2::core::trace::thrift::TInfo scanId; + + scanId.parentId = 0; + scanId.traceId = rand(); + + std::vector *iters = request->getIterators(); + std::map > iterOptions; + for (auto it = iters->begin(); it != iters->end(); it++) { + auto myOptions = (*it)->getOptions(); + for (auto optIt = myOptions.begin(); optIt != myOptions.end(); optIt++) { + iterOptions[(*it)->getName()][(*optIt).first] = (*optIt).second; + } + } + + ScanIdentifier, cclient::data::Range*> *ident = request->getRangeIdentifiers()->at(0); + std::shared_ptr extent = ident->getGlobalMapping().at(0); + cclient::data::Range *range = ident->getIdentifiers(extent).at(0); + org::apache::accumulov2::core::securityImpl::thrift::TCredentials creds = getOrSetCredentialsV2(request->getCredentials()); + /** + * void startScan( ::org::apache::accumulov2::core::dataImpl::thrift::InitialScan& _return, + * const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, + * const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, + * const ::org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent& extent, + * const ::org::apache::accumulov2::core::dataImpl::thrift::TRange& range, + * const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & columns, + * const int32_t batchSize, const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & ssiList, + * const std::map > & ssio, const std::vector & authorizations, + * const bool waitForWrites, const bool isolated, const int64_t readaheadThreshold, + * + * + * const TSamplerConfiguration& samplerConfig, const int64_t batchTimeOut, + * const std::string& classLoaderContext, const std::map & executionHints); + */ + org::apache::accumulov2::core::tabletserver::thrift::TSamplerConfiguration config; + std::map executionHints; + + logging::LOG_DEBUG(logger) << "extent is " << extent << " columns " << request->getColumns()->size(); + + tserverClient_V2->startScan(scan, scanId, creds, ThriftV2Wrapper::convert(extent), ThriftV2Wrapper::convert(range), ThriftV2Wrapper::convert(request->getColumns()), 1024, + ThriftV2Wrapper::convert(iters), iterOptions, request->getAuthorizations()->getAuthorizations(), true, false, 1024, config, 1024 * 5, "", executionHints); + + org::apache::accumulov2::core::dataImpl::thrift::ScanResult results = scan.result; + + std::vector > *kvs = ThriftV2Wrapper::convert(results.results); + + initialScan->setHasMore(results.more); + + initialScan->setScanId(scan.scanID); + + initialScan->setNextResults(kvs); + + if (!results.more) { + tserverClient_V2->closeScan(scanId, scan.scanID); + } + + delete kvs; + + return initialScan; +} + +Scan * AccumuloServerFacadeV2::v2_multiScan(ScanRequest, cclient::data::Range*> > *request) { + Scan *initialScan = new Scan(); + + org::apache::accumulov2::core::dataImpl::thrift::InitialMultiScan scan; + + org::apache::accumulov2::core::trace::thrift::TInfo scanId; + + scanId.traceId = scan.scanID; + scanId.parentId = scan.scanID; + + std::vector *iters = request->getIterators(); + std::map > iterOptions; + for (auto it = iters->begin(); it != iters->end(); it++) { + auto myOptions = (*it)->getOptions(); + for (auto optIt = myOptions.begin(); optIt != myOptions.end(); optIt++) { + iterOptions[(*it)->getName()][(*optIt).first] = (*optIt).second; + } + } + + /** + * void startMultiScan( ::org::apache::accumulov2::core::dataImpl::thrift::InitialMultiScan& _return, + * const ::org::apache::accumulov2::core::trace::thrift::TInfo& tinfo, + * const ::org::apache::accumulov2::core::securityImpl::thrift::TCredentials& credentials, + * const ::org::apache::accumulov2::core::dataImpl::thrift::ScanBatch& batch, + * const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TColumn> & columns, + * const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::IterInfo> & ssiList, + * const std::map > & ssio, + const std::vector & authorizations, const bool waitForWrites, + const TSamplerConfiguration& samplerConfig, const int64_t batchTimeOut, + const std::string& classLoaderContext, const std::map & executionHints); + */ + + org::apache::accumulov2::core::tabletserver::thrift::TSamplerConfiguration config; + std::map executionHints; + + tserverClient_V2->startMultiScan(scan, scanId, ThriftV2Wrapper::convert(request->getCredentials()), ThriftV2Wrapper::convert(request->getRangeIdentifiers()), + ThriftV2Wrapper::convert(request->getColumns()), ThriftV2Wrapper::convert(iters), iterOptions, request->getAuthorizations()->getAuthorizations(), true, config, + 1024 * 5, "", executionHints); + + org::apache::accumulov2::core::dataImpl::thrift::MultiScanResult results = scan.result; + + std::vector > *kvs = ThriftV2Wrapper::convert(results.results); + + initialScan->setHasMore(results.more); + + initialScan->setNextResults(kvs); + + tserverClient_V2->closeMultiScan(scanId, scan.scanID); + + delete kvs; + + return initialScan; +} +org::apache::accumulov2::core::securityImpl::thrift::TCredentials AccumuloServerFacadeV2::getOrSetCredentialsV2(cclient::data::security::AuthInfo * convert) { + std::lock_guard lock(mutex); + std::map::iterator it; + it = convertedMap_V2.find(convert); + if (it != convertedMap_V2.end()) { + return it->second; + } + + org::apache::accumulov2::core::securityImpl::thrift::TCredentials creds = ThriftV2Wrapper::convert(convert); + convertedMap_V2.insert(std::pair(convert, creds)); + return creds; + +} + +void AccumuloServerFacadeV2::v2_registerService(std::string instance, std::string clusterManagers) { + client_V2->getZooKeepers(clusterManagers); + client_V2->getInstanceId(instance); +} + +Scan * AccumuloServerFacadeV2::v2_beginScan(ScanRequest, cclient::data::Range*> > *request) { + Scan *initialScan = NULL; + if (request->getRangeIdentifiers()->size() > 1) { + initialScan = multiScan(request); + } else { + ScanIdentifier, cclient::data::Range*> *ident = request->getRangeIdentifiers()->at(0); + std::shared_ptr extent = ident->getGlobalMapping().at(0); + cclient::data::Range *range = ident->getIdentifiers(extent).at(0); + if (range->getStartKey() == NULL && range->getStopKey() == NULL) { + initialScan = v2_multiScan(request); + } else + initialScan = v2_singleScan(request); + + } + return initialScan; +} + +Scan * AccumuloServerFacadeV2::v2_continueScan(Scan * originalScan) { + org::apache::accumulov2::core::dataImpl::thrift::ScanResult results; + org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + + org::apache::accumulov2::core::dataImpl::thrift::ScanID scanId = originalScan->getId(); + + tinfo.traceId = originalScan->getId() + 1; + tinfo.parentId = originalScan->getId(); + try { + tserverClient_V2->continueScan(results, tinfo, scanId); + + std::vector > *kvs = ThriftV2Wrapper::convert(results.results); + + if (results.more) + originalScan->setTopKey(kvs->back()->getKey()); + + originalScan->setHasMore(results.more); + + originalScan->setNextResults(kvs); + + if (!results.more) { + tinfo.traceId++; + tserverClient_V2->closeScan(tinfo, originalScan->getId()); + } + + delete kvs; + } catch (org::apache::accumulov2::core::tabletserver::thrift::NotServingTabletException &te) { + throw cclient::exceptions::NotServingException(te.what()); + } + return originalScan; +} + +void *AccumuloServerFacadeV2::v2_write(cclient::data::security::AuthInfo *auth, std::map>> *request) { + + org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + org::apache::accumulov2::core::securityImpl::thrift::TCredentials creds = ThriftV2Wrapper::convert(auth); + + tinfo.parentId = 0; + tinfo.traceId = rand(); + org::apache::accumulov2::core::dataImpl::thrift::UpdateID upId = tserverClient_V2->startUpdate(tinfo, creds, org::apache::accumulov2::core::tabletserver::thrift::TDurability::DEFAULT); + for (auto it = request->begin(); it != request->end(); it++) { + + tserverClient_V2->applyUpdates(tinfo, upId, ThriftV2Wrapper::convert(it->first), ThriftV2Wrapper::convert(&it->second)); + } + tinfo.parentId = tinfo.traceId; + tinfo.traceId = tinfo.traceId + 1; + org::apache::accumulov2::core::dataImpl::thrift::UpdateErrors errors; + tserverClient_V2->closeUpdate(errors, tinfo, upId); +//@TODO return errors + return 0; +} + +bool AccumuloServerFacadeV2::v2_dropUser(cclient::data::security::AuthInfo *auth, std::string user) { + org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + org::apache::accumulov2::core::securityImpl::thrift::TCredentials creds = ThriftV2Wrapper::convert(auth); + + tinfo.parentId = 0; + tinfo.traceId = rand(); + try { + client_V2->dropLocalUser(tinfo, creds, user); + return true; + } catch (const org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &tse) { + // could not create the user for some reason + return false; + } +} + +bool AccumuloServerFacadeV2::v2_changeUserPassword(cclient::data::security::AuthInfo *auth, std::string user, std::string password) { + org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + org::apache::accumulov2::core::securityImpl::thrift::TCredentials creds = ThriftV2Wrapper::convert(auth); + + tinfo.parentId = 0; + tinfo.traceId = rand(); + + try { + client_V2->changeLocalUserPassword(tinfo, creds, user, password); + return true; + } catch (const org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &tse) { + // could not create the user for some reason + return false; + + } +} +bool AccumuloServerFacadeV2::v2_createUser(cclient::data::security::AuthInfo *auth, std::string user, std::string password) { + org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + org::apache::accumulov2::core::securityImpl::thrift::TCredentials creds = ThriftV2Wrapper::convert(auth); + + tinfo.parentId = 0; + tinfo.traceId = rand(); + try { + client_V2->createLocalUser(tinfo, creds, user, password); + return true; + } catch (const org::apache::accumulov2::core::clientImpl::thrift::ThriftSecurityException &tse) { + // could not create the user for some reason + return false; + + } + +} + +std::map AccumuloServerFacadeV2::v2_getTableConfiguration(cclient::data::security::AuthInfo *auth, std::string table) { + org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + org::apache::accumulov2::core::securityImpl::thrift::TCredentials creds = ThriftV2Wrapper::convert(auth); + + tinfo.parentId = 0; + tinfo.traceId = rand(); + std::map ret; + client_V2->getTableConfiguration(ret, tinfo, creds, table); + + return ret; +} + +cclient::data::security::Authorizations *AccumuloServerFacadeV2::v2_getUserAuths(cclient::data::security::AuthInfo *auth, std::string user) { + org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + org::apache::accumulov2::core::securityImpl::thrift::TCredentials creds = ThriftV2Wrapper::convert(auth); + + tinfo.parentId = 0; + tinfo.traceId = rand(); + std::vector returnStrings; + client_V2->getUserAuthorizations(returnStrings, tinfo, creds, user); + return new cclient::data::security::Authorizations(&returnStrings); +} + +void AccumuloServerFacadeV2::v2_changeUserAuths(cclient::data::security::AuthInfo *auth, std::string user, cclient::data::security::Authorizations *auths) { + org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + org::apache::accumulov2::core::securityImpl::thrift::TCredentials creds = ThriftV2Wrapper::convert(auth); + + tinfo.parentId = 0; + tinfo.traceId = rand(); + client_V2->changeAuthorizations(tinfo, creds, user, auths->getAuthorizations()); +} + +void AccumuloServerFacadeV2::v2_splitTablet(cclient::data::security::AuthInfo *auth, std::shared_ptr extent, std::string split) { + org::apache::accumulov2::core::trace::thrift::TInfo tinfo; + org::apache::accumulov2::core::securityImpl::thrift::TCredentials creds = ThriftV2Wrapper::convert(auth); + + org::apache::accumulov2::core::dataImpl::thrift::TKeyExtent ke = ThriftV2Wrapper::convert(extent); + tinfo.parentId = 0; + tinfo.traceId = rand(); + tserverClient_V2->splitTablet(tinfo, creds, ke, split); +} + +void AccumuloServerFacadeV2::v2_close() { + + if (NULL != client_V2) { + client_V2 = NULL; + } + if (NULL != tserverClient_V2) { + tserverClient_V2 = NULL; + } +} +} /* namespace interconnect */ diff --git a/src/interconnect/tableOps/ClientTableOps.cpp b/src/interconnect/tableOps/ClientTableOps.cpp index 96bd0bf5..caa33dfa 100644 --- a/src/interconnect/tableOps/ClientTableOps.cpp +++ b/src/interconnect/tableOps/ClientTableOps.cpp @@ -207,9 +207,10 @@ void AccumuloTableOperations::addSplits(std::set partitions) { for (std::string partition : partitions) { bool success = false; while (!success) { + logging::LOG_DEBUG(logger) << "Adding split " << partition << " for table id " << tableId; cclient::impl::TabletLocator *tabletLocator = cclient::impl::cachedLocators.getLocator(cclient::impl::LocatorKey(connectorInstance, tableId)); cclient::data::TabletLocation location = tabletLocator->locateTablet(credentials, partition, false, false); - + logging::LOG_DEBUG(logger) << "Located server for " << partition << " " << location.getServer() << ":" << location.getPort(); std::shared_ptr connection = std::make_shared(location.getServer(), location.getPort(), -1); auto cachedTransport = distributedConnector->getTransporter(connection); @@ -219,10 +220,12 @@ void AccumuloTableOperations::addSplits(std::set partitions) { cachedTransport->getTransport()->splitTablet(credentials, location.getExtent(), partition); success = true; } catch (const apache::thrift::protocol::TProtocolException &tpe) { + logging::LOG_ERROR(logger) << "Received exception while adding split " << partition << " " << tpe.what(); cachedTransport->sawError(true); distributedConnector->freeTransport(cachedTransport); success = false; } catch (const apache::thrift::transport::TTransportException &tpe) { + logging::LOG_ERROR(logger) << "Received exception while adding split " << partition << " " << tpe.what(); cachedTransport->sawError(true); distributedConnector->freeTransport(cachedTransport); success = false; diff --git a/src/interconnect/transport/accumulo/BaseTransport.cpp b/src/interconnect/transport/accumulo/BaseTransport.cpp index 412a88dc..88052483 100644 --- a/src/interconnect/transport/accumulo/BaseTransport.cpp +++ b/src/interconnect/transport/accumulo/BaseTransport.cpp @@ -12,12 +12,22 @@ * limitations under the License. */ #include "interconnect/transport/BaseTransport.h" +#include "logging/Logger.h" +#include "logging/LoggerConfiguration.h" namespace interconnect { ThriftTransporter::ThriftTransporter(const std::shared_ptr &conn) - : interconnect::ServerTransport>(conn) { - + : interconnect::ServerTransport>(conn), + logger(logging::LoggerFactory::getLogger()) { + switch (cclient::data::InstanceVersion::getVersion(conn->getHost())) { + case 1: + server = std::make_unique(); + break; + case 2: + server = std::make_unique(); + break; + } newTransporter(conn); } @@ -26,7 +36,7 @@ ThriftTransporter::~ThriftTransporter() { } std::map ThriftTransporter::getNamespaceConfiguration(cclient::data::security::AuthInfo *auth, const std::string &nameSpaceName) { - return server.getNamespaceConfiguration(auth, nameSpaceName); + return server->getNamespaceConfiguration(auth, nameSpaceName); } apache::thrift::transport::TTransport ThriftTransporter::getTransport() { @@ -34,7 +44,7 @@ apache::thrift::transport::TTransport ThriftTransporter::getTransport() { } void ThriftTransporter::authenticate(cclient::data::security::AuthInfo *auth) { - server.authenticate(auth); + server->authenticate(auth); } void ThriftTransporter::createIfClosed() { @@ -54,13 +64,32 @@ void ThriftTransporter::closeAndCreateClient() { createClientService(); } -void ThriftTransporter::createClientService() { +void ThriftTransporter::createClientService(bool callRegistration) { std::shared_ptr protocolPtr(new apache::thrift::protocol::TCompactProtocol(underlyingTransport)); - server.close(); - - server.initialize(protocolPtr); + try{ + server->close(); + + server->initialize(protocolPtr, callRegistration); + }catch(...){ + + auto suspectedVersion = cclient::data::InstanceVersion::getVersion(getConnection()->getHost()) + 1; + logging::LOG_DEBUG(logger) << "Attempting API version " << suspectedVersion; + switch (suspectedVersion) { + case 1: + server = std::make_unique(); + break; + case 2: + server = std::make_unique(); + break; + } + server->initialize(protocolPtr, callRegistration); + // if successful, we'll update the map + cclient::data::InstanceVersion::setVersion(getConnection()->getHost(),suspectedVersion); + switchInterconnect(); + logging::LOG_DEBUG(logger) << "Successfully switch to API version " << suspectedVersion; + } } @@ -73,16 +102,16 @@ void ThriftTransporter::newTransporter(const std::shared_ptr & std::shared_ptr transporty(new apache::thrift::transport::TFramedTransport(serverTransport)); try { - std::cout << "attempting to connect to ! to " << conn->getHost() << " and " << conn->getPort() << std::endl; + logging::LOG_TRACE(logger) << "attempting to connect to " << conn->getHost() << " and " << conn->getPort(); transporty->open(); - std::cout << "connected! to " << conn->getHost() << " and " << conn->getPort() << std::endl; + logging::LOG_TRACE(logger) << "connected! to " << conn->getHost() << " and " << conn->getPort(); } catch (const apache::thrift::transport::TTransportException &te) { - std::cout << conn->getHost() << " host-port " << conn->getPort() << te.what() << " " << std::endl; + logging::LOG_TRACE(logger) << conn->getHost() << " host-port " << conn->getPort() << te.what() << " "; try { transporty->close(); } catch (const apache::thrift::transport::TTransportException &to) { - std::cout << conn->getHost() << " host-port " << conn->getPort() << te.what() << " " << std::endl; + logging::LOG_TRACE(logger) << conn->getHost() << " host-port " << conn->getPort() << te.what() << " "; } throw te; } diff --git a/src/logging/LoggerConfiguration.cpp b/src/logging/LoggerConfiguration.cpp new file mode 100644 index 00000000..f8eef496 --- /dev/null +++ b/src/logging/LoggerConfiguration.cpp @@ -0,0 +1,294 @@ +/** + * @file Logger.cpp + * Logger class implementation + * + * 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 "logging/LoggerConfiguration.h" +#include +#include +#include +#include +#include +#include +#include + +#include "utils/StringUtils.h" +#include "utils/ClassUtils.h" + +#include "spdlog/spdlog.h" +#include "spdlog/sinks/stdout_sinks.h" +#include "spdlog/sinks/null_sink.h" +#ifdef WIN32 +#include +#define _WINSOCKAPI_ +#include +#include +#endif + +namespace logging { + +const char* LoggerConfiguration::spdlog_default_pattern = "[%Y-%m-%ll %H:%M:%S.%e] [%n] [%l] %v"; + +std::vector LoggerProperties::get_keys_of_type(const std::string &type) { + std::vector appenders; + std::string prefix = type + "."; + for (auto const & entry : properties_) { + if (entry.first.rfind(prefix, 0) == 0 && entry.first.find(".", prefix.length() + 1) == std::string::npos) { + appenders.push_back(entry.first); + } + } + return appenders; +} + +LoggerConfiguration::LoggerConfiguration() + : root_namespace_(create_default_root()), + loggers(std::vector>()), + shorten_names_(false), + formatter_(std::make_shared(spdlog_default_pattern)) { + controller_ = std::make_shared(); + logger_ = std::shared_ptr( + new LoggerImpl(ClassUtils::getClassName(), controller_, get_logger(nullptr, root_namespace_, ClassUtils::getClassName(), formatter_))); + loggers.push_back(logger_); +} + +void LoggerConfiguration::initialize(const std::shared_ptr &logger_properties) { + std::lock_guard lock(mutex); + root_namespace_ = initialize_namespaces(logger_properties); + std::string spdlog_pattern; + if (!logger_properties->get("spdlog.pattern", spdlog_pattern)) { + spdlog_pattern = spdlog_default_pattern; + } + + /** + * There is no need to shorten names per spdlog sink as this is a per log instance. + */ + std::string shorten_names_str; + if (logger_properties->get("spdlog.shorten_names", shorten_names_str)) { + utils::StringUtils::StringToBool(shorten_names_str, shorten_names_); + } + + formatter_ = std::make_shared(spdlog_pattern); + std::map> spdloggers; + for (auto const & logger_impl : loggers) { + std::shared_ptr spdlogger; + auto it = spdloggers.find(logger_impl->name); + if (it == spdloggers.end()) { + spdlogger = get_logger(logger_, root_namespace_, logger_impl->name, formatter_, true); + spdloggers[logger_impl->name] = spdlogger; + } else { + spdlogger = it->second; + } + logger_impl->set_delegate(spdlogger); + } + logger_->log_debug("Set following pattern on loggers: %s", spdlog_pattern); +} + +std::shared_ptr LoggerConfiguration::getLogger(const std::string &name) { + std::lock_guard lock(mutex); + std::string adjusted_name = name; + const std::string clazz = "class "; + auto haz_clazz = name.find(clazz); + if (haz_clazz == 0) + adjusted_name = name.substr(clazz.length(), name.length() - clazz.length()); + if (shorten_names_) { + ClassUtils::shortenClassName(adjusted_name, adjusted_name); + } + + std::shared_ptr result = std::make_shared(adjusted_name, controller_, get_logger(logger_, root_namespace_, adjusted_name, formatter_)); + loggers.push_back(result); + return result; +} + +std::shared_ptr LoggerConfiguration::initialize_namespaces(const std::shared_ptr &logger_properties) { + std::map> sink_map = logger_properties->initial_sinks(); + + std::string appender_type = "appender"; + for (auto const & appender_key : logger_properties->get_keys_of_type(appender_type)) { + std::string appender_name = appender_key.substr(appender_type.length() + 1); + std::string appender_type; + if (!logger_properties->get(appender_key, appender_type)) { + appender_type = "stderr"; + } + std::transform(appender_type.begin(), appender_type.end(), appender_type.begin(), ::tolower); + + if ("nullappender" == appender_type || "null appender" == appender_type || "null" == appender_type) { + sink_map[appender_name] = std::make_shared(); + } else if ("rollingappender" == appender_type || "rolling appender" == appender_type || "rolling" == appender_type) { + std::string file_name = ""; + if (!logger_properties->get(appender_key + ".file_name", file_name)) { + file_name = "minifi-app.log"; + } + std::string directory = ""; + directory = logger_properties->getHome(); + if (!directory.empty()) { + // Create the log directory if needed + directory += "/logs"; +#ifdef WIN32 + struct _stat logDirStat; + if (_stat(directory.c_str(), &logDirStat) != 0) { + if (_mkdir(directory.c_str()) == -1) { + exit(1); + } +#else + struct stat logDirStat; + if (stat(directory.c_str(), &logDirStat) != 0 || !S_ISDIR(logDirStat.st_mode)) { + if (mkdir(directory.c_str(), 0777) == -1) { + exit(1); + } +#endif + } + file_name = directory + "/" + file_name; + } + + int max_files = 3; + std::string max_files_str = ""; + if (logger_properties->get(appender_key + ".max_files", max_files_str)) { + try { + max_files = std::stoi(max_files_str); + } catch (const std::invalid_argument &ia) { + } catch (const std::out_of_range &oor) { + } + } + + int max_file_size = 5 * 1024 * 1024; + std::string max_file_size_str = ""; + if (logger_properties->get(appender_key + ".max_file_size", max_file_size_str)) { + try { + max_file_size = std::stoi(max_file_size_str); + } catch (const std::invalid_argument &ia) { + } catch (const std::out_of_range &oor) { + } + } + sink_map[appender_name] = std::make_shared(file_name, max_file_size, max_files); + } else if ("stdout" == appender_type) { + sink_map[appender_name] = spdlog::sinks::stdout_sink_mt::instance(); + } else { + sink_map[appender_name] = spdlog::sinks::stderr_sink_mt::instance(); + } + } + + std::shared_ptr root_namespace = std::make_shared(); + std::string logger_type = "logger"; + for (auto const & logger_key : logger_properties->get_keys_of_type(logger_type)) { + std::string logger_def; + if (!logger_properties->get(logger_key, logger_def)) { + continue; + } + bool first = true; + spdlog::level::level_enum level = spdlog::level::info; + std::vector> sinks; + for (auto const & segment : utils::StringUtils::split(logger_def, ",")) { + std::string level_name = utils::StringUtils::trim(segment); + if (first) { + first = false; + std::transform(level_name.begin(), level_name.end(), level_name.begin(), ::tolower); + if ("trace" == level_name) { + level = spdlog::level::trace; + } else if ("debug" == level_name) { + level = spdlog::level::debug; + } else if ("warn" == level_name) { + level = spdlog::level::warn; + } else if ("critical" == level_name) { + level = spdlog::level::critical; + } else if ("error" == level_name) { + level = spdlog::level::err; + } else if ("off" == level_name) { + level = spdlog::level::off; + } + } else { + sinks.push_back(sink_map[level_name]); + } + } + std::shared_ptr current_namespace = root_namespace; + if (logger_key != "logger.root") { + for (auto const & name : utils::StringUtils::split(logger_key.substr(logger_type.length() + 1, logger_key.length() - logger_type.length()), "::")) { + auto child_pair = current_namespace->children.find(name); + std::shared_ptr child; + if (child_pair == current_namespace->children.end()) { + child = std::make_shared(); + current_namespace->children[name] = child; + } else { + child = child_pair->second; + } + current_namespace = child; + } + } + current_namespace->level = level; + current_namespace->has_level = true; + current_namespace->sinks = sinks; + } + return root_namespace; +} + +std::shared_ptr LoggerConfiguration::get_logger(std::shared_ptr logger, const std::shared_ptr &root_namespace, const std::string &name, + std::shared_ptr formatter, bool remove_if_present) { + std::shared_ptr spdlogger = spdlog::get(name); + if (spdlogger) { + if (remove_if_present) { + spdlog::drop(name); + } else { + return spdlogger; + } + } + std::shared_ptr current_namespace = root_namespace; + std::vector> sinks = root_namespace->sinks; + spdlog::level::level_enum level = root_namespace->level; + std::string current_namespace_str = ""; + std::string sink_namespace_str = "root"; + std::string level_namespace_str = "root"; + for (auto const & name_segment : utils::StringUtils::split(name, "::")) { + current_namespace_str += name_segment; + auto child_pair = current_namespace->children.find(name_segment); + if (child_pair == current_namespace->children.end()) { + break; + } + current_namespace = child_pair->second; + if (current_namespace->sinks.size() > 0) { + sinks = current_namespace->sinks; + sink_namespace_str = current_namespace_str; + } + if (current_namespace->has_level) { + level = current_namespace->level; + level_namespace_str = current_namespace_str; + } + current_namespace_str += "::"; + } + if (logger != nullptr) { + logger->log_debug("%s logger got sinks from namespace %s and level %s from namespace %s", name, sink_namespace_str, spdlog::level::level_names[level], level_namespace_str); + } + spdlogger = std::make_shared(name, begin(sinks), end(sinks)); + spdlogger->set_level(level); + spdlogger->set_formatter(formatter); + spdlogger->flush_on(std::max(spdlog::level::info, current_namespace->level)); + try { + spdlog::register_logger(spdlogger); + } catch (const spdlog::spdlog_ex &ex) { + // Ignore as someone else beat us to registration, we should get the one they made below + } + return spdlog::get(name); +} + +std::shared_ptr LoggerConfiguration::create_default_root() { + std::shared_ptr result = std::make_shared(); + result->sinks = std::vector>(); + result->sinks.push_back(spdlog::sinks::stderr_sink_mt::instance()); + result->level = spdlog::level::info; + return result; +} + +} /* namespace logging */ diff --git a/src/logging/Properties.cpp b/src/logging/Properties.cpp new file mode 100644 index 00000000..14f1d59e --- /dev/null +++ b/src/logging/Properties.cpp @@ -0,0 +1,192 @@ +/** + * + * 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 "logging/Properties.h" +#include +#include "utils/StringUtils.h" +#include "logging/LoggerConfiguration.h" + +#define TRACE_BUFFER_SIZE 512 + + +Properties::Properties(const std::string& name) + : logger_(logging::LoggerFactory::getLogger()), + name_(name) { +} + +// Get the config value +bool Properties::get(const std::string &key, std::string &value) { + std::lock_guard lock(mutex_); + auto it = properties_.find(key); + + if (it != properties_.end()) { + value = it->second; + return true; + } else { + return false; + } +} + +bool Properties::get(const std::string &key, const std::string &alternate_key, std::string &value) { + std::lock_guard lock(mutex_); + auto it = properties_.find(key); + + if (it == properties_.end()) { + it = properties_.find(alternate_key); + if (it != properties_.end()) { + logger_->log_warn("%s is an alternate property that may not be supported in future releases. Please use %s instead.", alternate_key, key); + } + } + + if (it != properties_.end()) { + value = it->second; + return true; + } else { + return false; + } +} + +int Properties::getInt(const std::string &key, int default_value) { + std::lock_guard lock(mutex_); + auto it = properties_.find(key); + + if (it != properties_.end()) { + return std::atol(it->second.c_str()); + } else { + return default_value; + } +} + +// Parse one line in configure file like key=value +bool Properties::parseConfigureFileLine(char *buf, std::string &prop_key, std::string &prop_value) { + char *line = buf; + + while ((line[0] == ' ') || (line[0] == '\t')) + ++line; + + char first = line[0]; + if ((first == '\0') || (first == '#') || (first == '[') || (first == '\r') || (first == '\n') || (first == '=')) { + return true; + } + + char *equal = strchr(line, '='); + if (equal == NULL) { + return false; // invalid property as this is not a comment or property line + } + + equal[0] = '\0'; + std::string key = line; + + equal++; + while ((equal[0] == ' ') || (equal[0] == '\t')) + ++equal; + + first = equal[0]; + if ((first == '\0') || (first == '\r') || (first == '\n')) { + return true; // empty properties are okay + } + + std::string value = equal; + value = utils::StringUtils::replaceEnvironmentVariables(value); + prop_key = utils::StringUtils::trimRight(key); + prop_value = utils::StringUtils::trimRight(value); + return true; +} + +// Load Configure File +void Properties::loadConfigurationFile(const char *fileName) { + if (NULL == fileName) { + logger_->log_error("Configuration file path for %s is a nullptr!", getName().c_str()); + return; + } + + std::string adjustedFilename = getHome(); + // perform a naive determination if this is a relative path + if (fileName[0] != FILE_SEPARATOR) { + adjustedFilename += FILE_SEPARATOR; + } + + adjustedFilename += fileName; + + const char *path = NULL; + +#ifndef WIN32 + char full_path[PATH_MAX]; + path = realpath(adjustedFilename.c_str(), full_path); +#else + path = adjustedFilename.c_str(); +#endif + logger_->log_info("Using configuration file to load configuration for %s from %s (located at %s)", getName().c_str(), fileName, path); + + properties_file_ = path; + + std::ifstream file(path, std::ifstream::in); + if (!file.good()) { + logger_->log_error("load configure file failed %s", path); + return; + } + this->clear(); + + char buf[TRACE_BUFFER_SIZE]; + for (file.getline(buf, TRACE_BUFFER_SIZE); file.good(); file.getline(buf, TRACE_BUFFER_SIZE)) { + std::string key, value; + if (parseConfigureFileLine(buf, key, value)) { + set(key, value); + } + } + dirty_ = false; +} + +bool Properties::validateConfigurationFile(const std::string &configFile) { + std::ifstream file(configFile, std::ifstream::in); + if (!file.good()) { + logger_->log_error("Failed to load configuration file %s to configure %s", configFile, getName().c_str()); + return false; + } + + char buf[TRACE_BUFFER_SIZE]; + for (file.getline(buf, TRACE_BUFFER_SIZE); file.good(); file.getline(buf, TRACE_BUFFER_SIZE)) { + std::string key, value; + if (!parseConfigureFileLine(buf, key, value)) { + logger_->log_error("While loading configuration for %s found invalid line: %s", getName().c_str(), buf); + return false; + } + } + return true; +} + + +// Parse Command Line +void Properties::parseCommandLine(int argc, char **argv) { + int i; + bool keyFound = false; + std::string key, value; + + for (i = 1; i < argc; i++) { + if (argv[i][0] == '-' && argv[i][1] != '\0') { + keyFound = true; + key = &argv[i][1]; + continue; + } + if (keyFound) { + value = argv[i]; + set(key, value); + keyFound = false; + } + } + return; +} diff --git a/src/utils/ClassUtils.cpp b/src/utils/ClassUtils.cpp new file mode 100644 index 00000000..f9a440b2 --- /dev/null +++ b/src/utils/ClassUtils.cpp @@ -0,0 +1,47 @@ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "utils/ClassUtils.h" +#include "utils/StringUtils.h" +#include +#include + +bool ClassUtils::shortenClassName(const std::string &class_name, std::string &out) { + std::string class_delim = "::"; + auto class_split = utils::StringUtils::split(class_name, class_delim); + // support . and :: + if (class_split.size() <= 1) { + if (class_name.find(".") != std::string::npos) { + class_delim = "."; + class_split = utils::StringUtils::split(class_name, class_delim); + } else { + // if no update can be performed, return false to let the developer know + // this. Out will have no updates + return false; + } + } + for (auto &elem : class_split) { + if (&elem != &class_split.back() && elem.size() > 1) { + elem = elem.substr(0, 1); + } + } + + out = utils::StringUtils::join(class_delim, class_split); + return true; +} + diff --git a/src/utils/StringUtils.cpp b/src/utils/StringUtils.cpp new file mode 100644 index 00000000..8b177743 --- /dev/null +++ b/src/utils/StringUtils.cpp @@ -0,0 +1,148 @@ +/** + * 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 "utils/StringUtils.h" + +#ifdef WIN32 +#include +#endif + +namespace utils { + +bool StringUtils::StringToBool(std::string input, bool &output) { + std::transform(input.begin(), input.end(), input.begin(), ::tolower); + std::istringstream(input) >> std::boolalpha >> output; + return output; +} + +std::string StringUtils::trim(std::string s) { + return trimRight(trimLeft(s)); +} + +std::vector StringUtils::split(const std::string &str, const std::string &delimiter) { + std::vector result; + auto curr = str.begin(); + auto end = str.end(); + auto is_func = [delimiter](int s) { + return delimiter.at(0) == s; + }; + while (curr != end) { + curr = std::find_if_not(curr, end, is_func); + if (curr == end) { + break; + } + auto next = std::find_if(curr, end, is_func); + result.push_back(std::string(curr, next)); + curr = next; + } + + return result; +} + +bool StringUtils::StringToFloat(std::string input, float &output) { + try { + output = std::stof(input); + } catch (const std::invalid_argument &ie) { + return false; + } catch (const std::out_of_range &ofr) { + return false; + } + + return true; +} + +std::string StringUtils::replaceEnvironmentVariables(std::string& original_string) { + int32_t beg_seq = 0; + int32_t end_seq = 0; + std::string source_string = original_string; + do { + beg_seq = source_string.find("${", beg_seq); + if (beg_seq > 0 && source_string.at(beg_seq - 1) == '\\') { + beg_seq += 2; + continue; + } + if (beg_seq < 0) + break; + end_seq = source_string.find("}", beg_seq + 2); + if (end_seq < 0) + break; + if (end_seq - (beg_seq + 2) < 0) { + beg_seq += 2; + continue; + } + const std::string env_field = source_string.substr(beg_seq + 2, end_seq - (beg_seq + 2)); + const std::string env_field_wrapped = source_string.substr(beg_seq, end_seq + 1); + if (env_field.empty()) { + continue; + } +#ifdef WIN32 + DWORD buffSize = 65535; + std::vector buffer; + buffer.resize(buffSize); + char *strVal = buffer.data(); + GetEnvironmentVariableA(env_field.c_str(), strVal, buffSize); +#else + const auto strVal = std::getenv(env_field.c_str()); +#endif + std::string env_value; + if (strVal != nullptr) + env_value = strVal; + source_string = replaceAll(source_string, env_field_wrapped, env_value); + beg_seq = 0; // restart + } while (beg_seq >= 0); + + source_string = replaceAll(source_string, "\\$", "$"); + + return source_string; +} + +std::string& StringUtils::replaceAll(std::string& source_string, const std::string &from_string, const std::string &to_string) { + std::size_t loc = 0; + std::size_t lastFound; + while ((lastFound = source_string.find(from_string, loc)) != std::string::npos) { + source_string.replace(lastFound, from_string.size(), to_string); + loc = lastFound + to_string.size(); + } + return source_string; +} + +std::string StringUtils::replaceMap(std::string source_string, const std::map &replace_map) { + auto result_string = source_string; + + std::vector>> replacements; + for (const auto &replace_pair : replace_map) { + size_t replace_pos = 0; + while ((replace_pos = source_string.find(replace_pair.first, replace_pos)) != std::string::npos) { + replacements.emplace_back(std::make_pair(replace_pos, std::make_pair(replace_pair.first.length(), replace_pair.second))); + replace_pos += replace_pair.first.length(); + } + } + + std::sort(replacements.begin(), replacements.end(), [](const std::pair> a, + const std::pair> &b) { + return a.first > b.first; + }); + + for (const auto &replacement : replacements) { + result_string = source_string.replace(replacement.first, replacement.second.first, replacement.second.second); + } + + return result_string; +} + + +} /* namespace utils */ diff --git a/thirdparty/gzip-hpp/gzip/compress.hpp b/thirdparty/gzip-hpp/gzip/compress.hpp new file mode 100644 index 00000000..402d9f93 --- /dev/null +++ b/thirdparty/gzip-hpp/gzip/compress.hpp @@ -0,0 +1,114 @@ +#include + +#pragma once +// zlib +#include + +// std +#include +#include +#include + +namespace gzip { + +class Compressor +{ + std::size_t max_; + int level_; + + public: + Compressor(int level = Z_DEFAULT_COMPRESSION, + std::size_t max_bytes = 2000000000) // by default refuse operation if uncompressed data is > 2GB + : max_(max_bytes), + level_(level) + { + } + + template + void compress(InputType& output, + const char* data, + std::size_t size) const + { + +#ifdef DEBUG + // Verify if size input will fit into unsigned int, type used for zlib's avail_in + if (size > std::numeric_limits::max()) + { + throw std::runtime_error("size arg is too large to fit into unsigned int type"); + } +#endif + if (size > max_) + { + throw std::runtime_error("size may use more memory than intended when decompressing"); + } + + z_stream deflate_s; + deflate_s.zalloc = Z_NULL; + deflate_s.zfree = Z_NULL; + deflate_s.opaque = Z_NULL; + deflate_s.avail_in = 0; + deflate_s.next_in = Z_NULL; + + // The windowBits parameter is the base two logarithm of the window size (the size of the history buffer). + // It should be in the range 8..15 for this version of the library. + // Larger values of this parameter result in better compression at the expense of memory usage. + // This range of values also changes the decoding type: + // -8 to -15 for raw deflate + // 8 to 15 for zlib + // (8 to 15) + 16 for gzip + // (8 to 15) + 32 to automatically detect gzip/zlib header (decompression/inflate only) + constexpr int window_bits = 15 + 16; // gzip with windowbits of 15 + + constexpr int mem_level = 8; + // The memory requirements for deflate are (in bytes): + // (1 << (window_bits+2)) + (1 << (mem_level+9)) + // with a default value of 8 for mem_level and our window_bits of 15 + // this is 128Kb + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wold-style-cast" + if (deflateInit2(&deflate_s, level_, Z_DEFLATED, window_bits, mem_level, Z_DEFAULT_STRATEGY) != Z_OK) + { + throw std::runtime_error("deflate init failed"); + } +#pragma GCC diagnostic pop + + deflate_s.next_in = reinterpret_cast(data); + deflate_s.avail_in = static_cast(size); + + std::size_t size_compressed = 0; + do + { + size_t increase = size / 2 + 1024; + if (output.size() < (size_compressed + increase)) + { + output.resize(size_compressed + increase); + } + // There is no way we see that "increase" would not fit in an unsigned int, + // hence we use static cast here to avoid -Wshorten-64-to-32 error + deflate_s.avail_out = static_cast(increase); + deflate_s.next_out = reinterpret_cast((&output[0] + size_compressed)); + // From http://www.zlib.net/zlib_how.html + // "deflate() has a return value that can indicate errors, yet we do not check it here. + // Why not? Well, it turns out that deflate() can do no wrong here." + // Basically only possible error is from deflateInit not working properly + deflate(&deflate_s, Z_FINISH); + size_compressed += (increase - deflate_s.avail_out); + } while (deflate_s.avail_out == 0); + + deflateEnd(&deflate_s); + output.resize(size_compressed); + } +}; + +inline std::string compress(const char* data, + std::size_t size, + int level = Z_DEFAULT_COMPRESSION) +{ + Compressor comp(level); + std::string output; + comp.compress(output, data, size); + return output; +} + +} // namespace gzip diff --git a/thirdparty/gzip-hpp/gzip/config.hpp b/thirdparty/gzip-hpp/gzip/config.hpp new file mode 100644 index 00000000..21f34a0b --- /dev/null +++ b/thirdparty/gzip-hpp/gzip/config.hpp @@ -0,0 +1,5 @@ +#pragma once + +#ifndef ZLIB_CONST +#define ZLIB_CONST +#endif \ No newline at end of file diff --git a/thirdparty/gzip-hpp/gzip/decompress.hpp b/thirdparty/gzip-hpp/gzip/decompress.hpp new file mode 100644 index 00000000..36643b36 --- /dev/null +++ b/thirdparty/gzip-hpp/gzip/decompress.hpp @@ -0,0 +1,106 @@ +#include + +#pragma once +// zlib +#include + +// std +#include +#include +#include + +namespace gzip { + +class Decompressor +{ + std::size_t max_; + + public: + Decompressor(std::size_t max_bytes = 1000000000) // by default refuse operation if compressed data is > 1GB + : max_(max_bytes) + { + } + + template + void decompress(OutputType& output, + const char* data, + std::size_t size) const + { + z_stream inflate_s; + + inflate_s.zalloc = Z_NULL; + inflate_s.zfree = Z_NULL; + inflate_s.opaque = Z_NULL; + inflate_s.avail_in = 0; + inflate_s.next_in = Z_NULL; + + // The windowBits parameter is the base two logarithm of the window size (the size of the history buffer). + // It should be in the range 8..15 for this version of the library. + // Larger values of this parameter result in better compression at the expense of memory usage. + // This range of values also changes the decoding type: + // -8 to -15 for raw deflate + // 8 to 15 for zlib + // (8 to 15) + 16 for gzip + // (8 to 15) + 32 to automatically detect gzip/zlib header + constexpr int window_bits = 15 + 32; // auto with windowbits of 15 + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wold-style-cast" + if (inflateInit2(&inflate_s, window_bits) != Z_OK) + { + throw std::runtime_error("inflate init failed"); + } +#pragma GCC diagnostic pop + inflate_s.next_in = reinterpret_cast(data); + +#ifdef DEBUG + // Verify if size (long type) input will fit into unsigned int, type used for zlib's avail_in + std::uint64_t size_64 = size * 2; + if (size_64 > std::numeric_limits::max()) + { + inflateEnd(&inflate_s); + throw std::runtime_error("size arg is too large to fit into unsigned int type x2"); + } +#endif + if (size > max_ || (size * 2) > max_) + { + inflateEnd(&inflate_s); + throw std::runtime_error("size may use more memory than intended when decompressing"); + } + inflate_s.avail_in = static_cast(size); + std::size_t size_uncompressed = 0; + do + { + std::size_t resize_to = size_uncompressed + 2 * size; + if (resize_to > max_) + { + inflateEnd(&inflate_s); + throw std::runtime_error("size of output string will use more memory then intended when decompressing"); + } + output.resize(resize_to); + inflate_s.avail_out = static_cast(2 * size); + inflate_s.next_out = reinterpret_cast(&output[0] + size_uncompressed); + int ret = inflate(&inflate_s, Z_FINISH); + if (ret != Z_STREAM_END && ret != Z_OK && ret != Z_BUF_ERROR) + { + std::string error_msg = inflate_s.msg; + inflateEnd(&inflate_s); + throw std::runtime_error(error_msg); + } + + size_uncompressed += (2 * size - inflate_s.avail_out); + } while (inflate_s.avail_out == 0); + inflateEnd(&inflate_s); + output.resize(size_uncompressed); + } +}; + +inline std::string decompress(const char* data, std::size_t size) +{ + Decompressor decomp; + std::string output; + decomp.decompress(output, data, size); + return output; +} + +} // namespace gzip diff --git a/thirdparty/gzip-hpp/gzip/utils.hpp b/thirdparty/gzip-hpp/gzip/utils.hpp new file mode 100644 index 00000000..b2df895a --- /dev/null +++ b/thirdparty/gzip-hpp/gzip/utils.hpp @@ -0,0 +1,24 @@ +#include + +#pragma once + +namespace gzip { + +// These live in gzip.hpp because it doesnt need to use deps. +// Otherwise, they would need to live in impl files if these methods used +// zlib structures or functions like inflate/deflate) +inline bool is_compressed(const char* data, std::size_t size) +{ + return size > 2 && + ( + // zlib + ( + static_cast(data[0]) == 0x78 && + (static_cast(data[1]) == 0x9C || + static_cast(data[1]) == 0x01 || + static_cast(data[1]) == 0xDA || + static_cast(data[1]) == 0x5E)) || + // gzip + (static_cast(data[0]) == 0x1F && static_cast(data[1]) == 0x8B)); +} +} // namespace gzip diff --git a/thirdparty/gzip-hpp/gzip/version.hpp b/thirdparty/gzip-hpp/gzip/version.hpp new file mode 100644 index 00000000..47af692e --- /dev/null +++ b/thirdparty/gzip-hpp/gzip/version.hpp @@ -0,0 +1,16 @@ +#pragma once + +/// The major version number +#define GZIP_VERSION_MAJOR 1 + +/// The minor version number +#define GZIP_VERSION_MINOR 0 + +/// The patch number +#define GZIP_VERSION_PATCH 0 + +/// The complete version number +#define GZIP_VERSION_CODE (GZIP_VERSION_MAJOR * 10000 + GZIP_VERSION_MINOR * 100 + GZIP_VERSION_PATCH) + +/// Version number as string +#define GZIP_VERSION_STRING "1.0.0" \ No newline at end of file diff --git a/thirdparty/spdlog-20170710/.gitignore b/thirdparty/spdlog-20170710/.gitignore new file mode 100644 index 00000000..b51a05b7 --- /dev/null +++ b/thirdparty/spdlog-20170710/.gitignore @@ -0,0 +1,64 @@ +# Auto generated files +*.slo +*.lo +*.o +*.obj +*.suo +*.tlog +*.ilk +*.log +*.pdb +*.idb +*.iobj +*.ipdb +*.opensdf +*.sdf + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app + +# Codelite +.codelite + +# .orig files +*.orig + +# example files +example/* +!example/example.cpp +!example/bench.cpp +!example/utils.h +!example/Makefile* +!example/example.sln +!example/example.vcxproj +!example/CMakeLists.txt +!example/multisink.cpp +!example/jni + +# generated files +generated + +# Cmake +CMakeCache.txt +CMakeFiles +CMakeScripts +Makefile +cmake_install.cmake +install_manifest.txt +/tests/tests.VC.VC.opendb +/tests/tests.VC.db +/tests/tests +/tests/logs/file_helper_test.txt diff --git a/thirdparty/spdlog-20170710/CMakeLists.txt b/thirdparty/spdlog-20170710/CMakeLists.txt new file mode 100644 index 00000000..61c45b5e --- /dev/null +++ b/thirdparty/spdlog-20170710/CMakeLists.txt @@ -0,0 +1,87 @@ +# +# Copyright(c) 2015 Ruslan Baratov. +# Distributed under the MIT License (http://opensource.org/licenses/MIT) +# + +cmake_minimum_required(VERSION 3.1) +project(spdlog VERSION 1.0.0) +include(CTest) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") + set(CMAKE_CXX_FLAGS "-Wall ${CMAKE_CXX_FLAGS}") +endif() + +add_library(spdlog INTERFACE) + +option(SPDLOG_BUILD_EXAMPLES "Build examples" OFF) +option(SPDLOG_BUILD_TESTING "Build spdlog tests" ON) + +target_include_directories( + spdlog + INTERFACE + "$" + "$" +) + +set(HEADER_BASE "${CMAKE_CURRENT_SOURCE_DIR}/include") + +if(SPDLOG_BUILD_EXAMPLES) + add_subdirectory(example) +endif() + +if(SPDLOG_BUILD_TESTING) + add_subdirectory(tests) +endif() + +### Install ### +# * https://github.com/forexample/package-example +set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated") + +set(config_install_dir "lib/cmake/${PROJECT_NAME}") +set(include_install_dir "include") +set(pkgconfig_install_dir "lib/pkgconfig") + +set(version_config "${generated_dir}/${PROJECT_NAME}ConfigVersion.cmake") +set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake") +set(pkg_config "${generated_dir}/${PROJECT_NAME}.pc") +set(targets_export_name "${PROJECT_NAME}Targets") +set(namespace "${PROJECT_NAME}::") + +include(CMakePackageConfigHelpers) +write_basic_package_version_file( + "${version_config}" COMPATIBILITY SameMajorVersion +) + +# Note: use 'targets_export_name' +configure_file("cmake/Config.cmake.in" "${project_config}" @ONLY) +configure_file("cmake/spdlog.pc.in" "${pkg_config}" @ONLY) + +install( + TARGETS spdlog + EXPORT "${targets_export_name}" + INCLUDES DESTINATION "${include_install_dir}" +) + +install(DIRECTORY "include/spdlog" DESTINATION "${include_install_dir}") + +install( + FILES "${project_config}" "${version_config}" + DESTINATION "${config_install_dir}" +) + +install( + FILES "${pkg_config}" + DESTINATION "${pkgconfig_install_dir}" +) + +install( + EXPORT "${targets_export_name}" + NAMESPACE "${namespace}" + DESTINATION "${config_install_dir}" +) + +file(GLOB_RECURSE spdlog_include_SRCS "${HEADER_BASE}/*.h") +add_custom_target(spdlog_headers_for_ide SOURCES ${spdlog_include_SRCS}) diff --git a/thirdparty/spdlog-20170710/INSTALL b/thirdparty/spdlog-20170710/INSTALL new file mode 100644 index 00000000..664509d2 --- /dev/null +++ b/thirdparty/spdlog-20170710/INSTALL @@ -0,0 +1,13 @@ +spdlog is header only library. +Just copy the files to your build tree and use a C++11 compiler + +Tested on: +gcc 4.8.1 and above +clang 3.5 +Visual Studio 2013 + +gcc 4.8 flags: --std==c++11 -pthread -O3 -flto -Wl,--no-as-needed +gcc 4.9 flags: --std=c++11 -pthread -O3 -flto + + +see the makefile in the example folder diff --git a/thirdparty/spdlog-20170710/LICENSE b/thirdparty/spdlog-20170710/LICENSE new file mode 100644 index 00000000..4b43e064 --- /dev/null +++ b/thirdparty/spdlog-20170710/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2016 Gabi Melman. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/thirdparty/spdlog-20170710/README.md b/thirdparty/spdlog-20170710/README.md new file mode 100644 index 00000000..e3ae7e0a --- /dev/null +++ b/thirdparty/spdlog-20170710/README.md @@ -0,0 +1,223 @@ +# spdlog + +Very fast, header only, C++ logging library. [![Build Status](https://travis-ci.org/gabime/spdlog.svg?branch=master)](https://travis-ci.org/gabime/spdlog)  [![Build status](https://ci.appveyor.com/api/projects/status/d2jnxclg20vd0o50?svg=true)](https://ci.appveyor.com/project/gabime/spdlog) + + +## Install +#### Just copy the headers: + +* Copy the source [folder](https://github.com/gabime/spdlog/tree/master/include/spdlog) to your build tree and use a C++11 compiler. + +#### Or use your favourite package manager: + +* Ubuntu: `apt-get install libspdlog-dev` +* Homebrew: `brew install spdlog` +* FreeBSD: `cd /usr/ports/devel/spdlog/ && make install clean` +* Fedora: `yum install spdlog` +* Arch Linux: `pacman -S spdlog-git` +* vcpkg: `vcpkg install spdlog` + + +## Platforms + * Linux, FreeBSD, Solaris + * Windows (vc 2013+, cygwin/mingw) + * Mac OSX (clang 3.5+) + * Android + +## Features +* Very fast - performance is the primary goal (see [benchmarks](#benchmarks) below). +* Headers only, just copy and use. +* Feature rich [call style](#usage-example) using the excellent [fmt](https://github.com/fmtlib/fmt) library. +* Extremely fast asynchronous mode (optional) - using lockfree queues and other tricks to reach millions of calls/sec. +* [Custom](https://github.com/gabime/spdlog/wiki/3.-Custom-formatting) formatting. +* Conditional Logging +* Multi/Single threaded loggers. +* Various log targets: + * Rotating log files. + * Daily log files. + * Console logging (colors supported). + * syslog. + * Windows debugger (```OutputDebugString(..)```) + * Easily extendable with custom log targets (just implement a single function in the [sink](include/spdlog/sinks/sink.h) interface). +* Severity based filtering - threshold levels can be modified in runtime as well as in compile time. + + + +## Benchmarks + +Below are some [benchmarks](bench) comparing popular log libraries under Ubuntu 64 bit, Intel i7-4770 CPU @ 3.40GHz + +#### Synchronous mode +Time needed to log 1,000,000 lines in synchronous mode (in seconds, the best of 3 runs): + +|threads|boost log 1.54|glog |easylogging |spdlog| +|-------|:-------:|:-----:|----------:|------:| +|1| 4.169s |1.066s |0.975s |0.302s| +|10| 6.180s |3.032s |2.857s |0.968s| +|100| 5.981s |1.139s |4.512s |0.497s| + + +#### Asynchronous mode +Time needed to log 1,000,000 lines in asynchronous mode, i.e. the time it takes to put them in the async queue (in seconds, the best of 3 runs): + +|threads|g2log async logger |spdlog async mode| +|:-------|:-----:|-------------------------:| +|1| 1.850s |0.216s | +|10| 0.943s |0.173s| +|100| 0.959s |0.202s| + + + + +## Usage Example +```c++ + +#include "spdlog/spdlog.h" + +#include +#include + +void async_example(); +void syslog_example(); +void user_defined_example(); +void err_handler_example(); + +namespace spd = spdlog; +int main(int, char*[]) +{ + try + { + // Console logger with color + auto console = spd::stdout_color_mt("console"); + console->info("Welcome to spdlog!"); + console->error("Some error message with arg{}..", 1); + + // Conditional logging example + auto i = 2; + console->warn_if(i != 0, "an important message"); + + // Formatting examples + console->warn("Easy padding in numbers like {:08d}", 12); + console->critical("Support for int: {0:d}; hex: {0:x}; oct: {0:o}; bin: {0:b}", 42); + console->info("Support for floats {:03.2f}", 1.23456); + console->info("Positional args are {1} {0}..", "too", "supported"); + console->info("{:<30}", "left aligned"); + + + spd::get("console")->info("loggers can be retrieved from a global registry using the spdlog::get(logger_name) function"); + + // Create basic file logger (not rotated) + auto my_logger = spd::basic_logger_mt("basic_logger", "logs/basic.txt"); + my_logger->info("Some log message"); + + // Create a file rotating logger with 5mb size max and 3 rotated files + auto rotating_logger = spd::rotating_logger_mt("some_logger_name", "logs/mylogfile", 1048576 * 5, 3); + for (int i = 0; i < 10; ++i) + rotating_logger->info("{} * {} equals {:>10}", i, i, i*i); + + // Create a daily logger - a new file is created every day on 2:30am + auto daily_logger = spd::daily_logger_mt("daily_logger", "logs/daily", 2, 30); + // trigger flush if the log severity is error or higher + daily_logger->flush_on(spd::level::err); + daily_logger->info(123.44); + + // Customize msg format for all messages + spd::set_pattern("*** [%H:%M:%S %z] [thread %t] %v ***"); + rotating_logger->info("This is another message with custom format"); + + + // Runtime log levels + spd::set_level(spd::level::info); //Set global log level to info + console->debug("This message shold not be displayed!"); + console->set_level(spd::level::debug); // Set specific logger's log level + console->debug("This message shold be displayed.."); + + // Compile time log levels + // define SPDLOG_DEBUG_ON or SPDLOG_TRACE_ON + SPDLOG_TRACE(console, "Enabled only #ifdef SPDLOG_TRACE_ON..{} ,{}", 1, 3.23); + SPDLOG_DEBUG(console, "Enabled only #ifdef SPDLOG_DEBUG_ON.. {} ,{}", 1, 3.23); + + // Asynchronous logging is very fast.. + // Just call spdlog::set_async_mode(q_size) and all created loggers from now on will be asynchronous.. + async_example(); + + // syslog example. linux/osx only + syslog_example(); + + // android example. compile with NDK + android_example(); + + // Log user-defined types example + user_defined_example(); + + // Change default log error handler + err_handler_example(); + + // Apply a function on all registered loggers + spd::apply_all([&](std::shared_ptr l) + { + l->info("End of example."); + }); + + // Release and close all loggers + spd::drop_all(); + } + // Exceptions will only be thrown upon failed logger or sink construction (not during logging) + catch (const spd::spdlog_ex& ex) + { + std::cout << "Log init failed: " << ex.what() << std::endl; + return 1; + } +} + +void async_example() +{ + size_t q_size = 4096; //queue size must be power of 2 + spd::set_async_mode(q_size); + auto async_file = spd::daily_logger_st("async_file_logger", "logs/async_log.txt"); + for (int i = 0; i < 100; ++i) + async_file->info("Async message #{}", i); +} + +//syslog example +void syslog_example() +{ +#ifdef SPDLOG_ENABLE_SYSLOG + std::string ident = "spdlog-example"; + auto syslog_logger = spd::syslog_logger("syslog", ident, LOG_PID); + syslog_logger->warn("This is warning that will end up in syslog.."); +#endif +} + +// user defined types logging by implementing operator<< +struct my_type +{ + int i; + template + friend OStream& operator<<(OStream& os, const my_type &c) + { + return os << "[my_type i="< // must be included +void user_defined_example() +{ + spd::get("console")->info("user defined type: {}", my_type { 14 }); +} + +// +//custom error handler +// +void err_handler_example() +{ + spd::set_error_handler([](const std::string& msg) { + std::cerr << "my err handler: " << msg << std::endl; + }); + // (or logger->set_error_handler(..) to set for specific logger) +} + +``` + +## Documentation +Documentation can be found in the [wiki](https://github.com/gabime/spdlog/wiki/1.-QuickStart) pages. diff --git a/thirdparty/spdlog-20170710/astyle.sh b/thirdparty/spdlog-20170710/astyle.sh new file mode 100755 index 00000000..a7a90510 --- /dev/null +++ b/thirdparty/spdlog-20170710/astyle.sh @@ -0,0 +1,5 @@ +#!/bin/bash +find . -name "*\.h" -o -name "*\.cpp"|xargs dos2unix +find . -name "*\.h" -o -name "*\.cpp"|xargs astyle -n -c -A1 + + diff --git a/thirdparty/spdlog-20170710/cmake/Config.cmake.in b/thirdparty/spdlog-20170710/cmake/Config.cmake.in new file mode 100644 index 00000000..ba0b36f2 --- /dev/null +++ b/thirdparty/spdlog-20170710/cmake/Config.cmake.in @@ -0,0 +1,24 @@ +# *************************************************************************/ +# * Copyright (c) 2015 Ruslan Baratov. */ +# * */ +# * Permission is hereby granted, free of charge, to any person obtaining */ +# * a copy of this software and associated documentation files (the */ +# * "Software"), to deal in the Software without restriction, including */ +# * without limitation the rights to use, copy, modify, merge, publish, */ +# * distribute, sublicense, and/or sell copies of the Software, and to */ +# * permit persons to whom the Software is furnished to do so, subject to */ +# * the following conditions: */ +# * */ +# * The above copyright notice and this permission notice shall be */ +# * included in all copies or substantial portions of the Software. */ +# * */ +# * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +# * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +# * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +# * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +# * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +# * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +# * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +# *************************************************************************/ + +include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake") diff --git a/thirdparty/spdlog-20170710/cmake/spdlog.pc.in b/thirdparty/spdlog-20170710/cmake/spdlog.pc.in new file mode 100644 index 00000000..262248a7 --- /dev/null +++ b/thirdparty/spdlog-20170710/cmake/spdlog.pc.in @@ -0,0 +1,6 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +includedir=${prefix}/include + +Name: @PROJECT_NAME@ +Description: Super fast C++ logging library. +Version: @PROJECT_VERSION@ diff --git a/thirdparty/spdlog-20170710/include/spdlog/async_logger.h b/thirdparty/spdlog-20170710/include/spdlog/async_logger.h new file mode 100644 index 00000000..9d7e08fa --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/async_logger.h @@ -0,0 +1,82 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +// Very fast asynchronous logger (millions of logs per second on an average desktop) +// Uses pre allocated lockfree queue for maximum throughput even under large number of threads. +// Creates a single back thread to pop messages from the queue and log them. +// +// Upon each log write the logger: +// 1. Checks if its log level is enough to log the message +// 2. Push a new copy of the message to a queue (or block the caller until space is available in the queue) +// 3. will throw spdlog_ex upon log exceptions +// Upon destruction, logs all remaining messages in the queue before destructing.. + +#include "spdlog/common.h" +#include "spdlog/logger.h" + +#include +#include +#include +#include + +namespace spdlog +{ + +namespace details +{ +class async_log_helper; +} + +class async_logger SPDLOG_FINAL :public logger +{ +public: + template + async_logger(const std::string& name, + const It& begin, + const It& end, + size_t queue_size, + const async_overflow_policy overflow_policy = async_overflow_policy::block_retry, + const std::function& worker_warmup_cb = nullptr, + const std::chrono::milliseconds& flush_interval_ms = std::chrono::milliseconds::zero(), + const std::function& worker_teardown_cb = nullptr); + + async_logger(const std::string& logger_name, + sinks_init_list sinks, + size_t queue_size, + const async_overflow_policy overflow_policy = async_overflow_policy::block_retry, + const std::function& worker_warmup_cb = nullptr, + const std::chrono::milliseconds& flush_interval_ms = std::chrono::milliseconds::zero(), + const std::function& worker_teardown_cb = nullptr); + + async_logger(const std::string& logger_name, + sink_ptr single_sink, + size_t queue_size, + const async_overflow_policy overflow_policy = async_overflow_policy::block_retry, + const std::function& worker_warmup_cb = nullptr, + const std::chrono::milliseconds& flush_interval_ms = std::chrono::milliseconds::zero(), + const std::function& worker_teardown_cb = nullptr); + + //Wait for the queue to be empty, and flush synchronously + //Warning: this can potentially last forever as we wait it to complete + void flush() override; + + // Error handler + virtual void set_error_handler(log_err_handler) override; + virtual log_err_handler error_handler() override; + +protected: + void _sink_it(details::log_msg& msg) override; + void _set_formatter(spdlog::formatter_ptr msg_formatter) override; + void _set_pattern(const std::string& pattern, pattern_time_type pattern_time) override; + +private: + std::unique_ptr _async_log_helper; +}; +} + + +#include "spdlog/details/async_logger_impl.h" diff --git a/thirdparty/spdlog-20170710/include/spdlog/common.h b/thirdparty/spdlog-20170710/include/spdlog/common.h new file mode 100644 index 00000000..fdfe7bcb --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/common.h @@ -0,0 +1,157 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include +#include +#include +#include +#include +#include +#include + +#if defined(_WIN32) && defined(SPDLOG_WCHAR_FILENAMES) +#include +#include +#endif + +#include "spdlog/details/null_mutex.h" + +//visual studio upto 2013 does not support noexcept nor constexpr +#if defined(_MSC_VER) && (_MSC_VER < 1900) +#define SPDLOG_NOEXCEPT throw() +#define SPDLOG_CONSTEXPR +#else +#define SPDLOG_NOEXCEPT noexcept +#define SPDLOG_CONSTEXPR constexpr +#endif + +// See tweakme.h +#if !defined(SPDLOG_FINAL) +#define SPDLOG_FINAL +#endif + +#if defined(__GNUC__) || defined(__clang__) +#define SPDLOG_DEPRECATED __attribute__((deprecated)) +#elif defined(_MSC_VER) +#define SPDLOG_DEPRECATED __declspec(deprecated) +#else +#define SPDLOG_DEPRECATED +#endif + + +#include "spdlog/fmt/fmt.h" + +namespace spdlog +{ + +class formatter; + +namespace sinks +{ +class sink; +} + +using log_clock = std::chrono::system_clock; +using sink_ptr = std::shared_ptr < sinks::sink >; +using sinks_init_list = std::initializer_list < sink_ptr >; +using formatter_ptr = std::shared_ptr; +#if defined(SPDLOG_NO_ATOMIC_LEVELS) +using level_t = details::null_atomic_int; +#else +using level_t = std::atomic; +#endif + +using log_err_handler = std::function; + +//Log level enum +namespace level +{ +typedef enum +{ + trace = 0, + debug = 1, + info = 2, + warn = 3, + err = 4, + critical = 5, + off = 6 +} level_enum; + +static const char* level_names[] { "trace", "debug", "info", "warning", "error", "critical", "off" }; + +static const char* short_level_names[] { "T", "D", "I", "W", "E", "C", "O" }; + +inline const char* to_str(spdlog::level::level_enum l) +{ + return level_names[l]; +} + +inline const char* to_short_str(spdlog::level::level_enum l) +{ + return short_level_names[l]; +} +} //level + + +// +// Async overflow policy - block by default. +// +enum class async_overflow_policy +{ + block_retry, // Block / yield / sleep until message can be enqueued + discard_log_msg // Discard the message it enqueue fails +}; + +// +// Pattern time - specific time getting to use for pattern_formatter. +// local time by default +// +enum class pattern_time_type +{ + local, // log localtime + utc // log utc +}; + +// +// Log exception +// +namespace details +{ +namespace os +{ +std::string errno_str(int err_num); +} +} +class spdlog_ex: public std::exception +{ +public: + spdlog_ex(const std::string& msg):_msg(msg) + {} + spdlog_ex(const std::string& msg, int last_errno) + { + _msg = msg + ": " + details::os::errno_str(last_errno); + } + const char* what() const SPDLOG_NOEXCEPT override + { + return _msg.c_str(); + } +private: + std::string _msg; + +}; + +// +// wchar support for windows file names (SPDLOG_WCHAR_FILENAMES must be defined) +// +#if defined(_WIN32) && defined(SPDLOG_WCHAR_FILENAMES) +using filename_t = std::wstring; +#else +using filename_t = std::string; +#endif + + +} //spdlog diff --git a/thirdparty/spdlog-20170710/include/spdlog/details/async_log_helper.h b/thirdparty/spdlog-20170710/include/spdlog/details/async_log_helper.h new file mode 100644 index 00000000..6145dfa6 --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/details/async_log_helper.h @@ -0,0 +1,399 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +// async log helper : +// Process logs asynchronously using a back thread. +// +// If the internal queue of log messages reaches its max size, +// then the client call will block until there is more room. +// + +#pragma once + +#include "spdlog/common.h" +#include "spdlog/sinks/sink.h" +#include "spdlog/details/mpmc_bounded_q.h" +#include "spdlog/details/log_msg.h" +#include "spdlog/details/os.h" +#include "spdlog/formatter.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace spdlog +{ +namespace details +{ + +class async_log_helper +{ + // Async msg to move to/from the queue + // Movable only. should never be copied + enum class async_msg_type + { + log, + flush, + terminate + }; + struct async_msg + { + std::string logger_name; + level::level_enum level; + log_clock::time_point time; + size_t thread_id; + std::string txt; + async_msg_type msg_type; + size_t msg_id; + + async_msg() = default; + ~async_msg() = default; + + +async_msg(async_msg&& other) SPDLOG_NOEXCEPT: + logger_name(std::move(other.logger_name)), + level(std::move(other.level)), + time(std::move(other.time)), + thread_id(other.thread_id), + txt(std::move(other.txt)), + msg_type(std::move(other.msg_type)), + msg_id(other.msg_id) + {} + + async_msg(async_msg_type m_type): + level(level::info), + thread_id(0), + msg_type(m_type), + msg_id(0) + {} + + async_msg& operator=(async_msg&& other) SPDLOG_NOEXCEPT + { + logger_name = std::move(other.logger_name); + level = other.level; + time = std::move(other.time); + thread_id = other.thread_id; + txt = std::move(other.txt); + msg_type = other.msg_type; + msg_id = other.msg_id; + return *this; + } + + // never copy or assign. should only be moved.. + async_msg(const async_msg&) = delete; + async_msg& operator=(const async_msg& other) = delete; + + // construct from log_msg + async_msg(const details::log_msg& m): + level(m.level), + time(m.time), + thread_id(m.thread_id), + txt(m.raw.data(), m.raw.size()), + msg_type(async_msg_type::log), + msg_id(m.msg_id) + { +#ifndef SPDLOG_NO_NAME + logger_name = *m.logger_name; +#endif + } + + + // copy into log_msg + void fill_log_msg(log_msg &msg) + { + msg.logger_name = &logger_name; + msg.level = level; + msg.time = time; + msg.thread_id = thread_id; + msg.raw << txt; + msg.msg_id = msg_id; + } + }; + +public: + + using item_type = async_msg; + using q_type = details::mpmc_bounded_queue; + + using clock = std::chrono::steady_clock; + + + async_log_helper(formatter_ptr formatter, + const std::vector& sinks, + size_t queue_size, + const log_err_handler err_handler, + const async_overflow_policy overflow_policy = async_overflow_policy::block_retry, + const std::function& worker_warmup_cb = nullptr, + const std::chrono::milliseconds& flush_interval_ms = std::chrono::milliseconds::zero(), + const std::function& worker_teardown_cb = nullptr); + + void log(const details::log_msg& msg); + + // stop logging and join the back thread + ~async_log_helper(); + + void set_formatter(formatter_ptr); + + void flush(bool wait_for_q); + + void set_error_handler(spdlog::log_err_handler err_handler); + +private: + formatter_ptr _formatter; + std::vector> _sinks; + + // queue of messages to log + q_type _q; + + log_err_handler _err_handler; + + bool _flush_requested; + + bool _terminate_requested; + + + // overflow policy + const async_overflow_policy _overflow_policy; + + // worker thread warmup callback - one can set thread priority, affinity, etc + const std::function _worker_warmup_cb; + + // auto periodic sink flush parameter + const std::chrono::milliseconds _flush_interval_ms; + + // worker thread teardown callback + const std::function _worker_teardown_cb; + + // worker thread + std::thread _worker_thread; + + void push_msg(async_msg&& new_msg); + + // worker thread main loop + void worker_loop(); + + // pop next message from the queue and process it. will set the last_pop to the pop time + // return false if termination of the queue is required + bool process_next_msg(log_clock::time_point& last_pop, log_clock::time_point& last_flush); + + void handle_flush_interval(log_clock::time_point& now, log_clock::time_point& last_flush); + + // sleep,yield or return immediately using the time passed since last message as a hint + static void sleep_or_yield(const spdlog::log_clock::time_point& now, const log_clock::time_point& last_op_time); + + // wait until the queue is empty + void wait_empty_q(); + +}; +} +} + +/////////////////////////////////////////////////////////////////////////////// +// async_sink class implementation +/////////////////////////////////////////////////////////////////////////////// +inline spdlog::details::async_log_helper::async_log_helper( + formatter_ptr formatter, + const std::vector& sinks, + size_t queue_size, + log_err_handler err_handler, + const async_overflow_policy overflow_policy, + const std::function& worker_warmup_cb, + const std::chrono::milliseconds& flush_interval_ms, + const std::function& worker_teardown_cb): + _formatter(formatter), + _sinks(sinks), + _q(queue_size), + _err_handler(err_handler), + _flush_requested(false), + _terminate_requested(false), + _overflow_policy(overflow_policy), + _worker_warmup_cb(worker_warmup_cb), + _flush_interval_ms(flush_interval_ms), + _worker_teardown_cb(worker_teardown_cb), + _worker_thread(&async_log_helper::worker_loop, this) +{} + +// Send to the worker thread termination message(level=off) +// and wait for it to finish gracefully +inline spdlog::details::async_log_helper::~async_log_helper() +{ + try + { + push_msg(async_msg(async_msg_type::terminate)); + _worker_thread.join(); + } + catch (...) // don't crash in destructor + { + } +} + + +//Try to push and block until succeeded (if the policy is not to discard when the queue is full) +inline void spdlog::details::async_log_helper::log(const details::log_msg& msg) +{ + push_msg(async_msg(msg)); +} + +inline void spdlog::details::async_log_helper::push_msg(details::async_log_helper::async_msg&& new_msg) +{ + if (!_q.enqueue(std::move(new_msg)) && _overflow_policy != async_overflow_policy::discard_log_msg) + { + auto last_op_time = details::os::now(); + auto now = last_op_time; + do + { + now = details::os::now(); + sleep_or_yield(now, last_op_time); + } + while (!_q.enqueue(std::move(new_msg))); + } +} + +// optionally wait for the queue be empty and request flush from the sinks +inline void spdlog::details::async_log_helper::flush(bool wait_for_q) +{ + push_msg(async_msg(async_msg_type::flush)); + if (wait_for_q) + wait_empty_q(); //return only make after the above flush message was processed +} + +inline void spdlog::details::async_log_helper::worker_loop() +{ + if (_worker_warmup_cb) _worker_warmup_cb(); + auto last_pop = details::os::now(); + auto last_flush = last_pop; + auto active = true; + while (active) + { + try + { + active = process_next_msg(last_pop, last_flush); + } + catch (const std::exception &ex) + { + _err_handler(ex.what()); + } + catch (...) + { + _err_handler("Unknown exception"); + } + } + if (_worker_teardown_cb) _worker_teardown_cb(); + + +} + +// process next message in the queue +// return true if this thread should still be active (while no terminate msg was received) +inline bool spdlog::details::async_log_helper::process_next_msg(log_clock::time_point& last_pop, log_clock::time_point& last_flush) +{ + async_msg incoming_async_msg; + + if (_q.dequeue(incoming_async_msg)) + { + last_pop = details::os::now(); + switch (incoming_async_msg.msg_type) + { + case async_msg_type::flush: + _flush_requested = true; + break; + + case async_msg_type::terminate: + _flush_requested = true; + _terminate_requested = true; + break; + + default: + log_msg incoming_log_msg; + incoming_async_msg.fill_log_msg(incoming_log_msg); + _formatter->format(incoming_log_msg); + for (auto &s : _sinks) + { + if (s->should_log(incoming_log_msg.level)) + { + s->log(incoming_log_msg); + } + } + } + return true; + } + + // Handle empty queue.. + // This is the only place where the queue can terminate or flush to avoid losing messages already in the queue + else + { + auto now = details::os::now(); + handle_flush_interval(now, last_flush); + sleep_or_yield(now, last_pop); + return !_terminate_requested; + } +} + +// flush all sinks if _flush_interval_ms has expired +inline void spdlog::details::async_log_helper::handle_flush_interval(log_clock::time_point& now, log_clock::time_point& last_flush) +{ + auto should_flush = _flush_requested || (_flush_interval_ms != std::chrono::milliseconds::zero() && now - last_flush >= _flush_interval_ms); + if (should_flush) + { + for (auto &s : _sinks) + s->flush(); + now = last_flush = details::os::now(); + _flush_requested = false; + } +} + +inline void spdlog::details::async_log_helper::set_formatter(formatter_ptr msg_formatter) +{ + _formatter = msg_formatter; +} + + +// spin, yield or sleep. use the time passed since last message as a hint +inline void spdlog::details::async_log_helper::sleep_or_yield(const spdlog::log_clock::time_point& now, const spdlog::log_clock::time_point& last_op_time) +{ + using namespace std::this_thread; + using std::chrono::milliseconds; + using std::chrono::microseconds; + + auto time_since_op = now - last_op_time; + + // spin upto 50 micros + if (time_since_op <= microseconds(50)) + return; + + // yield upto 150 micros + if (time_since_op <= microseconds(100)) + return std::this_thread::yield(); + + // sleep for 20 ms upto 200 ms + if (time_since_op <= milliseconds(200)) + return sleep_for(milliseconds(20)); + + // sleep for 200 ms + return sleep_for(milliseconds(200)); +} + +// wait for the queue to be empty +inline void spdlog::details::async_log_helper::wait_empty_q() +{ + auto last_op = details::os::now(); + while (_q.approx_size() > 0) + { + sleep_or_yield(details::os::now(), last_op); + } +} + +inline void spdlog::details::async_log_helper::set_error_handler(spdlog::log_err_handler err_handler) +{ + _err_handler = err_handler; +} + + + diff --git a/thirdparty/spdlog-20170710/include/spdlog/details/async_logger_impl.h b/thirdparty/spdlog-20170710/include/spdlog/details/async_logger_impl.h new file mode 100644 index 00000000..33486c28 --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/details/async_logger_impl.h @@ -0,0 +1,105 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +// Async Logger implementation +// Use an async_sink (queue per logger) to perform the logging in a worker thread + +#include "spdlog/details/async_log_helper.h" +#include "spdlog/async_logger.h" + +#include +#include +#include +#include + +template +inline spdlog::async_logger::async_logger(const std::string& logger_name, + const It& begin, + const It& end, + size_t queue_size, + const async_overflow_policy overflow_policy, + const std::function& worker_warmup_cb, + const std::chrono::milliseconds& flush_interval_ms, + const std::function& worker_teardown_cb) : + logger(logger_name, begin, end), + _async_log_helper(new details::async_log_helper(_formatter, _sinks, queue_size, _err_handler, overflow_policy, worker_warmup_cb, flush_interval_ms, worker_teardown_cb)) +{ +} + +inline spdlog::async_logger::async_logger(const std::string& logger_name, + sinks_init_list sinks_list, + size_t queue_size, + const async_overflow_policy overflow_policy, + const std::function& worker_warmup_cb, + const std::chrono::milliseconds& flush_interval_ms, + const std::function& worker_teardown_cb) : + async_logger(logger_name, sinks_list.begin(), sinks_list.end(), queue_size, overflow_policy, worker_warmup_cb, flush_interval_ms, worker_teardown_cb) {} + +inline spdlog::async_logger::async_logger(const std::string& logger_name, + sink_ptr single_sink, + size_t queue_size, + const async_overflow_policy overflow_policy, + const std::function& worker_warmup_cb, + const std::chrono::milliseconds& flush_interval_ms, + const std::function& worker_teardown_cb) : + async_logger(logger_name, +{ + single_sink +}, queue_size, overflow_policy, worker_warmup_cb, flush_interval_ms, worker_teardown_cb) {} + + +inline void spdlog::async_logger::flush() +{ + _async_log_helper->flush(true); +} + +// Error handler +inline void spdlog::async_logger::set_error_handler(spdlog::log_err_handler err_handler) +{ + _err_handler = err_handler; + _async_log_helper->set_error_handler(err_handler); + +} +inline spdlog::log_err_handler spdlog::async_logger::error_handler() +{ + return _err_handler; +} + + +inline void spdlog::async_logger::_set_formatter(spdlog::formatter_ptr msg_formatter) +{ + _formatter = msg_formatter; + _async_log_helper->set_formatter(_formatter); +} + +inline void spdlog::async_logger::_set_pattern(const std::string& pattern, pattern_time_type pattern_time) +{ + _formatter = std::make_shared(pattern, pattern_time); + _async_log_helper->set_formatter(_formatter); +} + + +inline void spdlog::async_logger::_sink_it(details::log_msg& msg) +{ + try + { +#if defined(SPDLOG_ENABLE_MESSAGE_COUNTER) + msg.msg_id = _msg_counter.fetch_add(1, std::memory_order_relaxed); +#endif + _async_log_helper->log(msg); + if (_should_flush_on(msg)) + _async_log_helper->flush(false); // do async flush + } + catch (const std::exception &ex) + { + _err_handler(ex.what()); + } + catch (...) + { + _err_handler("Unknown exception"); + } +} diff --git a/thirdparty/spdlog-20170710/include/spdlog/details/file_helper.h b/thirdparty/spdlog-20170710/include/spdlog/details/file_helper.h new file mode 100644 index 00000000..d0d730e2 --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/details/file_helper.h @@ -0,0 +1,117 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +// Helper class for file sink +// When failing to open a file, retry several times(5) with small delay between the tries(10 ms) +// Throw spdlog_ex exception on errors + +#include "spdlog/details/os.h" +#include "spdlog/details/log_msg.h" + +#include +#include +#include +#include +#include + +namespace spdlog +{ +namespace details +{ + +class file_helper +{ + +public: + const int open_tries = 5; + const int open_interval = 10; + + explicit file_helper() : + _fd(nullptr) + {} + + file_helper(const file_helper&) = delete; + file_helper& operator=(const file_helper&) = delete; + + ~file_helper() + { + close(); + } + + + void open(const filename_t& fname, bool truncate = false) + { + + close(); + auto *mode = truncate ? SPDLOG_FILENAME_T("wb") : SPDLOG_FILENAME_T("ab"); + _filename = fname; + for (int tries = 0; tries < open_tries; ++tries) + { + if (!os::fopen_s(&_fd, fname, mode)) + return; + + std::this_thread::sleep_for(std::chrono::milliseconds(open_interval)); + } + + throw spdlog_ex("Failed opening file " + os::filename_to_str(_filename) + " for writing", errno); + } + + void reopen(bool truncate) + { + if (_filename.empty()) + throw spdlog_ex("Failed re opening file - was not opened before"); + open(_filename, truncate); + + } + + void flush() + { + std::fflush(_fd); + } + + void close() + { + if (_fd) + { + std::fclose(_fd); + _fd = nullptr; + } + } + + void write(const log_msg& msg) + { + + size_t msg_size = msg.formatted.size(); + auto data = msg.formatted.data(); + if (std::fwrite(data, 1, msg_size, _fd) != msg_size) + throw spdlog_ex("Failed writing to file " + os::filename_to_str(_filename), errno); + } + + size_t size() + { + if (!_fd) + throw spdlog_ex("Cannot use size() on closed file " + os::filename_to_str(_filename)); + return os::filesize(_fd); + } + + const filename_t& filename() const + { + return _filename; + } + + static bool file_exists(const filename_t& name) + { + + return os::file_exists(name); + } + +private: + FILE* _fd; + filename_t _filename; +}; +} +} diff --git a/thirdparty/spdlog-20170710/include/spdlog/details/log_msg.h b/thirdparty/spdlog-20170710/include/spdlog/details/log_msg.h new file mode 100644 index 00000000..0d7ce4ba --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/details/log_msg.h @@ -0,0 +1,50 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include "spdlog/common.h" +#include "spdlog/details/os.h" + + +#include +#include + +namespace spdlog +{ +namespace details +{ +struct log_msg +{ + log_msg() = default; + log_msg(const std::string *loggers_name, level::level_enum lvl) : + logger_name(loggers_name), + level(lvl), + msg_id(0) + { +#ifndef SPDLOG_NO_DATETIME + time = os::now(); +#endif + +#ifndef SPDLOG_NO_THREAD_ID + thread_id = os::thread_id(); +#endif + } + + log_msg(const log_msg& other) = delete; + log_msg& operator=(log_msg&& other) = delete; + log_msg(log_msg&& other) = delete; + + + const std::string *logger_name; + level::level_enum level; + log_clock::time_point time; + size_t thread_id; + fmt::MemoryWriter raw; + fmt::MemoryWriter formatted; + size_t msg_id; +}; +} +} diff --git a/thirdparty/spdlog-20170710/include/spdlog/details/logger_impl.h b/thirdparty/spdlog-20170710/include/spdlog/details/logger_impl.h new file mode 100644 index 00000000..79c4ef69 --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/details/logger_impl.h @@ -0,0 +1,563 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include "spdlog/logger.h" +#include "spdlog/sinks/stdout_sinks.h" + +#include +#include + + +// create logger with given name, sinks and the default pattern formatter +// all other ctors will call this one +template +inline spdlog::logger::logger(const std::string& logger_name, const It& begin, const It& end): + _name(logger_name), + _sinks(begin, end), + _formatter(std::make_shared("%+")), + _level(level::info), + _flush_level(level::off), + _last_err_time(0), + _msg_counter(1) // message counter will start from 1. 0-message id will be reserved for controll messages +{ + _err_handler = [this](const std::string &msg) + { + this->_default_err_handler(msg); + }; +} + +// ctor with sinks as init list +inline spdlog::logger::logger(const std::string& logger_name, sinks_init_list sinks_list): + logger(logger_name, sinks_list.begin(), sinks_list.end()) +{} + + +// ctor with single sink +inline spdlog::logger::logger(const std::string& logger_name, spdlog::sink_ptr single_sink): + logger(logger_name, +{ + single_sink +}) +{} + + +inline spdlog::logger::~logger() = default; + + +inline void spdlog::logger::set_formatter(spdlog::formatter_ptr msg_formatter) +{ + _set_formatter(msg_formatter); +} + +inline void spdlog::logger::set_pattern(const std::string& pattern, pattern_time_type pattern_time) +{ + _set_pattern(pattern, pattern_time); +} + + +template +inline void spdlog::logger::log(level::level_enum lvl, const char* fmt, const Args&... args) +{ + if (!should_log(lvl)) return; + + try + { + details::log_msg log_msg(&_name, lvl); + log_msg.raw.write(fmt, args...); + _sink_it(log_msg); + } + catch (const std::exception &ex) + { + _err_handler(ex.what()); + } + catch (...) + { + _err_handler("Unknown exception"); + } +} + +template +inline void spdlog::logger::log(level::level_enum lvl, const char* msg) +{ + if (!should_log(lvl)) return; + try + { + details::log_msg log_msg(&_name, lvl); + log_msg.raw << msg; + _sink_it(log_msg); + } + catch (const std::exception &ex) + { + _err_handler(ex.what()); + } + catch (...) + { + _err_handler("Unknown exception"); + } + +} + +template +inline void spdlog::logger::log(level::level_enum lvl, const T& msg) +{ + if (!should_log(lvl)) return; + try + { + details::log_msg log_msg(&_name, lvl); + log_msg.raw << msg; + _sink_it(log_msg); + } + catch (const std::exception &ex) + { + _err_handler(ex.what()); + } + catch (...) + { + _err_handler("Unknown exception"); + } +} + + +template +inline void spdlog::logger::trace(const char* fmt, const Arg1 &arg1, const Args&... args) +{ + log(level::trace, fmt, arg1, args...); +} + +template +inline void spdlog::logger::debug(const char* fmt, const Arg1 &arg1, const Args&... args) +{ + log(level::debug, fmt, arg1, args...); +} + +template +inline void spdlog::logger::info(const char* fmt, const Arg1 &arg1, const Args&... args) +{ + log(level::info, fmt, arg1, args...); +} + +template +inline void spdlog::logger::warn(const char* fmt, const Arg1 &arg1, const Args&... args) +{ + log(level::warn, fmt, arg1, args...); +} + +template +inline void spdlog::logger::error(const char* fmt, const Arg1 &arg1, const Args&... args) +{ + log(level::err, fmt, arg1, args...); +} + +template +inline void spdlog::logger::critical(const char* fmt, const Arg1 &arg1, const Args&... args) +{ + log(level::critical, fmt, arg1, args...); +} + +template +inline void spdlog::logger::log_if(const bool flag, level::level_enum lvl, const char* msg) +{ + if (flag) + { + log(lvl, msg); + } +} + +template +inline void spdlog::logger::log_if(const bool flag, level::level_enum lvl, const T& msg) +{ + if (flag) + { + log(lvl, msg); + } +} + +template +inline void spdlog::logger::trace_if(const bool flag, const char* fmt, const Arg1 &arg1, const Args&... args) +{ + if (flag) + { + log(level::trace, fmt, arg1, args...); + } +} + +template +inline void spdlog::logger::debug_if(const bool flag, const char* fmt, const Arg1 &arg1, const Args&... args) +{ + if (flag) + { + log(level::debug, fmt, arg1, args...); + } +} + +template +inline void spdlog::logger::info_if(const bool flag, const char* fmt, const Arg1 &arg1, const Args&... args) +{ + if (flag) + { + log(level::info, fmt, arg1, args...); + } +} + +template +inline void spdlog::logger::warn_if(const bool flag, const char* fmt, const Arg1& arg1, const Args&... args) +{ + if (flag) + { + log(level::warn, fmt, arg1, args...); + } +} + +template +inline void spdlog::logger::error_if(const bool flag, const char* fmt, const Arg1 &arg1, const Args&... args) +{ + if (flag) + { + log(level::err, fmt, arg1, args...); + } +} + +template +inline void spdlog::logger::critical_if(const bool flag, const char* fmt, const Arg1 &arg1, const Args&... args) +{ + if (flag) + { + log(level::critical, fmt, arg1, args...); + } +} + + +template +inline void spdlog::logger::trace(const T& msg) +{ + log(level::trace, msg); +} + +template +inline void spdlog::logger::debug(const T& msg) +{ + log(level::debug, msg); +} + + +template +inline void spdlog::logger::info(const T& msg) +{ + log(level::info, msg); +} + + +template +inline void spdlog::logger::warn(const T& msg) +{ + log(level::warn, msg); +} + +template +inline void spdlog::logger::error(const T& msg) +{ + log(level::err, msg); +} + +template +inline void spdlog::logger::critical(const T& msg) +{ + log(level::critical, msg); +} + +template +inline void spdlog::logger::trace_if(const bool flag, const T& msg) +{ + if (flag) + { + log(level::trace, msg); + } +} + +template +inline void spdlog::logger::debug_if(const bool flag, const T& msg) +{ + if (flag) + { + log(level::debug, msg); + } +} + +template +inline void spdlog::logger::info_if(const bool flag, const T& msg) +{ + if (flag) + { + log(level::info, msg); + } +} + +template +inline void spdlog::logger::warn_if(const bool flag, const T& msg) +{ + if (flag) + { + log(level::warn, msg); + } +} + +template +inline void spdlog::logger::error_if(const bool flag, const T& msg) +{ + if (flag) + { + log(level::err, msg); + } +} + +template +inline void spdlog::logger::critical_if(const bool flag, const T& msg) +{ + if (flag) + { + log(level::critical, msg); + } +} + + +#ifdef SPDLOG_WCHAR_TO_UTF8_SUPPORT +#include + +template +inline void spdlog::logger::log(level::level_enum lvl, const wchar_t* msg) +{ + std::wstring_convert > conv; + + log(lvl, conv.to_bytes(msg)); +} + +template +inline void spdlog::logger::log(level::level_enum lvl, const wchar_t* fmt, const Args&... args) +{ + fmt::WMemoryWriter wWriter; + + wWriter.write(fmt, args...); + log(lvl, wWriter.c_str()); +} + +template +inline void spdlog::logger::trace(const wchar_t* fmt, const Args&... args) +{ + log(level::trace, fmt, args...); +} + +template +inline void spdlog::logger::debug(const wchar_t* fmt, const Args&... args) +{ + log(level::debug, fmt, args...); +} + +template +inline void spdlog::logger::info(const wchar_t* fmt, const Args&... args) +{ + log(level::info, fmt, args...); +} + + +template +inline void spdlog::logger::warn(const wchar_t* fmt, const Args&... args) +{ + log(level::warn, fmt, args...); +} + +template +inline void spdlog::logger::error(const wchar_t* fmt, const Args&... args) +{ + log(level::err, fmt, args...); +} + +template +inline void spdlog::logger::critical(const wchar_t* fmt, const Args&... args) +{ + log(level::critical, fmt, args...); +} + +// +// conditional logging +// + +template +inline void spdlog::logger::log_if(const bool flag, level::level_enum lvl, const wchar_t* msg) +{ + if (flag) + { + log(lvl, msg); + } +} + +template +inline void spdlog::logger::log_if(const bool flag, level::level_enum lvl, const wchar_t* fmt, const Args&... args) +{ + if (flag) + { + log(lvl, fmt, args); + } +} + +template +inline void spdlog::logger::trace_if(const bool flag, const wchar_t* fmt, const Args&... args) +{ + if (flag) + { + log(level::trace, fmt, args...); + } +} + +template +inline void spdlog::logger::debug_if(const bool flag, const wchar_t* fmt, const Args&... args) +{ + if (flag) + { + log(level::debug, fmt, args...); + } +} + +template +inline void spdlog::logger::info_if(const bool flag, const wchar_t* fmt, const Args&... args) +{ + if (flag) + { + log(level::info, fmt, args...); + } +} + + +template +inline void spdlog::logger::warn_if(const bool flag, const wchar_t* fmt, const Args&... args) +{ + if (flag) + { + log(level::warn, fmt, args...); + } +} + +template +inline void spdlog::logger::error_if(const bool flag, const wchar_t* fmt, const Args&... args) +{ + if (flag) + { + log(level::err, fmt, args...); + } +} + +template +inline void spdlog::logger::critical_if(const bool flag, const wchar_t* fmt, const Args&... args) +{ + if (flag) + { + log(level::critical, fmt, args...); + } +} + +#endif // SPDLOG_WCHAR_TO_UTF8_SUPPORT + + + +// +// name and level +// +inline const std::string& spdlog::logger::name() const +{ + return _name; +} + +inline void spdlog::logger::set_level(spdlog::level::level_enum log_level) +{ + _level.store(log_level); +} + +inline void spdlog::logger::set_error_handler(spdlog::log_err_handler err_handler) +{ + _err_handler = err_handler; +} + +inline spdlog::log_err_handler spdlog::logger::error_handler() +{ + return _err_handler; +} + + +inline void spdlog::logger::flush_on(level::level_enum log_level) +{ + _flush_level.store(log_level); +} + +inline spdlog::level::level_enum spdlog::logger::level() const +{ + return static_cast(_level.load(std::memory_order_relaxed)); +} + +inline bool spdlog::logger::should_log(spdlog::level::level_enum msg_level) const +{ + return msg_level >= _level.load(std::memory_order_relaxed); +} + +// +// protected virtual called at end of each user log call (if enabled) by the line_logger +// +inline void spdlog::logger::_sink_it(details::log_msg& msg) +{ +#if defined(SPDLOG_ENABLE_MESSAGE_COUNTER) + msg.msg_id = _msg_counter.fetch_add(1, std::memory_order_relaxed); +#endif + _formatter->format(msg); + for (auto &sink : _sinks) + { + if( sink->should_log( msg.level)) + { + sink->log(msg); + } + } + + if(_should_flush_on(msg)) + flush(); +} + +inline void spdlog::logger::_set_pattern(const std::string& pattern, pattern_time_type pattern_time) +{ + _formatter = std::make_shared(pattern, pattern_time); +} +inline void spdlog::logger::_set_formatter(formatter_ptr msg_formatter) +{ + _formatter = msg_formatter; +} + +inline void spdlog::logger::flush() +{ + for (auto& sink : _sinks) + sink->flush(); +} + +inline void spdlog::logger::_default_err_handler(const std::string &msg) +{ + auto now = time(nullptr); + if (now - _last_err_time < 60) + return; + auto tm_time = details::os::localtime(now); + char date_buf[100]; + std::strftime(date_buf, sizeof(date_buf), "%Y-%m-%d %H:%M:%S", &tm_time); + details::log_msg err_msg; + err_msg.formatted.write("[*** LOG ERROR ***] [{}] [{}] [{}]{}", name(), msg, date_buf, details::os::eol); + sinks::stderr_sink_mt::instance()->log(err_msg); + _last_err_time = now; +} + +inline bool spdlog::logger::_should_flush_on(const details::log_msg &msg) +{ + const auto flush_level = _flush_level.load(std::memory_order_relaxed); + return (msg.level >= flush_level) && (msg.level != level::off); +} + +inline const std::vector& spdlog::logger::sinks() const +{ + return _sinks; +} diff --git a/thirdparty/spdlog-20170710/include/spdlog/details/mpmc_bounded_q.h b/thirdparty/spdlog-20170710/include/spdlog/details/mpmc_bounded_q.h new file mode 100644 index 00000000..afd4c881 --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/details/mpmc_bounded_q.h @@ -0,0 +1,172 @@ +/* +A modified version of Bounded MPMC queue by Dmitry Vyukov. + +Original code from: +http://www.1024cores.net/home/lock-free-algorithms/queues/bounded-mpmc-queue + +licensed by Dmitry Vyukov under the terms below: + +Simplified BSD license + +Copyright (c) 2010-2011 Dmitry Vyukov. All rights reserved. +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright notice, this list of +conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list +of conditions and the following disclaimer in the documentation and/or other materials +provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY DMITRY VYUKOV "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL DMITRY VYUKOV OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The views and conclusions contained in the software and documentation are those of the authors and +should not be interpreted as representing official policies, either expressed or implied, of Dmitry Vyukov. +*/ + +/* +The code in its current form adds the license below: + +Copyright(c) 2015 Gabi Melman. +Distributed under the MIT License (http://opensource.org/licenses/MIT) + +*/ + +#pragma once + +#include "spdlog/common.h" + +#include +#include + +namespace spdlog +{ +namespace details +{ + +template +class mpmc_bounded_queue +{ +public: + + using item_type = T; + mpmc_bounded_queue(size_t buffer_size) + :max_size_(buffer_size), + buffer_(new cell_t [buffer_size]), + buffer_mask_(buffer_size - 1) + { + //queue size must be power of two + if(!((buffer_size >= 2) && ((buffer_size & (buffer_size - 1)) == 0))) + throw spdlog_ex("async logger queue size must be power of two"); + + for (size_t i = 0; i != buffer_size; i += 1) + buffer_[i].sequence_.store(i, std::memory_order_relaxed); + enqueue_pos_.store(0, std::memory_order_relaxed); + dequeue_pos_.store(0, std::memory_order_relaxed); + } + + ~mpmc_bounded_queue() + { + delete [] buffer_; + } + + + bool enqueue(T&& data) + { + cell_t* cell; + size_t pos = enqueue_pos_.load(std::memory_order_relaxed); + for (;;) + { + cell = &buffer_[pos & buffer_mask_]; + size_t seq = cell->sequence_.load(std::memory_order_acquire); + intptr_t dif = (intptr_t)seq - (intptr_t)pos; + if (dif == 0) + { + if (enqueue_pos_.compare_exchange_weak(pos, pos + 1, std::memory_order_relaxed)) + break; + } + else if (dif < 0) + { + return false; + } + else + { + pos = enqueue_pos_.load(std::memory_order_relaxed); + } + } + cell->data_ = std::move(data); + cell->sequence_.store(pos + 1, std::memory_order_release); + return true; + } + + bool dequeue(T& data) + { + cell_t* cell; + size_t pos = dequeue_pos_.load(std::memory_order_relaxed); + for (;;) + { + cell = &buffer_[pos & buffer_mask_]; + size_t seq = + cell->sequence_.load(std::memory_order_acquire); + intptr_t dif = (intptr_t)seq - (intptr_t)(pos + 1); + if (dif == 0) + { + if (dequeue_pos_.compare_exchange_weak(pos, pos + 1, std::memory_order_relaxed)) + break; + } + else if (dif < 0) + return false; + else + pos = dequeue_pos_.load(std::memory_order_relaxed); + } + data = std::move(cell->data_); + cell->sequence_.store(pos + buffer_mask_ + 1, std::memory_order_release); + return true; + } + + size_t approx_size() + { + size_t first_pos = dequeue_pos_.load(std::memory_order_relaxed); + size_t last_pos = enqueue_pos_.load(std::memory_order_relaxed); + if (last_pos <= first_pos) + return 0; + auto size = last_pos - first_pos; + return size < max_size_ ? size : max_size_; + } + +private: + struct cell_t + { + std::atomic sequence_; + T data_; + }; + + size_t const max_size_; + + static size_t const cacheline_size = 64; + typedef char cacheline_pad_t [cacheline_size]; + + cacheline_pad_t pad0_; + cell_t* const buffer_; + size_t const buffer_mask_; + cacheline_pad_t pad1_; + std::atomic enqueue_pos_; + cacheline_pad_t pad2_; + std::atomic dequeue_pos_; + cacheline_pad_t pad3_; + + mpmc_bounded_queue(mpmc_bounded_queue const&) = delete; + void operator= (mpmc_bounded_queue const&) = delete; +}; + +} // ns details +} // ns spdlog diff --git a/thirdparty/spdlog-20170710/include/spdlog/details/null_mutex.h b/thirdparty/spdlog-20170710/include/spdlog/details/null_mutex.h new file mode 100644 index 00000000..67b0aeee --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/details/null_mutex.h @@ -0,0 +1,45 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include +// null, no cost dummy "mutex" and dummy "atomic" int + +namespace spdlog +{ +namespace details +{ +struct null_mutex +{ + void lock() {} + void unlock() {} + bool try_lock() + { + return true; + } +}; + +struct null_atomic_int +{ + int value; + null_atomic_int() = default; + + null_atomic_int(int val):value(val) + {} + + int load(std::memory_order) const + { + return value; + } + + void store(int val) + { + value = val; + } +}; + +} +} diff --git a/thirdparty/spdlog-20170710/include/spdlog/details/os.h b/thirdparty/spdlog-20170710/include/spdlog/details/os.h new file mode 100644 index 00000000..735f6014 --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/details/os.h @@ -0,0 +1,469 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// +#pragma once + +#include "spdlog/common.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef _WIN32 + +#ifndef NOMINMAX +#define NOMINMAX //prevent windows redefining min/max +#endif + +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#include // _get_pid support +#include // _get_osfhandle and _isatty support + +#ifdef __MINGW32__ +#include +#endif + +#else // unix + +#include +#include + +#ifdef __linux__ +#include //Use gettid() syscall under linux to get thread id + +#elif __FreeBSD__ +#include //Use thr_self() syscall under FreeBSD to get thread id +#endif + +#endif //unix + +#ifndef __has_feature // Clang - feature checking macros. +#define __has_feature(x) 0 // Compatibility with non-clang compilers. +#endif + + +namespace spdlog +{ +namespace details +{ +namespace os +{ + +inline spdlog::log_clock::time_point now() +{ + +#if defined __linux__ && defined SPDLOG_CLOCK_COARSE + timespec ts; + ::clock_gettime(CLOCK_REALTIME_COARSE, &ts); + return std::chrono::time_point( + std::chrono::duration_cast( + std::chrono::seconds(ts.tv_sec) + std::chrono::nanoseconds(ts.tv_nsec))); + + +#else + return log_clock::now(); +#endif + +} +inline std::tm localtime(const std::time_t &time_tt) +{ + +#ifdef _WIN32 + std::tm tm; + localtime_s(&tm, &time_tt); +#else + std::tm tm; + localtime_r(&time_tt, &tm); +#endif + return tm; +} + +inline std::tm localtime() +{ + std::time_t now_t = time(nullptr); + return localtime(now_t); +} + + +inline std::tm gmtime(const std::time_t &time_tt) +{ + +#ifdef _WIN32 + std::tm tm; + gmtime_s(&tm, &time_tt); +#else + std::tm tm; + gmtime_r(&time_tt, &tm); +#endif + return tm; +} + +inline std::tm gmtime() +{ + std::time_t now_t = time(nullptr); + return gmtime(now_t); +} +inline bool operator==(const std::tm& tm1, const std::tm& tm2) +{ + return (tm1.tm_sec == tm2.tm_sec && + tm1.tm_min == tm2.tm_min && + tm1.tm_hour == tm2.tm_hour && + tm1.tm_mday == tm2.tm_mday && + tm1.tm_mon == tm2.tm_mon && + tm1.tm_year == tm2.tm_year && + tm1.tm_isdst == tm2.tm_isdst); +} + +inline bool operator!=(const std::tm& tm1, const std::tm& tm2) +{ + return !(tm1 == tm2); +} + +// eol definition +#if !defined (SPDLOG_EOL) +#ifdef _WIN32 +#define SPDLOG_EOL "\r\n" +#else +#define SPDLOG_EOL "\n" +#endif +#endif + +SPDLOG_CONSTEXPR static const char* eol = SPDLOG_EOL; +SPDLOG_CONSTEXPR static int eol_size = sizeof(SPDLOG_EOL) - 1; + +inline void prevent_child_fd(FILE *f) +{ +#ifdef _WIN32 + auto file_handle = (HANDLE)_get_osfhandle(_fileno(f)); + if (!::SetHandleInformation(file_handle, HANDLE_FLAG_INHERIT, 0)) + throw spdlog_ex("SetHandleInformation failed", errno); +#else + auto fd = fileno(f); + if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) + throw spdlog_ex("fcntl with FD_CLOEXEC failed", errno); +#endif +} + + +//fopen_s on non windows for writing +inline int fopen_s(FILE** fp, const filename_t& filename, const filename_t& mode) +{ +#ifdef _WIN32 +#ifdef SPDLOG_WCHAR_FILENAMES + *fp = _wfsopen((filename.c_str()), mode.c_str(), _SH_DENYWR); +#else + *fp = _fsopen((filename.c_str()), mode.c_str(), _SH_DENYWR); +#endif +#else //unix + *fp = fopen((filename.c_str()), mode.c_str()); +#endif + +#ifdef SPDLOG_PREVENT_CHILD_FD + if (*fp != nullptr) + prevent_child_fd(*fp); +#endif + return *fp == nullptr; +} + + +inline int remove(const filename_t &filename) +{ +#if defined(_WIN32) && defined(SPDLOG_WCHAR_FILENAMES) + return _wremove(filename.c_str()); +#else + return std::remove(filename.c_str()); +#endif +} + +inline int rename(const filename_t& filename1, const filename_t& filename2) +{ +#if defined(_WIN32) && defined(SPDLOG_WCHAR_FILENAMES) + return _wrename(filename1.c_str(), filename2.c_str()); +#else + return std::rename(filename1.c_str(), filename2.c_str()); +#endif +} + + +//Return if file exists +inline bool file_exists(const filename_t& filename) +{ +#ifdef _WIN32 +#ifdef SPDLOG_WCHAR_FILENAMES + auto attribs = GetFileAttributesW(filename.c_str()); +#else + auto attribs = GetFileAttributesA(filename.c_str()); +#endif + return (attribs != INVALID_FILE_ATTRIBUTES && !(attribs & FILE_ATTRIBUTE_DIRECTORY)); +#else //common linux/unix all have the stat system call + struct stat buffer; + return (stat(filename.c_str(), &buffer) == 0); +#endif +} + + + + +//Return file size according to open FILE* object +inline size_t filesize(FILE *f) +{ + if (f == nullptr) + throw spdlog_ex("Failed getting file size. fd is null"); +#ifdef _WIN32 + int fd = _fileno(f); +#if _WIN64 //64 bits + struct _stat64 st; + if (_fstat64(fd, &st) == 0) + return st.st_size; + +#else //windows 32 bits + long ret = _filelength(fd); + if (ret >= 0) + return static_cast(ret); +#endif + +#else // unix + int fd = fileno(f); + //64 bits(but not in osx, where fstat64 is deprecated) +#if !defined(__FreeBSD__) && !defined(__APPLE__) && (defined(__x86_64__) || defined(__ppc64__)) + struct stat64 st; + if (fstat64(fd, &st) == 0) + return static_cast(st.st_size); +#else // unix 32 bits or osx + struct stat st; + if (fstat(fd, &st) == 0) + return static_cast(st.st_size); +#endif +#endif + throw spdlog_ex("Failed getting file size from fd", errno); +} + + + + +//Return utc offset in minutes or throw spdlog_ex on failure +inline int utc_minutes_offset(const std::tm& tm = details::os::localtime()) +{ + +#ifdef _WIN32 +#if _WIN32_WINNT < _WIN32_WINNT_WS08 + TIME_ZONE_INFORMATION tzinfo; + auto rv = GetTimeZoneInformation(&tzinfo); +#else + DYNAMIC_TIME_ZONE_INFORMATION tzinfo; + auto rv = GetDynamicTimeZoneInformation(&tzinfo); +#endif + if (rv == TIME_ZONE_ID_INVALID) + throw spdlog::spdlog_ex("Failed getting timezone info. ", errno); + + int offset = -tzinfo.Bias; + if (tm.tm_isdst) + offset -= tzinfo.DaylightBias; + else + offset -= tzinfo.StandardBias; + return offset; +#else + +#if defined(sun) || defined(__sun) + // 'tm_gmtoff' field is BSD extension and it's missing on SunOS/Solaris + struct helper + { + static long int calculate_gmt_offset(const std::tm & localtm = details::os::localtime(), const std::tm & gmtm = details::os::gmtime()) + { + int local_year = localtm.tm_year + (1900 - 1); + int gmt_year = gmtm.tm_year + (1900 - 1); + + long int days = ( + // difference in day of year + localtm.tm_yday - gmtm.tm_yday + + // + intervening leap days + + ((local_year >> 2) - (gmt_year >> 2)) + - (local_year / 100 - gmt_year / 100) + + ((local_year / 100 >> 2) - (gmt_year / 100 >> 2)) + + // + difference in years * 365 */ + + (long int)(local_year - gmt_year) * 365 + ); + + long int hours = (24 * days) + (localtm.tm_hour - gmtm.tm_hour); + long int mins = (60 * hours) + (localtm.tm_min - gmtm.tm_min); + long int secs = (60 * mins) + (localtm.tm_sec - gmtm.tm_sec); + + return secs; + } + }; + + long int offset_seconds = helper::calculate_gmt_offset(tm); +#else + long int offset_seconds = tm.tm_gmtoff; +#endif + + return static_cast(offset_seconds / 60); +#endif +} + +//Return current thread id as size_t +//It exists because the std::this_thread::get_id() is much slower(espcially under VS 2013) +inline size_t _thread_id() +{ +#ifdef _WIN32 + return static_cast(::GetCurrentThreadId()); +#elif __linux__ +# if defined(__ANDROID__) && defined(__ANDROID_API__) && (__ANDROID_API__ < 21) +# define SYS_gettid __NR_gettid +# endif + return static_cast(syscall(SYS_gettid)); +#elif __FreeBSD__ + long tid; + thr_self(&tid); + return static_cast(tid); +#elif __APPLE__ + uint64_t tid; + pthread_threadid_np(nullptr, &tid); + return static_cast(tid); +#else //Default to standard C++11 (other Unix) + return static_cast(std::hash()(std::this_thread::get_id())); +#endif +} + +//Return current thread id as size_t (from thread local storage) +inline size_t thread_id() +{ +#if defined(_MSC_VER) && (_MSC_VER < 1900) || defined(__clang__) && !__has_feature(cxx_thread_local) + return _thread_id(); +#else + static thread_local const size_t tid = _thread_id(); + return tid; +#endif +} + + + + +// wchar support for windows file names (SPDLOG_WCHAR_FILENAMES must be defined) +#if defined(_WIN32) && defined(SPDLOG_WCHAR_FILENAMES) +#define SPDLOG_FILENAME_T(s) L ## s +inline std::string filename_to_str(const filename_t& filename) +{ + std::wstring_convert, wchar_t> c; + return c.to_bytes(filename); +} +#else +#define SPDLOG_FILENAME_T(s) s +inline std::string filename_to_str(const filename_t& filename) +{ + return filename; +} +#endif + +inline std::string errno_to_string(char[256], char* res) +{ + return std::string(res); +} + +inline std::string errno_to_string(char buf[256], int res) +{ + if (res == 0) + { + return std::string(buf); + } + else + { + return "Unknown error"; + } +} + +// Return errno string (thread safe) +inline std::string errno_str(int err_num) +{ + char buf[256]; + SPDLOG_CONSTEXPR auto buf_size = sizeof(buf); + +#ifdef _WIN32 + if (strerror_s(buf, buf_size, err_num) == 0) + return std::string(buf); + else + return "Unknown error"; + +#elif defined(__FreeBSD__) || defined(__APPLE__) || defined(ANDROID) || defined(__SUNPRO_CC) || \ + ((_POSIX_C_SOURCE >= 200112L) && ! defined(_GNU_SOURCE)) // posix version + + if (strerror_r(err_num, buf, buf_size) == 0) + return std::string(buf); + else + return "Unknown error"; + +#else // gnu version (might not use the given buf, so its retval pointer must be used) + auto err = strerror_r(err_num, buf, buf_size); // let compiler choose type + return errno_to_string(buf, err); // use overloading to select correct stringify function +#endif +} + +inline int pid() +{ + +#ifdef _WIN32 + return ::_getpid(); +#else + return static_cast(::getpid()); +#endif + +} + + +// Detrmine if the terminal supports colors +// Source: https://github.com/agauniyal/rang/ +inline bool is_color_terminal() +{ +#ifdef _WIN32 + return true; +#else + static constexpr const char* Terms[] = + { + "ansi", "color", "console", "cygwin", "gnome", "konsole", "kterm", + "linux", "msys", "putty", "rxvt", "screen", "vt100", "xterm" + }; + + const char *env_p = std::getenv("TERM"); + if (env_p == nullptr) + { + return false; + } + + static const bool result = std::any_of( + std::begin(Terms), std::end(Terms), [&](const char* term) + { + return std::strstr(env_p, term) != nullptr; + }); + return result; +#endif +} + + +// Detrmine if the terminal attached +// Source: https://github.com/agauniyal/rang/ +inline bool in_terminal(FILE* file) +{ + +#ifdef _WIN32 + return _isatty(_fileno(file)) ? true : false; +#else + return isatty(fileno(file)) ? true : false; +#endif +} +} //os +} //details +} //spdlog diff --git a/thirdparty/spdlog-20170710/include/spdlog/details/pattern_formatter_impl.h b/thirdparty/spdlog-20170710/include/spdlog/details/pattern_formatter_impl.h new file mode 100644 index 00000000..c1ce7191 --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/details/pattern_formatter_impl.h @@ -0,0 +1,690 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include "spdlog/formatter.h" +#include "spdlog/details/log_msg.h" +#include "spdlog/details/os.h" +#include "spdlog/fmt/fmt.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace spdlog +{ +namespace details +{ +class flag_formatter +{ +public: + virtual ~flag_formatter() + {} + virtual void format(details::log_msg& msg, const std::tm& tm_time) = 0; +}; + +/////////////////////////////////////////////////////////////////////// +// name & level pattern appenders +/////////////////////////////////////////////////////////////////////// +namespace +{ +class name_formatter:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm&) override + { + msg.formatted << *msg.logger_name; + } +}; +} + +// log level appender +class level_formatter:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm&) override + { + msg.formatted << level::to_str(msg.level); + } +}; + +// short log level appender +class short_level_formatter:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm&) override + { + msg.formatted << level::to_short_str(msg.level); + } +}; + +/////////////////////////////////////////////////////////////////////// +// Date time pattern appenders +/////////////////////////////////////////////////////////////////////// + +static const char* ampm(const tm& t) +{ + return t.tm_hour >= 12 ? "PM" : "AM"; +} + +static int to12h(const tm& t) +{ + return t.tm_hour > 12 ? t.tm_hour - 12 : t.tm_hour; +} + +//Abbreviated weekday name +using days_array = std::array; +static const days_array& days() +{ + static const days_array arr{ { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" } }; + return arr; +} +class a_formatter:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << days()[tm_time.tm_wday]; + } +}; +// message counter formatter +class i_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm&) override + { + msg.formatted << '#' << msg.msg_id; + } +}; +//Full weekday name +static const days_array& full_days() +{ + static const days_array arr{ { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" } }; + return arr; +} +class A_formatter SPDLOG_FINAL :public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << full_days()[tm_time.tm_wday]; + } +}; + +//Abbreviated month +using months_array = std::array; +static const months_array& months() +{ + static const months_array arr{ { "Jan", "Feb", "Mar", "Apr", "May", "June", "July", "Aug", "Sept", "Oct", "Nov", "Dec" } }; + return arr; +} +class b_formatter:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << months()[tm_time.tm_mon]; + } +}; + +//Full month name +static const months_array& full_months() +{ + static const months_array arr{ { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" } }; + return arr; +} +class B_formatter SPDLOG_FINAL :public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << full_months()[tm_time.tm_mon]; + } +}; + + +//write 2 ints seperated by sep with padding of 2 +static fmt::MemoryWriter& pad_n_join(fmt::MemoryWriter& w, int v1, int v2, char sep) +{ + w << fmt::pad(v1, 2, '0') << sep << fmt::pad(v2, 2, '0'); + return w; +} + +//write 3 ints seperated by sep with padding of 2 +static fmt::MemoryWriter& pad_n_join(fmt::MemoryWriter& w, int v1, int v2, int v3, char sep) +{ + w << fmt::pad(v1, 2, '0') << sep << fmt::pad(v2, 2, '0') << sep << fmt::pad(v3, 2, '0'); + return w; +} + + +//Date and time representation (Thu Aug 23 15:35:46 2014) +class c_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << days()[tm_time.tm_wday] << ' ' << months()[tm_time.tm_mon] << ' ' << tm_time.tm_mday << ' '; + pad_n_join(msg.formatted, tm_time.tm_hour, tm_time.tm_min, tm_time.tm_sec, ':') << ' ' << tm_time.tm_year + 1900; + } +}; + + +// year - 2 digit +class C_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << fmt::pad(tm_time.tm_year % 100, 2, '0'); + } +}; + + + +// Short MM/DD/YY date, equivalent to %m/%d/%y 08/23/01 +class D_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + pad_n_join(msg.formatted, tm_time.tm_mon + 1, tm_time.tm_mday, tm_time.tm_year % 100, '/'); + } +}; + + +// year - 4 digit +class Y_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << tm_time.tm_year + 1900; + } +}; + +// month 1-12 +class m_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << fmt::pad(tm_time.tm_mon + 1, 2, '0'); + } +}; + +// day of month 1-31 +class d_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << fmt::pad(tm_time.tm_mday, 2, '0'); + } +}; + +// hours in 24 format 0-23 +class H_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << fmt::pad(tm_time.tm_hour, 2, '0'); + } +}; + +// hours in 12 format 1-12 +class I_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << fmt::pad(to12h(tm_time), 2, '0'); + } +}; + +// minutes 0-59 +class M_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << fmt::pad(tm_time.tm_min, 2, '0'); + } +}; + +// seconds 0-59 +class S_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << fmt::pad(tm_time.tm_sec, 2, '0'); + } +}; + +// milliseconds +class e_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm&) override + { + auto duration = msg.time.time_since_epoch(); + auto millis = std::chrono::duration_cast(duration).count() % 1000; + msg.formatted << fmt::pad(static_cast(millis), 3, '0'); + } +}; + +// microseconds +class f_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm&) override + { + auto duration = msg.time.time_since_epoch(); + auto micros = std::chrono::duration_cast(duration).count() % 1000000; + msg.formatted << fmt::pad(static_cast(micros), 6, '0'); + } +}; + +// nanoseconds +class F_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm&) override + { + auto duration = msg.time.time_since_epoch(); + auto ns = std::chrono::duration_cast(duration).count() % 1000000000; + msg.formatted << fmt::pad(static_cast(ns), 9, '0'); + } +}; + +// AM/PM +class p_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << ampm(tm_time); + } +}; + + +// 12 hour clock 02:55:02 pm +class r_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + pad_n_join(msg.formatted, to12h(tm_time), tm_time.tm_min, tm_time.tm_sec, ':') << ' ' << ampm(tm_time); + } +}; + +// 24-hour HH:MM time, equivalent to %H:%M +class R_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + pad_n_join(msg.formatted, tm_time.tm_hour, tm_time.tm_min, ':'); + } +}; + +// ISO 8601 time format (HH:MM:SS), equivalent to %H:%M:%S +class T_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + pad_n_join(msg.formatted, tm_time.tm_hour, tm_time.tm_min, tm_time.tm_sec, ':'); + } +}; + +// ISO 8601 offset from UTC in timezone (+-HH:MM) +class z_formatter SPDLOG_FINAL:public flag_formatter +{ +public: + const std::chrono::seconds cache_refresh = std::chrono::seconds(5); + + z_formatter():_last_update(std::chrono::seconds(0)), _offset_minutes(0) + {} + z_formatter(const z_formatter&) = delete; + z_formatter& operator=(const z_formatter&) = delete; + + void format(details::log_msg& msg, const std::tm& tm_time) override + { +#ifdef _WIN32 + int total_minutes = get_cached_offset(msg, tm_time); +#else + // No need to chache under gcc, + // it is very fast (already stored in tm.tm_gmtoff) + int total_minutes = os::utc_minutes_offset(tm_time); +#endif + bool is_negative = total_minutes < 0; + char sign; + if (is_negative) + { + total_minutes = -total_minutes; + sign = '-'; + } + else + { + sign = '+'; + } + + int h = total_minutes / 60; + int m = total_minutes % 60; + msg.formatted << sign; + pad_n_join(msg.formatted, h, m, ':'); + } +private: + log_clock::time_point _last_update; + int _offset_minutes; + std::mutex _mutex; + + int get_cached_offset(const log_msg& msg, const std::tm& tm_time) + { + using namespace std::chrono; + std::lock_guard l(_mutex); + if (msg.time - _last_update >= cache_refresh) + { + _offset_minutes = os::utc_minutes_offset(tm_time); + _last_update = msg.time; + } + return _offset_minutes; + } +}; + + + +// Thread id +class t_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm&) override + { + msg.formatted << msg.thread_id; + } +}; + +// Current pid +class pid_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm&) override + { + msg.formatted << details::os::pid(); + } +}; + + +class v_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm&) override + { + msg.formatted << fmt::StringRef(msg.raw.data(), msg.raw.size()); + } +}; + +class ch_formatter SPDLOG_FINAL:public flag_formatter +{ +public: + explicit ch_formatter(char ch): _ch(ch) + {} + void format(details::log_msg& msg, const std::tm&) override + { + msg.formatted << _ch; + } +private: + char _ch; +}; + + +//aggregate user chars to display as is +class aggregate_formatter SPDLOG_FINAL:public flag_formatter +{ +public: + aggregate_formatter() + {} + void add_ch(char ch) + { + _str += ch; + } + void format(details::log_msg& msg, const std::tm&) override + { + msg.formatted << _str; + } +private: + std::string _str; +}; + +// Full info formatter +// pattern: [%Y-%m-%d %H:%M:%S.%e] [%n] [%l] %v +class full_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { +#ifndef SPDLOG_NO_DATETIME + auto duration = msg.time.time_since_epoch(); + auto millis = std::chrono::duration_cast(duration).count() % 1000; + + /* Slower version(while still very fast - about 3.2 million lines/sec under 10 threads), + msg.formatted.write("[{:d}-{:02d}-{:02d} {:02d}:{:02d}:{:02d}.{:03d}] [{}] [{}] {} ", + tm_time.tm_year + 1900, + tm_time.tm_mon + 1, + tm_time.tm_mday, + tm_time.tm_hour, + tm_time.tm_min, + tm_time.tm_sec, + static_cast(millis), + msg.logger_name, + level::to_str(msg.level), + msg.raw.str());*/ + + + // Faster (albeit uglier) way to format the line (5.6 million lines/sec under 10 threads) + msg.formatted << '[' << static_cast(tm_time.tm_year + 1900) << '-' + << fmt::pad(static_cast(tm_time.tm_mon + 1), 2, '0') << '-' + << fmt::pad(static_cast(tm_time.tm_mday), 2, '0') << ' ' + << fmt::pad(static_cast(tm_time.tm_hour), 2, '0') << ':' + << fmt::pad(static_cast(tm_time.tm_min), 2, '0') << ':' + << fmt::pad(static_cast(tm_time.tm_sec), 2, '0') << '.' + << fmt::pad(static_cast(millis), 3, '0') << "] "; + + //no datetime needed +#else + (void)tm_time; +#endif + +#ifndef SPDLOG_NO_NAME + msg.formatted << '[' << *msg.logger_name << "] "; +#endif + + msg.formatted << '[' << level::to_str(msg.level) << "] "; + msg.formatted << fmt::StringRef(msg.raw.data(), msg.raw.size()); + } +}; + + + +} +} +/////////////////////////////////////////////////////////////////////////////// +// pattern_formatter inline impl +/////////////////////////////////////////////////////////////////////////////// +inline spdlog::pattern_formatter::pattern_formatter(const std::string& pattern, pattern_time_type pattern_time) + : _pattern_time(pattern_time) +{ + compile_pattern(pattern); +} + +inline void spdlog::pattern_formatter::compile_pattern(const std::string& pattern) +{ + auto end = pattern.end(); + std::unique_ptr user_chars; + for (auto it = pattern.begin(); it != end; ++it) + { + if (*it == '%') + { + if (user_chars) //append user chars found so far + _formatters.push_back(std::move(user_chars)); + + if (++it != end) + handle_flag(*it); + else + break; + } + else // chars not following the % sign should be displayed as is + { + if (!user_chars) + user_chars = std::unique_ptr(new details::aggregate_formatter()); + user_chars->add_ch(*it); + } + } + if (user_chars) //append raw chars found so far + { + _formatters.push_back(std::move(user_chars)); + } + +} +inline void spdlog::pattern_formatter::handle_flag(char flag) +{ + switch (flag) + { + // logger name + case 'n': + _formatters.push_back(std::unique_ptr(new details::name_formatter())); + break; + + case 'l': + _formatters.push_back(std::unique_ptr(new details::level_formatter())); + break; + + case 'L': + _formatters.push_back(std::unique_ptr(new details::short_level_formatter())); + break; + + case('t'): + _formatters.push_back(std::unique_ptr(new details::t_formatter())); + break; + + case('v'): + _formatters.push_back(std::unique_ptr(new details::v_formatter())); + break; + + case('a'): + _formatters.push_back(std::unique_ptr(new details::a_formatter())); + break; + + case('A'): + _formatters.push_back(std::unique_ptr(new details::A_formatter())); + break; + + case('b'): + case('h'): + _formatters.push_back(std::unique_ptr(new details::b_formatter())); + break; + + case('B'): + _formatters.push_back(std::unique_ptr(new details::B_formatter())); + break; + case('c'): + _formatters.push_back(std::unique_ptr(new details::c_formatter())); + break; + + case('C'): + _formatters.push_back(std::unique_ptr(new details::C_formatter())); + break; + + case('Y'): + _formatters.push_back(std::unique_ptr(new details::Y_formatter())); + break; + + case('D'): + case('x'): + + _formatters.push_back(std::unique_ptr(new details::D_formatter())); + break; + + case('m'): + _formatters.push_back(std::unique_ptr(new details::m_formatter())); + break; + + case('d'): + _formatters.push_back(std::unique_ptr(new details::d_formatter())); + break; + + case('H'): + _formatters.push_back(std::unique_ptr(new details::H_formatter())); + break; + + case('I'): + _formatters.push_back(std::unique_ptr(new details::I_formatter())); + break; + + case('M'): + _formatters.push_back(std::unique_ptr(new details::M_formatter())); + break; + + case('S'): + _formatters.push_back(std::unique_ptr(new details::S_formatter())); + break; + + case('e'): + _formatters.push_back(std::unique_ptr(new details::e_formatter())); + break; + + case('f'): + _formatters.push_back(std::unique_ptr(new details::f_formatter())); + break; + case('F'): + _formatters.push_back(std::unique_ptr(new details::F_formatter())); + break; + + case('p'): + _formatters.push_back(std::unique_ptr(new details::p_formatter())); + break; + + case('r'): + _formatters.push_back(std::unique_ptr(new details::r_formatter())); + break; + + case('R'): + _formatters.push_back(std::unique_ptr(new details::R_formatter())); + break; + + case('T'): + case('X'): + _formatters.push_back(std::unique_ptr(new details::T_formatter())); + break; + + case('z'): + _formatters.push_back(std::unique_ptr(new details::z_formatter())); + break; + + case ('+'): + _formatters.push_back(std::unique_ptr(new details::full_formatter())); + break; + + case ('P'): + _formatters.push_back(std::unique_ptr(new details::pid_formatter())); + break; + +#if defined(SPDLOG_ENABLE_MESSAGE_COUNTER) + case ('i'): + _formatters.push_back(std::unique_ptr(new details::i_formatter())); + break; +#endif + + default: //Unknown flag appears as is + _formatters.push_back(std::unique_ptr(new details::ch_formatter('%'))); + _formatters.push_back(std::unique_ptr(new details::ch_formatter(flag))); + break; + } +} + +inline std::tm spdlog::pattern_formatter::get_time(details::log_msg& msg) +{ + if (_pattern_time == pattern_time_type::local) + return details::os::localtime(log_clock::to_time_t(msg.time)); + else + return details::os::gmtime(log_clock::to_time_t(msg.time)); +} + +inline void spdlog::pattern_formatter::format(details::log_msg& msg) +{ + +#ifndef SPDLOG_NO_DATETIME + auto tm_time = get_time(msg); +#else + std::tm tm_time; +#endif + for (auto &f : _formatters) + { + f->format(msg, tm_time); + } + //write eol + msg.formatted.write(details::os::eol, details::os::eol_size); +} diff --git a/thirdparty/spdlog-20170710/include/spdlog/details/registry.h b/thirdparty/spdlog-20170710/include/spdlog/details/registry.h new file mode 100644 index 00000000..b518990a --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/details/registry.h @@ -0,0 +1,214 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +// Loggers registy of unique name->logger pointer +// An attempt to create a logger with an already existing name will be ignored +// If user requests a non existing logger, nullptr will be returned +// This class is thread safe + +#include "spdlog/details/null_mutex.h" +#include "spdlog/logger.h" +#include "spdlog/async_logger.h" +#include "spdlog/common.h" + +#include +#include +#include +#include +#include +#include + +namespace spdlog +{ +namespace details +{ +template class registry_t +{ +public: + + void register_logger(std::shared_ptr logger) + { + std::lock_guard lock(_mutex); + auto logger_name = logger->name(); + throw_if_exists(logger_name); + _loggers[logger_name] = logger; + } + + + std::shared_ptr get(const std::string& logger_name) + { + std::lock_guard lock(_mutex); + auto found = _loggers.find(logger_name); + return found == _loggers.end() ? nullptr : found->second; + } + + template + std::shared_ptr create(const std::string& logger_name, const It& sinks_begin, const It& sinks_end) + { + std::lock_guard lock(_mutex); + throw_if_exists(logger_name); + std::shared_ptr new_logger; + if (_async_mode) + new_logger = std::make_shared(logger_name, sinks_begin, sinks_end, _async_q_size, _overflow_policy, _worker_warmup_cb, _flush_interval_ms, _worker_teardown_cb); + else + new_logger = std::make_shared(logger_name, sinks_begin, sinks_end); + + if (_formatter) + new_logger->set_formatter(_formatter); + + if (_err_handler) + new_logger->set_error_handler(_err_handler); + + new_logger->set_level(_level); + + + //Add to registry + _loggers[logger_name] = new_logger; + return new_logger; + } + + template + std::shared_ptr create_async(const std::string& logger_name, size_t queue_size, const async_overflow_policy overflow_policy, const std::function& worker_warmup_cb, const std::chrono::milliseconds& flush_interval_ms, const std::function& worker_teardown_cb, const It& sinks_begin, const It& sinks_end) + { + std::lock_guard lock(_mutex); + throw_if_exists(logger_name); + auto new_logger = std::make_shared(logger_name, sinks_begin, sinks_end, queue_size, overflow_policy, worker_warmup_cb, flush_interval_ms, worker_teardown_cb); + + if (_formatter) + new_logger->set_formatter(_formatter); + + if (_err_handler) + new_logger->set_error_handler(_err_handler); + + new_logger->set_level(_level); + + //Add to registry + _loggers[logger_name] = new_logger; + return new_logger; + } + + void apply_all(std::function)> fun) + { + std::lock_guard lock(_mutex); + for (auto &l : _loggers) + fun(l.second); + } + + void drop(const std::string& logger_name) + { + std::lock_guard lock(_mutex); + _loggers.erase(logger_name); + } + + void drop_all() + { + std::lock_guard lock(_mutex); + _loggers.clear(); + } + std::shared_ptr create(const std::string& logger_name, sinks_init_list sinks) + { + return create(logger_name, sinks.begin(), sinks.end()); + } + + std::shared_ptr create(const std::string& logger_name, sink_ptr sink) + { + return create(logger_name, { sink }); + } + + std::shared_ptr create_async(const std::string& logger_name, size_t queue_size, const async_overflow_policy overflow_policy, const std::function& worker_warmup_cb, const std::chrono::milliseconds& flush_interval_ms, const std::function& worker_teardown_cb, sinks_init_list sinks) + { + return create_async(logger_name, queue_size, overflow_policy, worker_warmup_cb, flush_interval_ms, worker_teardown_cb, sinks.begin(), sinks.end()); + } + + std::shared_ptr create_async(const std::string& logger_name, size_t queue_size, const async_overflow_policy overflow_policy, const std::function& worker_warmup_cb, const std::chrono::milliseconds& flush_interval_ms, const std::function& worker_teardown_cb, sink_ptr sink) + { + return create_async(logger_name, queue_size, overflow_policy, worker_warmup_cb, flush_interval_ms, worker_teardown_cb, { sink }); + } + + void formatter(formatter_ptr f) + { + std::lock_guard lock(_mutex); + _formatter = f; + for (auto& l : _loggers) + l.second->set_formatter(_formatter); + } + + void set_pattern(const std::string& pattern) + { + std::lock_guard lock(_mutex); + _formatter = std::make_shared(pattern); + for (auto& l : _loggers) + l.second->set_formatter(_formatter); + } + + void set_level(level::level_enum log_level) + { + std::lock_guard lock(_mutex); + for (auto& l : _loggers) + l.second->set_level(log_level); + _level = log_level; + } + + void set_error_handler(log_err_handler handler) + { + for (auto& l : _loggers) + l.second->set_error_handler(handler); + _err_handler = handler; + } + + void set_async_mode(size_t q_size, const async_overflow_policy overflow_policy, const std::function& worker_warmup_cb, const std::chrono::milliseconds& flush_interval_ms, const std::function& worker_teardown_cb) + { + std::lock_guard lock(_mutex); + _async_mode = true; + _async_q_size = q_size; + _overflow_policy = overflow_policy; + _worker_warmup_cb = worker_warmup_cb; + _flush_interval_ms = flush_interval_ms; + _worker_teardown_cb = worker_teardown_cb; + } + + void set_sync_mode() + { + std::lock_guard lock(_mutex); + _async_mode = false; + } + + static registry_t& instance() + { + static registry_t s_instance; + return s_instance; + } + +private: + registry_t() {} + registry_t(const registry_t&) = delete; + registry_t& operator=(const registry_t&) = delete; + + void throw_if_exists(const std::string &logger_name) + { + if (_loggers.find(logger_name) != _loggers.end()) + throw spdlog_ex("logger with name '" + logger_name + "' already exists"); + } + Mutex _mutex; + std::unordered_map > _loggers; + formatter_ptr _formatter; + level::level_enum _level = level::info; + log_err_handler _err_handler; + bool _async_mode = false; + size_t _async_q_size = 0; + async_overflow_policy _overflow_policy = async_overflow_policy::block_retry; + std::function _worker_warmup_cb = nullptr; + std::chrono::milliseconds _flush_interval_ms; + std::function _worker_teardown_cb = nullptr; +}; +#ifdef SPDLOG_NO_REGISTRY_MUTEX +typedef registry_t registry; +#else +typedef registry_t registry; +#endif +} +} diff --git a/thirdparty/spdlog-20170710/include/spdlog/details/spdlog_impl.h b/thirdparty/spdlog-20170710/include/spdlog/details/spdlog_impl.h new file mode 100644 index 00000000..7fe9ab40 --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/details/spdlog_impl.h @@ -0,0 +1,263 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +// +// Global registry functions +// +#include "spdlog/spdlog.h" +#include "spdlog/details/registry.h" +#include "spdlog/sinks/file_sinks.h" +#include "spdlog/sinks/stdout_sinks.h" +#ifdef SPDLOG_ENABLE_SYSLOG +#include "spdlog/sinks/syslog_sink.h" +#endif + +#ifdef _WIN32 +#include "spdlog/sinks/wincolor_sink.h" +#else +#include "spdlog/sinks/ansicolor_sink.h" +#endif + + +#ifdef __ANDROID__ +#include "spdlog/sinks/android_sink.h" +#endif + +#include +#include +#include +#include + +inline void spdlog::register_logger(std::shared_ptr logger) +{ + return details::registry::instance().register_logger(logger); +} + +inline std::shared_ptr spdlog::get(const std::string& name) +{ + return details::registry::instance().get(name); +} + +inline void spdlog::drop(const std::string &name) +{ + details::registry::instance().drop(name); +} + +// Create multi/single threaded simple file logger +inline std::shared_ptr spdlog::basic_logger_mt(const std::string& logger_name, const filename_t& filename, bool truncate) +{ + return create(logger_name, filename, truncate); +} + +inline std::shared_ptr spdlog::basic_logger_st(const std::string& logger_name, const filename_t& filename, bool truncate) +{ + return create(logger_name, filename, truncate); +} + +// Create multi/single threaded rotating file logger +inline std::shared_ptr spdlog::rotating_logger_mt(const std::string& logger_name, const filename_t& filename, size_t max_file_size, size_t max_files) +{ + return create(logger_name, filename, max_file_size, max_files); +} + +inline std::shared_ptr spdlog::rotating_logger_st(const std::string& logger_name, const filename_t& filename, size_t max_file_size, size_t max_files) +{ + return create(logger_name, filename, max_file_size, max_files); +} + +// Create file logger which creates new file at midnight): +inline std::shared_ptr spdlog::daily_logger_mt(const std::string& logger_name, const filename_t& filename, int hour, int minute) +{ + return create(logger_name, filename, hour, minute); +} + +inline std::shared_ptr spdlog::daily_logger_st(const std::string& logger_name, const filename_t& filename, int hour, int minute) +{ + return create(logger_name, filename, hour, minute); +} + + +// +// stdout/stderr loggers +// +inline std::shared_ptr spdlog::stdout_logger_mt(const std::string& logger_name) +{ + return spdlog::details::registry::instance().create(logger_name, spdlog::sinks::stdout_sink_mt::instance()); +} + +inline std::shared_ptr spdlog::stdout_logger_st(const std::string& logger_name) +{ + return spdlog::details::registry::instance().create(logger_name, spdlog::sinks::stdout_sink_st::instance()); +} + +inline std::shared_ptr spdlog::stderr_logger_mt(const std::string& logger_name) +{ + return spdlog::details::registry::instance().create(logger_name, spdlog::sinks::stderr_sink_mt::instance()); +} + +inline std::shared_ptr spdlog::stderr_logger_st(const std::string& logger_name) +{ + return spdlog::details::registry::instance().create(logger_name, spdlog::sinks::stderr_sink_st::instance()); +} + +// +// stdout/stderr color loggers +// +#ifdef _WIN32 +inline std::shared_ptr spdlog::stdout_color_mt(const std::string& logger_name) +{ + auto sink = std::make_shared(); + return spdlog::details::registry::instance().create(logger_name, sink); +} + +inline std::shared_ptr spdlog::stdout_color_st(const std::string& logger_name) +{ + auto sink = std::make_shared(); + return spdlog::details::registry::instance().create(logger_name, sink); +} + +inline std::shared_ptr spdlog::stderr_color_mt(const std::string& logger_name) +{ + auto sink = std::make_shared(); + return spdlog::details::registry::instance().create(logger_name, sink); +} + + +inline std::shared_ptr spdlog::stderr_color_st(const std::string& logger_name) +{ + auto sink = std::make_shared(); + return spdlog::details::registry::instance().create(logger_name, sink); +} + +#else //ansi terminal colors + +inline std::shared_ptr spdlog::stdout_color_mt(const std::string& logger_name) +{ + auto sink = std::make_shared(); + return spdlog::details::registry::instance().create(logger_name, sink); +} + +inline std::shared_ptr spdlog::stdout_color_st(const std::string& logger_name) +{ + auto sink = std::make_shared(); + return spdlog::details::registry::instance().create(logger_name, sink); +} + +inline std::shared_ptr spdlog::stderr_color_mt(const std::string& logger_name) +{ + auto sink = std::make_shared(); + return spdlog::details::registry::instance().create(logger_name, sink); +} + +inline std::shared_ptr spdlog::stderr_color_st(const std::string& logger_name) +{ + auto sink = std::make_shared(); + return spdlog::details::registry::instance().create(logger_name, sink); +} +#endif + +#ifdef SPDLOG_ENABLE_SYSLOG +// Create syslog logger +inline std::shared_ptr spdlog::syslog_logger(const std::string& logger_name, const std::string& syslog_ident, int syslog_option) +{ + return create(logger_name, syslog_ident, syslog_option); +} +#endif + +#ifdef __ANDROID__ +inline std::shared_ptr spdlog::android_logger(const std::string& logger_name, const std::string& tag) +{ + return create(logger_name, tag); +} +#endif + +// Create and register a logger a single sink +inline std::shared_ptr spdlog::create(const std::string& logger_name, const spdlog::sink_ptr& sink) +{ + return details::registry::instance().create(logger_name, sink); +} + +//Create logger with multiple sinks + +inline std::shared_ptr spdlog::create(const std::string& logger_name, spdlog::sinks_init_list sinks) +{ + return details::registry::instance().create(logger_name, sinks); +} + + +template +inline std::shared_ptr spdlog::create(const std::string& logger_name, Args... args) +{ + sink_ptr sink = std::make_shared(args...); + return details::registry::instance().create(logger_name, { sink }); +} + + +template +inline std::shared_ptr spdlog::create(const std::string& logger_name, const It& sinks_begin, const It& sinks_end) +{ + return details::registry::instance().create(logger_name, sinks_begin, sinks_end); +} + +// Create and register an async logger with a single sink +inline std::shared_ptr spdlog::create_async(const std::string& logger_name, const sink_ptr& sink, size_t queue_size, const async_overflow_policy overflow_policy, const std::function& worker_warmup_cb, const std::chrono::milliseconds& flush_interval_ms, const std::function& worker_teardown_cb) +{ + return details::registry::instance().create_async(logger_name, queue_size, overflow_policy, worker_warmup_cb, flush_interval_ms, worker_teardown_cb, sink); +} + +// Create and register an async logger with multiple sinks +inline std::shared_ptr spdlog::create_async(const std::string& logger_name, sinks_init_list sinks, size_t queue_size, const async_overflow_policy overflow_policy, const std::function& worker_warmup_cb, const std::chrono::milliseconds& flush_interval_ms, const std::function& worker_teardown_cb ) +{ + return details::registry::instance().create_async(logger_name, queue_size, overflow_policy, worker_warmup_cb, flush_interval_ms, worker_teardown_cb, sinks); +} + +template +inline std::shared_ptr spdlog::create_async(const std::string& logger_name, const It& sinks_begin, const It& sinks_end, size_t queue_size, const async_overflow_policy overflow_policy, const std::function& worker_warmup_cb, const std::chrono::milliseconds& flush_interval_ms, const std::function& worker_teardown_cb) +{ + return details::registry::instance().create_async(logger_name, queue_size, overflow_policy, worker_warmup_cb, flush_interval_ms, worker_teardown_cb, sinks_begin, sinks_end); +} + +inline void spdlog::set_formatter(spdlog::formatter_ptr f) +{ + details::registry::instance().formatter(f); +} + +inline void spdlog::set_pattern(const std::string& format_string) +{ + return details::registry::instance().set_pattern(format_string); +} + +inline void spdlog::set_level(level::level_enum log_level) +{ + return details::registry::instance().set_level(log_level); +} + +inline void spdlog::set_error_handler(log_err_handler handler) +{ + return details::registry::instance().set_error_handler(handler); +} + + +inline void spdlog::set_async_mode(size_t queue_size, const async_overflow_policy overflow_policy, const std::function& worker_warmup_cb, const std::chrono::milliseconds& flush_interval_ms, const std::function& worker_teardown_cb) +{ + details::registry::instance().set_async_mode(queue_size, overflow_policy, worker_warmup_cb, flush_interval_ms, worker_teardown_cb); +} + +inline void spdlog::set_sync_mode() +{ + details::registry::instance().set_sync_mode(); +} + +inline void spdlog::apply_all(std::function)> fun) +{ + details::registry::instance().apply_all(fun); +} + +inline void spdlog::drop_all() +{ + details::registry::instance().drop_all(); +} diff --git a/thirdparty/spdlog-20170710/include/spdlog/dummy.cpp b/thirdparty/spdlog-20170710/include/spdlog/dummy.cpp new file mode 100644 index 00000000..6b2d4ab6 --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/dummy.cpp @@ -0,0 +1,22 @@ +/** + * @file dummy.cpp + * MiNiFiMain implementation + * + * 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. + */ + +// Dummy CPP file to work around Cmake limitation on header only libraries + diff --git a/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/format.cc b/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/format.cc new file mode 100644 index 00000000..2bd774e4 --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/format.cc @@ -0,0 +1,940 @@ +/* + Formatting library for C++ + + Copyright (c) 2012 - 2016, Victor Zverovich + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "format.h" + +#include + +#include +#include +#include +#include +#include +#include // for std::ptrdiff_t + +#if defined(_WIN32) && defined(__MINGW32__) +# include +#endif + +#if FMT_USE_WINDOWS_H +# if defined(NOMINMAX) || defined(FMT_WIN_MINMAX) +# include +# else +# define NOMINMAX +# include +# undef NOMINMAX +# endif +#endif + +using fmt::internal::Arg; + +#if FMT_EXCEPTIONS +# define FMT_TRY try +# define FMT_CATCH(x) catch (x) +#else +# define FMT_TRY if (true) +# define FMT_CATCH(x) if (false) +#endif + +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4127) // conditional expression is constant +# pragma warning(disable: 4702) // unreachable code +// Disable deprecation warning for strerror. The latter is not called but +// MSVC fails to detect it. +# pragma warning(disable: 4996) +#endif + +// Dummy implementations of strerror_r and strerror_s called if corresponding +// system functions are not available. +static inline fmt::internal::Null<> strerror_r(int, char *, ...) { + return fmt::internal::Null<>(); +} +static inline fmt::internal::Null<> strerror_s(char *, std::size_t, ...) { + return fmt::internal::Null<>(); +} + +namespace fmt { + +FMT_FUNC internal::RuntimeError::~RuntimeError() throw() {} +FMT_FUNC FormatError::~FormatError() throw() {} +FMT_FUNC SystemError::~SystemError() throw() {} + +namespace { + +#ifndef _MSC_VER +# define FMT_SNPRINTF snprintf +#else // _MSC_VER +inline int fmt_snprintf(char *buffer, size_t size, const char *format, ...) { + va_list args; + va_start(args, format); + int result = vsnprintf_s(buffer, size, _TRUNCATE, format, args); + va_end(args); + return result; +} +# define FMT_SNPRINTF fmt_snprintf +#endif // _MSC_VER + +#if defined(_WIN32) && defined(__MINGW32__) && !defined(__NO_ISOCEXT) +# define FMT_SWPRINTF snwprintf +#else +# define FMT_SWPRINTF swprintf +#endif // defined(_WIN32) && defined(__MINGW32__) && !defined(__NO_ISOCEXT) + +// Checks if a value fits in int - used to avoid warnings about comparing +// signed and unsigned integers. +template +struct IntChecker { + template + static bool fits_in_int(T value) { + unsigned max = INT_MAX; + return value <= max; + } + static bool fits_in_int(bool) { return true; } +}; + +template <> +struct IntChecker { + template + static bool fits_in_int(T value) { + return value >= INT_MIN && value <= INT_MAX; + } + static bool fits_in_int(int) { return true; } +}; + +const char RESET_COLOR[] = "\x1b[0m"; + +typedef void (*FormatFunc)(Writer &, int, StringRef); + +// Portable thread-safe version of strerror. +// Sets buffer to point to a string describing the error code. +// This can be either a pointer to a string stored in buffer, +// or a pointer to some static immutable string. +// Returns one of the following values: +// 0 - success +// ERANGE - buffer is not large enough to store the error message +// other - failure +// Buffer should be at least of size 1. +int safe_strerror( + int error_code, char *&buffer, std::size_t buffer_size) FMT_NOEXCEPT { + FMT_ASSERT(buffer != 0 && buffer_size != 0, "invalid buffer"); + + class StrError { + private: + int error_code_; + char *&buffer_; + std::size_t buffer_size_; + + // A noop assignment operator to avoid bogus warnings. + void operator=(const StrError &) {} + + // Handle the result of XSI-compliant version of strerror_r. + int handle(int result) { + // glibc versions before 2.13 return result in errno. + return result == -1 ? errno : result; + } + + // Handle the result of GNU-specific version of strerror_r. + int handle(char *message) { + // If the buffer is full then the message is probably truncated. + if (message == buffer_ && strlen(buffer_) == buffer_size_ - 1) + return ERANGE; + buffer_ = message; + return 0; + } + + // Handle the case when strerror_r is not available. + int handle(internal::Null<>) { + return fallback(strerror_s(buffer_, buffer_size_, error_code_)); + } + + // Fallback to strerror_s when strerror_r is not available. + int fallback(int result) { + // If the buffer is full then the message is probably truncated. + return result == 0 && strlen(buffer_) == buffer_size_ - 1 ? + ERANGE : result; + } + + // Fallback to strerror if strerror_r and strerror_s are not available. + int fallback(internal::Null<>) { + errno = 0; + buffer_ = strerror(error_code_); + return errno; + } + + public: + StrError(int err_code, char *&buf, std::size_t buf_size) + : error_code_(err_code), buffer_(buf), buffer_size_(buf_size) {} + + int run() { + strerror_r(0, 0, ""); // Suppress a warning about unused strerror_r. + return handle(strerror_r(error_code_, buffer_, buffer_size_)); + } + }; + return StrError(error_code, buffer, buffer_size).run(); +} + +void format_error_code(Writer &out, int error_code, + StringRef message) FMT_NOEXCEPT { + // Report error code making sure that the output fits into + // INLINE_BUFFER_SIZE to avoid dynamic memory allocation and potential + // bad_alloc. + out.clear(); + static const char SEP[] = ": "; + static const char ERROR_STR[] = "error "; + // Subtract 2 to account for terminating null characters in SEP and ERROR_STR. + std::size_t error_code_size = sizeof(SEP) + sizeof(ERROR_STR) - 2; + typedef internal::IntTraits::MainType MainType; + MainType abs_value = static_cast(error_code); + if (internal::is_negative(error_code)) { + abs_value = 0 - abs_value; + ++error_code_size; + } + error_code_size += internal::count_digits(abs_value); + if (message.size() <= internal::INLINE_BUFFER_SIZE - error_code_size) + out << message << SEP; + out << ERROR_STR << error_code; + assert(out.size() <= internal::INLINE_BUFFER_SIZE); +} + +void report_error(FormatFunc func, int error_code, + StringRef message) FMT_NOEXCEPT { + MemoryWriter full_message; + func(full_message, error_code, message); + // Use Writer::data instead of Writer::c_str to avoid potential memory + // allocation. + std::fwrite(full_message.data(), full_message.size(), 1, stderr); + std::fputc('\n', stderr); +} + +// IsZeroInt::visit(arg) returns true iff arg is a zero integer. +class IsZeroInt : public ArgVisitor { + public: + template + bool visit_any_int(T value) { return value == 0; } +}; + +// Checks if an argument is a valid printf width specifier and sets +// left alignment if it is negative. +class WidthHandler : public ArgVisitor { + private: + FormatSpec &spec_; + + FMT_DISALLOW_COPY_AND_ASSIGN(WidthHandler); + + public: + explicit WidthHandler(FormatSpec &spec) : spec_(spec) {} + + void report_unhandled_arg() { + FMT_THROW(FormatError("width is not integer")); + } + + template + unsigned visit_any_int(T value) { + typedef typename internal::IntTraits::MainType UnsignedType; + UnsignedType width = static_cast(value); + if (internal::is_negative(value)) { + spec_.align_ = ALIGN_LEFT; + width = 0 - width; + } + if (width > INT_MAX) + FMT_THROW(FormatError("number is too big")); + return static_cast(width); + } +}; + +class PrecisionHandler : public ArgVisitor { + public: + void report_unhandled_arg() { + FMT_THROW(FormatError("precision is not integer")); + } + + template + int visit_any_int(T value) { + if (!IntChecker::is_signed>::fits_in_int(value)) + FMT_THROW(FormatError("number is too big")); + return static_cast(value); + } +}; + +template +struct is_same { + enum { value = 0 }; +}; + +template +struct is_same { + enum { value = 1 }; +}; + +// An argument visitor that converts an integer argument to T for printf, +// if T is an integral type. If T is void, the argument is converted to +// corresponding signed or unsigned type depending on the type specifier: +// 'd' and 'i' - signed, other - unsigned) +template +class ArgConverter : public ArgVisitor, void> { + private: + internal::Arg &arg_; + wchar_t type_; + + FMT_DISALLOW_COPY_AND_ASSIGN(ArgConverter); + + public: + ArgConverter(internal::Arg &arg, wchar_t type) + : arg_(arg), type_(type) {} + + void visit_bool(bool value) { + if (type_ != 's') + visit_any_int(value); + } + + template + void visit_any_int(U value) { + bool is_signed = type_ == 'd' || type_ == 'i'; + using internal::Arg; + typedef typename internal::Conditional< + is_same::value, U, T>::type TargetType; + if (sizeof(TargetType) <= sizeof(int)) { + // Extra casts are used to silence warnings. + if (is_signed) { + arg_.type = Arg::INT; + arg_.int_value = static_cast(static_cast(value)); + } else { + arg_.type = Arg::UINT; + typedef typename internal::MakeUnsigned::Type Unsigned; + arg_.uint_value = static_cast(static_cast(value)); + } + } else { + if (is_signed) { + arg_.type = Arg::LONG_LONG; + // glibc's printf doesn't sign extend arguments of smaller types: + // std::printf("%lld", -42); // prints "4294967254" + // but we don't have to do the same because it's a UB. + arg_.long_long_value = static_cast(value); + } else { + arg_.type = Arg::ULONG_LONG; + arg_.ulong_long_value = + static_cast::Type>(value); + } + } + } +}; + +// Converts an integer argument to char for printf. +class CharConverter : public ArgVisitor { + private: + internal::Arg &arg_; + + FMT_DISALLOW_COPY_AND_ASSIGN(CharConverter); + + public: + explicit CharConverter(internal::Arg &arg) : arg_(arg) {} + + template + void visit_any_int(T value) { + arg_.type = internal::Arg::CHAR; + arg_.int_value = static_cast(value); + } +}; +} // namespace + +namespace internal { + +template +class PrintfArgFormatter : + public ArgFormatterBase, Char> { + + void write_null_pointer() { + this->spec().type_ = 0; + this->write("(nil)"); + } + + typedef ArgFormatterBase, Char> Base; + + public: + PrintfArgFormatter(BasicWriter &w, FormatSpec &s) + : ArgFormatterBase, Char>(w, s) {} + + void visit_bool(bool value) { + FormatSpec &fmt_spec = this->spec(); + if (fmt_spec.type_ != 's') + return this->visit_any_int(value); + fmt_spec.type_ = 0; + this->write(value); + } + + void visit_char(int value) { + const FormatSpec &fmt_spec = this->spec(); + BasicWriter &w = this->writer(); + if (fmt_spec.type_ && fmt_spec.type_ != 'c') + w.write_int(value, fmt_spec); + typedef typename BasicWriter::CharPtr CharPtr; + CharPtr out = CharPtr(); + if (fmt_spec.width_ > 1) { + Char fill = ' '; + out = w.grow_buffer(fmt_spec.width_); + if (fmt_spec.align_ != ALIGN_LEFT) { + std::fill_n(out, fmt_spec.width_ - 1, fill); + out += fmt_spec.width_ - 1; + } else { + std::fill_n(out + 1, fmt_spec.width_ - 1, fill); + } + } else { + out = w.grow_buffer(1); + } + *out = static_cast(value); + } + + void visit_cstring(const char *value) { + if (value) + Base::visit_cstring(value); + else if (this->spec().type_ == 'p') + write_null_pointer(); + else + this->write("(null)"); + } + + void visit_pointer(const void *value) { + if (value) + return Base::visit_pointer(value); + this->spec().type_ = 0; + write_null_pointer(); + } + + void visit_custom(Arg::CustomValue c) { + BasicFormatter formatter(ArgList(), this->writer()); + const Char format_str[] = {'}', 0}; + const Char *format = format_str; + c.format(&formatter, c.value, &format); + } +}; +} // namespace internal +} // namespace fmt + +FMT_FUNC void fmt::SystemError::init( + int err_code, CStringRef format_str, ArgList args) { + error_code_ = err_code; + MemoryWriter w; + internal::format_system_error(w, err_code, format(format_str, args)); + std::runtime_error &base = *this; + base = std::runtime_error(w.str()); +} + +template +int fmt::internal::CharTraits::format_float( + char *buffer, std::size_t size, const char *format, + unsigned width, int precision, T value) { + if (width == 0) { + return precision < 0 ? + FMT_SNPRINTF(buffer, size, format, value) : + FMT_SNPRINTF(buffer, size, format, precision, value); + } + return precision < 0 ? + FMT_SNPRINTF(buffer, size, format, width, value) : + FMT_SNPRINTF(buffer, size, format, width, precision, value); +} + +template +int fmt::internal::CharTraits::format_float( + wchar_t *buffer, std::size_t size, const wchar_t *format, + unsigned width, int precision, T value) { + if (width == 0) { + return precision < 0 ? + FMT_SWPRINTF(buffer, size, format, value) : + FMT_SWPRINTF(buffer, size, format, precision, value); + } + return precision < 0 ? + FMT_SWPRINTF(buffer, size, format, width, value) : + FMT_SWPRINTF(buffer, size, format, width, precision, value); +} + +template +const char fmt::internal::BasicData::DIGITS[] = + "0001020304050607080910111213141516171819" + "2021222324252627282930313233343536373839" + "4041424344454647484950515253545556575859" + "6061626364656667686970717273747576777879" + "8081828384858687888990919293949596979899"; + +#define FMT_POWERS_OF_10(factor) \ + factor * 10, \ + factor * 100, \ + factor * 1000, \ + factor * 10000, \ + factor * 100000, \ + factor * 1000000, \ + factor * 10000000, \ + factor * 100000000, \ + factor * 1000000000 + +template +const uint32_t fmt::internal::BasicData::POWERS_OF_10_32[] = { + 0, FMT_POWERS_OF_10(1) +}; + +template +const uint64_t fmt::internal::BasicData::POWERS_OF_10_64[] = { + 0, + FMT_POWERS_OF_10(1), + FMT_POWERS_OF_10(fmt::ULongLong(1000000000)), + // Multiply several constants instead of using a single long long constant + // to avoid warnings about C++98 not supporting long long. + fmt::ULongLong(1000000000) * fmt::ULongLong(1000000000) * 10 +}; + +FMT_FUNC void fmt::internal::report_unknown_type(char code, const char *type) { + (void)type; + if (std::isprint(static_cast(code))) { + FMT_THROW(fmt::FormatError( + fmt::format("unknown format code '{}' for {}", code, type))); + } + FMT_THROW(fmt::FormatError( + fmt::format("unknown format code '\\x{:02x}' for {}", + static_cast(code), type))); +} + +#if FMT_USE_WINDOWS_H + +FMT_FUNC fmt::internal::UTF8ToUTF16::UTF8ToUTF16(fmt::StringRef s) { + static const char ERROR_MSG[] = "cannot convert string from UTF-8 to UTF-16"; + if (s.size() > INT_MAX) + FMT_THROW(WindowsError(ERROR_INVALID_PARAMETER, ERROR_MSG)); + int s_size = static_cast(s.size()); + int length = MultiByteToWideChar( + CP_UTF8, MB_ERR_INVALID_CHARS, s.data(), s_size, 0, 0); + if (length == 0) + FMT_THROW(WindowsError(GetLastError(), ERROR_MSG)); + buffer_.resize(length + 1); + length = MultiByteToWideChar( + CP_UTF8, MB_ERR_INVALID_CHARS, s.data(), s_size, &buffer_[0], length); + if (length == 0) + FMT_THROW(WindowsError(GetLastError(), ERROR_MSG)); + buffer_[length] = 0; +} + +FMT_FUNC fmt::internal::UTF16ToUTF8::UTF16ToUTF8(fmt::WStringRef s) { + if (int error_code = convert(s)) { + FMT_THROW(WindowsError(error_code, + "cannot convert string from UTF-16 to UTF-8")); + } +} + +FMT_FUNC int fmt::internal::UTF16ToUTF8::convert(fmt::WStringRef s) { + if (s.size() > INT_MAX) + return ERROR_INVALID_PARAMETER; + int s_size = static_cast(s.size()); + int length = WideCharToMultiByte(CP_UTF8, 0, s.data(), s_size, 0, 0, 0, 0); + if (length == 0) + return GetLastError(); + buffer_.resize(length + 1); + length = WideCharToMultiByte( + CP_UTF8, 0, s.data(), s_size, &buffer_[0], length, 0, 0); + if (length == 0) + return GetLastError(); + buffer_[length] = 0; + return 0; +} + +FMT_FUNC void fmt::WindowsError::init( + int err_code, CStringRef format_str, ArgList args) { + error_code_ = err_code; + MemoryWriter w; + internal::format_windows_error(w, err_code, format(format_str, args)); + std::runtime_error &base = *this; + base = std::runtime_error(w.str()); +} + +FMT_FUNC void fmt::internal::format_windows_error( + fmt::Writer &out, int error_code, + fmt::StringRef message) FMT_NOEXCEPT { + FMT_TRY { + MemoryBuffer buffer; + buffer.resize(INLINE_BUFFER_SIZE); + for (;;) { + wchar_t *system_message = &buffer[0]; + int result = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + 0, error_code, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + system_message, static_cast(buffer.size()), 0); + if (result != 0) { + UTF16ToUTF8 utf8_message; + if (utf8_message.convert(system_message) == ERROR_SUCCESS) { + out << message << ": " << utf8_message; + return; + } + break; + } + if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) + break; // Can't get error message, report error code instead. + buffer.resize(buffer.size() * 2); + } + } FMT_CATCH(...) {} + fmt::format_error_code(out, error_code, message); // 'fmt::' is for bcc32. +} + +#endif // FMT_USE_WINDOWS_H + +FMT_FUNC void fmt::internal::format_system_error( + fmt::Writer &out, int error_code, + fmt::StringRef message) FMT_NOEXCEPT { + FMT_TRY { + MemoryBuffer buffer; + buffer.resize(INLINE_BUFFER_SIZE); + for (;;) { + char *system_message = &buffer[0]; + int result = safe_strerror(error_code, system_message, buffer.size()); + if (result == 0) { + out << message << ": " << system_message; + return; + } + if (result != ERANGE) + break; // Can't get error message, report error code instead. + buffer.resize(buffer.size() * 2); + } + } FMT_CATCH(...) {} + fmt::format_error_code(out, error_code, message); // 'fmt::' is for bcc32. +} + +template +void fmt::internal::ArgMap::init(const ArgList &args) { + if (!map_.empty()) + return; + typedef internal::NamedArg NamedArg; + const NamedArg *named_arg = 0; + bool use_values = + args.type(ArgList::MAX_PACKED_ARGS - 1) == internal::Arg::NONE; + if (use_values) { + for (unsigned i = 0;/*nothing*/; ++i) { + internal::Arg::Type arg_type = args.type(i); + switch (arg_type) { + case internal::Arg::NONE: + return; + case internal::Arg::NAMED_ARG: + named_arg = static_cast(args.values_[i].pointer); + map_.push_back(Pair(named_arg->name, *named_arg)); + break; + default: + /*nothing*/; + } + } + return; + } + for (unsigned i = 0; i != ArgList::MAX_PACKED_ARGS; ++i) { + internal::Arg::Type arg_type = args.type(i); + if (arg_type == internal::Arg::NAMED_ARG) { + named_arg = static_cast(args.args_[i].pointer); + map_.push_back(Pair(named_arg->name, *named_arg)); + } + } + for (unsigned i = ArgList::MAX_PACKED_ARGS;/*nothing*/; ++i) { + switch (args.args_[i].type) { + case internal::Arg::NONE: + return; + case internal::Arg::NAMED_ARG: + named_arg = static_cast(args.args_[i].pointer); + map_.push_back(Pair(named_arg->name, *named_arg)); + break; + default: + /*nothing*/; + } + } +} + +template +void fmt::internal::FixedBuffer::grow(std::size_t) { + FMT_THROW(std::runtime_error("buffer overflow")); +} + +FMT_FUNC Arg fmt::internal::FormatterBase::do_get_arg( + unsigned arg_index, const char *&error) { + Arg arg = args_[arg_index]; + switch (arg.type) { + case Arg::NONE: + error = "argument index out of range"; + break; + case Arg::NAMED_ARG: + arg = *static_cast(arg.pointer); + break; + default: + /*nothing*/; + } + return arg; +} + +template +void fmt::internal::PrintfFormatter::parse_flags( + FormatSpec &spec, const Char *&s) { + for (;;) { + switch (*s++) { + case '-': + spec.align_ = ALIGN_LEFT; + break; + case '+': + spec.flags_ |= SIGN_FLAG | PLUS_FLAG; + break; + case '0': + spec.fill_ = '0'; + break; + case ' ': + spec.flags_ |= SIGN_FLAG; + break; + case '#': + spec.flags_ |= HASH_FLAG; + break; + default: + --s; + return; + } + } +} + +template +Arg fmt::internal::PrintfFormatter::get_arg( + const Char *s, unsigned arg_index) { + (void)s; + const char *error = 0; + Arg arg = arg_index == UINT_MAX ? + next_arg(error) : FormatterBase::get_arg(arg_index - 1, error); + if (error) + FMT_THROW(FormatError(!*s ? "invalid format string" : error)); + return arg; +} + +template +unsigned fmt::internal::PrintfFormatter::parse_header( + const Char *&s, FormatSpec &spec) { + unsigned arg_index = UINT_MAX; + Char c = *s; + if (c >= '0' && c <= '9') { + // Parse an argument index (if followed by '$') or a width possibly + // preceded with '0' flag(s). + unsigned value = parse_nonnegative_int(s); + if (*s == '$') { // value is an argument index + ++s; + arg_index = value; + } else { + if (c == '0') + spec.fill_ = '0'; + if (value != 0) { + // Nonzero value means that we parsed width and don't need to + // parse it or flags again, so return now. + spec.width_ = value; + return arg_index; + } + } + } + parse_flags(spec, s); + // Parse width. + if (*s >= '0' && *s <= '9') { + spec.width_ = parse_nonnegative_int(s); + } else if (*s == '*') { + ++s; + spec.width_ = WidthHandler(spec).visit(get_arg(s)); + } + return arg_index; +} + +template +void fmt::internal::PrintfFormatter::format( + BasicWriter &writer, BasicCStringRef format_str) { + const Char *start = format_str.c_str(); + const Char *s = start; + while (*s) { + Char c = *s++; + if (c != '%') continue; + if (*s == c) { + write(writer, start, s); + start = ++s; + continue; + } + write(writer, start, s - 1); + + FormatSpec spec; + spec.align_ = ALIGN_RIGHT; + + // Parse argument index, flags and width. + unsigned arg_index = parse_header(s, spec); + + // Parse precision. + if (*s == '.') { + ++s; + if ('0' <= *s && *s <= '9') { + spec.precision_ = static_cast(parse_nonnegative_int(s)); + } else if (*s == '*') { + ++s; + spec.precision_ = PrecisionHandler().visit(get_arg(s)); + } + } + + Arg arg = get_arg(s, arg_index); + if (spec.flag(HASH_FLAG) && IsZeroInt().visit(arg)) + spec.flags_ &= ~to_unsigned(HASH_FLAG); + if (spec.fill_ == '0') { + if (arg.type <= Arg::LAST_NUMERIC_TYPE) + spec.align_ = ALIGN_NUMERIC; + else + spec.fill_ = ' '; // Ignore '0' flag for non-numeric types. + } + + // Parse length and convert the argument to the required type. + switch (*s++) { + case 'h': + if (*s == 'h') + ArgConverter(arg, *++s).visit(arg); + else + ArgConverter(arg, *s).visit(arg); + break; + case 'l': + if (*s == 'l') + ArgConverter(arg, *++s).visit(arg); + else + ArgConverter(arg, *s).visit(arg); + break; + case 'j': + ArgConverter(arg, *s).visit(arg); + break; + case 'z': + ArgConverter(arg, *s).visit(arg); + break; + case 't': + ArgConverter(arg, *s).visit(arg); + break; + case 'L': + // printf produces garbage when 'L' is omitted for long double, no + // need to do the same. + break; + default: + --s; + ArgConverter(arg, *s).visit(arg); + } + + // Parse type. + if (!*s) + FMT_THROW(FormatError("invalid format string")); + spec.type_ = static_cast(*s++); + if (arg.type <= Arg::LAST_INTEGER_TYPE) { + // Normalize type. + switch (spec.type_) { + case 'i': case 'u': + spec.type_ = 'd'; + break; + case 'c': + // TODO: handle wchar_t + CharConverter(arg).visit(arg); + break; + } + } + + start = s; + + // Format argument. + internal::PrintfArgFormatter(writer, spec).visit(arg); + } + write(writer, start, s); +} + +FMT_FUNC void fmt::report_system_error( + int error_code, fmt::StringRef message) FMT_NOEXCEPT { + // 'fmt::' is for bcc32. + fmt::report_error(internal::format_system_error, error_code, message); +} + +#if FMT_USE_WINDOWS_H +FMT_FUNC void fmt::report_windows_error( + int error_code, fmt::StringRef message) FMT_NOEXCEPT { + // 'fmt::' is for bcc32. + fmt::report_error(internal::format_windows_error, error_code, message); +} +#endif + +FMT_FUNC void fmt::print(std::FILE *f, CStringRef format_str, ArgList args) { + MemoryWriter w; + w.write(format_str, args); + std::fwrite(w.data(), 1, w.size(), f); +} + +FMT_FUNC void fmt::print(CStringRef format_str, ArgList args) { + print(stdout, format_str, args); +} + +FMT_FUNC void fmt::print_colored(Color c, CStringRef format, ArgList args) { + char escape[] = "\x1b[30m"; + escape[3] = static_cast('0' + c); + std::fputs(escape, stdout); + print(format, args); + std::fputs(RESET_COLOR, stdout); +} + +FMT_FUNC int fmt::fprintf(std::FILE *f, CStringRef format, ArgList args) { + MemoryWriter w; + printf(w, format, args); + std::size_t size = w.size(); + return std::fwrite(w.data(), 1, size, f) < size ? -1 : static_cast(size); +} + +#ifndef FMT_HEADER_ONLY + +template struct fmt::internal::BasicData; + +// Explicit instantiations for char. + +template void fmt::internal::FixedBuffer::grow(std::size_t); + +template void fmt::internal::ArgMap::init(const fmt::ArgList &args); + +template void fmt::internal::PrintfFormatter::format( + BasicWriter &writer, CStringRef format); + +template int fmt::internal::CharTraits::format_float( + char *buffer, std::size_t size, const char *format, + unsigned width, int precision, double value); + +template int fmt::internal::CharTraits::format_float( + char *buffer, std::size_t size, const char *format, + unsigned width, int precision, long double value); + +// Explicit instantiations for wchar_t. + +template void fmt::internal::FixedBuffer::grow(std::size_t); + +template void fmt::internal::ArgMap::init(const fmt::ArgList &args); + +template void fmt::internal::PrintfFormatter::format( + BasicWriter &writer, WCStringRef format); + +template int fmt::internal::CharTraits::format_float( + wchar_t *buffer, std::size_t size, const wchar_t *format, + unsigned width, int precision, double value); + +template int fmt::internal::CharTraits::format_float( + wchar_t *buffer, std::size_t size, const wchar_t *format, + unsigned width, int precision, long double value); + +#endif // FMT_HEADER_ONLY + +#ifdef _MSC_VER +# pragma warning(pop) +#endif diff --git a/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/format.h b/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/format.h new file mode 100644 index 00000000..64c949be --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/format.h @@ -0,0 +1,4501 @@ +/* + Formatting library for C++ + + Copyright (c) 2012 - 2016, Victor Zverovich + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef FMT_FORMAT_H_ +#define FMT_FORMAT_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef _SECURE_SCL +# define FMT_SECURE_SCL _SECURE_SCL +#else +# define FMT_SECURE_SCL 0 +#endif + +#if FMT_SECURE_SCL +# include +#endif + +#ifdef _MSC_VER +# define FMT_MSC_VER _MSC_VER +#else +# define FMT_MSC_VER 0 +#endif + +#if FMT_MSC_VER && FMT_MSC_VER <= 1500 +typedef unsigned __int32 uint32_t; +typedef unsigned __int64 uint64_t; +typedef __int64 intmax_t; +#else +#include +#endif + +#if !defined(FMT_HEADER_ONLY) && defined(_WIN32) +# ifdef FMT_EXPORT +# define FMT_API __declspec(dllexport) +# elif defined(FMT_SHARED) +# define FMT_API __declspec(dllimport) +# endif +#endif +#ifndef FMT_API +# define FMT_API +#endif + +#ifdef __GNUC__ +# define FMT_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) +# define FMT_GCC_EXTENSION __extension__ +# if FMT_GCC_VERSION >= 406 +# pragma GCC diagnostic push +// Disable the warning about "long long" which is sometimes reported even +// when using __extension__. +# pragma GCC diagnostic ignored "-Wlong-long" +// Disable the warning about declaration shadowing because it affects too +// many valid cases. +# pragma GCC diagnostic ignored "-Wshadow" +// Disable the warning about implicit conversions that may change the sign of +// an integer; silencing it otherwise would require many explicit casts. +# pragma GCC diagnostic ignored "-Wsign-conversion" +# endif +# if __cplusplus >= 201103L || defined __GXX_EXPERIMENTAL_CXX0X__ +# define FMT_HAS_GXX_CXX11 1 +# endif +#else +# define FMT_GCC_EXTENSION +#endif + +#if defined(__INTEL_COMPILER) +# define FMT_ICC_VERSION __INTEL_COMPILER +#elif defined(__ICL) +# define FMT_ICC_VERSION __ICL +#endif + +#if defined(__clang__) && !defined(FMT_ICC_VERSION) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdocumentation-unknown-command" +# pragma clang diagnostic ignored "-Wpadded" +#endif + +#ifdef __GNUC_LIBSTD__ +# define FMT_GNUC_LIBSTD_VERSION (__GNUC_LIBSTD__ * 100 + __GNUC_LIBSTD_MINOR__) +#endif + +#ifdef __has_feature +# define FMT_HAS_FEATURE(x) __has_feature(x) +#else +# define FMT_HAS_FEATURE(x) 0 +#endif + +#ifdef __has_builtin +# define FMT_HAS_BUILTIN(x) __has_builtin(x) +#else +# define FMT_HAS_BUILTIN(x) 0 +#endif + +#ifdef __has_cpp_attribute +# define FMT_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x) +#else +# define FMT_HAS_CPP_ATTRIBUTE(x) 0 +#endif + +#ifndef FMT_USE_VARIADIC_TEMPLATES +// Variadic templates are available in GCC since version 4.4 +// (http://gcc.gnu.org/projects/cxx0x.html) and in Visual C++ +// since version 2013. +# define FMT_USE_VARIADIC_TEMPLATES \ + (FMT_HAS_FEATURE(cxx_variadic_templates) || \ + (FMT_GCC_VERSION >= 404 && FMT_HAS_GXX_CXX11) || FMT_MSC_VER >= 1800) +#endif + +#ifndef FMT_USE_RVALUE_REFERENCES +// Don't use rvalue references when compiling with clang and an old libstdc++ +// as the latter doesn't provide std::move. +# if defined(FMT_GNUC_LIBSTD_VERSION) && FMT_GNUC_LIBSTD_VERSION <= 402 +# define FMT_USE_RVALUE_REFERENCES 0 +# else +# define FMT_USE_RVALUE_REFERENCES \ + (FMT_HAS_FEATURE(cxx_rvalue_references) || \ + (FMT_GCC_VERSION >= 403 && FMT_HAS_GXX_CXX11) || FMT_MSC_VER >= 1600) +# endif +#endif + +#if FMT_USE_RVALUE_REFERENCES +# include // for std::move +#endif + +// Check if exceptions are disabled. +#if defined(__GNUC__) && !defined(__EXCEPTIONS) +# define FMT_EXCEPTIONS 0 +#endif +#if FMT_MSC_VER && !_HAS_EXCEPTIONS +# define FMT_EXCEPTIONS 0 +#endif +#ifndef FMT_EXCEPTIONS +# define FMT_EXCEPTIONS 1 +#endif + +#ifndef FMT_THROW +# if FMT_EXCEPTIONS +# define FMT_THROW(x) throw x +# else +# define FMT_THROW(x) assert(false) +# endif +#endif + +// Define FMT_USE_NOEXCEPT to make fmt use noexcept (C++11 feature). +#ifndef FMT_USE_NOEXCEPT +# define FMT_USE_NOEXCEPT 0 +#endif + +#ifndef FMT_NOEXCEPT +# if FMT_EXCEPTIONS +# if FMT_USE_NOEXCEPT || FMT_HAS_FEATURE(cxx_noexcept) || \ + (FMT_GCC_VERSION >= 408 && FMT_HAS_GXX_CXX11) || \ + FMT_MSC_VER >= 1900 +# define FMT_NOEXCEPT noexcept +# else +# define FMT_NOEXCEPT throw() +# endif +# else +# define FMT_NOEXCEPT +# endif +#endif + +#ifndef FMT_OVERRIDE +# if FMT_USE_OVERRIDE || FMT_HAS_FEATURE(cxx_override) || \ + (FMT_GCC_VERSION >= 408 && FMT_HAS_GXX_CXX11) || \ + FMT_MSC_VER >= 1900 +# define FMT_OVERRIDE override +# else +# define FMT_OVERRIDE +# endif +#endif + + +// A macro to disallow the copy constructor and operator= functions +// This should be used in the private: declarations for a class +#ifndef FMT_USE_DELETED_FUNCTIONS +# define FMT_USE_DELETED_FUNCTIONS 0 +#endif + +#if FMT_USE_DELETED_FUNCTIONS || FMT_HAS_FEATURE(cxx_deleted_functions) || \ + (FMT_GCC_VERSION >= 404 && FMT_HAS_GXX_CXX11) || FMT_MSC_VER >= 1800 +# define FMT_DELETED_OR_UNDEFINED = delete +# define FMT_DISALLOW_COPY_AND_ASSIGN(TypeName) \ + TypeName(const TypeName&) = delete; \ + TypeName& operator=(const TypeName&) = delete +#else +# define FMT_DELETED_OR_UNDEFINED +# define FMT_DISALLOW_COPY_AND_ASSIGN(TypeName) \ + TypeName(const TypeName&); \ + TypeName& operator=(const TypeName&) +#endif + +#ifndef FMT_USE_USER_DEFINED_LITERALS +// All compilers which support UDLs also support variadic templates. This +// makes the fmt::literals implementation easier. However, an explicit check +// for variadic templates is added here just in case. +// For Intel's compiler both it and the system gcc/msc must support UDLs. +# define FMT_USE_USER_DEFINED_LITERALS \ + FMT_USE_VARIADIC_TEMPLATES && FMT_USE_RVALUE_REFERENCES && \ + (FMT_HAS_FEATURE(cxx_user_literals) || \ + (FMT_GCC_VERSION >= 407 && FMT_HAS_GXX_CXX11) || FMT_MSC_VER >= 1900) && \ + (!defined(FMT_ICC_VERSION) || FMT_ICC_VERSION >= 1500) +#endif + +#ifndef FMT_ASSERT +# define FMT_ASSERT(condition, message) assert((condition) && message) +#endif + +#if FMT_GCC_VERSION >= 400 || FMT_HAS_BUILTIN(__builtin_clz) +# define FMT_BUILTIN_CLZ(n) __builtin_clz(n) +#endif + +#if FMT_GCC_VERSION >= 400 || FMT_HAS_BUILTIN(__builtin_clzll) +# define FMT_BUILTIN_CLZLL(n) __builtin_clzll(n) +#endif + +// Some compilers masquerade as both MSVC and GCC-likes or +// otherwise support __builtin_clz and __builtin_clzll, so +// only define FMT_BUILTIN_CLZ using the MSVC intrinsics +// if the clz and clzll builtins are not available. +#if FMT_MSC_VER && !defined(FMT_BUILTIN_CLZLL) +# include // _BitScanReverse, _BitScanReverse64 + +namespace fmt +{ +namespace internal +{ +# pragma intrinsic(_BitScanReverse) +inline uint32_t clz(uint32_t x) +{ + unsigned long r = 0; + _BitScanReverse(&r, x); + + assert(x != 0); + // Static analysis complains about using uninitialized data + // "r", but the only way that can happen is if "x" is 0, + // which the callers guarantee to not happen. +# pragma warning(suppress: 6102) + return 31 - r; +} +# define FMT_BUILTIN_CLZ(n) fmt::internal::clz(n) + +# ifdef _WIN64 +# pragma intrinsic(_BitScanReverse64) +# endif + +inline uint32_t clzll(uint64_t x) +{ + unsigned long r = 0; +# ifdef _WIN64 + _BitScanReverse64(&r, x); +# else + // Scan the high 32 bits. + if (_BitScanReverse(&r, static_cast(x >> 32))) + return 63 - (r + 32); + + // Scan the low 32 bits. + _BitScanReverse(&r, static_cast(x)); +# endif + + assert(x != 0); + // Static analysis complains about using uninitialized data + // "r", but the only way that can happen is if "x" is 0, + // which the callers guarantee to not happen. +# pragma warning(suppress: 6102) + return 63 - r; +} +# define FMT_BUILTIN_CLZLL(n) fmt::internal::clzll(n) +} +} +#endif + +namespace fmt +{ +namespace internal +{ +struct DummyInt +{ + int data[2]; + operator int() const + { + return 0; + } +}; +typedef std::numeric_limits FPUtil; + +// Dummy implementations of system functions such as signbit and ecvt called +// if the latter are not available. +inline DummyInt signbit(...) +{ + return DummyInt(); +} +inline DummyInt _ecvt_s(...) +{ + return DummyInt(); +} +inline DummyInt isinf(...) +{ + return DummyInt(); +} +inline DummyInt _finite(...) +{ + return DummyInt(); +} +inline DummyInt isnan(...) +{ + return DummyInt(); +} +inline DummyInt _isnan(...) +{ + return DummyInt(); +} + +// A helper function to suppress bogus "conditional expression is constant" +// warnings. +template +inline T const_check(T value) +{ + return value; +} +} +} // namespace fmt + +namespace std +{ +// Standard permits specialization of std::numeric_limits. This specialization +// is used to resolve ambiguity between isinf and std::isinf in glibc: +// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48891 +// and the same for isnan and signbit. +template <> +class numeric_limits : + public std::numeric_limits +{ +public: + // Portable version of isinf. + template + static bool isinfinity(T x) + { + using namespace fmt::internal; + // The resolution "priority" is: + // isinf macro > std::isinf > ::isinf > fmt::internal::isinf + if (const_check(sizeof(isinf(x)) == sizeof(bool) || + sizeof(isinf(x)) == sizeof(int))) + { + return isinf(x) != 0; + } + return !_finite(static_cast(x)); + } + + // Portable version of isnan. + template + static bool isnotanumber(T x) + { + using namespace fmt::internal; + if (const_check(sizeof(isnan(x)) == sizeof(bool) || + sizeof(isnan(x)) == sizeof(int))) + { + return isnan(x) != 0; + } + return _isnan(static_cast(x)) != 0; + } + + // Portable version of signbit. + static bool isnegative(double x) + { + using namespace fmt::internal; + if (const_check(sizeof(signbit(x)) == sizeof(int))) + return signbit(x) != 0; + if (x < 0) return true; + if (!isnotanumber(x)) return false; + int dec = 0, sign = 0; + char buffer[2]; // The buffer size must be >= 2 or _ecvt_s will fail. + _ecvt_s(buffer, sizeof(buffer), x, 0, &dec, &sign); + return sign != 0; + } +}; +} // namespace std + +namespace fmt +{ + +// Fix the warning about long long on older versions of GCC +// that don't support the diagnostic pragma. +FMT_GCC_EXTENSION typedef long long LongLong; +FMT_GCC_EXTENSION typedef unsigned long long ULongLong; + +#if FMT_USE_RVALUE_REFERENCES +using std::move; +#endif + +template +class BasicWriter; + +typedef BasicWriter Writer; +typedef BasicWriter WWriter; + +template +class ArgFormatter; + +template > +class BasicFormatter; + +/** + \rst + A string reference. It can be constructed from a C string or ``std::string``. + + You can use one of the following typedefs for common character types: + + +------------+-------------------------+ + | Type | Definition | + +============+=========================+ + | StringRef | BasicStringRef | + +------------+-------------------------+ + | WStringRef | BasicStringRef | + +------------+-------------------------+ + + This class is most useful as a parameter type to allow passing + different types of strings to a function, for example:: + + template + std::string format(StringRef format_str, const Args & ... args); + + format("{}", 42); + format(std::string("{}"), 42); + \endrst + */ +template +class BasicStringRef +{ +private: + const Char *data_; + std::size_t size_; + +public: + /** Constructs a string reference object from a C string and a size. */ + BasicStringRef(const Char *s, std::size_t size) : data_(s), size_(size) {} + + /** + \rst + Constructs a string reference object from a C string computing + the size with ``std::char_traits::length``. + \endrst + */ + BasicStringRef(const Char *s) + : data_(s), size_(std::char_traits::length(s)) {} + + /** + \rst + Constructs a string reference from an ``std::string`` object. + \endrst + */ + BasicStringRef(const std::basic_string &s) + : data_(s.c_str()), size_(s.size()) {} + + /** + \rst + Converts a string reference to an ``std::string`` object. + \endrst + */ + std::basic_string to_string() const + { + return std::basic_string(data_, size_); + } + + /** Returns a pointer to the string data. */ + const Char *data() const + { + return data_; + } + + /** Returns the string size. */ + std::size_t size() const + { + return size_; + } + + // Lexicographically compare this string reference to other. + int compare(BasicStringRef other) const + { + std::size_t size = size_ < other.size_ ? size_ : other.size_; + int result = std::char_traits::compare(data_, other.data_, size); + if (result == 0) + result = size_ == other.size_ ? 0 : (size_ < other.size_ ? -1 : 1); + return result; + } + + friend bool operator==(BasicStringRef lhs, BasicStringRef rhs) + { + return lhs.compare(rhs) == 0; + } + friend bool operator!=(BasicStringRef lhs, BasicStringRef rhs) + { + return lhs.compare(rhs) != 0; + } + friend bool operator<(BasicStringRef lhs, BasicStringRef rhs) + { + return lhs.compare(rhs) < 0; + } + friend bool operator<=(BasicStringRef lhs, BasicStringRef rhs) + { + return lhs.compare(rhs) <= 0; + } + friend bool operator>(BasicStringRef lhs, BasicStringRef rhs) + { + return lhs.compare(rhs) > 0; + } + friend bool operator>=(BasicStringRef lhs, BasicStringRef rhs) + { + return lhs.compare(rhs) >= 0; + } +}; + +typedef BasicStringRef StringRef; +typedef BasicStringRef WStringRef; + +/** + \rst + A reference to a null terminated string. It can be constructed from a C + string or ``std::string``. + + You can use one of the following typedefs for common character types: + + +-------------+--------------------------+ + | Type | Definition | + +=============+==========================+ + | CStringRef | BasicCStringRef | + +-------------+--------------------------+ + | WCStringRef | BasicCStringRef | + +-------------+--------------------------+ + + This class is most useful as a parameter type to allow passing + different types of strings to a function, for example:: + + template + std::string format(CStringRef format_str, const Args & ... args); + + format("{}", 42); + format(std::string("{}"), 42); + \endrst + */ +template +class BasicCStringRef +{ +private: + const Char *data_; + +public: + /** Constructs a string reference object from a C string. */ + BasicCStringRef(const Char *s) : data_(s) {} + + /** + \rst + Constructs a string reference from an ``std::string`` object. + \endrst + */ + BasicCStringRef(const std::basic_string &s) : data_(s.c_str()) {} + + /** Returns the pointer to a C string. */ + const Char *c_str() const + { + return data_; + } +}; + +typedef BasicCStringRef CStringRef; +typedef BasicCStringRef WCStringRef; + +/** A formatting error such as invalid format string. */ +class FormatError : public std::runtime_error +{ +public: + explicit FormatError(CStringRef message) + : std::runtime_error(message.c_str()) {} + ~FormatError() throw(); +}; + +namespace internal +{ + +// MakeUnsigned::Type gives an unsigned type corresponding to integer type T. +template +struct MakeUnsigned +{ + typedef T Type; +}; + +#define FMT_SPECIALIZE_MAKE_UNSIGNED(T, U) \ + template <> \ + struct MakeUnsigned { typedef U Type; } + +FMT_SPECIALIZE_MAKE_UNSIGNED(char, unsigned char); +FMT_SPECIALIZE_MAKE_UNSIGNED(signed char, unsigned char); +FMT_SPECIALIZE_MAKE_UNSIGNED(short, unsigned short); +FMT_SPECIALIZE_MAKE_UNSIGNED(int, unsigned); +FMT_SPECIALIZE_MAKE_UNSIGNED(long, unsigned long); +FMT_SPECIALIZE_MAKE_UNSIGNED(LongLong, ULongLong); + +// Casts nonnegative integer to unsigned. +template +inline typename MakeUnsigned::Type to_unsigned(Int value) +{ + FMT_ASSERT(value >= 0, "negative value"); + return static_cast::Type>(value); +} + +// The number of characters to store in the MemoryBuffer object itself +// to avoid dynamic memory allocation. +enum { INLINE_BUFFER_SIZE = 500 }; + +#if FMT_SECURE_SCL +// Use checked iterator to avoid warnings on MSVC. +template +inline stdext::checked_array_iterator make_ptr(T *ptr, std::size_t size) +{ + return stdext::checked_array_iterator(ptr, size); +} +#else +template +inline T *make_ptr(T *ptr, std::size_t) +{ + return ptr; +} +#endif +} // namespace internal + +/** + \rst + A buffer supporting a subset of ``std::vector``'s operations. + \endrst + */ +template +class Buffer +{ +private: + FMT_DISALLOW_COPY_AND_ASSIGN(Buffer); + +protected: + T *ptr_; + std::size_t size_; + std::size_t capacity_; + + Buffer(T *ptr = 0, std::size_t capacity = 0) + : ptr_(ptr), size_(0), capacity_(capacity) {} + + /** + \rst + Increases the buffer capacity to hold at least *size* elements updating + ``ptr_`` and ``capacity_``. + \endrst + */ + virtual void grow(std::size_t size) = 0; + +public: + virtual ~Buffer() {} + + /** Returns the size of this buffer. */ + std::size_t size() const + { + return size_; + } + + /** Returns the capacity of this buffer. */ + std::size_t capacity() const + { + return capacity_; + } + + /** + Resizes the buffer. If T is a POD type new elements may not be initialized. + */ + void resize(std::size_t new_size) + { + if (new_size > capacity_) + grow(new_size); + size_ = new_size; + } + + /** + \rst + Reserves space to store at least *capacity* elements. + \endrst + */ + void reserve(std::size_t capacity) + { + if (capacity > capacity_) + grow(capacity); + } + + void clear() FMT_NOEXCEPT { size_ = 0; } + + void push_back(const T &value) + { + if (size_ == capacity_) + grow(size_ + 1); + ptr_[size_++] = value; + } + + /** Appends data to the end of the buffer. */ + template + void append(const U *begin, const U *end); + + T &operator[](std::size_t index) + { + return ptr_[index]; + } + const T &operator[](std::size_t index) const + { + return ptr_[index]; + } +}; + +template +template +void Buffer::append(const U *begin, const U *end) +{ + std::size_t new_size = size_ + internal::to_unsigned(end - begin); + if (new_size > capacity_) + grow(new_size); + std::uninitialized_copy(begin, end, + internal::make_ptr(ptr_, capacity_) + size_); + size_ = new_size; +} + +namespace internal +{ + +// A memory buffer for trivially copyable/constructible types with the first +// SIZE elements stored in the object itself. +template > +class MemoryBuffer : private Allocator, public Buffer +{ +private: + T data_[SIZE]; + + // Deallocate memory allocated by the buffer. + void deallocate() + { + if (this->ptr_ != data_) Allocator::deallocate(this->ptr_, this->capacity_); + } + +protected: + void grow(std::size_t size) FMT_OVERRIDE; + +public: + explicit MemoryBuffer(const Allocator &alloc = Allocator()) + : Allocator(alloc), Buffer(data_, SIZE) {} + ~MemoryBuffer() + { + deallocate(); + } + +#if FMT_USE_RVALUE_REFERENCES +private: + // Move data from other to this buffer. + void move(MemoryBuffer &other) + { + Allocator &this_alloc = *this, &other_alloc = other; + this_alloc = std::move(other_alloc); + this->size_ = other.size_; + this->capacity_ = other.capacity_; + if (other.ptr_ == other.data_) + { + this->ptr_ = data_; + std::uninitialized_copy(other.data_, other.data_ + this->size_, + make_ptr(data_, this->capacity_)); + } + else + { + this->ptr_ = other.ptr_; + // Set pointer to the inline array so that delete is not called + // when deallocating. + other.ptr_ = other.data_; + } + } + +public: + MemoryBuffer(MemoryBuffer &&other) + { + move(other); + } + + MemoryBuffer &operator=(MemoryBuffer &&other) + { + assert(this != &other); + deallocate(); + move(other); + return *this; + } +#endif + + // Returns a copy of the allocator associated with this buffer. + Allocator get_allocator() const + { + return *this; + } +}; + +template +void MemoryBuffer::grow(std::size_t size) +{ + std::size_t new_capacity = this->capacity_ + this->capacity_ / 2; + if (size > new_capacity) + new_capacity = size; + T *new_ptr = this->allocate(new_capacity); + // The following code doesn't throw, so the raw pointer above doesn't leak. + std::uninitialized_copy(this->ptr_, this->ptr_ + this->size_, + make_ptr(new_ptr, new_capacity)); + std::size_t old_capacity = this->capacity_; + T *old_ptr = this->ptr_; + this->capacity_ = new_capacity; + this->ptr_ = new_ptr; + // deallocate may throw (at least in principle), but it doesn't matter since + // the buffer already uses the new storage and will deallocate it in case + // of exception. + if (old_ptr != data_) + Allocator::deallocate(old_ptr, old_capacity); +} + +// A fixed-size buffer. +template +class FixedBuffer : public fmt::Buffer +{ +public: + FixedBuffer(Char *array, std::size_t size) : fmt::Buffer(array, size) {} + +protected: + FMT_API void grow(std::size_t size); +}; + +template +class BasicCharTraits +{ +public: +#if FMT_SECURE_SCL + typedef stdext::checked_array_iterator CharPtr; +#else + typedef Char *CharPtr; +#endif + static Char cast(int value) + { + return static_cast(value); + } +}; + +template +class CharTraits; + +template <> +class CharTraits : public BasicCharTraits +{ +private: + // Conversion from wchar_t to char is not allowed. + static char convert(wchar_t); + +public: + static char convert(char value) + { + return value; + } + + // Formats a floating-point number. + template + FMT_API static int format_float(char *buffer, std::size_t size, + const char *format, unsigned width, int precision, T value); +}; + +template <> +class CharTraits : public BasicCharTraits +{ +public: + static wchar_t convert(char value) + { + return value; + } + static wchar_t convert(wchar_t value) + { + return value; + } + + template + FMT_API static int format_float(wchar_t *buffer, std::size_t size, + const wchar_t *format, unsigned width, int precision, T value); +}; + +// Checks if a number is negative - used to avoid warnings. +template +struct SignChecker +{ + template + static bool is_negative(T value) + { + return value < 0; + } +}; + +template <> +struct SignChecker +{ + template + static bool is_negative(T) + { + return false; + } +}; + +// Returns true if value is negative, false otherwise. +// Same as (value < 0) but doesn't produce warnings if T is an unsigned type. +template +inline bool is_negative(T value) +{ + return SignChecker::is_signed>::is_negative(value); +} + +// Selects uint32_t if FitsIn32Bits is true, uint64_t otherwise. +template +struct TypeSelector +{ + typedef uint32_t Type; +}; + +template <> +struct TypeSelector +{ + typedef uint64_t Type; +}; + +template +struct IntTraits +{ + // Smallest of uint32_t and uint64_t that is large enough to represent + // all values of T. + typedef typename + TypeSelector::digits <= 32>::Type MainType; +}; + +FMT_API void report_unknown_type(char code, const char *type); + +// Static data is placed in this class template to allow header-only +// configuration. +template +struct FMT_API BasicData +{ + static const uint32_t POWERS_OF_10_32[]; + static const uint64_t POWERS_OF_10_64[]; + static const char DIGITS[]; +}; + +#ifndef FMT_USE_EXTERN_TEMPLATES +// Clang doesn't have a feature check for extern templates so we check +// for variadic templates which were introduced in the same version. +# define FMT_USE_EXTERN_TEMPLATES (__clang__ && FMT_USE_VARIADIC_TEMPLATES) +#endif + +#if FMT_USE_EXTERN_TEMPLATES && !defined(FMT_HEADER_ONLY) +extern template struct BasicData; +#endif + +typedef BasicData<> Data; + +#ifdef FMT_BUILTIN_CLZLL +// Returns the number of decimal digits in n. Leading zeros are not counted +// except for n == 0 in which case count_digits returns 1. +inline unsigned count_digits(uint64_t n) +{ + // Based on http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog10 + // and the benchmark https://github.com/localvoid/cxx-benchmark-count-digits. + int t = (64 - FMT_BUILTIN_CLZLL(n | 1)) * 1233 >> 12; + return to_unsigned(t) - (n < Data::POWERS_OF_10_64[t]) + 1; +} +#else +// Fallback version of count_digits used when __builtin_clz is not available. +inline unsigned count_digits(uint64_t n) +{ + unsigned count = 1; + for (;;) + { + // Integer division is slow so do it for a group of four digits instead + // of for every digit. The idea comes from the talk by Alexandrescu + // "Three Optimization Tips for C++". See speed-test for a comparison. + if (n < 10) return count; + if (n < 100) return count + 1; + if (n < 1000) return count + 2; + if (n < 10000) return count + 3; + n /= 10000u; + count += 4; + } +} +#endif + +#ifdef FMT_BUILTIN_CLZ +// Optional version of count_digits for better performance on 32-bit platforms. +inline unsigned count_digits(uint32_t n) +{ + int t = (32 - FMT_BUILTIN_CLZ(n | 1)) * 1233 >> 12; + return to_unsigned(t) - (n < Data::POWERS_OF_10_32[t]) + 1; +} +#endif + +// A functor that doesn't add a thousands separator. +struct NoThousandsSep +{ + template + void operator()(Char *) {} +}; + +// A functor that adds a thousands separator. +class ThousandsSep +{ +private: + fmt::StringRef sep_; + + // Index of a decimal digit with the least significant digit having index 0. + unsigned digit_index_; + +public: + explicit ThousandsSep(fmt::StringRef sep) : sep_(sep), digit_index_(0) {} + + template + void operator()(Char *&buffer) + { + if (++digit_index_ % 3 != 0) + return; + buffer -= sep_.size(); + std::uninitialized_copy(sep_.data(), sep_.data() + sep_.size(), + internal::make_ptr(buffer, sep_.size())); + } +}; + +// Formats a decimal unsigned integer value writing into buffer. +// thousands_sep is a functor that is called after writing each char to +// add a thousands separator if necessary. +template +inline void format_decimal(Char *buffer, UInt value, unsigned num_digits, + ThousandsSep thousands_sep) +{ + buffer += num_digits; + while (value >= 100) + { + // Integer division is slow so do it for a group of two digits instead + // of for every digit. The idea comes from the talk by Alexandrescu + // "Three Optimization Tips for C++". See speed-test for a comparison. + unsigned index = static_cast((value % 100) * 2); + value /= 100; + *--buffer = Data::DIGITS[index + 1]; + thousands_sep(buffer); + *--buffer = Data::DIGITS[index]; + thousands_sep(buffer); + } + if (value < 10) + { + *--buffer = static_cast('0' + value); + return; + } + unsigned index = static_cast(value * 2); + *--buffer = Data::DIGITS[index + 1]; + thousands_sep(buffer); + *--buffer = Data::DIGITS[index]; +} + +template +inline void format_decimal(Char *buffer, UInt value, unsigned num_digits) +{ + return format_decimal(buffer, value, num_digits, NoThousandsSep()); +} + +#ifndef _WIN32 +# define FMT_USE_WINDOWS_H 0 +#elif !defined(FMT_USE_WINDOWS_H) +# define FMT_USE_WINDOWS_H 1 +#endif + +// Define FMT_USE_WINDOWS_H to 0 to disable use of windows.h. +// All the functionality that relies on it will be disabled too. +#if FMT_USE_WINDOWS_H +// A converter from UTF-8 to UTF-16. +// It is only provided for Windows since other systems support UTF-8 natively. +class UTF8ToUTF16 +{ +private: + MemoryBuffer buffer_; + +public: + FMT_API explicit UTF8ToUTF16(StringRef s); + operator WStringRef() const + { + return WStringRef(&buffer_[0], size()); + } + size_t size() const + { + return buffer_.size() - 1; + } + const wchar_t *c_str() const + { + return &buffer_[0]; + } + std::wstring str() const + { + return std::wstring(&buffer_[0], size()); + } +}; + +// A converter from UTF-16 to UTF-8. +// It is only provided for Windows since other systems support UTF-8 natively. +class UTF16ToUTF8 +{ +private: + MemoryBuffer buffer_; + +public: + UTF16ToUTF8() {} + FMT_API explicit UTF16ToUTF8(WStringRef s); + operator StringRef() const + { + return StringRef(&buffer_[0], size()); + } + size_t size() const + { + return buffer_.size() - 1; + } + const char *c_str() const + { + return &buffer_[0]; + } + std::string str() const + { + return std::string(&buffer_[0], size()); + } + + // Performs conversion returning a system error code instead of + // throwing exception on conversion error. This method may still throw + // in case of memory allocation error. + FMT_API int convert(WStringRef s); +}; + +FMT_API void format_windows_error(fmt::Writer &out, int error_code, + fmt::StringRef message) FMT_NOEXCEPT; +#endif + +FMT_API void format_system_error(fmt::Writer &out, int error_code, + fmt::StringRef message) FMT_NOEXCEPT; + +// A formatting argument value. +struct Value +{ + template + struct StringValue + { + const Char *value; + std::size_t size; + }; + + typedef void (*FormatFunc)( + void *formatter, const void *arg, void *format_str_ptr); + + struct CustomValue + { + const void *value; + FormatFunc format; + }; + + union + { + int int_value; + unsigned uint_value; + LongLong long_long_value; + ULongLong ulong_long_value; + double double_value; + long double long_double_value; + const void *pointer; + StringValue string; + StringValue sstring; + StringValue ustring; + StringValue wstring; + CustomValue custom; + }; + + enum Type + { + NONE, NAMED_ARG, + // Integer types should go first, + INT, UINT, LONG_LONG, ULONG_LONG, BOOL, CHAR, LAST_INTEGER_TYPE = CHAR, + // followed by floating-point types. + DOUBLE, LONG_DOUBLE, LAST_NUMERIC_TYPE = LONG_DOUBLE, + CSTRING, STRING, WSTRING, POINTER, CUSTOM + }; +}; + +// A formatting argument. It is a trivially copyable/constructible type to +// allow storage in internal::MemoryBuffer. +struct Arg : Value +{ + Type type; +}; + +template +struct NamedArg; + +template +struct Null {}; + +// A helper class template to enable or disable overloads taking wide +// characters and strings in MakeValue. +template +struct WCharHelper +{ + typedef Null Supported; + typedef T Unsupported; +}; + +template +struct WCharHelper +{ + typedef T Supported; + typedef Null Unsupported; +}; + +typedef char Yes[1]; +typedef char No[2]; + +template +T &get(); + +// These are non-members to workaround an overload resolution bug in bcc32. +Yes &convert(fmt::ULongLong); +No &convert(...); + +template +struct ConvertToIntImpl +{ + enum { value = ENABLE_CONVERSION }; +}; + +template +struct ConvertToIntImpl2 +{ + enum { value = false }; +}; + +template +struct ConvertToIntImpl2 +{ + enum + { + // Don't convert numeric types. + value = ConvertToIntImpl::is_specialized>::value + }; +}; + +template +struct ConvertToInt +{ + enum { enable_conversion = sizeof(convert(get())) == sizeof(Yes) }; + enum { value = ConvertToIntImpl2::value }; +}; + +#define FMT_DISABLE_CONVERSION_TO_INT(Type) \ + template <> \ + struct ConvertToInt { enum { value = 0 }; } + +// Silence warnings about convering float to int. +FMT_DISABLE_CONVERSION_TO_INT(float); +FMT_DISABLE_CONVERSION_TO_INT(double); +FMT_DISABLE_CONVERSION_TO_INT(long double); + +template +struct EnableIf {}; + +template +struct EnableIf +{ + typedef T type; +}; + +template +struct Conditional +{ + typedef T type; +}; + +template +struct Conditional +{ + typedef F type; +}; + +// For bcc32 which doesn't understand ! in template arguments. +template +struct Not +{ + enum { value = 0 }; +}; + +template<> +struct Not +{ + enum { value = 1 }; +}; + +template struct LConvCheck +{ + LConvCheck(int) {} +}; + +// Returns the thousands separator for the current locale. +// We check if ``lconv`` contains ``thousands_sep`` because on Android +// ``lconv`` is stubbed as an empty struct. +template +inline StringRef thousands_sep( + LConv *lc, LConvCheck = 0) +{ + return lc->thousands_sep; +} + +inline fmt::StringRef thousands_sep(...) +{ + return ""; +} + +// Makes an Arg object from any type. +template +class MakeValue : public Arg +{ +public: + typedef typename Formatter::Char Char; + +private: + // The following two methods are private to disallow formatting of + // arbitrary pointers. If you want to output a pointer cast it to + // "void *" or "const void *". In particular, this forbids formatting + // of "[const] volatile char *" which is printed as bool by iostreams. + // Do not implement! + template + MakeValue(const T *value); + template + MakeValue(T *value); + + // The following methods are private to disallow formatting of wide + // characters and strings into narrow strings as in + // fmt::format("{}", L"test"); + // To fix this, use a wide format string: fmt::format(L"{}", L"test"). +#if !FMT_MSC_VER || defined(_NATIVE_WCHAR_T_DEFINED) + MakeValue(typename WCharHelper::Unsupported); +#endif + MakeValue(typename WCharHelper::Unsupported); + MakeValue(typename WCharHelper::Unsupported); + MakeValue(typename WCharHelper::Unsupported); + MakeValue(typename WCharHelper::Unsupported); + + void set_string(StringRef str) + { + string.value = str.data(); + string.size = str.size(); + } + + void set_string(WStringRef str) + { + wstring.value = str.data(); + wstring.size = str.size(); + } + + // Formats an argument of a custom type, such as a user-defined class. + template + static void format_custom_arg( + void *formatter, const void *arg, void *format_str_ptr) + { + format(*static_cast(formatter), + *static_cast(format_str_ptr), + *static_cast(arg)); + } + +public: + MakeValue() {} + +#define FMT_MAKE_VALUE_(Type, field, TYPE, rhs) \ + MakeValue(Type value) { field = rhs; } \ + static uint64_t type(Type) { return Arg::TYPE; } + +#define FMT_MAKE_VALUE(Type, field, TYPE) \ + FMT_MAKE_VALUE_(Type, field, TYPE, value) + + FMT_MAKE_VALUE(bool, int_value, BOOL) + FMT_MAKE_VALUE(short, int_value, INT) + FMT_MAKE_VALUE(unsigned short, uint_value, UINT) + FMT_MAKE_VALUE(int, int_value, INT) + FMT_MAKE_VALUE(unsigned, uint_value, UINT) + + MakeValue(long value) + { + // To minimize the number of types we need to deal with, long is + // translated either to int or to long long depending on its size. + if (const_check(sizeof(long) == sizeof(int))) + int_value = static_cast(value); + else + long_long_value = value; + } + static uint64_t type(long) + { + return sizeof(long) == sizeof(int) ? Arg::INT : Arg::LONG_LONG; + } + + MakeValue(unsigned long value) + { + if (const_check(sizeof(unsigned long) == sizeof(unsigned))) + uint_value = static_cast(value); + else + ulong_long_value = value; + } + static uint64_t type(unsigned long) + { + return sizeof(unsigned long) == sizeof(unsigned) ? + Arg::UINT : Arg::ULONG_LONG; + } + + FMT_MAKE_VALUE(LongLong, long_long_value, LONG_LONG) + FMT_MAKE_VALUE(ULongLong, ulong_long_value, ULONG_LONG) + FMT_MAKE_VALUE(float, double_value, DOUBLE) + FMT_MAKE_VALUE(double, double_value, DOUBLE) + FMT_MAKE_VALUE(long double, long_double_value, LONG_DOUBLE) + FMT_MAKE_VALUE(signed char, int_value, INT) + FMT_MAKE_VALUE(unsigned char, uint_value, UINT) + FMT_MAKE_VALUE(char, int_value, CHAR) + +#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED) + MakeValue(typename WCharHelper::Supported value) + { + int_value = value; + } + static uint64_t type(wchar_t) + { + return Arg::CHAR; + } +#endif + +#define FMT_MAKE_STR_VALUE(Type, TYPE) \ + MakeValue(Type value) { set_string(value); } \ + static uint64_t type(Type) { return Arg::TYPE; } + + FMT_MAKE_VALUE(char *, string.value, CSTRING) + FMT_MAKE_VALUE(const char *, string.value, CSTRING) + FMT_MAKE_VALUE(signed char *, sstring.value, CSTRING) + FMT_MAKE_VALUE(const signed char *, sstring.value, CSTRING) + FMT_MAKE_VALUE(unsigned char *, ustring.value, CSTRING) + FMT_MAKE_VALUE(const unsigned char *, ustring.value, CSTRING) + FMT_MAKE_STR_VALUE(const std::string &, STRING) + FMT_MAKE_STR_VALUE(StringRef, STRING) + FMT_MAKE_VALUE_(CStringRef, string.value, CSTRING, value.c_str()) + +#define FMT_MAKE_WSTR_VALUE(Type, TYPE) \ + MakeValue(typename WCharHelper::Supported value) { \ + set_string(value); \ + } \ + static uint64_t type(Type) { return Arg::TYPE; } + + FMT_MAKE_WSTR_VALUE(wchar_t *, WSTRING) + FMT_MAKE_WSTR_VALUE(const wchar_t *, WSTRING) + FMT_MAKE_WSTR_VALUE(const std::wstring &, WSTRING) + FMT_MAKE_WSTR_VALUE(WStringRef, WSTRING) + + FMT_MAKE_VALUE(void *, pointer, POINTER) + FMT_MAKE_VALUE(const void *, pointer, POINTER) + + template + MakeValue(const T &value, + typename EnableIf::value>::value, int>::type = 0) + { + custom.value = &value; + custom.format = &format_custom_arg; + } + + template + MakeValue(const T &value, + typename EnableIf::value, int>::type = 0) + { + int_value = value; + } + + template + static uint64_t type(const T &) + { + return ConvertToInt::value ? Arg::INT : Arg::CUSTOM; + } + + // Additional template param `Char_` is needed here because make_type always + // uses char. + template + MakeValue(const NamedArg &value) + { + pointer = &value; + } + + template + static uint64_t type(const NamedArg &) + { + return Arg::NAMED_ARG; + } +}; + +template +class MakeArg : public Arg +{ +public: + MakeArg() + { + type = Arg::NONE; + } + + template + MakeArg(const T &value) + : Arg(MakeValue(value)) + { + type = static_cast(MakeValue::type(value)); + } +}; + +template +struct NamedArg : Arg +{ + BasicStringRef name; + + template + NamedArg(BasicStringRef argname, const T &value) + : Arg(MakeArg< BasicFormatter >(value)), name(argname) {} +}; + +class RuntimeError : public std::runtime_error +{ +protected: + RuntimeError() : std::runtime_error("") {} + ~RuntimeError() throw(); +}; + +template +class PrintfArgFormatter; + +template +class ArgMap; +} // namespace internal + +/** An argument list. */ +class ArgList +{ +private: + // To reduce compiled code size per formatting function call, types of first + // MAX_PACKED_ARGS arguments are passed in the types_ field. + uint64_t types_; + union + { + // If the number of arguments is less than MAX_PACKED_ARGS, the argument + // values are stored in values_, otherwise they are stored in args_. + // This is done to reduce compiled code size as storing larger objects + // may require more code (at least on x86-64) even if the same amount of + // data is actually copied to stack. It saves ~10% on the bloat test. + const internal::Value *values_; + const internal::Arg *args_; + }; + + internal::Arg::Type type(unsigned index) const + { + unsigned shift = index * 4; + uint64_t mask = 0xf; + return static_cast( + (types_ & (mask << shift)) >> shift); + } + + template + friend class internal::ArgMap; + +public: + // Maximum number of arguments with packed types. + enum { MAX_PACKED_ARGS = 16 }; + + ArgList() : types_(0) {} + + ArgList(ULongLong types, const internal::Value *values) + : types_(types), values_(values) {} + ArgList(ULongLong types, const internal::Arg *args) + : types_(types), args_(args) {} + + /** Returns the argument at specified index. */ + internal::Arg operator[](unsigned index) const + { + using internal::Arg; + Arg arg; + bool use_values = type(MAX_PACKED_ARGS - 1) == Arg::NONE; + if (index < MAX_PACKED_ARGS) + { + Arg::Type arg_type = type(index); + internal::Value &val = arg; + if (arg_type != Arg::NONE) + val = use_values ? values_[index] : args_[index]; + arg.type = arg_type; + return arg; + } + if (use_values) + { + // The index is greater than the number of arguments that can be stored + // in values, so return a "none" argument. + arg.type = Arg::NONE; + return arg; + } + for (unsigned i = MAX_PACKED_ARGS; i <= index; ++i) + { + if (args_[i].type == Arg::NONE) + return args_[i]; + } + return args_[index]; + } +}; + +#define FMT_DISPATCH(call) static_cast(this)->call + +/** + \rst + An argument visitor based on the `curiously recurring template pattern + `_. + + To use `~fmt::ArgVisitor` define a subclass that implements some or all of the + visit methods with the same signatures as the methods in `~fmt::ArgVisitor`, + for example, `~fmt::ArgVisitor::visit_int()`. + Pass the subclass as the *Impl* template parameter. Then calling + `~fmt::ArgVisitor::visit` for some argument will dispatch to a visit method + specific to the argument type. For example, if the argument type is + ``double`` then the `~fmt::ArgVisitor::visit_double()` method of a subclass + will be called. If the subclass doesn't contain a method with this signature, + then a corresponding method of `~fmt::ArgVisitor` will be called. + + **Example**:: + + class MyArgVisitor : public fmt::ArgVisitor { + public: + void visit_int(int value) { fmt::print("{}", value); } + void visit_double(double value) { fmt::print("{}", value ); } + }; + \endrst + */ +template +class ArgVisitor +{ +private: + typedef internal::Arg Arg; + +public: + void report_unhandled_arg() {} + + Result visit_unhandled_arg() + { + FMT_DISPATCH(report_unhandled_arg()); + return Result(); + } + + /** Visits an ``int`` argument. **/ + Result visit_int(int value) + { + return FMT_DISPATCH(visit_any_int(value)); + } + + /** Visits a ``long long`` argument. **/ + Result visit_long_long(LongLong value) + { + return FMT_DISPATCH(visit_any_int(value)); + } + + /** Visits an ``unsigned`` argument. **/ + Result visit_uint(unsigned value) + { + return FMT_DISPATCH(visit_any_int(value)); + } + + /** Visits an ``unsigned long long`` argument. **/ + Result visit_ulong_long(ULongLong value) + { + return FMT_DISPATCH(visit_any_int(value)); + } + + /** Visits a ``bool`` argument. **/ + Result visit_bool(bool value) + { + return FMT_DISPATCH(visit_any_int(value)); + } + + /** Visits a ``char`` or ``wchar_t`` argument. **/ + Result visit_char(int value) + { + return FMT_DISPATCH(visit_any_int(value)); + } + + /** Visits an argument of any integral type. **/ + template + Result visit_any_int(T) + { + return FMT_DISPATCH(visit_unhandled_arg()); + } + + /** Visits a ``double`` argument. **/ + Result visit_double(double value) + { + return FMT_DISPATCH(visit_any_double(value)); + } + + /** Visits a ``long double`` argument. **/ + Result visit_long_double(long double value) + { + return FMT_DISPATCH(visit_any_double(value)); + } + + /** Visits a ``double`` or ``long double`` argument. **/ + template + Result visit_any_double(T) + { + return FMT_DISPATCH(visit_unhandled_arg()); + } + + /** Visits a null-terminated C string (``const char *``) argument. **/ + Result visit_cstring(const char *) + { + return FMT_DISPATCH(visit_unhandled_arg()); + } + + /** Visits a string argument. **/ + Result visit_string(Arg::StringValue) + { + return FMT_DISPATCH(visit_unhandled_arg()); + } + + /** Visits a wide string argument. **/ + Result visit_wstring(Arg::StringValue) + { + return FMT_DISPATCH(visit_unhandled_arg()); + } + + /** Visits a pointer argument. **/ + Result visit_pointer(const void *) + { + return FMT_DISPATCH(visit_unhandled_arg()); + } + + /** Visits an argument of a custom (user-defined) type. **/ + Result visit_custom(Arg::CustomValue) + { + return FMT_DISPATCH(visit_unhandled_arg()); + } + + /** + \rst + Visits an argument dispatching to the appropriate visit method based on + the argument type. For example, if the argument type is ``double`` then + the `~fmt::ArgVisitor::visit_double()` method of the *Impl* class will be + called. + \endrst + */ + Result visit(const Arg &arg) + { + switch (arg.type) + { + case Arg::NONE: + case Arg::NAMED_ARG: + FMT_ASSERT(false, "invalid argument type"); + break; + case Arg::INT: + return FMT_DISPATCH(visit_int(arg.int_value)); + case Arg::UINT: + return FMT_DISPATCH(visit_uint(arg.uint_value)); + case Arg::LONG_LONG: + return FMT_DISPATCH(visit_long_long(arg.long_long_value)); + case Arg::ULONG_LONG: + return FMT_DISPATCH(visit_ulong_long(arg.ulong_long_value)); + case Arg::BOOL: + return FMT_DISPATCH(visit_bool(arg.int_value != 0)); + case Arg::CHAR: + return FMT_DISPATCH(visit_char(arg.int_value)); + case Arg::DOUBLE: + return FMT_DISPATCH(visit_double(arg.double_value)); + case Arg::LONG_DOUBLE: + return FMT_DISPATCH(visit_long_double(arg.long_double_value)); + case Arg::CSTRING: + return FMT_DISPATCH(visit_cstring(arg.string.value)); + case Arg::STRING: + return FMT_DISPATCH(visit_string(arg.string)); + case Arg::WSTRING: + return FMT_DISPATCH(visit_wstring(arg.wstring)); + case Arg::POINTER: + return FMT_DISPATCH(visit_pointer(arg.pointer)); + case Arg::CUSTOM: + return FMT_DISPATCH(visit_custom(arg.custom)); + } + return Result(); + } +}; + +enum Alignment +{ + ALIGN_DEFAULT, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTER, ALIGN_NUMERIC +}; + +// Flags. +enum +{ + SIGN_FLAG = 1, PLUS_FLAG = 2, MINUS_FLAG = 4, HASH_FLAG = 8, + CHAR_FLAG = 0x10 // Argument has char type - used in error reporting. +}; + +// An empty format specifier. +struct EmptySpec {}; + +// A type specifier. +template +struct TypeSpec : EmptySpec +{ + Alignment align() const + { + return ALIGN_DEFAULT; + } + unsigned width() const + { + return 0; + } + int precision() const + { + return -1; + } + bool flag(unsigned) const + { + return false; + } + char type() const + { + return TYPE; + } + char fill() const + { + return ' '; + } +}; + +// A width specifier. +struct WidthSpec +{ + unsigned width_; + // Fill is always wchar_t and cast to char if necessary to avoid having + // two specialization of WidthSpec and its subclasses. + wchar_t fill_; + + WidthSpec(unsigned width, wchar_t fill) : width_(width), fill_(fill) {} + + unsigned width() const + { + return width_; + } + wchar_t fill() const + { + return fill_; + } +}; + +// An alignment specifier. +struct AlignSpec : WidthSpec +{ + Alignment align_; + + AlignSpec(unsigned width, wchar_t fill, Alignment align = ALIGN_DEFAULT) + : WidthSpec(width, fill), align_(align) {} + + Alignment align() const + { + return align_; + } + + int precision() const + { + return -1; + } +}; + +// An alignment and type specifier. +template +struct AlignTypeSpec : AlignSpec +{ + AlignTypeSpec(unsigned width, wchar_t fill) : AlignSpec(width, fill) {} + + bool flag(unsigned) const + { + return false; + } + char type() const + { + return TYPE; + } +}; + +// A full format specifier. +struct FormatSpec : AlignSpec +{ + unsigned flags_; + int precision_; + char type_; + + FormatSpec( + unsigned width = 0, char type = 0, wchar_t fill = ' ') + : AlignSpec(width, fill), flags_(0), precision_(-1), type_(type) {} + + bool flag(unsigned f) const + { + return (flags_ & f) != 0; + } + int precision() const + { + return precision_; + } + char type() const + { + return type_; + } +}; + +// An integer format specifier. +template , typename Char = char> +class IntFormatSpec : public SpecT +{ +private: + T value_; + +public: + IntFormatSpec(T val, const SpecT &spec = SpecT()) + : SpecT(spec), value_(val) {} + + T value() const + { + return value_; + } +}; + +// A string format specifier. +template +class StrFormatSpec : public AlignSpec +{ +private: + const Char *str_; + +public: + template + StrFormatSpec(const Char *str, unsigned width, FillChar fill) + : AlignSpec(width, fill), str_(str) + { + internal::CharTraits::convert(FillChar()); + } + + const Char *str() const + { + return str_; + } +}; + +/** + Returns an integer format specifier to format the value in base 2. + */ +IntFormatSpec > bin(int value); + +/** + Returns an integer format specifier to format the value in base 8. + */ +IntFormatSpec > oct(int value); + +/** + Returns an integer format specifier to format the value in base 16 using + lower-case letters for the digits above 9. + */ +IntFormatSpec > hex(int value); + +/** + Returns an integer formatter format specifier to format in base 16 using + upper-case letters for the digits above 9. + */ +IntFormatSpec > hexu(int value); + +/** + \rst + Returns an integer format specifier to pad the formatted argument with the + fill character to the specified width using the default (right) numeric + alignment. + + **Example**:: + + MemoryWriter out; + out << pad(hex(0xcafe), 8, '0'); + // out.str() == "0000cafe" + + \endrst + */ +template +IntFormatSpec, Char> pad( + int value, unsigned width, Char fill = ' '); + +#define FMT_DEFINE_INT_FORMATTERS(TYPE) \ +inline IntFormatSpec > bin(TYPE value) { \ + return IntFormatSpec >(value, TypeSpec<'b'>()); \ +} \ + \ +inline IntFormatSpec > oct(TYPE value) { \ + return IntFormatSpec >(value, TypeSpec<'o'>()); \ +} \ + \ +inline IntFormatSpec > hex(TYPE value) { \ + return IntFormatSpec >(value, TypeSpec<'x'>()); \ +} \ + \ +inline IntFormatSpec > hexu(TYPE value) { \ + return IntFormatSpec >(value, TypeSpec<'X'>()); \ +} \ + \ +template \ +inline IntFormatSpec > pad( \ + IntFormatSpec > f, unsigned width) { \ + return IntFormatSpec >( \ + f.value(), AlignTypeSpec(width, ' ')); \ +} \ + \ +/* For compatibility with older compilers we provide two overloads for pad, */ \ +/* one that takes a fill character and one that doesn't. In the future this */ \ +/* can be replaced with one overload making the template argument Char */ \ +/* default to char (C++11). */ \ +template \ +inline IntFormatSpec, Char> pad( \ + IntFormatSpec, Char> f, \ + unsigned width, Char fill) { \ + return IntFormatSpec, Char>( \ + f.value(), AlignTypeSpec(width, fill)); \ +} \ + \ +inline IntFormatSpec > pad( \ + TYPE value, unsigned width) { \ + return IntFormatSpec >( \ + value, AlignTypeSpec<0>(width, ' ')); \ +} \ + \ +template \ +inline IntFormatSpec, Char> pad( \ + TYPE value, unsigned width, Char fill) { \ + return IntFormatSpec, Char>( \ + value, AlignTypeSpec<0>(width, fill)); \ +} + +FMT_DEFINE_INT_FORMATTERS(int) +FMT_DEFINE_INT_FORMATTERS(long) +FMT_DEFINE_INT_FORMATTERS(unsigned) +FMT_DEFINE_INT_FORMATTERS(unsigned long) +FMT_DEFINE_INT_FORMATTERS(LongLong) +FMT_DEFINE_INT_FORMATTERS(ULongLong) + +/** + \rst + Returns a string formatter that pads the formatted argument with the fill + character to the specified width using the default (left) string alignment. + + **Example**:: + + std::string s = str(MemoryWriter() << pad("abc", 8)); + // s == "abc " + + \endrst + */ +template +inline StrFormatSpec pad( + const Char *str, unsigned width, Char fill = ' ') +{ + return StrFormatSpec(str, width, fill); +} + +inline StrFormatSpec pad( + const wchar_t *str, unsigned width, char fill = ' ') +{ + return StrFormatSpec(str, width, fill); +} + +namespace internal +{ + +template +class ArgMap +{ +private: + typedef std::vector< + std::pair, internal::Arg> > MapType; + typedef typename MapType::value_type Pair; + + MapType map_; + +public: + FMT_API void init(const ArgList &args); + + const internal::Arg* find(const fmt::BasicStringRef &name) const + { + // The list is unsorted, so just return the first matching name. + for (typename MapType::const_iterator it = map_.begin(), end = map_.end(); + it != end; ++it) + { + if (it->first == name) + return &it->second; + } + return 0; + } +}; + +template +class ArgFormatterBase : public ArgVisitor +{ +private: + BasicWriter &writer_; + FormatSpec &spec_; + + FMT_DISALLOW_COPY_AND_ASSIGN(ArgFormatterBase); + + void write_pointer(const void *p) + { + spec_.flags_ = HASH_FLAG; + spec_.type_ = 'x'; + writer_.write_int(reinterpret_cast(p), spec_); + } + +protected: + BasicWriter &writer() + { + return writer_; + } + FormatSpec &spec() + { + return spec_; + } + + void write(bool value) + { + const char *str_value = value ? "true" : "false"; + Arg::StringValue str = { str_value, std::strlen(str_value) }; + writer_.write_str(str, spec_); + } + + void write(const char *value) + { + Arg::StringValue str = {value, value != 0 ? std::strlen(value) : 0}; + writer_.write_str(str, spec_); + } + +public: + ArgFormatterBase(BasicWriter &w, FormatSpec &s) + : writer_(w), spec_(s) {} + + template + void visit_any_int(T value) + { + writer_.write_int(value, spec_); + } + + template + void visit_any_double(T value) + { + writer_.write_double(value, spec_); + } + + void visit_bool(bool value) + { + if (spec_.type_) + return visit_any_int(value); + write(value); + } + + void visit_char(int value) + { + if (spec_.type_ && spec_.type_ != 'c') + { + spec_.flags_ |= CHAR_FLAG; + writer_.write_int(value, spec_); + return; + } + if (spec_.align_ == ALIGN_NUMERIC || spec_.flags_ != 0) + FMT_THROW(FormatError("invalid format specifier for char")); + typedef typename BasicWriter::CharPtr CharPtr; + Char fill = internal::CharTraits::cast(spec_.fill()); + CharPtr out = CharPtr(); + const unsigned CHAR_SIZE = 1; + if (spec_.width_ > CHAR_SIZE) + { + out = writer_.grow_buffer(spec_.width_); + if (spec_.align_ == ALIGN_RIGHT) + { + std::uninitialized_fill_n(out, spec_.width_ - CHAR_SIZE, fill); + out += spec_.width_ - CHAR_SIZE; + } + else if (spec_.align_ == ALIGN_CENTER) + { + out = writer_.fill_padding(out, spec_.width_, + internal::const_check(CHAR_SIZE), fill); + } + else + { + std::uninitialized_fill_n(out + CHAR_SIZE, + spec_.width_ - CHAR_SIZE, fill); + } + } + else + { + out = writer_.grow_buffer(CHAR_SIZE); + } + *out = internal::CharTraits::cast(value); + } + + void visit_cstring(const char *value) + { + if (spec_.type_ == 'p') + return write_pointer(value); + write(value); + } + + void visit_string(Arg::StringValue value) + { + writer_.write_str(value, spec_); + } + + using ArgVisitor::visit_wstring; + + void visit_wstring(Arg::StringValue value) + { + writer_.write_str(value, spec_); + } + + void visit_pointer(const void *value) + { + if (spec_.type_ && spec_.type_ != 'p') + report_unknown_type(spec_.type_, "pointer"); + write_pointer(value); + } +}; + +class FormatterBase +{ +private: + ArgList args_; + int next_arg_index_; + + // Returns the argument with specified index. + FMT_API Arg do_get_arg(unsigned arg_index, const char *&error); + +protected: + const ArgList &args() const + { + return args_; + } + + explicit FormatterBase(const ArgList &args) + { + args_ = args; + next_arg_index_ = 0; + } + + // Returns the next argument. + Arg next_arg(const char *&error) + { + if (next_arg_index_ >= 0) + return do_get_arg(internal::to_unsigned(next_arg_index_++), error); + error = "cannot switch from manual to automatic argument indexing"; + return Arg(); + } + + // Checks if manual indexing is used and returns the argument with + // specified index. + Arg get_arg(unsigned arg_index, const char *&error) + { + return check_no_auto_index(error) ? do_get_arg(arg_index, error) : Arg(); + } + + bool check_no_auto_index(const char *&error) + { + if (next_arg_index_ > 0) + { + error = "cannot switch from automatic to manual argument indexing"; + return false; + } + next_arg_index_ = -1; + return true; + } + + template + void write(BasicWriter &w, const Char *start, const Char *end) + { + if (start != end) + w << BasicStringRef(start, internal::to_unsigned(end - start)); + } +}; + +// A printf formatter. +template +class PrintfFormatter : private FormatterBase +{ +private: + void parse_flags(FormatSpec &spec, const Char *&s); + + // Returns the argument with specified index or, if arg_index is equal + // to the maximum unsigned value, the next argument. + Arg get_arg(const Char *s, + unsigned arg_index = (std::numeric_limits::max)()); + + // Parses argument index, flags and width and returns the argument index. + unsigned parse_header(const Char *&s, FormatSpec &spec); + +public: + explicit PrintfFormatter(const ArgList &args) : FormatterBase(args) {} + FMT_API void format(BasicWriter &writer, + BasicCStringRef format_str); +}; +} // namespace internal + +/** + \rst + An argument formatter based on the `curiously recurring template pattern + `_. + + To use `~fmt::BasicArgFormatter` define a subclass that implements some or + all of the visit methods with the same signatures as the methods in + `~fmt::ArgVisitor`, for example, `~fmt::ArgVisitor::visit_int()`. + Pass the subclass as the *Impl* template parameter. When a formatting + function processes an argument, it will dispatch to a visit method + specific to the argument type. For example, if the argument type is + ``double`` then the `~fmt::ArgVisitor::visit_double()` method of a subclass + will be called. If the subclass doesn't contain a method with this signature, + then a corresponding method of `~fmt::BasicArgFormatter` or its superclass + will be called. + \endrst + */ +template +class BasicArgFormatter : public internal::ArgFormatterBase +{ +private: + BasicFormatter &formatter_; + const Char *format_; + +public: + /** + \rst + Constructs an argument formatter object. + *formatter* is a reference to the main formatter object, *spec* contains + format specifier information for standard argument types, and *fmt* points + to the part of the format string being parsed for custom argument types. + \endrst + */ + BasicArgFormatter(BasicFormatter &formatter, + FormatSpec &spec, const Char *fmt) + : internal::ArgFormatterBase(formatter.writer(), spec), + formatter_(formatter), format_(fmt) {} + + /** Formats argument of a custom (user-defined) type. */ + void visit_custom(internal::Arg::CustomValue c) + { + c.format(&formatter_, c.value, &format_); + } +}; + +/** The default argument formatter. */ +template +class ArgFormatter : public BasicArgFormatter, Char> +{ +public: + /** Constructs an argument formatter object. */ + ArgFormatter(BasicFormatter &formatter, + FormatSpec &spec, const Char *fmt) + : BasicArgFormatter, Char>(formatter, spec, fmt) {} +}; + +/** This template formats data and writes the output to a writer. */ +template +class BasicFormatter : private internal::FormatterBase +{ +public: + /** The character type for the output. */ + typedef CharType Char; + +private: + BasicWriter &writer_; + internal::ArgMap map_; + + FMT_DISALLOW_COPY_AND_ASSIGN(BasicFormatter); + + using internal::FormatterBase::get_arg; + + // Checks if manual indexing is used and returns the argument with + // specified name. + internal::Arg get_arg(BasicStringRef arg_name, const char *&error); + + // Parses argument index and returns corresponding argument. + internal::Arg parse_arg_index(const Char *&s); + + // Parses argument name and returns corresponding argument. + internal::Arg parse_arg_name(const Char *&s); + +public: + /** + \rst + Constructs a ``BasicFormatter`` object. References to the arguments and + the writer are stored in the formatter object so make sure they have + appropriate lifetimes. + \endrst + */ + BasicFormatter(const ArgList &args, BasicWriter &w) + : internal::FormatterBase(args), writer_(w) {} + + /** Returns a reference to the writer associated with this formatter. */ + BasicWriter &writer() + { + return writer_; + } + + /** Formats stored arguments and writes the output to the writer. */ + void format(BasicCStringRef format_str); + + // Formats a single argument and advances format_str, a format string pointer. + const Char *format(const Char *&format_str, const internal::Arg &arg); +}; + +// Generates a comma-separated list with results of applying f to +// numbers 0..n-1. +# define FMT_GEN(n, f) FMT_GEN##n(f) +# define FMT_GEN1(f) f(0) +# define FMT_GEN2(f) FMT_GEN1(f), f(1) +# define FMT_GEN3(f) FMT_GEN2(f), f(2) +# define FMT_GEN4(f) FMT_GEN3(f), f(3) +# define FMT_GEN5(f) FMT_GEN4(f), f(4) +# define FMT_GEN6(f) FMT_GEN5(f), f(5) +# define FMT_GEN7(f) FMT_GEN6(f), f(6) +# define FMT_GEN8(f) FMT_GEN7(f), f(7) +# define FMT_GEN9(f) FMT_GEN8(f), f(8) +# define FMT_GEN10(f) FMT_GEN9(f), f(9) +# define FMT_GEN11(f) FMT_GEN10(f), f(10) +# define FMT_GEN12(f) FMT_GEN11(f), f(11) +# define FMT_GEN13(f) FMT_GEN12(f), f(12) +# define FMT_GEN14(f) FMT_GEN13(f), f(13) +# define FMT_GEN15(f) FMT_GEN14(f), f(14) + +namespace internal +{ +inline uint64_t make_type() +{ + return 0; +} + +template +inline uint64_t make_type(const T &arg) +{ + return MakeValue< BasicFormatter >::type(arg); +} + +template + struct ArgArray; + +template +struct ArgArray +{ + typedef Value Type[N > 0 ? N : 1]; + +template +static Value make(const T &value) +{ +#ifdef __clang__ + Value result = MakeValue(value); + // Workaround a bug in Apple LLVM version 4.2 (clang-425.0.28) of clang: + // https://github.com/fmtlib/fmt/issues/276 + (void)result.custom.format; + return result; +#else + return MakeValue(value); +#endif +} + }; + +template +struct ArgArray +{ + typedef Arg Type[N + 1]; // +1 for the list end Arg::NONE + + template + static Arg make(const T &value) + { + return MakeArg(value); + } +}; + +#if FMT_USE_VARIADIC_TEMPLATES +template +inline uint64_t make_type(const Arg &first, const Args & ... tail) +{ + return make_type(first) | (make_type(tail...) << 4); +} + +#else + +struct ArgType +{ + uint64_t type; + + ArgType() : type(0) {} + + template + ArgType(const T &arg) : type(make_type(arg)) {} +}; + +# define FMT_ARG_TYPE_DEFAULT(n) ArgType t##n = ArgType() + +inline uint64_t make_type(FMT_GEN15(FMT_ARG_TYPE_DEFAULT)) +{ + return t0.type | (t1.type << 4) | (t2.type << 8) | (t3.type << 12) | + (t4.type << 16) | (t5.type << 20) | (t6.type << 24) | (t7.type << 28) | + (t8.type << 32) | (t9.type << 36) | (t10.type << 40) | (t11.type << 44) | + (t12.type << 48) | (t13.type << 52) | (t14.type << 56); +} +#endif +} // namespace internal + +# define FMT_MAKE_TEMPLATE_ARG(n) typename T##n +# define FMT_MAKE_ARG_TYPE(n) T##n +# define FMT_MAKE_ARG(n) const T##n &v##n +# define FMT_ASSIGN_char(n) \ + arr[n] = fmt::internal::MakeValue< fmt::BasicFormatter >(v##n) +# define FMT_ASSIGN_wchar_t(n) \ + arr[n] = fmt::internal::MakeValue< fmt::BasicFormatter >(v##n) + +#if FMT_USE_VARIADIC_TEMPLATES +// Defines a variadic function returning void. +# define FMT_VARIADIC_VOID(func, arg_type) \ + template \ + void func(arg_type arg0, const Args & ... args) { \ + typedef fmt::internal::ArgArray ArgArray; \ + typename ArgArray::Type array{ \ + ArgArray::template make >(args)...}; \ + func(arg0, fmt::ArgList(fmt::internal::make_type(args...), array)); \ + } + +// Defines a variadic constructor. +# define FMT_VARIADIC_CTOR(ctor, func, arg0_type, arg1_type) \ + template \ + ctor(arg0_type arg0, arg1_type arg1, const Args & ... args) { \ + typedef fmt::internal::ArgArray ArgArray; \ + typename ArgArray::Type array{ \ + ArgArray::template make >(args)...}; \ + func(arg0, arg1, fmt::ArgList(fmt::internal::make_type(args...), array)); \ + } + +#else + +# define FMT_MAKE_REF(n) \ + fmt::internal::MakeValue< fmt::BasicFormatter >(v##n) +# define FMT_MAKE_REF2(n) v##n + +// Defines a wrapper for a function taking one argument of type arg_type +// and n additional arguments of arbitrary types. +# define FMT_WRAP1(func, arg_type, n) \ + template \ + inline void func(arg_type arg1, FMT_GEN(n, FMT_MAKE_ARG)) { \ + const fmt::internal::ArgArray::Type array = {FMT_GEN(n, FMT_MAKE_REF)}; \ + func(arg1, fmt::ArgList( \ + fmt::internal::make_type(FMT_GEN(n, FMT_MAKE_REF2)), array)); \ + } + +// Emulates a variadic function returning void on a pre-C++11 compiler. +# define FMT_VARIADIC_VOID(func, arg_type) \ + inline void func(arg_type arg) { func(arg, fmt::ArgList()); } \ + FMT_WRAP1(func, arg_type, 1) FMT_WRAP1(func, arg_type, 2) \ + FMT_WRAP1(func, arg_type, 3) FMT_WRAP1(func, arg_type, 4) \ + FMT_WRAP1(func, arg_type, 5) FMT_WRAP1(func, arg_type, 6) \ + FMT_WRAP1(func, arg_type, 7) FMT_WRAP1(func, arg_type, 8) \ + FMT_WRAP1(func, arg_type, 9) FMT_WRAP1(func, arg_type, 10) + +# define FMT_CTOR(ctor, func, arg0_type, arg1_type, n) \ + template \ + ctor(arg0_type arg0, arg1_type arg1, FMT_GEN(n, FMT_MAKE_ARG)) { \ + const fmt::internal::ArgArray::Type array = {FMT_GEN(n, FMT_MAKE_REF)}; \ + func(arg0, arg1, fmt::ArgList( \ + fmt::internal::make_type(FMT_GEN(n, FMT_MAKE_REF2)), array)); \ + } + +// Emulates a variadic constructor on a pre-C++11 compiler. +# define FMT_VARIADIC_CTOR(ctor, func, arg0_type, arg1_type) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 1) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 2) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 3) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 4) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 5) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 6) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 7) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 8) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 9) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 10) +#endif + +// Generates a comma-separated list with results of applying f to pairs +// (argument, index). +#define FMT_FOR_EACH1(f, x0) f(x0, 0) +#define FMT_FOR_EACH2(f, x0, x1) \ + FMT_FOR_EACH1(f, x0), f(x1, 1) +#define FMT_FOR_EACH3(f, x0, x1, x2) \ + FMT_FOR_EACH2(f, x0 ,x1), f(x2, 2) +#define FMT_FOR_EACH4(f, x0, x1, x2, x3) \ + FMT_FOR_EACH3(f, x0, x1, x2), f(x3, 3) +#define FMT_FOR_EACH5(f, x0, x1, x2, x3, x4) \ + FMT_FOR_EACH4(f, x0, x1, x2, x3), f(x4, 4) +#define FMT_FOR_EACH6(f, x0, x1, x2, x3, x4, x5) \ + FMT_FOR_EACH5(f, x0, x1, x2, x3, x4), f(x5, 5) +#define FMT_FOR_EACH7(f, x0, x1, x2, x3, x4, x5, x6) \ + FMT_FOR_EACH6(f, x0, x1, x2, x3, x4, x5), f(x6, 6) +#define FMT_FOR_EACH8(f, x0, x1, x2, x3, x4, x5, x6, x7) \ + FMT_FOR_EACH7(f, x0, x1, x2, x3, x4, x5, x6), f(x7, 7) +#define FMT_FOR_EACH9(f, x0, x1, x2, x3, x4, x5, x6, x7, x8) \ + FMT_FOR_EACH8(f, x0, x1, x2, x3, x4, x5, x6, x7), f(x8, 8) +#define FMT_FOR_EACH10(f, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9) \ + FMT_FOR_EACH9(f, x0, x1, x2, x3, x4, x5, x6, x7, x8), f(x9, 9) + +/** + An error returned by an operating system or a language runtime, + for example a file opening error. +*/ +class SystemError : public internal::RuntimeError +{ +private: + void init(int err_code, CStringRef format_str, ArgList args); + +protected: + int error_code_; + + typedef char Char; // For FMT_VARIADIC_CTOR. + + SystemError() {} + +public: + /** + \rst + Constructs a :class:`fmt::SystemError` object with the description + of the form + + .. parsed-literal:: + **: ** + + where ** is the formatted message and ** is + the system message corresponding to the error code. + *error_code* is a system error code as given by ``errno``. + If *error_code* is not a valid error code such as -1, the system message + may look like "Unknown error -1" and is platform-dependent. + + **Example**:: + + // This throws a SystemError with the description + // cannot open file 'madeup': No such file or directory + // or similar (system message may vary). + const char *filename = "madeup"; + std::FILE *file = std::fopen(filename, "r"); + if (!file) + throw fmt::SystemError(errno, "cannot open file '{}'", filename); + \endrst + */ + SystemError(int error_code, CStringRef message) + { + init(error_code, message, ArgList()); + } + FMT_VARIADIC_CTOR(SystemError, init, int, CStringRef) + + ~SystemError() throw(); + + int error_code() const + { + return error_code_; + } +}; + +/** + \rst + This template provides operations for formatting and writing data into + a character stream. The output is stored in a buffer provided by a subclass + such as :class:`fmt::BasicMemoryWriter`. + + You can use one of the following typedefs for common character types: + + +---------+----------------------+ + | Type | Definition | + +=========+======================+ + | Writer | BasicWriter | + +---------+----------------------+ + | WWriter | BasicWriter | + +---------+----------------------+ + + \endrst + */ +template +class BasicWriter +{ +private: + // Output buffer. + Buffer &buffer_; + + FMT_DISALLOW_COPY_AND_ASSIGN(BasicWriter); + + typedef typename internal::CharTraits::CharPtr CharPtr; + +#if FMT_SECURE_SCL + // Returns pointer value. + static Char *get(CharPtr p) + { + return p.base(); + } +#else + static Char *get(Char *p) + { + return p; + } +#endif + + // Fills the padding around the content and returns the pointer to the + // content area. + static CharPtr fill_padding(CharPtr buffer, + unsigned total_size, std::size_t content_size, wchar_t fill); + + // Grows the buffer by n characters and returns a pointer to the newly + // allocated area. + CharPtr grow_buffer(std::size_t n) + { + std::size_t size = buffer_.size(); + buffer_.resize(size + n); + return internal::make_ptr(&buffer_[size], n); + } + + // Writes an unsigned decimal integer. + template + Char *write_unsigned_decimal(UInt value, unsigned prefix_size = 0) + { + unsigned num_digits = internal::count_digits(value); + Char *ptr = get(grow_buffer(prefix_size + num_digits)); + internal::format_decimal(ptr + prefix_size, value, num_digits); + return ptr; + } + + // Writes a decimal integer. + template + void write_decimal(Int value) + { + typedef typename internal::IntTraits::MainType MainType; + MainType abs_value = static_cast(value); + if (internal::is_negative(value)) + { + abs_value = 0 - abs_value; + *write_unsigned_decimal(abs_value, 1) = '-'; + } + else + { + write_unsigned_decimal(abs_value, 0); + } + } + + // Prepare a buffer for integer formatting. + CharPtr prepare_int_buffer(unsigned num_digits, + const EmptySpec &, const char *prefix, unsigned prefix_size) + { + unsigned size = prefix_size + num_digits; + CharPtr p = grow_buffer(size); + std::uninitialized_copy(prefix, prefix + prefix_size, p); + return p + size - 1; + } + + template + CharPtr prepare_int_buffer(unsigned num_digits, + const Spec &spec, const char *prefix, unsigned prefix_size); + + // Formats an integer. + template + void write_int(T value, Spec spec); + + // Formats a floating-point number (double or long double). + template + void write_double(T value, const FormatSpec &spec); + + // Writes a formatted string. + template + CharPtr write_str(const StrChar *s, std::size_t size, const AlignSpec &spec); + + template + void write_str(const internal::Arg::StringValue &str, + const FormatSpec &spec); + + // This following methods are private to disallow writing wide characters + // and strings to a char stream. If you want to print a wide string as a + // pointer as std::ostream does, cast it to const void*. + // Do not implement! + void operator<<(typename internal::WCharHelper::Unsupported); + void operator<<( + typename internal::WCharHelper::Unsupported); + + // Appends floating-point length specifier to the format string. + // The second argument is only used for overload resolution. + void append_float_length(Char *&format_ptr, long double) + { + *format_ptr++ = 'L'; + } + + template + void append_float_length(Char *&, T) {} + + template + friend class internal::ArgFormatterBase; + + friend class internal::PrintfArgFormatter; + +protected: + /** + Constructs a ``BasicWriter`` object. + */ + explicit BasicWriter(Buffer &b) : buffer_(b) {} + +public: + /** + \rst + Destroys a ``BasicWriter`` object. + \endrst + */ + virtual ~BasicWriter() {} + + /** + Returns the total number of characters written. + */ + std::size_t size() const + { + return buffer_.size(); + } + + /** + Returns a pointer to the output buffer content. No terminating null + character is appended. + */ + const Char *data() const FMT_NOEXCEPT + { + return &buffer_[0]; + } + + /** + Returns a pointer to the output buffer content with terminating null + character appended. + */ + const Char *c_str() const + { + std::size_t size = buffer_.size(); + buffer_.reserve(size + 1); + buffer_[size] = '\0'; + return &buffer_[0]; + } + + /** + \rst + Returns the content of the output buffer as an `std::string`. + \endrst + */ + std::basic_string str() const + { + return std::basic_string(&buffer_[0], buffer_.size()); + } + + /** + \rst + Writes formatted data. + + *args* is an argument list representing arbitrary arguments. + + **Example**:: + + MemoryWriter out; + out.write("Current point:\n"); + out.write("({:+f}, {:+f})", -3.14, 3.14); + + This will write the following output to the ``out`` object: + + .. code-block:: none + + Current point: + (-3.140000, +3.140000) + + The output can be accessed using :func:`data()`, :func:`c_str` or + :func:`str` methods. + + See also :ref:`syntax`. + \endrst + */ + void write(BasicCStringRef format, ArgList args) + { + BasicFormatter(args, *this).format(format); + } + FMT_VARIADIC_VOID(write, BasicCStringRef) + + BasicWriter &operator<<(int value) + { + write_decimal(value); + return *this; + } + BasicWriter &operator<<(unsigned value) + { + return *this << IntFormatSpec(value); + } + BasicWriter &operator<<(long value) + { + write_decimal(value); + return *this; + } + BasicWriter &operator<<(unsigned long value) + { + return *this << IntFormatSpec(value); + } + BasicWriter &operator<<(LongLong value) + { + write_decimal(value); + return *this; + } + + /** + \rst + Formats *value* and writes it to the stream. + \endrst + */ + BasicWriter &operator<<(ULongLong value) + { + return *this << IntFormatSpec(value); + } + + BasicWriter &operator<<(double value) + { + write_double(value, FormatSpec()); + return *this; + } + + /** + \rst + Formats *value* using the general format for floating-point numbers + (``'g'``) and writes it to the stream. + \endrst + */ + BasicWriter &operator<<(long double value) + { + write_double(value, FormatSpec()); + return *this; + } + + /** + Writes a character to the stream. + */ + BasicWriter &operator<<(char value) + { + buffer_.push_back(value); + return *this; + } + + BasicWriter &operator<<( + typename internal::WCharHelper::Supported value) + { + buffer_.push_back(value); + return *this; + } + + /** + \rst + Writes *value* to the stream. + \endrst + */ + BasicWriter &operator<<(fmt::BasicStringRef value) + { + const Char *str = value.data(); + buffer_.append(str, str + value.size()); + return *this; + } + + BasicWriter &operator<<( + typename internal::WCharHelper::Supported value) + { + const char *str = value.data(); + buffer_.append(str, str + value.size()); + return *this; + } + + template + BasicWriter &operator<<(IntFormatSpec spec) + { + internal::CharTraits::convert(FillChar()); + write_int(spec.value(), spec); + return *this; + } + + template + BasicWriter &operator<<(const StrFormatSpec &spec) + { + const StrChar *s = spec.str(); + write_str(s, std::char_traits::length(s), spec); + return *this; + } + + void clear() FMT_NOEXCEPT { buffer_.clear(); } + + Buffer &buffer() FMT_NOEXCEPT { return buffer_; } +}; + +template +template +typename BasicWriter::CharPtr BasicWriter::write_str( + const StrChar *s, std::size_t size, const AlignSpec &spec) +{ + CharPtr out = CharPtr(); + if (spec.width() > size) + { + out = grow_buffer(spec.width()); + Char fill = internal::CharTraits::cast(spec.fill()); + if (spec.align() == ALIGN_RIGHT) + { + std::uninitialized_fill_n(out, spec.width() - size, fill); + out += spec.width() - size; + } + else if (spec.align() == ALIGN_CENTER) + { + out = fill_padding(out, spec.width(), size, fill); + } + else + { + std::uninitialized_fill_n(out + size, spec.width() - size, fill); + } + } + else + { + out = grow_buffer(size); + } + std::uninitialized_copy(s, s + size, out); + return out; +} + +template +template +void BasicWriter::write_str( + const internal::Arg::StringValue &s, const FormatSpec &spec) +{ + // Check if StrChar is convertible to Char. + internal::CharTraits::convert(StrChar()); + if (spec.type_ && spec.type_ != 's') + internal::report_unknown_type(spec.type_, "string"); + const StrChar *str_value = s.value; + std::size_t str_size = s.size; + if (str_size == 0) + { + if (!str_value) + { + FMT_THROW(FormatError("string pointer is null")); + } + } + std::size_t precision = static_cast(spec.precision_); + if (spec.precision_ >= 0 && precision < str_size) + str_size = precision; + write_str(str_value, str_size, spec); +} + +template +typename BasicWriter::CharPtr +BasicWriter::fill_padding( + CharPtr buffer, unsigned total_size, + std::size_t content_size, wchar_t fill) +{ + std::size_t padding = total_size - content_size; + std::size_t left_padding = padding / 2; + Char fill_char = internal::CharTraits::cast(fill); + std::uninitialized_fill_n(buffer, left_padding, fill_char); + buffer += left_padding; + CharPtr content = buffer; + std::uninitialized_fill_n(buffer + content_size, + padding - left_padding, fill_char); + return content; +} + +template +template +typename BasicWriter::CharPtr +BasicWriter::prepare_int_buffer( + unsigned num_digits, const Spec &spec, + const char *prefix, unsigned prefix_size) +{ + unsigned width = spec.width(); + Alignment align = spec.align(); + Char fill = internal::CharTraits::cast(spec.fill()); + if (spec.precision() > static_cast(num_digits)) + { + // Octal prefix '0' is counted as a digit, so ignore it if precision + // is specified. + if (prefix_size > 0 && prefix[prefix_size - 1] == '0') + --prefix_size; + unsigned number_size = + prefix_size + internal::to_unsigned(spec.precision()); + AlignSpec subspec(number_size, '0', ALIGN_NUMERIC); + if (number_size >= width) + return prepare_int_buffer(num_digits, subspec, prefix, prefix_size); + buffer_.reserve(width); + unsigned fill_size = width - number_size; + if (align != ALIGN_LEFT) + { + CharPtr p = grow_buffer(fill_size); + std::uninitialized_fill(p, p + fill_size, fill); + } + CharPtr result = prepare_int_buffer( + num_digits, subspec, prefix, prefix_size); + if (align == ALIGN_LEFT) + { + CharPtr p = grow_buffer(fill_size); + std::uninitialized_fill(p, p + fill_size, fill); + } + return result; + } + unsigned size = prefix_size + num_digits; + if (width <= size) + { + CharPtr p = grow_buffer(size); + std::uninitialized_copy(prefix, prefix + prefix_size, p); + return p + size - 1; + } + CharPtr p = grow_buffer(width); + CharPtr end = p + width; + if (align == ALIGN_LEFT) + { + std::uninitialized_copy(prefix, prefix + prefix_size, p); + p += size; + std::uninitialized_fill(p, end, fill); + } + else if (align == ALIGN_CENTER) + { + p = fill_padding(p, width, size, fill); + std::uninitialized_copy(prefix, prefix + prefix_size, p); + p += size; + } + else + { + if (align == ALIGN_NUMERIC) + { + if (prefix_size != 0) + { + p = std::uninitialized_copy(prefix, prefix + prefix_size, p); + size -= prefix_size; + } + } + else + { + std::uninitialized_copy(prefix, prefix + prefix_size, end - size); + } + std::uninitialized_fill(p, end - size, fill); + p = end; + } + return p - 1; +} + +template +template +void BasicWriter::write_int(T value, Spec spec) +{ + unsigned prefix_size = 0; + typedef typename internal::IntTraits::MainType UnsignedType; + UnsignedType abs_value = static_cast(value); + char prefix[4] = ""; + if (internal::is_negative(value)) + { + prefix[0] = '-'; + ++prefix_size; + abs_value = 0 - abs_value; + } + else if (spec.flag(SIGN_FLAG)) + { + prefix[0] = spec.flag(PLUS_FLAG) ? '+' : ' '; + ++prefix_size; + } + switch (spec.type()) + { + case 0: + case 'd': + { + unsigned num_digits = internal::count_digits(abs_value); + CharPtr p = prepare_int_buffer(num_digits, spec, prefix, prefix_size) + 1; + internal::format_decimal(get(p), abs_value, 0); + break; + } + case 'x': + case 'X': + { + UnsignedType n = abs_value; + if (spec.flag(HASH_FLAG)) + { + prefix[prefix_size++] = '0'; + prefix[prefix_size++] = spec.type(); + } + unsigned num_digits = 0; + do + { + ++num_digits; + } + while ((n >>= 4) != 0); + Char *p = get(prepare_int_buffer( + num_digits, spec, prefix, prefix_size)); + n = abs_value; + const char *digits = spec.type() == 'x' ? + "0123456789abcdef" : "0123456789ABCDEF"; + do + { + *p-- = digits[n & 0xf]; + } + while ((n >>= 4) != 0); + break; + } + case 'b': + case 'B': + { + UnsignedType n = abs_value; + if (spec.flag(HASH_FLAG)) + { + prefix[prefix_size++] = '0'; + prefix[prefix_size++] = spec.type(); + } + unsigned num_digits = 0; + do + { + ++num_digits; + } + while ((n >>= 1) != 0); + Char *p = get(prepare_int_buffer(num_digits, spec, prefix, prefix_size)); + n = abs_value; + do + { + *p-- = static_cast('0' + (n & 1)); + } + while ((n >>= 1) != 0); + break; + } + case 'o': + { + UnsignedType n = abs_value; + if (spec.flag(HASH_FLAG)) + prefix[prefix_size++] = '0'; + unsigned num_digits = 0; + do + { + ++num_digits; + } + while ((n >>= 3) != 0); + Char *p = get(prepare_int_buffer(num_digits, spec, prefix, prefix_size)); + n = abs_value; + do + { + *p-- = static_cast('0' + (n & 7)); + } + while ((n >>= 3) != 0); + break; + } + case 'n': + { + unsigned num_digits = internal::count_digits(abs_value); + fmt::StringRef sep = ""; +#ifndef ANDROID + sep = internal::thousands_sep(std::localeconv()); +#endif + unsigned size = static_cast( + num_digits + sep.size() * ((num_digits - 1) / 3)); + CharPtr p = prepare_int_buffer(size, spec, prefix, prefix_size) + 1; + internal::format_decimal(get(p), abs_value, 0, internal::ThousandsSep(sep)); + break; + } + default: + internal::report_unknown_type( + spec.type(), spec.flag(CHAR_FLAG) ? "char" : "integer"); + break; + } +} + +template +template +void BasicWriter::write_double(T value, const FormatSpec &spec) +{ + // Check type. + char type = spec.type(); + bool upper = false; + switch (type) + { + case 0: + type = 'g'; + break; + case 'e': + case 'f': + case 'g': + case 'a': + break; + case 'F': +#if FMT_MSC_VER + // MSVC's printf doesn't support 'F'. + type = 'f'; +#endif + // Fall through. + case 'E': + case 'G': + case 'A': + upper = true; + break; + default: + internal::report_unknown_type(type, "double"); + break; + } + + char sign = 0; + // Use isnegative instead of value < 0 because the latter is always + // false for NaN. + if (internal::FPUtil::isnegative(static_cast(value))) + { + sign = '-'; + value = -value; + } + else if (spec.flag(SIGN_FLAG)) + { + sign = spec.flag(PLUS_FLAG) ? '+' : ' '; + } + + if (internal::FPUtil::isnotanumber(value)) + { + // Format NaN ourselves because sprintf's output is not consistent + // across platforms. + std::size_t nan_size = 4; + const char *nan = upper ? " NAN" : " nan"; + if (!sign) + { + --nan_size; + ++nan; + } + CharPtr out = write_str(nan, nan_size, spec); + if (sign) + *out = sign; + return; + } + + if (internal::FPUtil::isinfinity(value)) + { + // Format infinity ourselves because sprintf's output is not consistent + // across platforms. + std::size_t inf_size = 4; + const char *inf = upper ? " INF" : " inf"; + if (!sign) + { + --inf_size; + ++inf; + } + CharPtr out = write_str(inf, inf_size, spec); + if (sign) + *out = sign; + return; + } + + std::size_t offset = buffer_.size(); + unsigned width = spec.width(); + if (sign) + { + buffer_.reserve(buffer_.size() + (width > 1u ? width : 1u)); + if (width > 0) + --width; + ++offset; + } + + // Build format string. + enum { MAX_FORMAT_SIZE = 10}; // longest format: %#-*.*Lg + Char format[MAX_FORMAT_SIZE]; + Char *format_ptr = format; + *format_ptr++ = '%'; + unsigned width_for_sprintf = width; + if (spec.flag(HASH_FLAG)) + *format_ptr++ = '#'; + if (spec.align() == ALIGN_CENTER) + { + width_for_sprintf = 0; + } + else + { + if (spec.align() == ALIGN_LEFT) + *format_ptr++ = '-'; + if (width != 0) + *format_ptr++ = '*'; + } + if (spec.precision() >= 0) + { + *format_ptr++ = '.'; + *format_ptr++ = '*'; + } + + append_float_length(format_ptr, value); + *format_ptr++ = type; + *format_ptr = '\0'; + + // Format using snprintf. + Char fill = internal::CharTraits::cast(spec.fill()); + unsigned n = 0; + Char *start = 0; + for (;;) + { + std::size_t buffer_size = buffer_.capacity() - offset; +#if FMT_MSC_VER + // MSVC's vsnprintf_s doesn't work with zero size, so reserve + // space for at least one extra character to make the size non-zero. + // Note that the buffer's capacity will increase by more than 1. + if (buffer_size == 0) + { + buffer_.reserve(offset + 1); + buffer_size = buffer_.capacity() - offset; + } +#endif + start = &buffer_[offset]; + int result = internal::CharTraits::format_float( + start, buffer_size, format, width_for_sprintf, spec.precision(), value); + if (result >= 0) + { + n = internal::to_unsigned(result); + if (offset + n < buffer_.capacity()) + break; // The buffer is large enough - continue with formatting. + buffer_.reserve(offset + n + 1); + } + else + { + // If result is negative we ask to increase the capacity by at least 1, + // but as std::vector, the buffer grows exponentially. + buffer_.reserve(buffer_.capacity() + 1); + } + } + if (sign) + { + if ((spec.align() != ALIGN_RIGHT && spec.align() != ALIGN_DEFAULT) || + *start != ' ') + { + *(start - 1) = sign; + sign = 0; + } + else + { + *(start - 1) = fill; + } + ++n; + } + if (spec.align() == ALIGN_CENTER && spec.width() > n) + { + width = spec.width(); + CharPtr p = grow_buffer(width); + std::memmove(get(p) + (width - n) / 2, get(p), n * sizeof(Char)); + fill_padding(p, spec.width(), n, fill); + return; + } + if (spec.fill() != ' ' || sign) + { + while (*start == ' ') + *start++ = fill; + if (sign) + *(start - 1) = sign; + } + grow_buffer(n); +} + +/** + \rst + This class template provides operations for formatting and writing data + into a character stream. The output is stored in a memory buffer that grows + dynamically. + + You can use one of the following typedefs for common character types + and the standard allocator: + + +---------------+-----------------------------------------------------+ + | Type | Definition | + +===============+=====================================================+ + | MemoryWriter | BasicMemoryWriter> | + +---------------+-----------------------------------------------------+ + | WMemoryWriter | BasicMemoryWriter> | + +---------------+-----------------------------------------------------+ + + **Example**:: + + MemoryWriter out; + out << "The answer is " << 42 << "\n"; + out.write("({:+f}, {:+f})", -3.14, 3.14); + + This will write the following output to the ``out`` object: + + .. code-block:: none + + The answer is 42 + (-3.140000, +3.140000) + + The output can be converted to an ``std::string`` with ``out.str()`` or + accessed as a C string with ``out.c_str()``. + \endrst + */ +template > +class BasicMemoryWriter : public BasicWriter +{ +private: + internal::MemoryBuffer buffer_; + +public: + explicit BasicMemoryWriter(const Allocator& alloc = Allocator()) + : BasicWriter(buffer_), buffer_(alloc) {} + +#if FMT_USE_RVALUE_REFERENCES + /** + \rst + Constructs a :class:`fmt::BasicMemoryWriter` object moving the content + of the other object to it. + \endrst + */ + BasicMemoryWriter(BasicMemoryWriter &&other) + : BasicWriter(buffer_), buffer_(std::move(other.buffer_)) + { + } + + /** + \rst + Moves the content of the other ``BasicMemoryWriter`` object to this one. + \endrst + */ + BasicMemoryWriter &operator=(BasicMemoryWriter &&other) + { + buffer_ = std::move(other.buffer_); + return *this; + } +#endif +}; + +typedef BasicMemoryWriter MemoryWriter; +typedef BasicMemoryWriter WMemoryWriter; + +/** + \rst + This class template provides operations for formatting and writing data + into a fixed-size array. For writing into a dynamically growing buffer + use :class:`fmt::BasicMemoryWriter`. + + Any write method will throw ``std::runtime_error`` if the output doesn't fit + into the array. + + You can use one of the following typedefs for common character types: + + +--------------+---------------------------+ + | Type | Definition | + +==============+===========================+ + | ArrayWriter | BasicArrayWriter | + +--------------+---------------------------+ + | WArrayWriter | BasicArrayWriter | + +--------------+---------------------------+ + \endrst + */ +template +class BasicArrayWriter : public BasicWriter +{ +private: + internal::FixedBuffer buffer_; + +public: + /** + \rst + Constructs a :class:`fmt::BasicArrayWriter` object for *array* of the + given size. + \endrst + */ + BasicArrayWriter(Char *array, std::size_t size) + : BasicWriter(buffer_), buffer_(array, size) {} + + /** + \rst + Constructs a :class:`fmt::BasicArrayWriter` object for *array* of the + size known at compile time. + \endrst + */ + template + explicit BasicArrayWriter(Char (&array)[SIZE]) + : BasicWriter(buffer_), buffer_(array, SIZE) {} +}; + +typedef BasicArrayWriter ArrayWriter; +typedef BasicArrayWriter WArrayWriter; + +// Reports a system error without throwing an exception. +// Can be used to report errors from destructors. +FMT_API void report_system_error(int error_code, + StringRef message) FMT_NOEXCEPT; + +#if FMT_USE_WINDOWS_H + +/** A Windows error. */ +class WindowsError : public SystemError +{ +private: + FMT_API void init(int error_code, CStringRef format_str, ArgList args); + +public: + /** + \rst + Constructs a :class:`fmt::WindowsError` object with the description + of the form + + .. parsed-literal:: + **: ** + + where ** is the formatted message and ** is the + system message corresponding to the error code. + *error_code* is a Windows error code as given by ``GetLastError``. + If *error_code* is not a valid error code such as -1, the system message + will look like "error -1". + + **Example**:: + + // This throws a WindowsError with the description + // cannot open file 'madeup': The system cannot find the file specified. + // or similar (system message may vary). + const char *filename = "madeup"; + LPOFSTRUCT of = LPOFSTRUCT(); + HFILE file = OpenFile(filename, &of, OF_READ); + if (file == HFILE_ERROR) { + throw fmt::WindowsError(GetLastError(), + "cannot open file '{}'", filename); + } + \endrst + */ + WindowsError(int error_code, CStringRef message) + { + init(error_code, message, ArgList()); + } + FMT_VARIADIC_CTOR(WindowsError, init, int, CStringRef) +}; + +// Reports a Windows error without throwing an exception. +// Can be used to report errors from destructors. +FMT_API void report_windows_error(int error_code, + StringRef message) FMT_NOEXCEPT; + +#endif + +enum Color { BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE }; + +/** + Formats a string and prints it to stdout using ANSI escape sequences + to specify color (experimental). + Example: + print_colored(fmt::RED, "Elapsed time: {0:.2f} seconds", 1.23); + */ +FMT_API void print_colored(Color c, CStringRef format, ArgList args); + +/** + \rst + Formats arguments and returns the result as a string. + + **Example**:: + + std::string message = format("The answer is {}", 42); + \endrst +*/ +inline std::string format(CStringRef format_str, ArgList args) +{ + MemoryWriter w; + w.write(format_str, args); + return w.str(); +} + +inline std::wstring format(WCStringRef format_str, ArgList args) +{ + WMemoryWriter w; + w.write(format_str, args); + return w.str(); +} + +/** + \rst + Prints formatted data to the file *f*. + + **Example**:: + + print(stderr, "Don't {}!", "panic"); + \endrst + */ +FMT_API void print(std::FILE *f, CStringRef format_str, ArgList args); + +/** + \rst + Prints formatted data to ``stdout``. + + **Example**:: + + print("Elapsed time: {0:.2f} seconds", 1.23); + \endrst + */ +FMT_API void print(CStringRef format_str, ArgList args); + +template +void printf(BasicWriter &w, BasicCStringRef format, ArgList args) +{ + internal::PrintfFormatter(args).format(w, format); +} + +/** + \rst + Formats arguments and returns the result as a string. + + **Example**:: + + std::string message = fmt::sprintf("The answer is %d", 42); + \endrst +*/ +inline std::string sprintf(CStringRef format, ArgList args) +{ + MemoryWriter w; + printf(w, format, args); + return w.str(); +} + +inline std::wstring sprintf(WCStringRef format, ArgList args) +{ + WMemoryWriter w; + printf(w, format, args); + return w.str(); +} + +/** + \rst + Prints formatted data to the file *f*. + + **Example**:: + + fmt::fprintf(stderr, "Don't %s!", "panic"); + \endrst + */ +FMT_API int fprintf(std::FILE *f, CStringRef format, ArgList args); + +/** + \rst + Prints formatted data to ``stdout``. + + **Example**:: + + fmt::printf("Elapsed time: %.2f seconds", 1.23); + \endrst + */ +inline int printf(CStringRef format, ArgList args) +{ + return fprintf(stdout, format, args); +} + +/** + Fast integer formatter. + */ +class FormatInt +{ +private: + // Buffer should be large enough to hold all digits (digits10 + 1), + // a sign and a null character. + enum {BUFFER_SIZE = std::numeric_limits::digits10 + 3}; + mutable char buffer_[BUFFER_SIZE]; + char *str_; + + // Formats value in reverse and returns the number of digits. + char *format_decimal(ULongLong value) + { + char *buffer_end = buffer_ + BUFFER_SIZE - 1; + while (value >= 100) + { + // Integer division is slow so do it for a group of two digits instead + // of for every digit. The idea comes from the talk by Alexandrescu + // "Three Optimization Tips for C++". See speed-test for a comparison. + unsigned index = static_cast((value % 100) * 2); + value /= 100; + *--buffer_end = internal::Data::DIGITS[index + 1]; + *--buffer_end = internal::Data::DIGITS[index]; + } + if (value < 10) + { + *--buffer_end = static_cast('0' + value); + return buffer_end; + } + unsigned index = static_cast(value * 2); + *--buffer_end = internal::Data::DIGITS[index + 1]; + *--buffer_end = internal::Data::DIGITS[index]; + return buffer_end; + } + + void FormatSigned(LongLong value) + { + ULongLong abs_value = static_cast(value); + bool negative = value < 0; + if (negative) + abs_value = 0 - abs_value; + str_ = format_decimal(abs_value); + if (negative) + *--str_ = '-'; + } + +public: + explicit FormatInt(int value) + { + FormatSigned(value); + } + explicit FormatInt(long value) + { + FormatSigned(value); + } + explicit FormatInt(LongLong value) + { + FormatSigned(value); + } + explicit FormatInt(unsigned value) : str_(format_decimal(value)) {} + explicit FormatInt(unsigned long value) : str_(format_decimal(value)) {} + explicit FormatInt(ULongLong value) : str_(format_decimal(value)) {} + + /** Returns the number of characters written to the output buffer. */ + std::size_t size() const + { + return internal::to_unsigned(buffer_ - str_ + BUFFER_SIZE - 1); + } + + /** + Returns a pointer to the output buffer content. No terminating null + character is appended. + */ + const char *data() const + { + return str_; + } + + /** + Returns a pointer to the output buffer content with terminating null + character appended. + */ + const char *c_str() const + { + buffer_[BUFFER_SIZE - 1] = '\0'; + return str_; + } + + /** + \rst + Returns the content of the output buffer as an ``std::string``. + \endrst + */ + std::string str() const + { + return std::string(str_, size()); + } +}; + +// Formats a decimal integer value writing into buffer and returns +// a pointer to the end of the formatted string. This function doesn't +// write a terminating null character. +template +inline void format_decimal(char *&buffer, T value) +{ + typedef typename internal::IntTraits::MainType MainType; + MainType abs_value = static_cast(value); + if (internal::is_negative(value)) + { + *buffer++ = '-'; + abs_value = 0 - abs_value; + } + if (abs_value < 100) + { + if (abs_value < 10) + { + *buffer++ = static_cast('0' + abs_value); + return; + } + unsigned index = static_cast(abs_value * 2); + *buffer++ = internal::Data::DIGITS[index]; + *buffer++ = internal::Data::DIGITS[index + 1]; + return; + } + unsigned num_digits = internal::count_digits(abs_value); + internal::format_decimal(buffer, abs_value, num_digits); + buffer += num_digits; +} + +/** + \rst + Returns a named argument for formatting functions. + + **Example**:: + + print("Elapsed time: {s:.2f} seconds", arg("s", 1.23)); + + \endrst + */ +template +inline internal::NamedArg arg(StringRef name, const T &arg) +{ + return internal::NamedArg(name, arg); +} + +template +inline internal::NamedArg arg(WStringRef name, const T &arg) +{ + return internal::NamedArg(name, arg); +} + +// The following two functions are deleted intentionally to disable +// nested named arguments as in ``format("{}", arg("a", arg("b", 42)))``. +template +void arg(StringRef, const internal::NamedArg&) FMT_DELETED_OR_UNDEFINED; +template +void arg(WStringRef, const internal::NamedArg&) FMT_DELETED_OR_UNDEFINED; +} + +#if FMT_GCC_VERSION +// Use the system_header pragma to suppress warnings about variadic macros +// because suppressing -Wvariadic-macros with the diagnostic pragma doesn't +// work. It is used at the end because we want to suppress as little warnings +// as possible. +# pragma GCC system_header +#endif + +// This is used to work around VC++ bugs in handling variadic macros. +#define FMT_EXPAND(args) args + +// Returns the number of arguments. +// Based on https://groups.google.com/forum/#!topic/comp.std.c/d-6Mj5Lko_s. +#define FMT_NARG(...) FMT_NARG_(__VA_ARGS__, FMT_RSEQ_N()) +#define FMT_NARG_(...) FMT_EXPAND(FMT_ARG_N(__VA_ARGS__)) +#define FMT_ARG_N(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N +#define FMT_RSEQ_N() 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 + +#define FMT_CONCAT(a, b) a##b +#define FMT_FOR_EACH_(N, f, ...) \ + FMT_EXPAND(FMT_CONCAT(FMT_FOR_EACH, N)(f, __VA_ARGS__)) +#define FMT_FOR_EACH(f, ...) \ + FMT_EXPAND(FMT_FOR_EACH_(FMT_NARG(__VA_ARGS__), f, __VA_ARGS__)) + +#define FMT_ADD_ARG_NAME(type, index) type arg##index +#define FMT_GET_ARG_NAME(type, index) arg##index + +#if FMT_USE_VARIADIC_TEMPLATES +# define FMT_VARIADIC_(Char, ReturnType, func, call, ...) \ + template \ + ReturnType func(FMT_FOR_EACH(FMT_ADD_ARG_NAME, __VA_ARGS__), \ + const Args & ... args) { \ + typedef fmt::internal::ArgArray ArgArray; \ + typename ArgArray::Type array{ \ + ArgArray::template make >(args)...}; \ + call(FMT_FOR_EACH(FMT_GET_ARG_NAME, __VA_ARGS__), \ + fmt::ArgList(fmt::internal::make_type(args...), array)); \ + } +#else +// Defines a wrapper for a function taking __VA_ARGS__ arguments +// and n additional arguments of arbitrary types. +# define FMT_WRAP(Char, ReturnType, func, call, n, ...) \ + template \ + inline ReturnType func(FMT_FOR_EACH(FMT_ADD_ARG_NAME, __VA_ARGS__), \ + FMT_GEN(n, FMT_MAKE_ARG)) { \ + fmt::internal::ArgArray::Type arr; \ + FMT_GEN(n, FMT_ASSIGN_##Char); \ + call(FMT_FOR_EACH(FMT_GET_ARG_NAME, __VA_ARGS__), fmt::ArgList( \ + fmt::internal::make_type(FMT_GEN(n, FMT_MAKE_REF2)), arr)); \ + } + +# define FMT_VARIADIC_(Char, ReturnType, func, call, ...) \ + inline ReturnType func(FMT_FOR_EACH(FMT_ADD_ARG_NAME, __VA_ARGS__)) { \ + call(FMT_FOR_EACH(FMT_GET_ARG_NAME, __VA_ARGS__), fmt::ArgList()); \ + } \ + FMT_WRAP(Char, ReturnType, func, call, 1, __VA_ARGS__) \ + FMT_WRAP(Char, ReturnType, func, call, 2, __VA_ARGS__) \ + FMT_WRAP(Char, ReturnType, func, call, 3, __VA_ARGS__) \ + FMT_WRAP(Char, ReturnType, func, call, 4, __VA_ARGS__) \ + FMT_WRAP(Char, ReturnType, func, call, 5, __VA_ARGS__) \ + FMT_WRAP(Char, ReturnType, func, call, 6, __VA_ARGS__) \ + FMT_WRAP(Char, ReturnType, func, call, 7, __VA_ARGS__) \ + FMT_WRAP(Char, ReturnType, func, call, 8, __VA_ARGS__) \ + FMT_WRAP(Char, ReturnType, func, call, 9, __VA_ARGS__) \ + FMT_WRAP(Char, ReturnType, func, call, 10, __VA_ARGS__) \ + FMT_WRAP(Char, ReturnType, func, call, 11, __VA_ARGS__) \ + FMT_WRAP(Char, ReturnType, func, call, 12, __VA_ARGS__) \ + FMT_WRAP(Char, ReturnType, func, call, 13, __VA_ARGS__) \ + FMT_WRAP(Char, ReturnType, func, call, 14, __VA_ARGS__) \ + FMT_WRAP(Char, ReturnType, func, call, 15, __VA_ARGS__) +#endif // FMT_USE_VARIADIC_TEMPLATES + +/** + \rst + Defines a variadic function with the specified return type, function name + and argument types passed as variable arguments to this macro. + + **Example**:: + + void print_error(const char *file, int line, const char *format, + fmt::ArgList args) { + fmt::print("{}: {}: ", file, line); + fmt::print(format, args); + } + FMT_VARIADIC(void, print_error, const char *, int, const char *) + + ``FMT_VARIADIC`` is used for compatibility with legacy C++ compilers that + don't implement variadic templates. You don't have to use this macro if + you don't need legacy compiler support and can use variadic templates + directly:: + + template + void print_error(const char *file, int line, const char *format, + const Args & ... args) { + fmt::print("{}: {}: ", file, line); + fmt::print(format, args...); + } + \endrst + */ +#define FMT_VARIADIC(ReturnType, func, ...) \ + FMT_VARIADIC_(char, ReturnType, func, return func, __VA_ARGS__) + +#define FMT_VARIADIC_W(ReturnType, func, ...) \ + FMT_VARIADIC_(wchar_t, ReturnType, func, return func, __VA_ARGS__) + +#define FMT_CAPTURE_ARG_(id, index) ::fmt::arg(#id, id) + +#define FMT_CAPTURE_ARG_W_(id, index) ::fmt::arg(L###id, id) + +/** + \rst + Convenient macro to capture the arguments' names and values into several + ``fmt::arg(name, value)``. + + **Example**:: + + int x = 1, y = 2; + print("point: ({x}, {y})", FMT_CAPTURE(x, y)); + // same as: + // print("point: ({x}, {y})", arg("x", x), arg("y", y)); + + \endrst + */ +#define FMT_CAPTURE(...) FMT_FOR_EACH(FMT_CAPTURE_ARG_, __VA_ARGS__) + +#define FMT_CAPTURE_W(...) FMT_FOR_EACH(FMT_CAPTURE_ARG_W_, __VA_ARGS__) + +namespace fmt +{ +FMT_VARIADIC(std::string, format, CStringRef) +FMT_VARIADIC_W(std::wstring, format, WCStringRef) +FMT_VARIADIC(void, print, CStringRef) +FMT_VARIADIC(void, print, std::FILE *, CStringRef) + +FMT_VARIADIC(void, print_colored, Color, CStringRef) +FMT_VARIADIC(std::string, sprintf, CStringRef) +FMT_VARIADIC_W(std::wstring, sprintf, WCStringRef) +FMT_VARIADIC(int, printf, CStringRef) +FMT_VARIADIC(int, fprintf, std::FILE *, CStringRef) + +namespace internal +{ +template +inline bool is_name_start(Char c) +{ + return ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || '_' == c; +} + +// Parses an unsigned integer advancing s to the end of the parsed input. +// This function assumes that the first character of s is a digit. +template +unsigned parse_nonnegative_int(const Char *&s) +{ + assert('0' <= *s && *s <= '9'); + unsigned value = 0; + do + { + unsigned new_value = value * 10 + (*s++ - '0'); + // Check if value wrapped around. + if (new_value < value) + { + value = (std::numeric_limits::max)(); + break; + } + value = new_value; + } + while ('0' <= *s && *s <= '9'); + // Convert to unsigned to prevent a warning. + unsigned max_int = (std::numeric_limits::max)(); + if (value > max_int) + FMT_THROW(FormatError("number is too big")); + return value; +} + +inline void require_numeric_argument(const Arg &arg, char spec) +{ + if (arg.type > Arg::LAST_NUMERIC_TYPE) + { + std::string message = + fmt::format("format specifier '{}' requires numeric argument", spec); + FMT_THROW(fmt::FormatError(message)); + } +} + +template +void check_sign(const Char *&s, const Arg &arg) +{ + char sign = static_cast(*s); + require_numeric_argument(arg, sign); + if (arg.type == Arg::UINT || arg.type == Arg::ULONG_LONG) + { + FMT_THROW(FormatError(fmt::format( + "format specifier '{}' requires signed argument", sign))); + } + ++s; +} +} // namespace internal + +template +inline internal::Arg BasicFormatter::get_arg( + BasicStringRef arg_name, const char *&error) +{ + if (check_no_auto_index(error)) + { + map_.init(args()); + const internal::Arg *arg = map_.find(arg_name); + if (arg) + return *arg; + error = "argument not found"; + } + return internal::Arg(); +} + +template +inline internal::Arg BasicFormatter::parse_arg_index(const Char *&s) +{ + const char *error = 0; + internal::Arg arg = *s < '0' || *s > '9' ? + next_arg(error) : get_arg(internal::parse_nonnegative_int(s), error); + if (error) + { + FMT_THROW(FormatError( + *s != '}' && *s != ':' ? "invalid format string" : error)); + } + return arg; +} + +template +inline internal::Arg BasicFormatter::parse_arg_name(const Char *&s) +{ + assert(internal::is_name_start(*s)); + const Char *start = s; + Char c; + do + { + c = *++s; + } + while (internal::is_name_start(c) || ('0' <= c && c <= '9')); + const char *error = 0; + internal::Arg arg = get_arg(BasicStringRef(start, s - start), error); + if (error) + FMT_THROW(FormatError(error)); + return arg; +} + +template +const Char *BasicFormatter::format( + const Char *&format_str, const internal::Arg &arg) +{ + using internal::Arg; + const Char *s = format_str; + FormatSpec spec; + if (*s == ':') + { + if (arg.type == Arg::CUSTOM) + { + arg.custom.format(this, arg.custom.value, &s); + return s; + } + ++s; + // Parse fill and alignment. + if (Char c = *s) + { + const Char *p = s + 1; + spec.align_ = ALIGN_DEFAULT; + do + { + switch (*p) + { + case '<': + spec.align_ = ALIGN_LEFT; + break; + case '>': + spec.align_ = ALIGN_RIGHT; + break; + case '=': + spec.align_ = ALIGN_NUMERIC; + break; + case '^': + spec.align_ = ALIGN_CENTER; + break; + } + if (spec.align_ != ALIGN_DEFAULT) + { + if (p != s) + { + if (c == '}') break; + if (c == '{') + FMT_THROW(FormatError("invalid fill character '{'")); + s += 2; + spec.fill_ = c; + } + else ++s; + if (spec.align_ == ALIGN_NUMERIC) + require_numeric_argument(arg, '='); + break; + } + } + while (--p >= s); + } + + // Parse sign. + switch (*s) + { + case '+': + check_sign(s, arg); + spec.flags_ |= SIGN_FLAG | PLUS_FLAG; + break; + case '-': + check_sign(s, arg); + spec.flags_ |= MINUS_FLAG; + break; + case ' ': + check_sign(s, arg); + spec.flags_ |= SIGN_FLAG; + break; + } + + if (*s == '#') + { + require_numeric_argument(arg, '#'); + spec.flags_ |= HASH_FLAG; + ++s; + } + + // Parse zero flag. + if (*s == '0') + { + require_numeric_argument(arg, '0'); + spec.align_ = ALIGN_NUMERIC; + spec.fill_ = '0'; + ++s; + } + + // Parse width. + if ('0' <= *s && *s <= '9') + { + spec.width_ = internal::parse_nonnegative_int(s); + } + else if (*s == '{') + { + ++s; + Arg width_arg = internal::is_name_start(*s) ? + parse_arg_name(s) : parse_arg_index(s); + if (*s++ != '}') + FMT_THROW(FormatError("invalid format string")); + ULongLong value = 0; + switch (width_arg.type) + { + case Arg::INT: + if (width_arg.int_value < 0) + FMT_THROW(FormatError("negative width")); + value = width_arg.int_value; + break; + case Arg::UINT: + value = width_arg.uint_value; + break; + case Arg::LONG_LONG: + if (width_arg.long_long_value < 0) + FMT_THROW(FormatError("negative width")); + value = width_arg.long_long_value; + break; + case Arg::ULONG_LONG: + value = width_arg.ulong_long_value; + break; + default: + FMT_THROW(FormatError("width is not integer")); + } + if (value > (std::numeric_limits::max)()) + FMT_THROW(FormatError("number is too big")); + spec.width_ = static_cast(value); + } + + // Parse precision. + if (*s == '.') + { + ++s; + spec.precision_ = 0; + if ('0' <= *s && *s <= '9') + { + spec.precision_ = internal::parse_nonnegative_int(s); + } + else if (*s == '{') + { + ++s; + Arg precision_arg = internal::is_name_start(*s) ? + parse_arg_name(s) : parse_arg_index(s); + if (*s++ != '}') + FMT_THROW(FormatError("invalid format string")); + ULongLong value = 0; + switch (precision_arg.type) + { + case Arg::INT: + if (precision_arg.int_value < 0) + FMT_THROW(FormatError("negative precision")); + value = precision_arg.int_value; + break; + case Arg::UINT: + value = precision_arg.uint_value; + break; + case Arg::LONG_LONG: + if (precision_arg.long_long_value < 0) + FMT_THROW(FormatError("negative precision")); + value = precision_arg.long_long_value; + break; + case Arg::ULONG_LONG: + value = precision_arg.ulong_long_value; + break; + default: + FMT_THROW(FormatError("precision is not integer")); + } + if (value > (std::numeric_limits::max)()) + FMT_THROW(FormatError("number is too big")); + spec.precision_ = static_cast(value); + } + else + { + FMT_THROW(FormatError("missing precision specifier")); + } + if (arg.type <= Arg::LAST_INTEGER_TYPE || arg.type == Arg::POINTER) + { + FMT_THROW(FormatError( + fmt::format("precision not allowed in {} format specifier", + arg.type == Arg::POINTER ? "pointer" : "integer"))); + } + } + + // Parse type. + if (*s != '}' && *s) + spec.type_ = static_cast(*s++); + } + + if (*s++ != '}') + FMT_THROW(FormatError("missing '}' in format string")); + + // Format argument. + ArgFormatter(*this, spec, s - 1).visit(arg); + return s; +} + +template +void BasicFormatter::format(BasicCStringRef format_str) +{ + const Char *s = format_str.c_str(); + const Char *start = s; + while (*s) + { + Char c = *s++; + if (c != '{' && c != '}') continue; + if (*s == c) + { + write(writer_, start, s); + start = ++s; + continue; + } + if (c == '}') + FMT_THROW(FormatError("unmatched '}' in format string")); + write(writer_, start, s - 1); + internal::Arg arg = internal::is_name_start(*s) ? + parse_arg_name(s) : parse_arg_index(s); + start = s = format(s, arg); + } + write(writer_, start, s); +} +} // namespace fmt + +#if FMT_USE_USER_DEFINED_LITERALS +namespace fmt +{ +namespace internal +{ + +template +struct UdlFormat +{ + const Char *str; + + template + auto operator()(Args && ... args) const + -> decltype(format(str, std::forward(args)...)) + { + return format(str, std::forward(args)...); + } +}; + +template +struct UdlArg +{ + const Char *str; + + template + NamedArg operator=(T &&value) const + { + return {str, std::forward(value)}; + } +}; + +} // namespace internal + +inline namespace literals +{ + +/** + \rst + C++11 literal equivalent of :func:`fmt::format`. + + **Example**:: + + using namespace fmt::literals; + std::string message = "The answer is {}"_format(42); + \endrst + */ +inline internal::UdlFormat +operator"" _format(const char *s, std::size_t) +{ + return {s}; +} +inline internal::UdlFormat +operator"" _format(const wchar_t *s, std::size_t) +{ + return {s}; +} + +/** + \rst + C++11 literal equivalent of :func:`fmt::arg`. + + **Example**:: + + using namespace fmt::literals; + print("Elapsed time: {s:.2f} seconds", "s"_a=1.23); + \endrst + */ +inline internal::UdlArg +operator"" _a(const char *s, std::size_t) +{ + return {s}; +} +inline internal::UdlArg +operator"" _a(const wchar_t *s, std::size_t) +{ + return {s}; +} + +} // inline namespace literals +} // namespace fmt +#endif // FMT_USE_USER_DEFINED_LITERALS + +// Restore warnings. +#if FMT_GCC_VERSION >= 406 +# pragma GCC diagnostic pop +#endif + +#if defined(__clang__) && !defined(FMT_ICC_VERSION) +# pragma clang diagnostic pop +#endif + +#ifdef FMT_HEADER_ONLY +# define FMT_FUNC inline +# include "format.cc" +#else +# define FMT_FUNC +#endif + +#endif // FMT_FORMAT_H_ diff --git a/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/ostream.cc b/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/ostream.cc new file mode 100644 index 00000000..bcb67fe1 --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/ostream.cc @@ -0,0 +1,43 @@ +/* + Formatting library for C++ - std::ostream support + + Copyright (c) 2012 - 2016, Victor Zverovich + All rights reserved. + + For the license information refer to format.h. + */ + +#include "ostream.h" + +namespace fmt { + +namespace { +// Write the content of w to os. +void write(std::ostream &os, Writer &w) { + const char *data = w.data(); + typedef internal::MakeUnsigned::Type UnsignedStreamSize; + UnsignedStreamSize size = w.size(); + UnsignedStreamSize max_size = + internal::to_unsigned((std::numeric_limits::max)()); + do { + UnsignedStreamSize n = size <= max_size ? size : max_size; + os.write(data, static_cast(n)); + data += n; + size -= n; + } while (size != 0); +} +} + +FMT_FUNC void print(std::ostream &os, CStringRef format_str, ArgList args) { + MemoryWriter w; + w.write(format_str, args); + write(os, w); +} + +FMT_FUNC int fprintf(std::ostream &os, CStringRef format, ArgList args) { + MemoryWriter w; + printf(w, format, args); + write(os, w); + return static_cast(w.size()); +} +} // namespace fmt diff --git a/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/ostream.h b/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/ostream.h new file mode 100644 index 00000000..c52646d0 --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/ostream.h @@ -0,0 +1,126 @@ +/* + Formatting library for C++ - std::ostream support + + Copyright (c) 2012 - 2016, Victor Zverovich + All rights reserved. + + For the license information refer to format.h. + */ + +#ifndef FMT_OSTREAM_H_ +#define FMT_OSTREAM_H_ + +#include "format.h" +#include + +namespace fmt +{ + +namespace internal +{ + +template +class FormatBuf : public std::basic_streambuf +{ +private: + typedef typename std::basic_streambuf::int_type int_type; + typedef typename std::basic_streambuf::traits_type traits_type; + + Buffer &buffer_; + Char *start_; + +public: + FormatBuf(Buffer &buffer) : buffer_(buffer), start_(&buffer[0]) + { + this->setp(start_, start_ + buffer_.capacity()); + } + + int_type overflow(int_type ch = traits_type::eof()) + { + if (!traits_type::eq_int_type(ch, traits_type::eof())) + { + size_t buf_size = size(); + buffer_.resize(buf_size); + buffer_.reserve(buf_size * 2); + + start_ = &buffer_[0]; + start_[buf_size] = traits_type::to_char_type(ch); + this->setp(start_+ buf_size + 1, start_ + buf_size * 2); + } + return ch; + } + + size_t size() const + { + return to_unsigned(this->pptr() - start_); + } +}; + +Yes &convert(std::ostream &); + +struct DummyStream : std::ostream +{ + DummyStream(); // Suppress a bogus warning in MSVC. + // Hide all operator<< overloads from std::ostream. + void operator<<(Null<>); +}; + +No &operator<<(std::ostream &, int); + +template +struct ConvertToIntImpl +{ + // Convert to int only if T doesn't have an overloaded operator<<. + enum + { + value = sizeof(convert(get() << get())) == sizeof(No) + }; +}; +} // namespace internal + +// Formats a value. +template +void format(BasicFormatter &f, + const Char *&format_str, const T &value) +{ + internal::MemoryBuffer buffer; + + internal::FormatBuf format_buf(buffer); + std::basic_ostream output(&format_buf); + output << value; + + BasicStringRef str(&buffer[0], format_buf.size()); + typedef internal::MakeArg< BasicFormatter > MakeArg; + format_str = f.format(format_str, MakeArg(str)); +} + +/** + \rst + Prints formatted data to the stream *os*. + + **Example**:: + + print(cerr, "Don't {}!", "panic"); + \endrst + */ +FMT_API void print(std::ostream &os, CStringRef format_str, ArgList args); +FMT_VARIADIC(void, print, std::ostream &, CStringRef) + +/** + \rst + Prints formatted data to the stream *os*. + + **Example**:: + + fprintf(cerr, "Don't %s!", "panic"); + \endrst + */ +FMT_API int fprintf(std::ostream &os, CStringRef format_str, ArgList args); +FMT_VARIADIC(int, fprintf, std::ostream &, CStringRef) +} // namespace fmt + +#ifdef FMT_HEADER_ONLY +# include "ostream.cc" +#endif + +#endif // FMT_OSTREAM_H_ diff --git a/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/posix.cc b/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/posix.cc new file mode 100644 index 00000000..76eb7f05 --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/posix.cc @@ -0,0 +1,238 @@ +/* + A C++ interface to POSIX functions. + + Copyright (c) 2012 - 2016, Victor Zverovich + All rights reserved. + + For the license information refer to format.h. + */ + +// Disable bogus MSVC warnings. +#ifndef _CRT_SECURE_NO_WARNINGS +# define _CRT_SECURE_NO_WARNINGS +#endif + +#include "posix.h" + +#include +#include +#include + +#ifndef _WIN32 +# include +#else +# include +# include + +# define O_CREAT _O_CREAT +# define O_TRUNC _O_TRUNC + +# ifndef S_IRUSR +# define S_IRUSR _S_IREAD +# endif + +# ifndef S_IWUSR +# define S_IWUSR _S_IWRITE +# endif + +# ifdef __MINGW32__ +# define _SH_DENYNO 0x40 +# endif + +#endif // _WIN32 + +#ifdef fileno +# undef fileno +#endif + +namespace { +#ifdef _WIN32 +// Return type of read and write functions. +typedef int RWResult; + +// On Windows the count argument to read and write is unsigned, so convert +// it from size_t preventing integer overflow. +inline unsigned convert_rwcount(std::size_t count) { + return count <= UINT_MAX ? static_cast(count) : UINT_MAX; +} +#else +// Return type of read and write functions. +typedef ssize_t RWResult; + +inline std::size_t convert_rwcount(std::size_t count) { return count; } +#endif +} + +fmt::BufferedFile::~BufferedFile() FMT_NOEXCEPT { + if (file_ && FMT_SYSTEM(fclose(file_)) != 0) + fmt::report_system_error(errno, "cannot close file"); +} + +fmt::BufferedFile::BufferedFile( + fmt::CStringRef filename, fmt::CStringRef mode) { + FMT_RETRY_VAL(file_, FMT_SYSTEM(fopen(filename.c_str(), mode.c_str())), 0); + if (!file_) + FMT_THROW(SystemError(errno, "cannot open file {}", filename)); +} + +void fmt::BufferedFile::close() { + if (!file_) + return; + int result = FMT_SYSTEM(fclose(file_)); + file_ = 0; + if (result != 0) + FMT_THROW(SystemError(errno, "cannot close file")); +} + +// A macro used to prevent expansion of fileno on broken versions of MinGW. +#define FMT_ARGS + +int fmt::BufferedFile::fileno() const { + int fd = FMT_POSIX_CALL(fileno FMT_ARGS(file_)); + if (fd == -1) + FMT_THROW(SystemError(errno, "cannot get file descriptor")); + return fd; +} + +fmt::File::File(fmt::CStringRef path, int oflag) { + int mode = S_IRUSR | S_IWUSR; +#if defined(_WIN32) && !defined(__MINGW32__) + fd_ = -1; + FMT_POSIX_CALL(sopen_s(&fd_, path.c_str(), oflag, _SH_DENYNO, mode)); +#else + FMT_RETRY(fd_, FMT_POSIX_CALL(open(path.c_str(), oflag, mode))); +#endif + if (fd_ == -1) + FMT_THROW(SystemError(errno, "cannot open file {}", path)); +} + +fmt::File::~File() FMT_NOEXCEPT { + // Don't retry close in case of EINTR! + // See http://linux.derkeiler.com/Mailing-Lists/Kernel/2005-09/3000.html + if (fd_ != -1 && FMT_POSIX_CALL(close(fd_)) != 0) + fmt::report_system_error(errno, "cannot close file"); +} + +void fmt::File::close() { + if (fd_ == -1) + return; + // Don't retry close in case of EINTR! + // See http://linux.derkeiler.com/Mailing-Lists/Kernel/2005-09/3000.html + int result = FMT_POSIX_CALL(close(fd_)); + fd_ = -1; + if (result != 0) + FMT_THROW(SystemError(errno, "cannot close file")); +} + +fmt::LongLong fmt::File::size() const { +#ifdef _WIN32 + // Use GetFileSize instead of GetFileSizeEx for the case when _WIN32_WINNT + // is less than 0x0500 as is the case with some default MinGW builds. + // Both functions support large file sizes. + DWORD size_upper = 0; + HANDLE handle = reinterpret_cast(_get_osfhandle(fd_)); + DWORD size_lower = FMT_SYSTEM(GetFileSize(handle, &size_upper)); + if (size_lower == INVALID_FILE_SIZE) { + DWORD error = GetLastError(); + if (error != NO_ERROR) + FMT_THROW(WindowsError(GetLastError(), "cannot get file size")); + } + fmt::ULongLong long_size = size_upper; + return (long_size << sizeof(DWORD) * CHAR_BIT) | size_lower; +#else + typedef struct stat Stat; + Stat file_stat = Stat(); + if (FMT_POSIX_CALL(fstat(fd_, &file_stat)) == -1) + FMT_THROW(SystemError(errno, "cannot get file attributes")); + FMT_STATIC_ASSERT(sizeof(fmt::LongLong) >= sizeof(file_stat.st_size), + "return type of File::size is not large enough"); + return file_stat.st_size; +#endif +} + +std::size_t fmt::File::read(void *buffer, std::size_t count) { + RWResult result = 0; + FMT_RETRY(result, FMT_POSIX_CALL(read(fd_, buffer, convert_rwcount(count)))); + if (result < 0) + FMT_THROW(SystemError(errno, "cannot read from file")); + return internal::to_unsigned(result); +} + +std::size_t fmt::File::write(const void *buffer, std::size_t count) { + RWResult result = 0; + FMT_RETRY(result, FMT_POSIX_CALL(write(fd_, buffer, convert_rwcount(count)))); + if (result < 0) + FMT_THROW(SystemError(errno, "cannot write to file")); + return internal::to_unsigned(result); +} + +fmt::File fmt::File::dup(int fd) { + // Don't retry as dup doesn't return EINTR. + // http://pubs.opengroup.org/onlinepubs/009695399/functions/dup.html + int new_fd = FMT_POSIX_CALL(dup(fd)); + if (new_fd == -1) + FMT_THROW(SystemError(errno, "cannot duplicate file descriptor {}", fd)); + return File(new_fd); +} + +void fmt::File::dup2(int fd) { + int result = 0; + FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd))); + if (result == -1) { + FMT_THROW(SystemError(errno, + "cannot duplicate file descriptor {} to {}", fd_, fd)); + } +} + +void fmt::File::dup2(int fd, ErrorCode &ec) FMT_NOEXCEPT { + int result = 0; + FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd))); + if (result == -1) + ec = ErrorCode(errno); +} + +void fmt::File::pipe(File &read_end, File &write_end) { + // Close the descriptors first to make sure that assignments don't throw + // and there are no leaks. + read_end.close(); + write_end.close(); + int fds[2] = {}; +#ifdef _WIN32 + // Make the default pipe capacity same as on Linux 2.6.11+. + enum { DEFAULT_CAPACITY = 65536 }; + int result = FMT_POSIX_CALL(pipe(fds, DEFAULT_CAPACITY, _O_BINARY)); +#else + // Don't retry as the pipe function doesn't return EINTR. + // http://pubs.opengroup.org/onlinepubs/009696799/functions/pipe.html + int result = FMT_POSIX_CALL(pipe(fds)); +#endif + if (result != 0) + FMT_THROW(SystemError(errno, "cannot create pipe")); + // The following assignments don't throw because read_fd and write_fd + // are closed. + read_end = File(fds[0]); + write_end = File(fds[1]); +} + +fmt::BufferedFile fmt::File::fdopen(const char *mode) { + // Don't retry as fdopen doesn't return EINTR. + FILE *f = FMT_POSIX_CALL(fdopen(fd_, mode)); + if (!f) + FMT_THROW(SystemError(errno, "cannot associate stream with file descriptor")); + BufferedFile file(f); + fd_ = -1; + return file; +} + +long fmt::getpagesize() { +#ifdef _WIN32 + SYSTEM_INFO si; + GetSystemInfo(&si); + return si.dwPageSize; +#else + long size = FMT_POSIX_CALL(sysconf(_SC_PAGESIZE)); + if (size < 0) + FMT_THROW(SystemError(errno, "cannot get memory page size")); + return size; +#endif +} diff --git a/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/posix.h b/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/posix.h new file mode 100644 index 00000000..859fcaa7 --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/posix.h @@ -0,0 +1,443 @@ +/* + A C++ interface to POSIX functions. + + Copyright (c) 2012 - 2016, Victor Zverovich + All rights reserved. + + For the license information refer to format.h. + */ + +#ifndef FMT_POSIX_H_ +#define FMT_POSIX_H_ + +#if defined(__MINGW32__) || defined(__CYGWIN__) +// Workaround MinGW bug https://sourceforge.net/p/mingw/bugs/2024/. +# undef __STRICT_ANSI__ +#endif + +#include +#include // for O_RDONLY +#include // for locale_t +#include +#include // for strtod_l + +#include + +#if defined __APPLE__ || defined(__FreeBSD__) +# include // for LC_NUMERIC_MASK on OS X +#endif + +#include "format.h" + +#ifndef FMT_POSIX +# if defined(_WIN32) && !defined(__MINGW32__) +// Fix warnings about deprecated symbols. +# define FMT_POSIX(call) _##call +# else +# define FMT_POSIX(call) call +# endif +#endif + +// Calls to system functions are wrapped in FMT_SYSTEM for testability. +#ifdef FMT_SYSTEM +# define FMT_POSIX_CALL(call) FMT_SYSTEM(call) +#else +# define FMT_SYSTEM(call) call +# ifdef _WIN32 +// Fix warnings about deprecated symbols. +# define FMT_POSIX_CALL(call) ::_##call +# else +# define FMT_POSIX_CALL(call) ::call +# endif +#endif + +#if FMT_GCC_VERSION >= 407 +# define FMT_UNUSED __attribute__((unused)) +#else +# define FMT_UNUSED +#endif + +#ifndef FMT_USE_STATIC_ASSERT +# define FMT_USE_STATIC_ASSERT 0 +#endif + +#if FMT_USE_STATIC_ASSERT || FMT_HAS_FEATURE(cxx_static_assert) || \ + (FMT_GCC_VERSION >= 403 && FMT_HAS_GXX_CXX11) || _MSC_VER >= 1600 +# define FMT_STATIC_ASSERT(cond, message) static_assert(cond, message) +#else +# define FMT_CONCAT_(a, b) FMT_CONCAT(a, b) +# define FMT_STATIC_ASSERT(cond, message) \ + typedef int FMT_CONCAT_(Assert, __LINE__)[(cond) ? 1 : -1] FMT_UNUSED +#endif + +// Retries the expression while it evaluates to error_result and errno +// equals to EINTR. +#ifndef _WIN32 +# define FMT_RETRY_VAL(result, expression, error_result) \ + do { \ + result = (expression); \ + } while (result == error_result && errno == EINTR) +#else +# define FMT_RETRY_VAL(result, expression, error_result) result = (expression) +#endif + +#define FMT_RETRY(result, expression) FMT_RETRY_VAL(result, expression, -1) + +namespace fmt +{ + +// An error code. +class ErrorCode +{ +private: + int value_; + +public: +explicit ErrorCode(int value = 0) FMT_NOEXCEPT : + value_(value) {} + + int get() const FMT_NOEXCEPT + { + return value_; + } +}; + +// A buffered file. +class BufferedFile +{ +private: + FILE *file_; + + friend class File; + + explicit BufferedFile(FILE *f) : file_(f) {} + +public: + // Constructs a BufferedFile object which doesn't represent any file. +BufferedFile() FMT_NOEXCEPT : + file_(0) {} + + // Destroys the object closing the file it represents if any. + ~BufferedFile() FMT_NOEXCEPT; + +#if !FMT_USE_RVALUE_REFERENCES + // Emulate a move constructor and a move assignment operator if rvalue + // references are not supported. + +private: + // A proxy object to emulate a move constructor. + // It is private to make it impossible call operator Proxy directly. + struct Proxy + { + FILE *file; + }; + +public: + // A "move constructor" for moving from a temporary. +BufferedFile(Proxy p) FMT_NOEXCEPT : + file_(p.file) {} + + // A "move constructor" for moving from an lvalue. +BufferedFile(BufferedFile &f) FMT_NOEXCEPT : + file_(f.file_) + { + f.file_ = 0; + } + + // A "move assignment operator" for moving from a temporary. + BufferedFile &operator=(Proxy p) + { + close(); + file_ = p.file; + return *this; + } + + // A "move assignment operator" for moving from an lvalue. + BufferedFile &operator=(BufferedFile &other) + { + close(); + file_ = other.file_; + other.file_ = 0; + return *this; + } + + // Returns a proxy object for moving from a temporary: + // BufferedFile file = BufferedFile(...); + operator Proxy() FMT_NOEXCEPT + { + Proxy p = {file_}; + file_ = 0; + return p; + } + +#else +private: + FMT_DISALLOW_COPY_AND_ASSIGN(BufferedFile); + +public: +BufferedFile(BufferedFile &&other) FMT_NOEXCEPT : + file_(other.file_) + { + other.file_ = 0; + } + + BufferedFile& operator=(BufferedFile &&other) + { + close(); + file_ = other.file_; + other.file_ = 0; + return *this; + } +#endif + + // Opens a file. + BufferedFile(CStringRef filename, CStringRef mode); + + // Closes the file. + void close(); + + // Returns the pointer to a FILE object representing this file. + FILE *get() const FMT_NOEXCEPT + { + return file_; + } + + // We place parentheses around fileno to workaround a bug in some versions + // of MinGW that define fileno as a macro. + int (fileno)() const; + + void print(CStringRef format_str, const ArgList &args) + { + fmt::print(file_, format_str, args); + } + FMT_VARIADIC(void, print, CStringRef) +}; + +// A file. Closed file is represented by a File object with descriptor -1. +// Methods that are not declared with FMT_NOEXCEPT may throw +// fmt::SystemError in case of failure. Note that some errors such as +// closing the file multiple times will cause a crash on Windows rather +// than an exception. You can get standard behavior by overriding the +// invalid parameter handler with _set_invalid_parameter_handler. +class File +{ +private: + int fd_; // File descriptor. + + // Constructs a File object with a given descriptor. + explicit File(int fd) : fd_(fd) {} + +public: + // Possible values for the oflag argument to the constructor. + enum + { + RDONLY = FMT_POSIX(O_RDONLY), // Open for reading only. + WRONLY = FMT_POSIX(O_WRONLY), // Open for writing only. + RDWR = FMT_POSIX(O_RDWR) // Open for reading and writing. + }; + + // Constructs a File object which doesn't represent any file. +File() FMT_NOEXCEPT : + fd_(-1) {} + + // Opens a file and constructs a File object representing this file. + File(CStringRef path, int oflag); + +#if !FMT_USE_RVALUE_REFERENCES + // Emulate a move constructor and a move assignment operator if rvalue + // references are not supported. + +private: + // A proxy object to emulate a move constructor. + // It is private to make it impossible call operator Proxy directly. + struct Proxy + { + int fd; + }; + +public: + // A "move constructor" for moving from a temporary. +File(Proxy p) FMT_NOEXCEPT : + fd_(p.fd) {} + + // A "move constructor" for moving from an lvalue. +File(File &other) FMT_NOEXCEPT : + fd_(other.fd_) + { + other.fd_ = -1; + } + + // A "move assignment operator" for moving from a temporary. + File &operator=(Proxy p) + { + close(); + fd_ = p.fd; + return *this; + } + + // A "move assignment operator" for moving from an lvalue. + File &operator=(File &other) + { + close(); + fd_ = other.fd_; + other.fd_ = -1; + return *this; + } + + // Returns a proxy object for moving from a temporary: + // File file = File(...); + operator Proxy() FMT_NOEXCEPT + { + Proxy p = {fd_}; + fd_ = -1; + return p; + } + +#else +private: + FMT_DISALLOW_COPY_AND_ASSIGN(File); + +public: +File(File &&other) FMT_NOEXCEPT : + fd_(other.fd_) + { + other.fd_ = -1; + } + + File& operator=(File &&other) + { + close(); + fd_ = other.fd_; + other.fd_ = -1; + return *this; + } +#endif + + // Destroys the object closing the file it represents if any. + ~File() FMT_NOEXCEPT; + + // Returns the file descriptor. + int descriptor() const FMT_NOEXCEPT + { + return fd_; + } + + // Closes the file. + void close(); + + // Returns the file size. The size has signed type for consistency with + // stat::st_size. + LongLong size() const; + + // Attempts to read count bytes from the file into the specified buffer. + std::size_t read(void *buffer, std::size_t count); + + // Attempts to write count bytes from the specified buffer to the file. + std::size_t write(const void *buffer, std::size_t count); + + // Duplicates a file descriptor with the dup function and returns + // the duplicate as a file object. + static File dup(int fd); + + // Makes fd be the copy of this file descriptor, closing fd first if + // necessary. + void dup2(int fd); + + // Makes fd be the copy of this file descriptor, closing fd first if + // necessary. + void dup2(int fd, ErrorCode &ec) FMT_NOEXCEPT; + + // Creates a pipe setting up read_end and write_end file objects for reading + // and writing respectively. + static void pipe(File &read_end, File &write_end); + + // Creates a BufferedFile object associated with this file and detaches + // this File object from the file. + BufferedFile fdopen(const char *mode); +}; + +// Returns the memory page size. +long getpagesize(); + +#if (defined(LC_NUMERIC_MASK) || defined(_MSC_VER)) && \ + !defined(__ANDROID__) && !defined(__CYGWIN__) +# define FMT_LOCALE +#endif + +#ifdef FMT_LOCALE +// A "C" numeric locale. +class Locale +{ +private: +# ifdef _MSC_VER + typedef _locale_t locale_t; + + enum { LC_NUMERIC_MASK = LC_NUMERIC }; + + static locale_t newlocale(int category_mask, const char *locale, locale_t) + { + return _create_locale(category_mask, locale); + } + + static void freelocale(locale_t locale) + { + _free_locale(locale); + } + + static double strtod_l(const char *nptr, char **endptr, _locale_t locale) + { + return _strtod_l(nptr, endptr, locale); + } +# endif + + locale_t locale_; + + FMT_DISALLOW_COPY_AND_ASSIGN(Locale); + +public: + typedef locale_t Type; + + Locale() : locale_(newlocale(LC_NUMERIC_MASK, "C", NULL)) + { + if (!locale_) + FMT_THROW(fmt::SystemError(errno, "cannot create locale")); + } + ~Locale() + { + freelocale(locale_); + } + + Type get() const + { + return locale_; + } + + // Converts string to floating-point number and advances str past the end + // of the parsed input. + double strtod(const char *&str) const + { + char *end = 0; + double result = strtod_l(str, &end, locale_); + str = end; + return result; + } +}; +#endif // FMT_LOCALE +} // namespace fmt + +#if !FMT_USE_RVALUE_REFERENCES +namespace std +{ +// For compatibility with C++98. +inline fmt::BufferedFile &move(fmt::BufferedFile &f) +{ + return f; +} +inline fmt::File &move(fmt::File &f) +{ + return f; +} +} +#endif + +#endif // FMT_POSIX_H_ diff --git a/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/time.h b/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/time.h new file mode 100644 index 00000000..10c6cfc9 --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/time.h @@ -0,0 +1,58 @@ +/* + Formatting library for C++ - time formatting + + Copyright (c) 2012 - 2016, Victor Zverovich + All rights reserved. + + For the license information refer to format.h. + */ + +#ifndef FMT_TIME_H_ +#define FMT_TIME_H_ + +#include "format.h" +#include + +namespace fmt +{ +template +void format(BasicFormatter &f, + const char *&format_str, const std::tm &tm) +{ + if (*format_str == ':') + ++format_str; + const char *end = format_str; + while (*end && *end != '}') + ++end; + if (*end != '}') + FMT_THROW(FormatError("missing '}' in format string")); + internal::MemoryBuffer format; + format.append(format_str, end + 1); + format[format.size() - 1] = '\0'; + Buffer &buffer = f.writer().buffer(); + std::size_t start = buffer.size(); + for (;;) + { + std::size_t size = buffer.capacity() - start; + std::size_t count = std::strftime(&buffer[start], size, &format[0], &tm); + if (count != 0) + { + buffer.resize(start + count); + break; + } + if (size >= format.size() * 256) + { + // If the buffer is 256 times larger than the format string, assume + // that `strftime` gives an empty result. There doesn't seem to be a + // better way to distinguish the two cases: + // https://github.com/fmtlib/fmt/issues/367 + break; + } + const std::size_t MIN_GROWTH = 10; + buffer.reserve(buffer.capacity() + (size > MIN_GROWTH ? size : MIN_GROWTH)); + } + format_str = end + 1; +} +} + +#endif // FMT_TIME_H_ diff --git a/thirdparty/spdlog-20170710/include/spdlog/fmt/fmt.h b/thirdparty/spdlog-20170710/include/spdlog/fmt/fmt.h new file mode 100644 index 00000000..a4ee4673 --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/fmt/fmt.h @@ -0,0 +1,28 @@ +// +// Copyright(c) 2016 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +// +// Include a bundled header-only copy of fmtlib or an external one. +// By default spdlog include its own copy. +// + +#if !defined(SPDLOG_FMT_EXTERNAL) + +#ifndef FMT_HEADER_ONLY +#define FMT_HEADER_ONLY +#endif +#ifndef FMT_USE_WINDOWS_H +#define FMT_USE_WINDOWS_H 0 +#endif +#include "spdlog/fmt/bundled/format.h" + +#else //external fmtlib + +#include + +#endif + diff --git a/thirdparty/spdlog-20170710/include/spdlog/fmt/ostr.h b/thirdparty/spdlog-20170710/include/spdlog/fmt/ostr.h new file mode 100644 index 00000000..49b5e98c --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/fmt/ostr.h @@ -0,0 +1,17 @@ +// +// Copyright(c) 2016 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +// include external or bundled copy of fmtlib's ostream support +// +#if !defined(SPDLOG_FMT_EXTERNAL) +#include "spdlog/fmt/fmt.h" +#include "spdlog/fmt/bundled/ostream.h" +#else +#include +#endif + + diff --git a/thirdparty/spdlog-20170710/include/spdlog/formatter.h b/thirdparty/spdlog-20170710/include/spdlog/formatter.h new file mode 100644 index 00000000..6bba9025 --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/formatter.h @@ -0,0 +1,47 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include "spdlog/details/log_msg.h" + +#include +#include +#include + +namespace spdlog +{ +namespace details +{ +class flag_formatter; +} + +class formatter +{ +public: + virtual ~formatter() {} + virtual void format(details::log_msg& msg) = 0; +}; + +class pattern_formatter SPDLOG_FINAL : public formatter +{ + +public: + explicit pattern_formatter(const std::string& pattern, pattern_time_type pattern_time = pattern_time_type::local); + pattern_formatter(const pattern_formatter&) = delete; + pattern_formatter& operator=(const pattern_formatter&) = delete; + void format(details::log_msg& msg) override; +private: + const std::string _pattern; + const pattern_time_type _pattern_time; + std::vector> _formatters; + std::tm get_time(details::log_msg& msg); + void handle_flag(char flag); + void compile_pattern(const std::string& pattern); +}; +} + +#include "spdlog/details/pattern_formatter_impl.h" + diff --git a/thirdparty/spdlog-20170710/include/spdlog/logger.h b/thirdparty/spdlog-20170710/include/spdlog/logger.h new file mode 100644 index 00000000..642208eb --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/logger.h @@ -0,0 +1,132 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +// Thread safe logger (except for set_pattern(..), set_formatter(..) and set_error_handler()) +// Has name, log level, vector of std::shared sink pointers and formatter +// Upon each log write the logger: +// 1. Checks if its log level is enough to log the message +// 2. Format the message using the formatter function +// 3. Pass the formatted message to its sinks to performa the actual logging + +#include "spdlog/sinks/base_sink.h" +#include "spdlog/common.h" + +#include +#include +#include + +namespace spdlog +{ + +class logger +{ +public: + logger(const std::string& logger_name, sink_ptr single_sink); + logger(const std::string& name, sinks_init_list); + template + logger(const std::string& name, const It& begin, const It& end); + + virtual ~logger(); + logger(const logger&) = delete; + logger& operator=(const logger&) = delete; + + + template void log(level::level_enum lvl, const char* fmt, const Args&... args); + template void log(level::level_enum lvl, const char* msg); + template void trace(const char* fmt, const Arg1&, const Args&... args); + template void debug(const char* fmt, const Arg1&, const Args&... args); + template void info(const char* fmt, const Arg1&, const Args&... args); + template void warn(const char* fmt, const Arg1&, const Args&... args); + template void error(const char* fmt, const Arg1&, const Args&... args); + template void critical(const char* fmt, const Arg1&, const Args&... args); + + template void log_if(const bool flag, level::level_enum lvl, const char* fmt, const Args&... args); + template void log_if(const bool flag, level::level_enum lvl, const char* msg); + template void trace_if(const bool flag, const char* fmt, const Arg1&, const Args&... args); + template void debug_if(const bool flag, const char* fmt, const Arg1&, const Args&... args); + template void info_if(const bool flag, const char* fmt, const Arg1&, const Args&... args); + template void warn_if(const bool flag, const char* fmt, const Arg1&, const Args&... args); + template void error_if(const bool flag, const char* fmt, const Arg1&, const Args&... args); + template void critical_if(const bool flag, const char* fmt, const Arg1&, const Args&... args); + +#ifdef SPDLOG_WCHAR_TO_UTF8_SUPPORT + template void log(level::level_enum lvl, const wchar_t* msg); + template void log(level::level_enum lvl, const wchar_t* fmt, const Args&... args); + template void trace(const wchar_t* fmt, const Args&... args); + template void debug(const wchar_t* fmt, const Args&... args); + template void info(const wchar_t* fmt, const Args&... args); + template void warn(const wchar_t* fmt, const Args&... args); + template void error(const wchar_t* fmt, const Args&... args); + template void critical(const wchar_t* fmt, const Args&... args); + + template void log_if(const bool flag, level::level_enum lvl, const wchar_t* msg); + template void log_if(const bool flag, level::level_enum lvl, const wchar_t* fmt, const Args&... args); + template void trace_if(const bool flag, const wchar_t* fmt, const Args&... args); + template void debug_if(const bool flag, const wchar_t* fmt, const Args&... args); + template void info_if(const bool flag, const wchar_t* fmt, const Args&... args); + template void warn_if(const bool flag, const wchar_t* fmt, const Args&... args); + template void error_if(const bool flag, const wchar_t* fmt, const Args&... args); + template void critical_if(const bool flag, const wchar_t* fmt, const Args&... args); +#endif // SPDLOG_WCHAR_TO_UTF8_SUPPORT + + template void log(level::level_enum lvl, const T&); + template void trace(const T&); + template void debug(const T&); + template void info(const T&); + template void warn(const T&); + template void error(const T&); + template void critical(const T&); + + template void log_if(const bool flag, level::level_enum lvl, const T&); + template void trace_if(const bool flag, const T&); + template void debug_if(const bool flag, const T&); + template void info_if(const bool flag, const T&); + template void warn_if(const bool flag, const T&); + template void error_if(const bool flag, const T&); + template void critical_if(const bool flag, const T&); + + bool should_log(level::level_enum) const; + void set_level(level::level_enum); + level::level_enum level() const; + const std::string& name() const; + void set_pattern(const std::string&, pattern_time_type = pattern_time_type::local); + void set_formatter(formatter_ptr); + + // automatically call flush() if message level >= log_level + void flush_on(level::level_enum log_level); + + virtual void flush(); + + const std::vector& sinks() const; + + // error handler + virtual void set_error_handler(log_err_handler); + virtual log_err_handler error_handler(); + +protected: + virtual void _sink_it(details::log_msg&); + virtual void _set_pattern(const std::string&, pattern_time_type); + virtual void _set_formatter(formatter_ptr); + + // default error handler: print the error to stderr with the max rate of 1 message/minute + virtual void _default_err_handler(const std::string &msg); + + // return true if the given message level should trigger a flush + bool _should_flush_on(const details::log_msg&); + + const std::string _name; + std::vector _sinks; + formatter_ptr _formatter; + spdlog::level_t _level; + spdlog::level_t _flush_level; + log_err_handler _err_handler; + std::atomic _last_err_time; + std::atomic _msg_counter; +}; +} + +#include "spdlog/details/logger_impl.h" diff --git a/thirdparty/spdlog-20170710/include/spdlog/sinks/android_sink.h b/thirdparty/spdlog-20170710/include/spdlog/sinks/android_sink.h new file mode 100644 index 00000000..239f2d28 --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/sinks/android_sink.h @@ -0,0 +1,90 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#if defined(__ANDROID__) + +#include "spdlog/sinks/sink.h" + +#include +#include +#include +#include +#include + +#if !defined(SPDLOG_ANDROID_RETRIES) +#define SPDLOG_ANDROID_RETRIES 2 +#endif + +namespace spdlog +{ +namespace sinks +{ + +/* +* Android sink (logging using __android_log_write) +* __android_log_write is thread-safe. No lock is needed. +*/ +class android_sink : public sink +{ +public: + explicit android_sink(const std::string& tag = "spdlog", bool use_raw_msg = false): _tag(tag), _use_raw_msg(use_raw_msg) {} + + void log(const details::log_msg& msg) override + { + const android_LogPriority priority = convert_to_android(msg.level); + const char *msg_output = (_use_raw_msg ? msg.raw.c_str() : msg.formatted.c_str()); + + // See system/core/liblog/logger_write.c for explanation of return value + int ret = __android_log_write(priority, _tag.c_str(), msg_output); + int retry_count = 0; + while ((ret == -11/*EAGAIN*/) && (retry_count < SPDLOG_ANDROID_RETRIES)) + { + std::this_thread::sleep_for(std::chrono::milliseconds(5)); + ret = __android_log_write(priority, _tag.c_str(), msg_output); + retry_count++; + } + + if (ret < 0) + { + throw spdlog_ex("__android_log_write() failed", ret); + } + } + + void flush() override + { + } + +private: + static android_LogPriority convert_to_android(spdlog::level::level_enum level) + { + switch(level) + { + case spdlog::level::trace: + return ANDROID_LOG_VERBOSE; + case spdlog::level::debug: + return ANDROID_LOG_DEBUG; + case spdlog::level::info: + return ANDROID_LOG_INFO; + case spdlog::level::warn: + return ANDROID_LOG_WARN; + case spdlog::level::err: + return ANDROID_LOG_ERROR; + case spdlog::level::critical: + return ANDROID_LOG_FATAL; + default: + return ANDROID_LOG_DEFAULT; + } + } + + std::string _tag; + bool _use_raw_msg; +}; + +} +} + +#endif diff --git a/thirdparty/spdlog-20170710/include/spdlog/sinks/ansicolor_sink.h b/thirdparty/spdlog-20170710/include/spdlog/sinks/ansicolor_sink.h new file mode 100644 index 00000000..56fd3fd5 --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/sinks/ansicolor_sink.h @@ -0,0 +1,133 @@ +// +// Copyright(c) 2017 spdlog authors. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include "spdlog/sinks/base_sink.h" +#include "spdlog/common.h" +#include "spdlog/details/os.h" + +#include +#include + +namespace spdlog +{ +namespace sinks +{ + +/** + * This sink prefixes the output with an ANSI escape sequence color code depending on the severity + * of the message. + * If no color terminal detected, omit the escape codes. + */ +template +class ansicolor_sink: public base_sink +{ +public: + ansicolor_sink(FILE* file): target_file_(file) + { + should_do_colors_ = details::os::in_terminal(file) && details::os::is_color_terminal(); + colors_[level::trace] = cyan; + colors_[level::debug] = cyan; + colors_[level::info] = reset; + colors_[level::warn] = yellow + bold; + colors_[level::err] = red + bold; + colors_[level::critical] = bold + on_red; + colors_[level::off] = reset; + } + virtual ~ansicolor_sink() + { + _flush(); + } + + void set_color(level::level_enum color_level, const std::string& color) + { + std::lock_guard lock(base_sink::_mutex); + colors_[color_level] = color; + } + + /// Formatting codes + const std::string reset = "\033[00m"; + const std::string bold = "\033[1m"; + const std::string dark = "\033[2m"; + const std::string underline = "\033[4m"; + const std::string blink = "\033[5m"; + const std::string reverse = "\033[7m"; + const std::string concealed = "\033[8m"; + + // Foreground colors + const std::string grey = "\033[30m"; + const std::string red = "\033[31m"; + const std::string green = "\033[32m"; + const std::string yellow = "\033[33m"; + const std::string blue = "\033[34m"; + const std::string magenta = "\033[35m"; + const std::string cyan = "\033[36m"; + const std::string white = "\033[37m"; + + /// Background colors + const std::string on_grey = "\033[40m"; + const std::string on_red = "\033[41m"; + const std::string on_green = "\033[42m"; + const std::string on_yellow = "\033[43m"; + const std::string on_blue = "\033[44m"; + const std::string on_magenta = "\033[45m"; + const std::string on_cyan = "\033[46m"; + const std::string on_white = "\033[47m"; + +protected: + virtual void _sink_it(const details::log_msg& msg) override + { + // Wrap the originally formatted message in color codes. + // If color is not supported in the terminal, log as is instead. + if (should_do_colors_) + { + const std::string& prefix = colors_[msg.level]; + fwrite(prefix.data(), sizeof(char), prefix.size(), target_file_); + fwrite(msg.formatted.data(), sizeof(char), msg.formatted.size(), target_file_); + fwrite(reset.data(), sizeof(char), reset.size(), target_file_); + } + else + { + fwrite(msg.formatted.data(), sizeof(char), msg.formatted.size(), target_file_); + } + _flush(); + } + + void _flush() override + { + fflush(target_file_); + } + FILE* target_file_; + bool should_do_colors_; + std::map colors_; +}; + + +template +class ansicolor_stdout_sink: public ansicolor_sink +{ +public: + ansicolor_stdout_sink(): ansicolor_sink(stdout) + {} +}; + +template +class ansicolor_stderr_sink: public ansicolor_sink +{ +public: + ansicolor_stderr_sink(): ansicolor_sink(stderr) + {} +}; + +typedef ansicolor_stdout_sink ansicolor_stdout_sink_mt; +typedef ansicolor_stdout_sink ansicolor_stdout_sink_st; + +typedef ansicolor_stderr_sink ansicolor_stderr_sink_mt; +typedef ansicolor_stderr_sink ansicolor_stderr_sink_st; + +} // namespace sinks +} // namespace spdlog + diff --git a/thirdparty/spdlog-20170710/include/spdlog/sinks/base_sink.h b/thirdparty/spdlog-20170710/include/spdlog/sinks/base_sink.h new file mode 100644 index 00000000..926f4931 --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/sinks/base_sink.h @@ -0,0 +1,50 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once +// +// base sink templated over a mutex (either dummy or real) +// concrete implementation should only override the _sink_it method. +// all locking is taken care of here so no locking needed by the implementers.. +// + +#include "spdlog/sinks/sink.h" +#include "spdlog/formatter.h" +#include "spdlog/common.h" +#include "spdlog/details/log_msg.h" + +#include + +namespace spdlog +{ +namespace sinks +{ +template +class base_sink:public sink +{ +public: + base_sink():_mutex() {} + virtual ~base_sink() = default; + + base_sink(const base_sink&) = delete; + base_sink& operator=(const base_sink&) = delete; + + void log(const details::log_msg& msg) SPDLOG_FINAL override + { + std::lock_guard lock(_mutex); + _sink_it(msg); + } + void flush() SPDLOG_FINAL override + { + _flush(); + } + +protected: + virtual void _sink_it(const details::log_msg& msg) = 0; + virtual void _flush() = 0; + Mutex _mutex; +}; +} +} diff --git a/thirdparty/spdlog-20170710/include/spdlog/sinks/dist_sink.h b/thirdparty/spdlog-20170710/include/spdlog/sinks/dist_sink.h new file mode 100644 index 00000000..4d4b6b61 --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/sinks/dist_sink.h @@ -0,0 +1,73 @@ +// +// Copyright (c) 2015 David Schury, Gabi Melman +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include "spdlog/details/log_msg.h" +#include "spdlog/details/null_mutex.h" +#include "spdlog/sinks/base_sink.h" +#include "spdlog/sinks/sink.h" + +#include +#include +#include +#include + +// Distribution sink (mux). Stores a vector of sinks which get called when log is called + +namespace spdlog +{ +namespace sinks +{ +template +class dist_sink: public base_sink +{ +public: + explicit dist_sink() :_sinks() {} + dist_sink(const dist_sink&) = delete; + dist_sink& operator=(const dist_sink&) = delete; + virtual ~dist_sink() = default; + +protected: + std::vector> _sinks; + + void _sink_it(const details::log_msg& msg) override + { + for (auto &sink : _sinks) + { + if( sink->should_log( msg.level)) + { + sink->log(msg); + } + } + } + + void _flush() override + { + std::lock_guard lock(base_sink::_mutex); + for (auto &sink : _sinks) + sink->flush(); + } + +public: + + + void add_sink(std::shared_ptr sink) + { + std::lock_guard lock(base_sink::_mutex); + _sinks.push_back(sink); + } + + void remove_sink(std::shared_ptr sink) + { + std::lock_guard lock(base_sink::_mutex); + _sinks.erase(std::remove(_sinks.begin(), _sinks.end(), sink), _sinks.end()); + } +}; + +typedef dist_sink dist_sink_mt; +typedef dist_sink dist_sink_st; +} +} diff --git a/thirdparty/spdlog-20170710/include/spdlog/sinks/file_sinks.h b/thirdparty/spdlog-20170710/include/spdlog/sinks/file_sinks.h new file mode 100644 index 00000000..421acc8a --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/sinks/file_sinks.h @@ -0,0 +1,242 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include "spdlog/sinks/base_sink.h" +#include "spdlog/details/null_mutex.h" +#include "spdlog/details/file_helper.h" +#include "spdlog/fmt/fmt.h" + +#include +#include +#include +#include +#include +#include +#include + +namespace spdlog +{ +namespace sinks +{ +/* + * Trivial file sink with single file as target + */ +template +class simple_file_sink SPDLOG_FINAL : public base_sink < Mutex > +{ +public: + explicit simple_file_sink(const filename_t &filename, bool truncate = false):_force_flush(false) + { + _file_helper.open(filename, truncate); + } + + void set_force_flush(bool force_flush) + { + _force_flush = force_flush; + } + +protected: + void _sink_it(const details::log_msg& msg) override + { + _file_helper.write(msg); + if(_force_flush) + _file_helper.flush(); + } + void _flush() override + { + _file_helper.flush(); + } +private: + details::file_helper _file_helper; + bool _force_flush; +}; + +typedef simple_file_sink simple_file_sink_mt; +typedef simple_file_sink simple_file_sink_st; + +/* + * Rotating file sink based on size + */ +template +class rotating_file_sink SPDLOG_FINAL : public base_sink < Mutex > +{ +public: + rotating_file_sink(const filename_t &base_filename, + std::size_t max_size, std::size_t max_files) : + _base_filename(base_filename), + _max_size(max_size), + _max_files(max_files), + _current_size(0), + _file_helper() + { + _file_helper.open(calc_filename(_base_filename, 0)); + _current_size = _file_helper.size(); //expensive. called only once + } + + +protected: + void _sink_it(const details::log_msg& msg) override + { + _current_size += msg.formatted.size(); + if (_current_size > _max_size) + { + _rotate(); + _current_size = msg.formatted.size(); + } + _file_helper.write(msg); + } + + void _flush() override + { + _file_helper.flush(); + } + +private: + static filename_t calc_filename(const filename_t& filename, std::size_t index) + { + std::conditional::value, fmt::MemoryWriter, fmt::WMemoryWriter>::type w; + if (index) + w.write(SPDLOG_FILENAME_T("{}.{}"), filename, index); + else + w.write(SPDLOG_FILENAME_T("{}"), filename); + return w.str(); + } + + // Rotate files: + // log.txt -> log.txt.1 + // log.txt.1 -> log.txt.2 + // log.txt.2 -> log.txt.3 + // lo3.txt.3 -> delete + + void _rotate() + { + using details::os::filename_to_str; + _file_helper.close(); + for (auto i = _max_files; i > 0; --i) + { + filename_t src = calc_filename(_base_filename, i - 1); + filename_t target = calc_filename(_base_filename, i); + + if (details::file_helper::file_exists(target)) + { + if (details::os::remove(target) != 0) + { + throw spdlog_ex("rotating_file_sink: failed removing " + filename_to_str(target), errno); + } + } + if (details::file_helper::file_exists(src) && details::os::rename(src, target)) + { + throw spdlog_ex("rotating_file_sink: failed renaming " + filename_to_str(src) + " to " + filename_to_str(target), errno); + } + } + _file_helper.reopen(true); + } + filename_t _base_filename; + std::size_t _max_size; + std::size_t _max_files; + std::size_t _current_size; + details::file_helper _file_helper; +}; + +typedef rotating_file_sink rotating_file_sink_mt; +typedef rotating_file_sinkrotating_file_sink_st; + +/* + * Default generator of daily log file names. + */ +struct default_daily_file_name_calculator +{ + // Create filename for the form basename.YYYY-MM-DD_hh-mm + static filename_t calc_filename(const filename_t& basename) + { + std::tm tm = spdlog::details::os::localtime(); + std::conditional::value, fmt::MemoryWriter, fmt::WMemoryWriter>::type w; + w.write(SPDLOG_FILENAME_T("{}_{:04d}-{:02d}-{:02d}_{:02d}-{:02d}"), basename, tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min); + return w.str(); + } +}; + +/* + * Generator of daily log file names in format basename.YYYY-MM-DD + */ +struct dateonly_daily_file_name_calculator +{ + // Create filename for the form basename.YYYY-MM-DD + static filename_t calc_filename(const filename_t& basename) + { + std::tm tm = spdlog::details::os::localtime(); + std::conditional::value, fmt::MemoryWriter, fmt::WMemoryWriter>::type w; + w.write(SPDLOG_FILENAME_T("{}_{:04d}-{:02d}-{:02d}"), basename, tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday); + return w.str(); + } +}; + +/* + * Rotating file sink based on date. rotates at midnight + */ +template +class daily_file_sink SPDLOG_FINAL :public base_sink < Mutex > +{ +public: + //create daily file sink which rotates on given time + daily_file_sink( + const filename_t& base_filename, + int rotation_hour, + int rotation_minute) : _base_filename(base_filename), + _rotation_h(rotation_hour), + _rotation_m(rotation_minute) + { + if (rotation_hour < 0 || rotation_hour > 23 || rotation_minute < 0 || rotation_minute > 59) + throw spdlog_ex("daily_file_sink: Invalid rotation time in ctor"); + _rotation_tp = _next_rotation_tp(); + _file_helper.open(FileNameCalc::calc_filename(_base_filename)); + } + + +protected: + void _sink_it(const details::log_msg& msg) override + { + if (std::chrono::system_clock::now() >= _rotation_tp) + { + _file_helper.open(FileNameCalc::calc_filename(_base_filename)); + _rotation_tp = _next_rotation_tp(); + } + _file_helper.write(msg); + } + + void _flush() override + { + _file_helper.flush(); + } + +private: + std::chrono::system_clock::time_point _next_rotation_tp() + { + auto now = std::chrono::system_clock::now(); + time_t tnow = std::chrono::system_clock::to_time_t(now); + tm date = spdlog::details::os::localtime(tnow); + date.tm_hour = _rotation_h; + date.tm_min = _rotation_m; + date.tm_sec = 0; + auto rotation_time = std::chrono::system_clock::from_time_t(std::mktime(&date)); + if (rotation_time > now) + return rotation_time; + else + return std::chrono::system_clock::time_point(rotation_time + std::chrono::hours(24)); + } + + filename_t _base_filename; + int _rotation_h; + int _rotation_m; + std::chrono::system_clock::time_point _rotation_tp; + details::file_helper _file_helper; +}; + +typedef daily_file_sink daily_file_sink_mt; +typedef daily_file_sink daily_file_sink_st; +} +} diff --git a/thirdparty/spdlog-20170710/include/spdlog/sinks/msvc_sink.h b/thirdparty/spdlog-20170710/include/spdlog/sinks/msvc_sink.h new file mode 100644 index 00000000..68b02556 --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/sinks/msvc_sink.h @@ -0,0 +1,51 @@ +// +// Copyright(c) 2016 Alexander Dalshov. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#if defined(_MSC_VER) + +#include "spdlog/sinks/base_sink.h" +#include "spdlog/details/null_mutex.h" + +#include + +#include +#include + +namespace spdlog +{ +namespace sinks +{ +/* +* MSVC sink (logging using OutputDebugStringA) +*/ +template +class msvc_sink : public base_sink < Mutex > +{ +public: + explicit msvc_sink() + { + } + + + +protected: + void _sink_it(const details::log_msg& msg) override + { + OutputDebugStringA(msg.formatted.c_str()); + } + + void _flush() override + {} +}; + +typedef msvc_sink msvc_sink_mt; +typedef msvc_sink msvc_sink_st; + +} +} + +#endif diff --git a/thirdparty/spdlog-20170710/include/spdlog/sinks/null_sink.h b/thirdparty/spdlog-20170710/include/spdlog/sinks/null_sink.h new file mode 100644 index 00000000..ed4b5e47 --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/sinks/null_sink.h @@ -0,0 +1,34 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include "spdlog/sinks/base_sink.h" +#include "spdlog/details/null_mutex.h" + +#include + +namespace spdlog +{ +namespace sinks +{ + +template +class null_sink : public base_sink < Mutex > +{ +protected: + void _sink_it(const details::log_msg&) override + {} + + void _flush() override + {} + +}; +typedef null_sink null_sink_st; +typedef null_sink null_sink_mt; + +} +} + diff --git a/thirdparty/spdlog-20170710/include/spdlog/sinks/ostream_sink.h b/thirdparty/spdlog-20170710/include/spdlog/sinks/ostream_sink.h new file mode 100644 index 00000000..f056107f --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/sinks/ostream_sink.h @@ -0,0 +1,47 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include "spdlog/details/null_mutex.h" +#include "spdlog/sinks/base_sink.h" + +#include +#include + +namespace spdlog +{ +namespace sinks +{ +template +class ostream_sink: public base_sink +{ +public: + explicit ostream_sink(std::ostream& os, bool force_flush=false) :_ostream(os), _force_flush(force_flush) {} + ostream_sink(const ostream_sink&) = delete; + ostream_sink& operator=(const ostream_sink&) = delete; + virtual ~ostream_sink() = default; + +protected: + void _sink_it(const details::log_msg& msg) override + { + _ostream.write(msg.formatted.data(), msg.formatted.size()); + if (_force_flush) + _ostream.flush(); + } + + void _flush() override + { + _ostream.flush(); + } + + std::ostream& _ostream; + bool _force_flush; +}; + +typedef ostream_sink ostream_sink_mt; +typedef ostream_sink ostream_sink_st; +} +} diff --git a/thirdparty/spdlog-20170710/include/spdlog/sinks/sink.h b/thirdparty/spdlog-20170710/include/spdlog/sinks/sink.h new file mode 100644 index 00000000..0974f337 --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/sinks/sink.h @@ -0,0 +1,53 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + + +#pragma once + +#include "spdlog/details/log_msg.h" + +namespace spdlog +{ +namespace sinks +{ +class sink +{ +public: + sink() + { + _level = level::trace; + } + + virtual ~sink() {} + virtual void log(const details::log_msg& msg) = 0; + virtual void flush() = 0; + + bool should_log(level::level_enum msg_level) const; + void set_level(level::level_enum log_level); + level::level_enum level() const; + +private: + level_t _level; + +}; + +inline bool sink::should_log(level::level_enum msg_level) const +{ + return msg_level >= _level.load(std::memory_order_relaxed); +} + +inline void sink::set_level(level::level_enum log_level) +{ + _level.store(log_level); +} + +inline level::level_enum sink::level() const +{ + return static_cast(_level.load(std::memory_order_relaxed)); +} + +} +} + diff --git a/thirdparty/spdlog-20170710/include/spdlog/sinks/stdout_sinks.h b/thirdparty/spdlog-20170710/include/spdlog/sinks/stdout_sinks.h new file mode 100644 index 00000000..dcdcc7c1 --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/sinks/stdout_sinks.h @@ -0,0 +1,77 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include "spdlog/details/null_mutex.h" +#include "spdlog/sinks/base_sink.h" + +#include +#include +#include + +namespace spdlog +{ +namespace sinks +{ + +template +class stdout_sink SPDLOG_FINAL : public base_sink +{ + using MyType = stdout_sink; +public: + stdout_sink() + {} + static std::shared_ptr instance() + { + static std::shared_ptr instance = std::make_shared(); + return instance; + } +protected: + void _sink_it(const details::log_msg& msg) override + { + fwrite(msg.formatted.data(), sizeof(char), msg.formatted.size(), stdout); + _flush(); + } + + void _flush() override + { + fflush(stdout); + } +}; + +typedef stdout_sink stdout_sink_st; +typedef stdout_sink stdout_sink_mt; + + +template +class stderr_sink SPDLOG_FINAL : public base_sink +{ + using MyType = stderr_sink; +public: + stderr_sink() + {} + static std::shared_ptr instance() + { + static std::shared_ptr instance = std::make_shared(); + return instance; + } +protected: + void _sink_it(const details::log_msg& msg) override + { + fwrite(msg.formatted.data(), sizeof(char), msg.formatted.size(), stderr); + _flush(); + } + + void _flush() override + { + fflush(stderr); + } +}; + +typedef stderr_sink stderr_sink_mt; +typedef stderr_sink stderr_sink_st; +} +} diff --git a/thirdparty/spdlog-20170710/include/spdlog/sinks/syslog_sink.h b/thirdparty/spdlog-20170710/include/spdlog/sinks/syslog_sink.h new file mode 100644 index 00000000..0b509c4a --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/sinks/syslog_sink.h @@ -0,0 +1,81 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include "spdlog/common.h" + +#ifdef SPDLOG_ENABLE_SYSLOG + +#include "spdlog/sinks/sink.h" +#include "spdlog/details/log_msg.h" + +#include +#include +#include + + +namespace spdlog +{ +namespace sinks +{ +/** + * Sink that write to syslog using the `syscall()` library call. + * + * Locking is not needed, as `syslog()` itself is thread-safe. + */ +class syslog_sink : public sink +{ +public: + // + syslog_sink(const std::string& ident = "", int syslog_option=0, int syslog_facility=LOG_USER): + _ident(ident) + { + _priorities[static_cast(level::trace)] = LOG_DEBUG; + _priorities[static_cast(level::debug)] = LOG_DEBUG; + _priorities[static_cast(level::info)] = LOG_INFO; + _priorities[static_cast(level::warn)] = LOG_WARNING; + _priorities[static_cast(level::err)] = LOG_ERR; + _priorities[static_cast(level::critical)] = LOG_CRIT; + _priorities[static_cast(level::off)] = LOG_INFO; + + //set ident to be program name if empty + ::openlog(_ident.empty()? nullptr:_ident.c_str(), syslog_option, syslog_facility); + } + ~syslog_sink() + { + ::closelog(); + } + + syslog_sink(const syslog_sink&) = delete; + syslog_sink& operator=(const syslog_sink&) = delete; + + void log(const details::log_msg &msg) override + { + ::syslog(syslog_prio_from_level(msg), "%s", msg.raw.str().c_str()); + } + + void flush() override + { + } + + +private: + std::array _priorities; + //must store the ident because the man says openlog might use the pointer as is and not a string copy + const std::string _ident; + + // + // Simply maps spdlog's log level to syslog priority level. + // + int syslog_prio_from_level(const details::log_msg &msg) const + { + return _priorities[static_cast(msg.level)]; + } +}; +} +} + +#endif diff --git a/thirdparty/spdlog-20170710/include/spdlog/sinks/wincolor_sink.h b/thirdparty/spdlog-20170710/include/spdlog/sinks/wincolor_sink.h new file mode 100644 index 00000000..66111249 --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/sinks/wincolor_sink.h @@ -0,0 +1,117 @@ +// +// Copyright(c) 2016 spdlog +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include "spdlog/sinks/base_sink.h" +#include "spdlog/details/null_mutex.h" +#include "spdlog/common.h" + +#include +#include +#include +#include + +namespace spdlog +{ +namespace sinks +{ +/* + * Windows color console sink. Uses WriteConsoleA to write to the console with colors + */ +template +class wincolor_sink: public base_sink +{ +public: + const WORD BOLD = FOREGROUND_INTENSITY; + const WORD RED = FOREGROUND_RED; + const WORD CYAN = FOREGROUND_GREEN | FOREGROUND_BLUE; + const WORD WHITE = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE; + const WORD YELLOW = FOREGROUND_RED | FOREGROUND_GREEN; + + wincolor_sink(HANDLE std_handle): out_handle_(std_handle) + { + colors_[level::trace] = CYAN; + colors_[level::debug] = CYAN; + colors_[level::info] = WHITE | BOLD; + colors_[level::warn] = YELLOW | BOLD; + colors_[level::err] = RED | BOLD; // red bold + colors_[level::critical] = BACKGROUND_RED | WHITE | BOLD; // white bold on red background + colors_[level::off] = 0; + } + + virtual ~wincolor_sink() + { + this->flush(); + } + + wincolor_sink(const wincolor_sink& other) = delete; + wincolor_sink& operator=(const wincolor_sink& other) = delete; + +protected: + virtual void _sink_it(const details::log_msg& msg) override + { + auto color = colors_[msg.level]; + auto orig_attribs = set_console_attribs(color); + WriteConsoleA(out_handle_, msg.formatted.data(), static_cast(msg.formatted.size()), nullptr, nullptr); + SetConsoleTextAttribute(out_handle_, orig_attribs); //reset to orig colors + } + + virtual void _flush() override + { + // windows console always flushed? + } + + // change the color for the given level + void set_color(level::level_enum level, WORD color) + { + std::lock_guard lock(base_sink::_mutex); + colors_[level] = color; + } + +private: + HANDLE out_handle_; + std::map colors_; + + // set color and return the orig console attributes (for resetting later) + WORD set_console_attribs(WORD attribs) + { + CONSOLE_SCREEN_BUFFER_INFO orig_buffer_info; + GetConsoleScreenBufferInfo(out_handle_, &orig_buffer_info); + SetConsoleTextAttribute(out_handle_, attribs); + return orig_buffer_info.wAttributes; //return orig attribs + } +}; + +// +// windows color console to stdout +// +template +class wincolor_stdout_sink: public wincolor_sink +{ +public: + wincolor_stdout_sink() : wincolor_sink(GetStdHandle(STD_OUTPUT_HANDLE)) + {} +}; + +typedef wincolor_stdout_sink wincolor_stdout_sink_mt; +typedef wincolor_stdout_sink wincolor_stdout_sink_st; + +// +// windows color console to stderr +// +template +class wincolor_stderr_sink: public wincolor_sink +{ +public: + wincolor_stderr_sink() : wincolor_sink(GetStdHandle(STD_ERROR_HANDLE)) + {} +}; + +typedef wincolor_stderr_sink wincolor_stderr_sink_mt; +typedef wincolor_stderr_sink wincolor_stderr_sink_st; + +} +} diff --git a/thirdparty/spdlog-20170710/include/spdlog/spdlog.h b/thirdparty/spdlog-20170710/include/spdlog/spdlog.h new file mode 100644 index 00000000..fb4ea59e --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/spdlog.h @@ -0,0 +1,187 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// +// spdlog main header file. +// see example.cpp for usage example + +#pragma once + +#define SPDLOG_VERSION "0.13.0" + +#include "spdlog/tweakme.h" +#include "spdlog/common.h" +#include "spdlog/logger.h" + +#include +#include +#include +#include + +namespace spdlog +{ + +// +// Return an existing logger or nullptr if a logger with such name doesn't exist. +// example: spdlog::get("my_logger")->info("hello {}", "world"); +// +std::shared_ptr get(const std::string& name); + + +// +// Set global formatting +// example: spdlog::set_pattern("%Y-%m-%d %H:%M:%S.%e %l : %v"); +// +void set_pattern(const std::string& format_string); +void set_formatter(formatter_ptr f); + +// +// Set global logging level for +// +void set_level(level::level_enum log_level); + +// +// Set global error handler +// +void set_error_handler(log_err_handler); + +// +// Turn on async mode (off by default) and set the queue size for each async_logger. +// effective only for loggers created after this call. +// queue_size: size of queue (must be power of 2): +// Each logger will pre-allocate a dedicated queue with queue_size entries upon construction. +// +// async_overflow_policy (optional, block_retry by default): +// async_overflow_policy::block_retry - if queue is full, block until queue has room for the new log entry. +// async_overflow_policy::discard_log_msg - never block and discard any new messages when queue overflows. +// +// worker_warmup_cb (optional): +// callback function that will be called in worker thread upon start (can be used to init stuff like thread affinity) +// +// worker_teardown_cb (optional): +// callback function that will be called in worker thread upon exit +// +void set_async_mode(size_t queue_size, const async_overflow_policy overflow_policy = async_overflow_policy::block_retry, const std::function& worker_warmup_cb = nullptr, const std::chrono::milliseconds& flush_interval_ms = std::chrono::milliseconds::zero(), const std::function& worker_teardown_cb = nullptr); + +// Turn off async mode +void set_sync_mode(); + + +// +// Create and register multi/single threaded basic file logger. +// Basic logger simply writes to given file without any limitatons or rotations. +// +std::shared_ptr basic_logger_mt(const std::string& logger_name, const filename_t& filename, bool truncate = false); +std::shared_ptr basic_logger_st(const std::string& logger_name, const filename_t& filename, bool truncate = false); + +// +// Create and register multi/single threaded rotating file logger +// +std::shared_ptr rotating_logger_mt(const std::string& logger_name, const filename_t& filename, size_t max_file_size, size_t max_files); +std::shared_ptr rotating_logger_st(const std::string& logger_name, const filename_t& filename, size_t max_file_size, size_t max_files); + +// +// Create file logger which creates new file on the given time (default in midnight): +// +std::shared_ptr daily_logger_mt(const std::string& logger_name, const filename_t& filename, int hour=0, int minute=0); +std::shared_ptr daily_logger_st(const std::string& logger_name, const filename_t& filename, int hour=0, int minute=0); + +// +// Create and register stdout/stderr loggers +// +std::shared_ptr stdout_logger_mt(const std::string& logger_name); +std::shared_ptr stdout_logger_st(const std::string& logger_name); +std::shared_ptr stderr_logger_mt(const std::string& logger_name); +std::shared_ptr stderr_logger_st(const std::string& logger_name); +// +// Create and register colored stdout/stderr loggers +// +std::shared_ptr stdout_color_mt(const std::string& logger_name); +std::shared_ptr stdout_color_st(const std::string& logger_name); +std::shared_ptr stderr_color_mt(const std::string& logger_name); +std::shared_ptr stderr_color_st(const std::string& logger_name); + + +// +// Create and register a syslog logger +// +#ifdef SPDLOG_ENABLE_SYSLOG +std::shared_ptr syslog_logger(const std::string& logger_name, const std::string& ident = "", int syslog_option = 0); +#endif + +#if defined(__ANDROID__) +std::shared_ptr android_logger(const std::string& logger_name, const std::string& tag = "spdlog"); +#endif + +// Create and register a logger with a single sink +std::shared_ptr create(const std::string& logger_name, const sink_ptr& sink); + +// Create and register a logger with multiple sinks +std::shared_ptr create(const std::string& logger_name, sinks_init_list sinks); +template +std::shared_ptr create(const std::string& logger_name, const It& sinks_begin, const It& sinks_end); + + +// Create and register a logger with templated sink type +// Example: +// spdlog::create("mylog", "dailylog_filename"); +template +std::shared_ptr create(const std::string& logger_name, Args...); + +// Create and register an async logger with a single sink +std::shared_ptr create_async(const std::string& logger_name, const sink_ptr& sink, size_t queue_size, const async_overflow_policy overflow_policy = async_overflow_policy::block_retry, const std::function& worker_warmup_cb = nullptr, const std::chrono::milliseconds& flush_interval_ms = std::chrono::milliseconds::zero(), const std::function& worker_teardown_cb = nullptr); + +// Create and register an async logger with multiple sinks +std::shared_ptr create_async(const std::string& logger_name, sinks_init_list sinks, size_t queue_size, const async_overflow_policy overflow_policy = async_overflow_policy::block_retry, const std::function& worker_warmup_cb = nullptr, const std::chrono::milliseconds& flush_interval_ms = std::chrono::milliseconds::zero(), const std::function& worker_teardown_cb = nullptr); +template +std::shared_ptr create_async(const std::string& logger_name, const It& sinks_begin, const It& sinks_end, size_t queue_size, const async_overflow_policy overflow_policy = async_overflow_policy::block_retry, const std::function& worker_warmup_cb = nullptr, const std::chrono::milliseconds& flush_interval_ms = std::chrono::milliseconds::zero(), const std::function& worker_teardown_cb = nullptr); + +// Register the given logger with the given name +void register_logger(std::shared_ptr logger); + +// Apply a user defined function on all registered loggers +// Example: +// spdlog::apply_all([&](std::shared_ptr l) {l->flush();}); +void apply_all(std::function)> fun); + +// Drop the reference to the given logger +void drop(const std::string &name); + +// Drop all references from the registry +void drop_all(); + + +/////////////////////////////////////////////////////////////////////////////// +// +// Trace & Debug can be switched on/off at compile time for zero cost debug statements. +// Uncomment SPDLOG_DEBUG_ON/SPDLOG_TRACE_ON in teakme.h to enable. +// SPDLOG_TRACE(..) will also print current file and line. +// +// Example: +// spdlog::set_level(spdlog::level::trace); +// SPDLOG_TRACE(my_logger, "some trace message"); +// SPDLOG_TRACE(my_logger, "another trace message {} {}", 1, 2); +// SPDLOG_DEBUG(my_logger, "some debug message {} {}", 3, 4); +// SPDLOG_DEBUG_IF(my_logger, true, "some debug message {} {}", 3, 4); +/////////////////////////////////////////////////////////////////////////////// + +#ifdef SPDLOG_TRACE_ON +#define SPDLOG_STR_H(x) #x +#define SPDLOG_STR_HELPER(x) SPDLOG_STR_H(x) +#define SPDLOG_TRACE(logger, ...) logger->trace("[" __FILE__ " line #" SPDLOG_STR_HELPER(__LINE__) "] " __VA_ARGS__) +#define SPDLOG_TRACE_IF(logger, flag, ...) logger->trace_if(flag, "[" __FILE__ " line #" SPDLOG_STR_HELPER(__LINE__) "] " __VA_ARGS__) +#else +#define SPDLOG_TRACE(logger, ...) +#endif + +#ifdef SPDLOG_DEBUG_ON +#define SPDLOG_DEBUG(logger, ...) logger->debug(__VA_ARGS__) +#define SPDLOG_DEBUG_IF(logger, flag, ...) logger->debug_if(flag, __VA_ARGS__) +#else +#define SPDLOG_DEBUG(logger, ...) +#endif + +} + + +#include "spdlog/details/spdlog_impl.h" diff --git a/thirdparty/spdlog-20170710/include/spdlog/tweakme.h b/thirdparty/spdlog-20170710/include/spdlog/tweakme.h new file mode 100644 index 00000000..d1b63c06 --- /dev/null +++ b/thirdparty/spdlog-20170710/include/spdlog/tweakme.h @@ -0,0 +1,134 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +/////////////////////////////////////////////////////////////////////////////// +// +// Edit this file to squeeze more performance, and to customize supported features +// +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Under Linux, the much faster CLOCK_REALTIME_COARSE clock can be used. +// This clock is less accurate - can be off by dozens of millis - depending on the kernel HZ. +// Uncomment to use it instead of the regular clock. +// +// #define SPDLOG_CLOCK_COARSE +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment if date/time logging is not needed and never appear in the log pattern. +// This will prevent spdlog from quering the clock on each log call. +// +// WARNING: If the log pattern contains any date/time while this flag is on, the result is undefined. +// You must set new pattern(spdlog::set_pattern(..") without any date/time in it +// +// #define SPDLOG_NO_DATETIME +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment if thread id logging is not needed (i.e. no %t in the log pattern). +// This will prevent spdlog from quering the thread id on each log call. +// +// WARNING: If the log pattern contains thread id (i.e, %t) while this flag is on, the result is undefined. +// +// #define SPDLOG_NO_THREAD_ID +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment if logger name logging is not needed. +// This will prevent spdlog from copying the logger name on each log call. +// +// #define SPDLOG_NO_NAME +/////////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment to enable the SPDLOG_DEBUG/SPDLOG_TRACE macros. +// +// #define SPDLOG_DEBUG_ON +// #define SPDLOG_TRACE_ON +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment to avoid locking in the registry operations (spdlog::get(), spdlog::drop() spdlog::register()). +// Use only if your code never modifes concurrently the registry. +// Note that upon creating a logger the registry is modified by spdlog.. +// +// #define SPDLOG_NO_REGISTRY_MUTEX +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment to avoid spdlog's usage of atomic log levels +// Use only if your code never modifies a logger's log levels concurrently by different threads. +// +// #define SPDLOG_NO_ATOMIC_LEVELS +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment to enable usage of wchar_t for file names on Windows. +// +// #define SPDLOG_WCHAR_FILENAMES +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment to override default eol ("\n" or "\r\n" under Linux/Windows) +// +// #define SPDLOG_EOL ";-)\n" +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment to use your own copy of the fmt library instead of spdlog's copy. +// In this case spdlog will try to include so set your -I flag accordingly. +// +// #define SPDLOG_FMT_EXTERNAL +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment to enable syslog (disabled by default) +// +// #define SPDLOG_ENABLE_SYSLOG +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment to enable wchar_t support (convert to utf8) +// +// #define SPDLOG_WCHAR_TO_UTF8_SUPPORT +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment to prevent child processes from inheriting log file descriptors +// +// #define SPDLOG_PREVENT_CHILD_FD +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment to mark some types as final, allowing more optimizations in release +// mode with recent compilers. See GCC's documentation for -Wsuggest-final-types +// for instance. +// +// #define SPDLOG_FINAL final +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment to enable message counting feature. Adds %i logger pattern that +// prints log message sequence id. +// +// #define SPDLOG_ENABLE_MESSAGE_COUNTER +/////////////////////////////////////////////////////////////////////////////// diff --git a/thrift/2.x/client.thrift b/thrift/2.x/client.thrift new file mode 100644 index 00000000..6db44889 --- /dev/null +++ b/thrift/2.x/client.thrift @@ -0,0 +1,372 @@ +/* +* 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. +*/ +namespace java org.apache.accumulo.core.clientImpl.thrift +namespace cpp org.apache.accumulov2.core.clientImpl.thrift + +include "security.thrift" +include "trace.thrift" + +enum TableOperation { + CREATE + DELETE + RENAME + SET_PROPERTY + REMOVE_PROPERTY + OFFLINE + ONLINE + FLUSH + PERMISSION + CLONE + MERGE + DELETE_RANGE + BULK_IMPORT + COMPACT + IMPORT + EXPORT + COMPACT_CANCEL +} + +enum TableOperationExceptionType { + EXISTS + NOTFOUND + OFFLINE + BULK_BAD_INPUT_DIRECTORY + BULK_BAD_ERROR_DIRECTORY + BAD_RANGE + OTHER + NAMESPACE_EXISTS + NAMESPACE_NOTFOUND + INVALID_NAME + BULK_BAD_LOAD_MAPPING + BULK_CONCURRENT_MERGE +} + +enum ConfigurationType { + CURRENT + SITE + DEFAULT +} + +enum SecurityErrorCode { + DEFAULT_SECURITY_ERROR = 0 + BAD_CREDENTIALS = 1 + PERMISSION_DENIED = 2 + USER_DOESNT_EXIST = 3 + CONNECTION_ERROR = 4 + USER_EXISTS = 5 + GRANT_INVALID = 6 + BAD_AUTHORIZATIONS = 7 + INVALID_INSTANCEID = 8 + TABLE_DOESNT_EXIST = 9 + UNSUPPORTED_OPERATION = 10 + INVALID_TOKEN = 11 + AUTHENTICATOR_FAILED = 12 + AUTHORIZOR_FAILED = 13 + PERMISSIONHANDLER_FAILED = 14 + TOKEN_EXPIRED = 15 + SERIALIZATION_ERROR = 16 + INSUFFICIENT_PROPERTIES = 17 + NAMESPACE_DOESNT_EXIST = 18 +} + +exception ThriftSecurityException { + 1:string user + 2:SecurityErrorCode code +} + +exception ThriftTableOperationException { + 1:string tableId + 2:string tableName + 3:TableOperation op + 4:TableOperationExceptionType type + 5:string description +} + +exception ThriftNotActiveServiceException {} + +struct TDiskUsage { + 1:list tables + 2:i64 usage +} + +service ClientService { + + // system management methods + string getRootTabletLocation() + string getInstanceId() + string getZooKeepers() + + // deprecated for new bulkImport + list bulkImportFiles( + 1:trace.TInfo tinfo + 8:security.TCredentials credentials + 3:i64 tid + 4:string tableId + 5:list files + 6:string errorDir + 7:bool setTime + ) throws ( + 1:ThriftSecurityException sec + 2:ThriftTableOperationException tope + ) + + // ensures that nobody is working on the transaction id above + bool isActive( + 1:trace.TInfo tinfo + 2:i64 tid + ) + + void ping( + 2:security.TCredentials credentials + ) throws ( + 1:ThriftSecurityException sec + ) + + list getDiskUsage( + 2:set tables + 1:security.TCredentials credentials + ) throws ( + 1:ThriftSecurityException sec + 2:ThriftTableOperationException toe + ) + + // user management methods + set listLocalUsers( + 2:trace.TInfo tinfo + 3:security.TCredentials credentials + ) throws ( + 1:ThriftSecurityException sec + ) + + void createLocalUser( + 5:trace.TInfo tinfo + 6:security.TCredentials credentials + 2:string principal + 3:binary password + ) throws ( + 1:ThriftSecurityException sec + ) + + void dropLocalUser( + 3:trace.TInfo tinfo + 4:security.TCredentials credentials + 2:string principal + ) throws ( + 1:ThriftSecurityException sec + ) + + void changeLocalUserPassword( + 4:trace.TInfo tinfo + 5:security.TCredentials credentials + 2:string principal + 3:binary password + ) throws ( + 1:ThriftSecurityException sec + ) + + // authentication-related methods + bool authenticate( + 1:trace.TInfo tinfo + 2:security.TCredentials credentials + ) throws ( + 1:ThriftSecurityException sec + ) + + bool authenticateUser( + 1:trace.TInfo tinfo + 2:security.TCredentials credentials + 3:security.TCredentials toAuth + ) throws ( + 1:ThriftSecurityException sec + ) + + // authorization-related methods + void changeAuthorizations( + 4:trace.TInfo tinfo + 5:security.TCredentials credentials + 2:string principal + 3:list authorizations + ) throws ( + 1:ThriftSecurityException sec + ) + + list getUserAuthorizations( + 3:trace.TInfo tinfo + 4:security.TCredentials credentials + 2:string principal + ) throws ( + 1:ThriftSecurityException sec + ) + + // permissions-related methods + bool hasSystemPermission( + 4:trace.TInfo tinfo + 5:security.TCredentials credentials + 2:string principal + 3:i8 sysPerm + ) throws ( + 1:ThriftSecurityException sec + ) + + bool hasTablePermission( + 5:trace.TInfo tinfo + 6:security.TCredentials credentials + 2:string principal + 3:string tableName + 4:i8 tblPerm + ) throws ( + 1:ThriftSecurityException sec + 2:ThriftTableOperationException tope + ) + + bool hasNamespacePermission( + 1:trace.TInfo tinfo + 2:security.TCredentials credentials + 3:string principal + 4:string ns + 5:i8 tblNspcPerm + ) throws ( + 1:ThriftSecurityException sec + 2:ThriftTableOperationException tope + ) + + void grantSystemPermission( + 4:trace.TInfo tinfo + 5:security.TCredentials credentials + 2:string principal + 3:i8 permission + ) throws ( + 1:ThriftSecurityException sec + ) + + void revokeSystemPermission( + 4:trace.TInfo tinfo + 5:security.TCredentials credentials + 2:string principal + 3:i8 permission + ) throws ( + 1:ThriftSecurityException sec + ) + + void grantTablePermission( + 5:trace.TInfo tinfo + 6:security.TCredentials credentials + 2:string principal + 3:string tableName + 4:i8 permission + ) throws ( + 1:ThriftSecurityException sec + 2:ThriftTableOperationException tope + ) + + void revokeTablePermission( + 5:trace.TInfo tinfo + 6:security.TCredentials credentials + 2:string principal + 3:string tableName + 4:i8 permission + ) throws ( + 1:ThriftSecurityException sec + 2:ThriftTableOperationException tope + ) + + void grantNamespacePermission( + 1:trace.TInfo tinfo + 2:security.TCredentials credentials + 3:string principal + 4:string ns + 5:i8 permission + ) throws ( + 1:ThriftSecurityException sec + 2:ThriftTableOperationException tope + ) + + void revokeNamespacePermission( + 1:trace.TInfo tinfo + 2:security.TCredentials credentials + 3:string principal + 4:string ns + 5:i8 permission + ) throws ( + 1:ThriftSecurityException sec + 2:ThriftTableOperationException tope + ) + + // configuration methods + map getConfiguration( + 2:trace.TInfo tinfo + 3:security.TCredentials credentials + 1:ConfigurationType type + ) + + map getTableConfiguration( + 1:trace.TInfo tinfo + 3:security.TCredentials credentials + 2:string tableName + ) throws ( + 1:ThriftTableOperationException tope + ) + + map getNamespaceConfiguration( + 1:trace.TInfo tinfo + 2:security.TCredentials credentials + 3:string ns + ) throws ( + 1:ThriftTableOperationException tope + ) + + bool checkClass( + 1:trace.TInfo tinfo + 4:security.TCredentials credentials + 2:string className + 3:string interfaceMatch + ) + + bool checkTableClass( + 1:trace.TInfo tinfo + 5:security.TCredentials credentials + 2:string tableId + 3:string className + 4:string interfaceMatch + ) throws ( + 1:ThriftSecurityException sec + 2:ThriftTableOperationException tope + ) + + bool checkNamespaceClass( + 1:trace.TInfo tinfo + 2:security.TCredentials credentials + 3:string namespaceId + 4:string className + 5:string interfaceMatch + ) throws ( + 1:ThriftSecurityException sec + 2:ThriftTableOperationException tope + ) + +} + +// Only used for a unit test +service ThriftTest { + + bool success() + bool fails() + bool throwsError() throws ( + 1:ThriftSecurityException ex + ) + +} diff --git a/thrift/2.x/data.thrift b/thrift/2.x/data.thrift new file mode 100644 index 00000000..4a5ad256 --- /dev/null +++ b/thrift/2.x/data.thrift @@ -0,0 +1,190 @@ +/* +* 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. +*/ +namespace java org.apache.accumulo.core.dataImpl.thrift +namespace cpp org.apache.accumulov2.core.dataImpl.thrift + +include "security.thrift" +include "client.thrift" + +typedef i64 ScanID +typedef i64 UpdateID + +struct TKey { + 1:binary row + 2:binary colFamily + 3:binary colQualifier + 4:binary colVisibility + 5:i64 timestamp +} + +struct TColumn { + 1:binary columnFamily + 2:binary columnQualifier + 3:binary columnVisibility +} + +struct TMutation { + 1:binary row + 2:binary data + 3:list values + 4:i32 entries + 5:optional list sources +} + +struct TKeyExtent { + 1:binary table + 2:binary endRow + 3:binary prevEndRow +} + +struct TKeyValue { + 1:TKey key + 2:binary value +} + +struct ScanResult { + 1:list results + 2:bool more +} + +struct TRange { + 1:TKey start + 2:TKey stop + 3:bool startKeyInclusive + 4:bool stopKeyInclusive + 5:bool infiniteStartKey + 6:bool infiniteStopKey +} + +typedef map> ScanBatch + +struct MultiScanResult { + 1:list results + 2:ScanBatch failures + 3:list fullScans + 4:TKeyExtent partScan + 5:TKey partNextKey + 6:bool partNextKeyInclusive + 7:bool more +} + +struct InitialScan { + 1:ScanID scanID + 2:ScanResult result +} + +struct InitialMultiScan { + 1:ScanID scanID + 2:MultiScanResult result +} + +struct IterInfo { + 1:i32 priority + 2:string className + 3:string iterName +} + +struct TConstraintViolationSummary { + 1:string constrainClass + 2:i16 violationCode + 3:string violationDescription + 4:i64 numberOfViolatingMutations +} + +struct UpdateErrors { + 1:map failedExtents + 2:list violationSummaries + 3:map authorizationFailures +} + +enum TCMStatus { + ACCEPTED + REJECTED + VIOLATED + IGNORED +} + +struct TCMResult { + 1:i64 cmid + 2:TCMStatus status +} + +struct MapFileInfo { + 1:i64 estimatedSize +} + +struct TCondition { + 1:binary cf + 2:binary cq + 3:binary cv + 4:i64 ts + 5:bool hasTimestamp + 6:binary val + 7:binary iterators +} + +struct TConditionalMutation { + 1:list conditions + 2:TMutation mutation + 3:i64 id +} + +struct TConditionalSession { + 1:i64 sessionId + 2:string tserverLock + 3:i64 ttl +} + +struct TSummarizerConfiguration { + 1:string classname + 2:map options + 3:string configId +} + +struct TSummary { + 1:map summary + 2:TSummarizerConfiguration config + 3:i64 filesContaining + 4:i64 filesExceeding + 5:i64 filesLarge +} + +struct TSummaries { + 1:bool finished + 2:i64 sessionId + 3:i64 totalFiles + 4:i64 deletedFiles + 5:list summaries +} + +struct TRowRange { + 1:binary startRow + 2:binary endRow +} + +struct TSummaryRequest { + 1:string tableId + 2:TRowRange bounds + 3:list summarizers + 4:string summarizerPattern +} + +typedef map> CMBatch + +typedef map> UpdateBatch + +typedef map> TabletFiles diff --git a/thrift/2.x/gc.thrift b/thrift/2.x/gc.thrift new file mode 100644 index 00000000..e7762a29 --- /dev/null +++ b/thrift/2.x/gc.thrift @@ -0,0 +1,49 @@ +/* +* 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. +*/ +namespace java org.apache.accumulo.core.gc.thrift +namespace cpp org.apache.accumulov2.core.gc.thrift + +include "security.thrift" +include "trace.thrift" +include "client.thrift" + +struct GcCycleStats { + 1:i64 started + 2:i64 finished + 3:i64 candidates + 4:i64 inUse + 5:i64 deleted + 6:i64 errors +} + +struct GCStatus { + 1:GcCycleStats last + 2:GcCycleStats lastLog + 3:GcCycleStats current + 4:GcCycleStats currentLog +} + +service GCMonitorService { + + GCStatus getStatus( + 2:trace.TInfo tinfo + 1:security.TCredentials credentials + ) throws ( + 1:client.ThriftSecurityException sec + ) + +} diff --git a/thrift/2.x/master.thrift b/thrift/2.x/master.thrift new file mode 100644 index 00000000..69fb5c4d --- /dev/null +++ b/thrift/2.x/master.thrift @@ -0,0 +1,394 @@ +/* +* 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. +*/ +namespace java org.apache.accumulo.core.master.thrift +namespace cpp org.apache.accumulov2.core.master.thrift + +include "data.thrift" +include "security.thrift" +include "client.thrift" +include "trace.thrift" + +struct Compacting { + 1:i32 running + 2:i32 queued +} + +struct TableInfo { + 1:i64 recs + 2:i64 recsInMemory + 3:i32 tablets + 4:i32 onlineTablets + 5:double ingestRate + 6:double ingestByteRate + 7:double queryRate + 8:double queryByteRate + 9:Compacting minors + 10:Compacting majors + 11:Compacting scans + 12:double scanRate +} + +struct RecoveryStatus { + 2:string name + // in millis + 5:i32 runtime + 6:double progress +} + +enum BulkImportState { + INITIAL + // master moves the files into the accumulo area + MOVING + // tserver examines the index of the file + PROCESSING + // tserver assigns the file to tablets + ASSIGNING + // tserver incorporates file into tablet + LOADING + // master moves error files into the error directory + COPY_FILES + // flags and locks removed + CLEANUP +} + +struct BulkImportStatus { + 1:i64 startTime + 2:string filename + 3:BulkImportState state +} + +struct TabletServerStatus { + 1:map tableMap + 2:i64 lastContact + 3:string name + 5:double osLoad + 7:i64 holdTime + 8:i64 lookups + 10:i64 indexCacheHits + 11:i64 indexCacheRequest + 12:i64 dataCacheHits + 13:i64 dataCacheRequest + 14:list logSorts + 15:i64 flushs + 16:i64 syncs + 17:list bulkImports + 19:string version + 18:i64 responseTime +} + +enum MasterState { + INITIAL + HAVE_LOCK + SAFE_MODE + NORMAL + UNLOAD_METADATA_TABLETS + UNLOAD_ROOT_TABLET + STOP +} + +enum MasterGoalState { + CLEAN_STOP + SAFE_MODE + NORMAL +} + +struct DeadServer { + 1:string server + 2:i64 lastStatus + 3:string status +} + +struct MasterMonitorInfo { + 1:map tableMap + 2:list tServerInfo + 3:map badTServers + 6:MasterState state + 8:MasterGoalState goalState + 7:i32 unassignedTablets + 9:set serversShuttingDown + 10:list deadTabletServers + 11:list bulkImports +} + +struct TabletSplit { + 1:data.TKeyExtent oldTablet + 2:list newTablets +} + +exception RecoveryException { + 1:string why +} + +enum TabletLoadState { + LOADED + LOAD_FAILURE + UNLOADED + UNLOAD_FAILURE_NOT_SERVING + UNLOAD_ERROR + CHOPPED +} + +enum FateOperation { + TABLE_CREATE + TABLE_CLONE + TABLE_DELETE + TABLE_RENAME + TABLE_ONLINE + TABLE_OFFLINE + TABLE_MERGE + TABLE_DELETE_RANGE + TABLE_BULK_IMPORT + TABLE_COMPACT + TABLE_IMPORT + TABLE_EXPORT + TABLE_CANCEL_COMPACT + NAMESPACE_CREATE + NAMESPACE_DELETE + NAMESPACE_RENAME + TABLE_BULK_IMPORT2 +} + +service FateService { + + // register a fate operation by reserving an opid + i64 beginFateOperation( + 2:trace.TInfo tinfo + 1:security.TCredentials credentials + ) throws ( + 1:client.ThriftSecurityException sec + 2:client.ThriftNotActiveServiceException tnase + ) + + // initiate execution of the fate operation; set autoClean to true if not waiting for completion + void executeFateOperation( + 7:trace.TInfo tinfo + 1:security.TCredentials credentials + 2:i64 opid + 3:FateOperation op + 4:list arguments + 5:map options + 6:bool autoClean + ) throws ( + 1:client.ThriftSecurityException sec + 2:client.ThriftTableOperationException tope + 3:client.ThriftNotActiveServiceException tnase + ) + + // wait for completion of the operation and get the returned exception, if any + string waitForFateOperation( + 3:trace.TInfo tinfo + 1:security.TCredentials credentials + 2:i64 opid + ) throws ( + 1:client.ThriftSecurityException sec + 2:client.ThriftTableOperationException tope + 3:client.ThriftNotActiveServiceException tnase + ) + + // clean up fate operation if autoClean was not set, after waiting + void finishFateOperation( + 3:trace.TInfo tinfo + 1:security.TCredentials credentials + 2:i64 opid + ) throws ( + 1:client.ThriftSecurityException sec + 2:client.ThriftNotActiveServiceException tnase + ) + +} + +service MasterClientService extends FateService { + + // table management methods + i64 initiateFlush( + 3:trace.TInfo tinfo + 1:security.TCredentials credentials + 2:string tableName + ) throws ( + 1:client.ThriftSecurityException sec + 2:client.ThriftTableOperationException tope + 3:client.ThriftNotActiveServiceException tnase + ) + + void waitForFlush( + 5:trace.TInfo tinfo + 1:security.TCredentials credentials + 2:string tableName + 6:binary startRow + 7:binary endRow + 3:i64 flushID + 4:i64 maxLoops + ) throws ( + 1:client.ThriftSecurityException sec + 2:client.ThriftTableOperationException tope + 3:client.ThriftNotActiveServiceException tnase + ) + + void setTableProperty( + 5:trace.TInfo tinfo + 1:security.TCredentials credentials + 2:string tableName + 3:string property + 4:string value + ) throws ( + 1:client.ThriftSecurityException sec + 2:client.ThriftTableOperationException tope + 3:client.ThriftNotActiveServiceException tnase + ) + + void removeTableProperty( + 4:trace.TInfo tinfo + 1:security.TCredentials credentials + 2:string tableName + 3:string property + ) throws ( + 1:client.ThriftSecurityException sec + 2:client.ThriftTableOperationException tope + 3:client.ThriftNotActiveServiceException tnase + ) + + void setNamespaceProperty( + 5:trace.TInfo tinfo + 1:security.TCredentials credentials + 2:string ns + 3:string property + 4:string value + ) throws ( + 1:client.ThriftSecurityException sec + 2:client.ThriftTableOperationException tope + 3:client.ThriftNotActiveServiceException tnase + ) + + void removeNamespaceProperty( + 4:trace.TInfo tinfo + 1:security.TCredentials credentials + 2:string ns + 3:string property + ) throws ( + 1:client.ThriftSecurityException sec + 2:client.ThriftTableOperationException tope + 3:client.ThriftNotActiveServiceException tnase + ) + + // system management methods + void setMasterGoalState( + 3:trace.TInfo tinfo + 1:security.TCredentials credentials + 2:MasterGoalState state + ) throws ( + 1:client.ThriftSecurityException sec + 2:client.ThriftNotActiveServiceException tnase + ) + + void shutdown( + 3:trace.TInfo tinfo + 1:security.TCredentials credentials + 2:bool stopTabletServers + ) throws ( + 1:client.ThriftSecurityException sec + 2:client.ThriftNotActiveServiceException tnase + ) + + void shutdownTabletServer( + 3:trace.TInfo tinfo + 1:security.TCredentials credentials + 2:string tabletServer + 4:bool force + ) throws ( + 1: client.ThriftSecurityException sec + 2:client.ThriftNotActiveServiceException tnase + ) + + void setSystemProperty( + 4:trace.TInfo tinfo + 1:security.TCredentials credentials + 2:string property + 3:string value + ) throws ( + 1:client.ThriftSecurityException sec + 2:client.ThriftNotActiveServiceException tnase + ) + + void removeSystemProperty( + 3:trace.TInfo tinfo + 1:security.TCredentials credentials + 2:string property + ) throws ( + 1:client.ThriftSecurityException sec + 2:client.ThriftNotActiveServiceException tnase + ) + + // system monitoring methods + MasterMonitorInfo getMasterStats( + 2:trace.TInfo tinfo + 1:security.TCredentials credentials + ) throws ( + 1:client.ThriftSecurityException sec + 2:client.ThriftNotActiveServiceException tnase + ) + + void waitForBalance( + 1:trace.TInfo tinfo + ) throws ( + 1:client.ThriftNotActiveServiceException tnase + ) + + // tablet server reporting + oneway void reportSplitExtent( + 4:trace.TInfo tinfo + 1:security.TCredentials credentials + 2:string serverName + 3:TabletSplit split + ) + + oneway void reportTabletStatus( + 5:trace.TInfo tinfo + 1:security.TCredentials credentials + 2:string serverName + 3:TabletLoadState status + 4:data.TKeyExtent tablet + ) + + list getActiveTservers( + 1:trace.TInfo tinfo + 2:security.TCredentials credentials + ) throws ( + 1:client.ThriftSecurityException sec + 2:client.ThriftNotActiveServiceException tnase + ) + + // Delegation token request + security.TDelegationToken getDelegationToken( + 1:trace.TInfo tinfo + 2:security.TCredentials credentials + 3:security.TDelegationTokenConfig cfg + ) throws ( + 1:client.ThriftSecurityException sec + 2:client.ThriftNotActiveServiceException tnase + ) + + // Determine when all provided logs are replicated + bool drainReplicationTable( + 1:trace.TInfo tfino + 2:security.TCredentials credentials + 3:string tableName + 4:set logsToWatch + ) throws ( + 1:client.ThriftNotActiveServiceException tnase + ) + +} diff --git a/thrift/2.x/replication.thrift b/thrift/2.x/replication.thrift new file mode 100644 index 00000000..1766cb42 --- /dev/null +++ b/thrift/2.x/replication.thrift @@ -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. +*/ +namespace java org.apache.accumulo.core.replication.thrift +namespace cpp org.apache.accumulov2.core.replication.thrift + +include "data.thrift" +include "security.thrift" + +struct WalEdits { + 1:list edits +} + +struct KeyValues { + 1:list keyValues +} + +enum RemoteReplicationErrorCode { + COULD_NOT_DESERIALIZE + COULD_NOT_APPLY + TABLE_DOES_NOT_EXIST + CANNOT_AUTHENTICATE + CANNOT_INSTANTIATE_REPLAYER +} + +enum ReplicationCoordinatorErrorCode { + NO_AVAILABLE_SERVERS + SERVICE_CONFIGURATION_UNAVAILABLE + CANNOT_AUTHENTICATE +} + +exception ReplicationCoordinatorException { + 1:ReplicationCoordinatorErrorCode code + 2:string reason +} + +exception RemoteReplicationException { + 1:RemoteReplicationErrorCode code + 2:string reason +} + +service ReplicationCoordinator { + + string getServicerAddress( + 1:string remoteTableId + 2:security.TCredentials credentials + ) throws ( + 1:ReplicationCoordinatorException e + ) + +} + +service ReplicationServicer { + + i64 replicateLog( + 1:string remoteTableId + 2:WalEdits data + 3:security.TCredentials credentials + ) throws ( + 1:RemoteReplicationException e + ) + + i64 replicateKeyValues( + 1:string remoteTableId + 2:KeyValues data + 3:security.TCredentials credentials + ) throws ( + 1:RemoteReplicationException e + ) + +} diff --git a/thrift/2.x/security.thrift b/thrift/2.x/security.thrift new file mode 100644 index 00000000..dd3c9dc7 --- /dev/null +++ b/thrift/2.x/security.thrift @@ -0,0 +1,49 @@ +/* +* 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. +*/ +namespace java org.apache.accumulo.core.securityImpl.thrift +namespace cpp org.apache.accumulov2.core.securityImpl.thrift + +struct TCredentials { + 1:string principal + 2:string tokenClassName + 3:binary token + 4:string instanceId +} + +struct TAuthenticationTokenIdentifier { + 1:string principal + 2:optional i32 keyId + 3:optional i64 issueDate + 4:optional i64 expirationDate + 5:optional string instanceId +} + +struct TAuthenticationKey { + 1:binary secret + 2:optional i32 keyId + 3:optional i64 expirationDate + 4:optional i64 creationDate +} + +struct TDelegationToken { + 1:binary password + 2:TAuthenticationTokenIdentifier identifier +} + +struct TDelegationTokenConfig { + 1:optional i64 lifetime +} diff --git a/thrift/2.x/tabletserver.thrift b/thrift/2.x/tabletserver.thrift new file mode 100644 index 00000000..f29c27f0 --- /dev/null +++ b/thrift/2.x/tabletserver.thrift @@ -0,0 +1,479 @@ +/* +* 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. +*/ +namespace java org.apache.accumulo.core.tabletserver.thrift +namespace cpp org.apache.accumulov2.core.tabletserver.thrift + +include "data.thrift" +include "security.thrift" +include "client.thrift" +include "master.thrift" +include "trace.thrift" + +exception NotServingTabletException { + 1:data.TKeyExtent extent +} + +exception TooManyFilesException { + 1:data.TKeyExtent extent +} + +exception TSampleNotPresentException { + 1:data.TKeyExtent extent +} + +exception NoSuchScanIDException {} + +exception ConstraintViolationException { + 1:list violationSummaries +} + +struct ActionStats { + 1:i32 status + 2:double elapsed + 3:i32 num + 4:i64 count + // sum of the square of the elapsed time + 5:double sumDev + 6:i32 fail + 7:double queueTime + // sum of the square of the queue time + 8:double queueSumDev +} + +struct TabletStats { + 1:data.TKeyExtent extent + 2:ActionStats majors + 3:ActionStats minors + 4:ActionStats splits + 5:i64 numEntries + 6:double ingestRate + 7:double queryRate + // zero if loaded by the master, currentTimeMillis when the split was created + 8:i64 splitCreationTime +} + +enum ScanType { + SINGLE + BATCH +} + +enum ScanState { + IDLE + RUNNING + QUEUED +} + +struct ActiveScan { + 2:string client + 3:string user + 4:string tableId + 5:i64 age + 6:i64 idleTime + 7:ScanType type + 8:ScanState state + 9:data.TKeyExtent extent + 10:list columns + 11:list ssiList + // Server Side Iterator Options + 12:map> ssio + 13:list authorizations + 14:optional i64 scanId + // name of the classloader context + 15:string classLoaderContext +} + +enum CompactionType { + MINOR + MERGE + MAJOR + FULL +} + +enum CompactionReason { + USER + SYSTEM + CHOP + IDLE + CLOSE +} + +enum TDurability { + DEFAULT = 0 + SYNC = 1 + FLUSH = 2 + LOG = 3 + NONE = 4 +} + +struct ActiveCompaction { + 1:data.TKeyExtent extent + 2:i64 age + 3:list inputFiles + 4:string outputFile + 5:CompactionType type + 6:CompactionReason reason + 7:string localityGroup + 8:i64 entriesRead + 9:i64 entriesWritten + 10:list ssiList + 11:map> ssio +} + +struct TIteratorSetting { + 1:i32 priority + 2:string name + 3:string iteratorClass + 4:map properties +} + +struct IteratorConfig { + 1:list iterators +} + +struct TSamplerConfiguration { + 1:string className + 2:map options +} + +enum TUnloadTabletGoal { + UNKNOWN + UNASSIGNED + SUSPENDED + DELETED +} + +service TabletClientService extends client.ClientService { + + // scan a range of keys + data.InitialScan startScan( + 11:trace.TInfo tinfo + 1:security.TCredentials credentials + 2:data.TKeyExtent extent + 3:data.TRange range + 4:list columns + 5:i32 batchSize + 6:list ssiList + 7:map> ssio + 8:list authorizations + 9:bool waitForWrites + 10:bool isolated + 12:i64 readaheadThreshold + 13:TSamplerConfiguration samplerConfig + 14:i64 batchTimeOut + // name of the classloader context + 15:string classLoaderContext + 16:map executionHints + ) throws ( + 1:client.ThriftSecurityException sec + 2:NotServingTabletException nste + 3:TooManyFilesException tmfe + 4:TSampleNotPresentException tsnpe + ) + + data.ScanResult continueScan( + 2:trace.TInfo tinfo + 1:data.ScanID scanID + ) throws ( + 1:NoSuchScanIDException nssi + 2:NotServingTabletException nste + 3:TooManyFilesException tmfe + 4:TSampleNotPresentException tsnpe + ) + + oneway void closeScan( + 2:trace.TInfo tinfo + 1:data.ScanID scanID + ) + + // scan over a series of ranges + data.InitialMultiScan startMultiScan( + 8:trace.TInfo tinfo + 1:security.TCredentials credentials + 2:data.ScanBatch batch + 3:list columns + 4:list ssiList + 5:map> ssio + 6:list authorizations + 7:bool waitForWrites + 9:TSamplerConfiguration samplerConfig + 10:i64 batchTimeOut + // name of the classloader context + 11:string classLoaderContext + 12:map executionHints + ) throws ( + 1:client.ThriftSecurityException sec + 2:TSampleNotPresentException tsnpe + ) + + data.MultiScanResult continueMultiScan( + 2:trace.TInfo tinfo + 1:data.ScanID scanID + ) throws ( + 1:NoSuchScanIDException nssi + 2:TSampleNotPresentException tsnpe + ) + + void closeMultiScan( + 2:trace.TInfo tinfo + 1:data.ScanID scanID + ) throws ( + 1:NoSuchScanIDException nssi + ) + + //the following calls support a batch update to multiple tablets on a tablet server + data.UpdateID startUpdate( + 2:trace.TInfo tinfo + 1:security.TCredentials credentials + 3:TDurability durability + ) throws ( + 1:client.ThriftSecurityException sec + ) + + oneway void applyUpdates( + 1:trace.TInfo tinfo + 2:data.UpdateID updateID + 3:data.TKeyExtent keyExtent + 4:list mutations + ) + + data.UpdateErrors closeUpdate( + 2:trace.TInfo tinfo + 1:data.UpdateID updateID + ) throws ( + 1:NoSuchScanIDException nssi + ) + + //the following call supports making a single update to a tablet + void update( + 4:trace.TInfo tinfo + 1:security.TCredentials credentials + 2:data.TKeyExtent keyExtent + 3:data.TMutation mutation + 5:TDurability durability + ) throws ( + 1:client.ThriftSecurityException sec + 2:NotServingTabletException nste + 3:ConstraintViolationException cve + ) + + data.TConditionalSession startConditionalUpdate( + 1:trace.TInfo tinfo + 2:security.TCredentials credentials + 3:list authorizations + 4:string tableID + 5:TDurability durability + 6:string classLoaderContext + ) throws ( + 1:client.ThriftSecurityException sec + ) + + list conditionalUpdate( + 1:trace.TInfo tinfo + 2:data.UpdateID sessID + 3:data.CMBatch mutations + 4:list symbols + ) throws ( + 1:NoSuchScanIDException nssi + ) + + void invalidateConditionalUpdate( + 1:trace.TInfo tinfo + 2:data.UpdateID sessID + ) + + oneway void closeConditionalUpdate( + 1:trace.TInfo tinfo + 2:data.UpdateID sessID + ) + + // on success, returns an empty list + list bulkImport( + 3:trace.TInfo tinfo + 1:security.TCredentials credentials + 4:i64 tid + 2:data.TabletFiles files + 5:bool setTime + ) throws ( + 1:client.ThriftSecurityException sec + ) + + oneway void loadFiles( + 1:trace.TInfo tinfo + 2:security.TCredentials credentials + 3:i64 tid + 4:string dir + 5:map> files + 6:bool setTime + ) + + void splitTablet( + 4:trace.TInfo tinfo + 1:security.TCredentials credentials + 2:data.TKeyExtent extent + 3:binary splitPoint + ) throws ( + 1:client.ThriftSecurityException sec + 2:NotServingTabletException nste + ) + + oneway void loadTablet( + 5:trace.TInfo tinfo + 1:security.TCredentials credentials + 4:string lock + 2:data.TKeyExtent extent + ) + + oneway void unloadTablet( + 5:trace.TInfo tinfo + 1:security.TCredentials credentials + 4:string lock + 2:data.TKeyExtent extent + 6:TUnloadTabletGoal goal + 7:i64 requestTime + ) + + oneway void flush( + 4:trace.TInfo tinfo + 1:security.TCredentials credentials + 3:string lock + 2:string tableId + 5:binary startRow + 6:binary endRow + ) + + oneway void flushTablet( + 1:trace.TInfo tinfo + 2:security.TCredentials credentials + 3:string lock + 4:data.TKeyExtent extent + ) + + oneway void chop( + 1:trace.TInfo tinfo + 2:security.TCredentials credentials + 3:string lock + 4:data.TKeyExtent extent + ) + + oneway void compact( + 1:trace.TInfo tinfo + 2:security.TCredentials credentials + 3:string lock + 4:string tableId + 5:binary startRow + 6:binary endRow + ) + + master.TabletServerStatus getTabletServerStatus( + 3:trace.TInfo tinfo + 1:security.TCredentials credentials + ) throws ( + 1:client.ThriftSecurityException sec + ) + + list getTabletStats( + 3:trace.TInfo tinfo + 1:security.TCredentials credentials + 2:string tableId + ) throws ( + 1:client.ThriftSecurityException sec + ) + + TabletStats getHistoricalStats( + 2:trace.TInfo tinfo + 1:security.TCredentials credentials + ) throws ( + 1:client.ThriftSecurityException sec + ) + + void halt( + 3:trace.TInfo tinfo + 1:security.TCredentials credentials + 2:string lock + ) throws ( + 1:client.ThriftSecurityException sec + ) + + oneway void fastHalt( + 3:trace.TInfo tinfo + 1:security.TCredentials credentials + 2:string lock + ) + + list getActiveScans( + 2:trace.TInfo tinfo + 1:security.TCredentials credentials + ) throws ( + 1:client.ThriftSecurityException sec + ) + + list getActiveCompactions( + 2:trace.TInfo tinfo + 1:security.TCredentials credentials + ) throws ( + 1:client.ThriftSecurityException sec + ) + + oneway void removeLogs( + 1:trace.TInfo tinfo + 2:security.TCredentials credentials + 3:list filenames + ) + + list getActiveLogs( + 1:trace.TInfo tinfo + 2:security.TCredentials credentials + ) + + data.TSummaries startGetSummaries( + 1:trace.TInfo tinfo + 2:security.TCredentials credentials + 3:data.TSummaryRequest request + ) throws ( + 1:client.ThriftSecurityException sec + 2:client.ThriftTableOperationException tope + ) + + data.TSummaries startGetSummariesForPartition( + 1:trace.TInfo tinfo + 2:security.TCredentials credentials + 3:data.TSummaryRequest request + 4:i32 modulus + 5:i32 remainder + ) throws ( + 1:client.ThriftSecurityException sec + ) + + data.TSummaries startGetSummariesFromFiles( + 1:trace.TInfo tinfo + 2:security.TCredentials credentials + 3:data.TSummaryRequest request + 4:map> files + ) throws ( + 1:client.ThriftSecurityException sec + ) + + data.TSummaries contiuneGetSummaries( + 1:trace.TInfo tinfo + 2:i64 sessionId + ) throws ( + 1:NoSuchScanIDException nssi + ) + +} + +typedef i32 TabletID diff --git a/thrift/2.x/trace.thrift b/thrift/2.x/trace.thrift new file mode 100644 index 00000000..ed84240b --- /dev/null +++ b/thrift/2.x/trace.thrift @@ -0,0 +1,23 @@ +/* +* 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. +*/ +namespace java org.apache.accumulo.core.trace.thrift +namespace cpp org.apache.accumulov2.core.trace.thrift + +struct TInfo { + 1:i64 traceId + 2:i64 parentId +} diff --git a/utils/generatethrift.sh b/utils/generatethrift.sh new file mode 100755 index 00000000..6e5fb612 --- /dev/null +++ b/utils/generatethrift.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +INDIR=$1 +OUTDIR=$2 + +ls ${INDIR}/*.thrift | xargs -I {} ./thrift --gen cpp -o out {} +rm ${OUTDIR}/gen-cpp/*skeleton* +grep -l stdcxx ${OUTDIR}/gen-cpp/* | xargs -I {} sed -i '' 's/::apache::thrift::stdcxx::/std::/g' {} +grep -l stdcxx ${OUTDIR}/gen-cpp/* | xargs -I {} sed -i '' 's/apache::thrift::stdcxx::/std::/g' {}