From 69e37c732c6336a8de37f6e64ccccad114d84dbf Mon Sep 17 00:00:00 2001 From: Fokko Driesprong Date: Wed, 3 Aug 2022 01:50:17 +0200 Subject: [PATCH] Python: Add Hive Catalog (#5391) --- .pre-commit-config.yaml | 1 + LICENSE | 20 + Makefile | 2 +- poetry.lock | 236 +- pyiceberg/catalog/base.py | 4 +- pyiceberg/catalog/hive.py | 459 + pyiceberg/catalog/rest.py | 4 +- pyiceberg/table/base.py | 2 +- pyproject.toml | 14 + tests/catalog/test_hive.py | 446 + vendor/README.md | 45 + vendor/fb303/FacebookService.py | 2420 + vendor/fb303/__init__.py | 18 + vendor/fb303/constants.py | 26 + vendor/fb303/ttypes.py | 64 + vendor/hive_metastore/ThriftHiveMetastore.py | 72960 +++++++++++++++++ vendor/hive_metastore/__init__.py | 17 + vendor/hive_metastore/constants.py | 66 + vendor/hive_metastore/ttypes.py | 42515 ++++++++++ 19 files changed, 119125 insertions(+), 194 deletions(-) create mode 100644 pyiceberg/catalog/hive.py create mode 100644 tests/catalog/test_hive.py create mode 100644 vendor/README.md create mode 100644 vendor/fb303/FacebookService.py create mode 100644 vendor/fb303/__init__.py create mode 100644 vendor/fb303/constants.py create mode 100644 vendor/fb303/ttypes.py create mode 100644 vendor/hive_metastore/ThriftHiveMetastore.py create mode 100644 vendor/hive_metastore/__init__.py create mode 100644 vendor/hive_metastore/constants.py create mode 100644 vendor/hive_metastore/ttypes.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 717b429783..7c9875a468 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,6 +16,7 @@ # under the License. --- files: ^python/ +exclude: ^python/vendor/ repos: - repo: https://github.com/pre-commit/pre-commit-hooks diff --git a/LICENSE b/LICENSE index 5823c32b65..ffdd12aad2 100644 --- a/LICENSE +++ b/LICENSE @@ -213,3 +213,23 @@ Home page: https://avro.apache.org/ License: https://www.apache.org/licenses/LICENSE-2.0 -------------------------------------------------------------------------------- + +This product includes code from Apache Thrift. + +* Uses the fb303.thrift file that's part of Hive's thrift service in vendor/fb303/ + +Copyright: 2006-2022 The Apache Software Foundation. +Home page: https://thrift.apache.org/ +License: https://www.apache.org/licenses/LICENSE-2.0 + +-------------------------------------------------------------------------------- + +This product includes code from Apache Hive. + +* Uses hive_metastore.thrift to generate the Hive Metastore client in vendor/hive_metastore/ + +Copyright: 2008-2022 The Apache Software Foundation. +Home page: https://hive.apache.org/ +License: https://www.apache.org/licenses/LICENSE-2.0 + +-------------------------------------------------------------------------------- diff --git a/Makefile b/Makefile index 66ce52cd8e..aef783db33 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ install: pip install poetry - poetry install -E pyarrow + poetry install -E pyarrow -E hive lint: poetry run pre-commit run --all-files diff --git a/poetry.lock b/poetry.lock index 649dc074f5..b7ecd0bd04 100644 --- a/poetry.lock +++ b/poetry.lock @@ -8,17 +8,17 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "attrs" -version = "21.4.0" +version = "22.1.0" description = "Classes Without Boilerplate" category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.5" [package.extras] -dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"] +dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"] docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] -tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "cloudpickle"] -tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "cloudpickle"] +tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "zope.interface", "cloudpickle"] +tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "cloudpickle"] [[package]] name = "certifi" @@ -202,14 +202,14 @@ pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" [[package]] name = "pep517" -version = "0.12.0" +version = "0.13.0" description = "Wrappers to build Python packages using PEP 517 hooks" category = "dev" optional = false -python-versions = "*" +python-versions = ">=3.6" [package.dependencies] -tomli = {version = ">=1.1.0", markers = "python_version >= \"3.6\""} +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} [[package]] name = "platformdirs" @@ -232,8 +232,8 @@ optional = false python-versions = ">=3.6" [package.extras] -testing = ["pytest-benchmark", "pytest"] -dev = ["tox", "pre-commit"] +dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] [[package]] name = "pre-commit" @@ -396,10 +396,26 @@ test = ["fixtures", "mock", "purl", "pytest", "sphinx", "testrepository (>=0.0.1 name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" -category = "dev" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +[[package]] +name = "thrift" +version = "0.16.0" +description = "Python bindings for the Apache Thrift RPC system" +category = "main" +optional = true +python-versions = "*" + +[package.dependencies] +six = ">=1.7.2" + +[package.extras] +all = ["tornado (>=4.0)", "twisted"] +tornado = ["tornado (>=4.0)"] +twisted = ["twisted"] + [[package]] name = "toml" version = "0.10.2" @@ -426,7 +442,7 @@ python-versions = ">=3.7" [[package]] name = "urllib3" -version = "1.26.10" +version = "1.26.11" description = "HTTP library with thread-safe connection pooling, file post, and more." category = "main" optional = false @@ -439,21 +455,20 @@ socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] name = "virtualenv" -version = "20.15.1" +version = "20.16.2" description = "Virtual Python Environment builder" category = "dev" optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" +python-versions = ">=3.6" [package.dependencies] distlib = ">=0.3.1,<1" filelock = ">=3.2,<4" platformdirs = ">=2,<3" -six = ">=1.9.0,<2" [package.extras] docs = ["proselint (>=0.10.2)", "sphinx (>=3)", "sphinx-argparse (>=0.2.5)", "sphinx-rtd-theme (>=0.4.3)", "towncrier (>=21.3)"] -testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)", "packaging (>=20.0)"] +testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "packaging (>=20.0)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)"] [[package]] name = "zipp" @@ -482,6 +497,7 @@ cffi = {version = ">=1.11", markers = "platform_python_implementation == \"PyPy\ cffi = ["cffi (>=1.11)"] [extras] +hive = ["thrift"] pyarrow = ["pyarrow"] python-snappy = ["zstandard"] snappy = ["python-snappy"] @@ -489,16 +505,11 @@ snappy = ["python-snappy"] [metadata] lock-version = "1.1" python-versions = "^3.8" -content-hash = "d8312a4f53fd87fc2dc2059d15a9aa8274512debe1c780a9e53a1108b6c12e55" +content-hash = "fa4637615911260d5d031479bd2e2481d952e1ecb6feaddfe6be6c358132465c" [metadata.files] -atomicwrites = [ - {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, -] -attrs = [ - {file = "attrs-21.4.0-py2.py3-none-any.whl", hash = "sha256:2d27e3784d7a565d36ab851fe94887c5eccd6a463168875832a1be79c82828b4"}, - {file = "attrs-21.4.0.tar.gz", hash = "sha256:626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd"}, -] +atomicwrites = [] +attrs = [] certifi = [ {file = "certifi-2022.6.15-py3-none-any.whl", hash = "sha256:fe86415d55e84719d75f8b69414f6438ac3547d2078ab91b67e779ef69378412"}, {file = "certifi-2022.6.15.tar.gz", hash = "sha256:84c85a9078b11105f04f3036a9482ae10e4621616db313fe045dd24743a0820d"}, @@ -581,84 +592,18 @@ colorama = [ {file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"}, {file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"}, ] -coverage = [ - {file = "coverage-6.4.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a9032f9b7d38bdf882ac9f66ebde3afb8145f0d4c24b2e600bc4c6304aafb87e"}, - {file = "coverage-6.4.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e0524adb49c716ca763dbc1d27bedce36b14f33e6b8af6dba56886476b42957c"}, - {file = "coverage-6.4.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d4548be38a1c810d79e097a38107b6bf2ff42151900e47d49635be69943763d8"}, - {file = "coverage-6.4.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f23876b018dfa5d3e98e96f5644b109090f16a4acb22064e0f06933663005d39"}, - {file = "coverage-6.4.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fe75dcfcb889b6800f072f2af5a331342d63d0c1b3d2bf0f7b4f6c353e8c9c0"}, - {file = "coverage-6.4.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:2f8553878a24b00d5ab04b7a92a2af50409247ca5c4b7a2bf4eabe94ed20d3ee"}, - {file = "coverage-6.4.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:d774d9e97007b018a651eadc1b3970ed20237395527e22cbeb743d8e73e0563d"}, - {file = "coverage-6.4.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d56f105592188ce7a797b2bd94b4a8cb2e36d5d9b0d8a1d2060ff2a71e6b9bbc"}, - {file = "coverage-6.4.2-cp310-cp310-win32.whl", hash = "sha256:d230d333b0be8042ac34808ad722eabba30036232e7a6fb3e317c49f61c93386"}, - {file = "coverage-6.4.2-cp310-cp310-win_amd64.whl", hash = "sha256:5ef42e1db047ca42827a85e34abe973971c635f83aed49611b7f3ab49d0130f0"}, - {file = "coverage-6.4.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:25b7ec944f114f70803d6529394b64f8749e93cbfac0fe6c5ea1b7e6c14e8a46"}, - {file = "coverage-6.4.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7bb00521ab4f99fdce2d5c05a91bddc0280f0afaee0e0a00425e28e209d4af07"}, - {file = "coverage-6.4.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2dff52b3e7f76ada36f82124703f4953186d9029d00d6287f17c68a75e2e6039"}, - {file = "coverage-6.4.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:147605e1702d996279bb3cc3b164f408698850011210d133a2cb96a73a2f7996"}, - {file = "coverage-6.4.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:422fa44070b42fef9fb8dabd5af03861708cdd6deb69463adc2130b7bf81332f"}, - {file = "coverage-6.4.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:8af6c26ba8df6338e57bedbf916d76bdae6308e57fc8f14397f03b5da8622b4e"}, - {file = "coverage-6.4.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:5336e0352c0b12c7e72727d50ff02557005f79a0b8dcad9219c7c4940a930083"}, - {file = "coverage-6.4.2-cp37-cp37m-win32.whl", hash = "sha256:0f211df2cba951ffcae210ee00e54921ab42e2b64e0bf2c0befc977377fb09b7"}, - {file = "coverage-6.4.2-cp37-cp37m-win_amd64.whl", hash = "sha256:a13772c19619118903d65a91f1d5fea84be494d12fd406d06c849b00d31bf120"}, - {file = "coverage-6.4.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f7bd0ffbcd03dc39490a1f40b2669cc414fae0c4e16b77bb26806a4d0b7d1452"}, - {file = "coverage-6.4.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:0895ea6e6f7f9939166cc835df8fa4599e2d9b759b02d1521b574e13b859ac32"}, - {file = "coverage-6.4.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d4e7ced84a11c10160c0697a6cc0b214a5d7ab21dfec1cd46e89fbf77cc66fae"}, - {file = "coverage-6.4.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:80db4a47a199c4563d4a25919ff29c97c87569130375beca3483b41ad5f698e8"}, - {file = "coverage-6.4.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3def6791adf580d66f025223078dc84c64696a26f174131059ce8e91452584e1"}, - {file = "coverage-6.4.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:4f89d8e03c8a3757aae65570d14033e8edf192ee9298303db15955cadcff0c63"}, - {file = "coverage-6.4.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:6d0b48aff8e9720bdec315d67723f0babd936a7211dc5df453ddf76f89c59933"}, - {file = "coverage-6.4.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:2b20286c2b726f94e766e86a3fddb7b7e37af5d0c635bdfa7e4399bc523563de"}, - {file = "coverage-6.4.2-cp38-cp38-win32.whl", hash = "sha256:d714af0bdba67739598849c9f18efdcc5a0412f4993914a0ec5ce0f1e864d783"}, - {file = "coverage-6.4.2-cp38-cp38-win_amd64.whl", hash = "sha256:5f65e5d3ff2d895dab76b1faca4586b970a99b5d4b24e9aafffc0ce94a6022d6"}, - {file = "coverage-6.4.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a697977157adc052284a7160569b36a8bbec09db3c3220642e6323b47cec090f"}, - {file = "coverage-6.4.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c77943ef768276b61c96a3eb854eba55633c7a3fddf0a79f82805f232326d33f"}, - {file = "coverage-6.4.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:54d8d0e073a7f238f0666d3c7c0d37469b2aa43311e4024c925ee14f5d5a1cbe"}, - {file = "coverage-6.4.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f22325010d8824594820d6ce84fa830838f581a7fd86a9235f0d2ed6deb61e29"}, - {file = "coverage-6.4.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:24b04d305ea172ccb21bee5bacd559383cba2c6fcdef85b7701cf2de4188aa55"}, - {file = "coverage-6.4.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:866ebf42b4c5dbafd64455b0a1cd5aa7b4837a894809413b930026c91e18090b"}, - {file = "coverage-6.4.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:e36750fbbc422c1c46c9d13b937ab437138b998fe74a635ec88989afb57a3978"}, - {file = "coverage-6.4.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:79419370d6a637cb18553ecb25228893966bd7935a9120fa454e7076f13b627c"}, - {file = "coverage-6.4.2-cp39-cp39-win32.whl", hash = "sha256:b5e28db9199dd3833cc8a07fa6cf429a01227b5d429facb56eccd765050c26cd"}, - {file = "coverage-6.4.2-cp39-cp39-win_amd64.whl", hash = "sha256:edfdabe7aa4f97ed2b9dd5dde52d2bb29cb466993bb9d612ddd10d0085a683cf"}, - {file = "coverage-6.4.2-pp36.pp37.pp38-none-any.whl", hash = "sha256:e2618cb2cf5a7cc8d698306e42ebcacd02fb7ef8cfc18485c59394152c70be97"}, - {file = "coverage-6.4.2.tar.gz", hash = "sha256:6c3ccfe89c36f3e5b9837b9ee507472310164f352c9fe332120b764c9d60adbe"}, -] -distlib = [ - {file = "distlib-0.3.5-py2.py3-none-any.whl", hash = "sha256:b710088c59f06338ca514800ad795a132da19fda270e3ce4affc74abf955a26c"}, - {file = "distlib-0.3.5.tar.gz", hash = "sha256:a7f75737c70be3b25e2bee06288cec4e4c221de18455b2dd037fe2a795cab2fe"}, -] +coverage = [] +distlib = [] docutils = [ {file = "docutils-0.19-py3-none-any.whl", hash = "sha256:5e1de4d849fee02c63b040a4a3fd567f4ab104defd8a5511fbbc24a8a017efbc"}, {file = "docutils-0.19.tar.gz", hash = "sha256:33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6"}, ] -fastavro = [ - {file = "fastavro-1.5.4-cp310-cp310-macosx_10_14_x86_64.whl", hash = "sha256:d316cc476b2b24ef06402b8bfa047f8f72a9d6df2de777bb30d9ededda7e3a02"}, - {file = "fastavro-1.5.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8459faec46e34f2dfeb9b70ee8c36e935e626cff8608d675724718987a5f9ce5"}, - {file = "fastavro-1.5.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cd44636d7ff8365a57b88707b747371fffb676c8c1f68c0d423ec36623888668"}, - {file = "fastavro-1.5.4-cp310-cp310-win_amd64.whl", hash = "sha256:2402428b26d3c08a58acfa723833e19fb75077872bcb2475a4c81195cdae6a5d"}, - {file = "fastavro-1.5.4-cp37-cp37m-macosx_10_15_x86_64.whl", hash = "sha256:5afc14398f4191d1a807aa59d2fba5ed869b31343679ec43dbc289db0a8e35c5"}, - {file = "fastavro-1.5.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5217e9713a3ea03205532394fba4d743749155b04b10b12a12fc26d225b89792"}, - {file = "fastavro-1.5.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2e93a5eecb28cc35d670c9c4df70223fa9bcd6d9ca21b38b1b7ae13ece60c7fb"}, - {file = "fastavro-1.5.4-cp37-cp37m-win_amd64.whl", hash = "sha256:1a2f2465efd0e7de557c4034e8d4d88a132750cfa51e1582362a1b3a1a9fa911"}, - {file = "fastavro-1.5.4-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:f7d5bc76c03c692d9acea0e5d5baceec19e1c059b26cb8ae9f4481e842be95a5"}, - {file = "fastavro-1.5.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:80fe920229ab1f40eccb1b4918481cdd8a20e5e7dce19308ab38b23732da8a70"}, - {file = "fastavro-1.5.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a3d190aee86ab73caa1aa550eba850be2ca5dd29d814b38720f4e300184e01d5"}, - {file = "fastavro-1.5.4-cp38-cp38-win_amd64.whl", hash = "sha256:b6c30299a49b11f42251cb81c8e15db67750642eac7ba5c194a5ee95c83ebb11"}, - {file = "fastavro-1.5.4-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:1f7685f3a3c38352abab432bad2f9f2229a0e5f5f8548831e887c30f8396f2e9"}, - {file = "fastavro-1.5.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd021ec850fd30020b7c4fa868466fb7f95450f1f06eac92bd2204cbd8e45fb8"}, - {file = "fastavro-1.5.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:06a7b5602dfa032c92f20ca90b8bde88251573773e501bedf5e8b76b9feb14a3"}, - {file = "fastavro-1.5.4-cp39-cp39-win_amd64.whl", hash = "sha256:18250aa2ab0f7a095b1865565cf9976ea4605c201129636e6defe24ec3ef112c"}, - {file = "fastavro-1.5.4.tar.gz", hash = "sha256:d86f72c966713fb699570a18f7960cf4110b069c70681d7538be8d671c9db7c8"}, -] +fastavro = [] filelock = [ {file = "filelock-3.7.1-py3-none-any.whl", hash = "sha256:37def7b658813cda163b56fc564cdc75e86d338246458c4c28ae84cabefa2404"}, {file = "filelock-3.7.1.tar.gz", hash = "sha256:3a0fd85166ad9dbab54c9aec96737b744106dc5f15c0b09a6744a445299fcf04"}, ] -identify = [ - {file = "identify-2.5.2-py2.py3-none-any.whl", hash = "sha256:feaa9db2dc0ce333b453ce171c0cf1247bbfde2c55fc6bb785022d411a1b78b5"}, - {file = "identify-2.5.2.tar.gz", hash = "sha256:a3d4c096b384d50d5e6dc5bc8b9bc44f1f61cefebd750a7b3e9f939b53fb214d"}, -] +identify = [] idna = [ {file = "idna-3.3-py3-none-any.whl", hash = "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"}, {file = "idna-3.3.tar.gz", hash = "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"}, @@ -703,38 +648,12 @@ nodeenv = [ {file = "nodeenv-1.7.0-py2.py3-none-any.whl", hash = "sha256:27083a7b96a25f2f5e1d8cb4b6317ee8aeda3bdd121394e5ac54e498028a042e"}, {file = "nodeenv-1.7.0.tar.gz", hash = "sha256:e0e7f7dfb85fc5394c6fe1e8fa98131a2473e04311a45afb6508f7cf1836fa2b"}, ] -numpy = [ - {file = "numpy-1.23.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b15c3f1ed08df4980e02cc79ee058b788a3d0bef2fb3c9ca90bb8cbd5b8a3a04"}, - {file = "numpy-1.23.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9ce242162015b7e88092dccd0e854548c0926b75c7924a3495e02c6067aba1f5"}, - {file = "numpy-1.23.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e0d7447679ae9a7124385ccf0ea990bb85bb869cef217e2ea6c844b6a6855073"}, - {file = "numpy-1.23.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3119daed207e9410eaf57dcf9591fdc68045f60483d94956bee0bfdcba790953"}, - {file = "numpy-1.23.1-cp310-cp310-win32.whl", hash = "sha256:3ab67966c8d45d55a2bdf40701536af6443763907086c0a6d1232688e27e5447"}, - {file = "numpy-1.23.1-cp310-cp310-win_amd64.whl", hash = "sha256:1865fdf51446839ca3fffaab172461f2b781163f6f395f1aed256b1ddc253622"}, - {file = "numpy-1.23.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:aeba539285dcf0a1ba755945865ec61240ede5432df41d6e29fab305f4384db2"}, - {file = "numpy-1.23.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7e8229f3687cdadba2c4faef39204feb51ef7c1a9b669247d49a24f3e2e1617c"}, - {file = "numpy-1.23.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:68b69f52e6545af010b76516f5daaef6173e73353e3295c5cb9f96c35d755641"}, - {file = "numpy-1.23.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1408c3527a74a0209c781ac82bde2182b0f0bf54dea6e6a363fe0cc4488a7ce7"}, - {file = "numpy-1.23.1-cp38-cp38-win32.whl", hash = "sha256:47f10ab202fe4d8495ff484b5561c65dd59177949ca07975663f4494f7269e3e"}, - {file = "numpy-1.23.1-cp38-cp38-win_amd64.whl", hash = "sha256:37e5ebebb0eb54c5b4a9b04e6f3018e16b8ef257d26c8945925ba8105008e645"}, - {file = "numpy-1.23.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:173f28921b15d341afadf6c3898a34f20a0569e4ad5435297ba262ee8941e77b"}, - {file = "numpy-1.23.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:876f60de09734fbcb4e27a97c9a286b51284df1326b1ac5f1bf0ad3678236b22"}, - {file = "numpy-1.23.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:35590b9c33c0f1c9732b3231bb6a72d1e4f77872390c47d50a615686ae7ed3fd"}, - {file = "numpy-1.23.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a35c4e64dfca659fe4d0f1421fc0f05b8ed1ca8c46fb73d9e5a7f175f85696bb"}, - {file = "numpy-1.23.1-cp39-cp39-win32.whl", hash = "sha256:c2f91f88230042a130ceb1b496932aa717dcbd665350beb821534c5c7e15881c"}, - {file = "numpy-1.23.1-cp39-cp39-win_amd64.whl", hash = "sha256:37ece2bd095e9781a7156852e43d18044fd0d742934833335599c583618181b9"}, - {file = "numpy-1.23.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:8002574a6b46ac3b5739a003b5233376aeac5163e5dcd43dd7ad062f3e186129"}, - {file = "numpy-1.23.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d732d17b8a9061540a10fda5bfeabca5785700ab5469a5e9b93aca5e2d3a5fb"}, - {file = "numpy-1.23.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:55df0f7483b822855af67e38fb3a526e787adf189383b4934305565d71c4b148"}, - {file = "numpy-1.23.1.tar.gz", hash = "sha256:d748ef349bfef2e1194b59da37ed5a29c19ea8d7e6342019921ba2ba4fd8b624"}, -] +numpy = [] packaging = [ {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"}, {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"}, ] -pep517 = [ - {file = "pep517-0.12.0-py2.py3-none-any.whl", hash = "sha256:dd884c326898e2c6e11f9e0b64940606a93eb10ea022a2e067959f3a110cf161"}, - {file = "pep517-0.12.0.tar.gz", hash = "sha256:931378d93d11b298cf511dd634cf5ea4cb249a28ef84160b3247ee9afb4e8ab0"}, -] +pep517 = [] platformdirs = [ {file = "platformdirs-2.5.2-py3-none-any.whl", hash = "sha256:027d8e83a2d7de06bbac4e5ef7e023c02b863d7ea5d079477e722bb41ab25788"}, {file = "platformdirs-2.5.2.tar.gz", hash = "sha256:58c8abb07dcb441e6ee4b11d8df0ac856038f944ab98b7be6b27b2a3c7feef19"}, @@ -743,10 +662,7 @@ pluggy = [ {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, ] -pre-commit = [ - {file = "pre_commit-2.20.0-py2.py3-none-any.whl", hash = "sha256:51a5ba7c480ae8072ecdb6933df22d2f812dc897d5fe848778116129a681aac7"}, - {file = "pre_commit-2.20.0.tar.gz", hash = "sha256:a978dac7bc9ec0bcee55c18a277d553b0f419d259dadb4b9418ff2d00eb43959"}, -] +pre-commit = [] py = [ {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, @@ -925,14 +841,12 @@ requests = [ {file = "requests-2.28.1-py3-none-any.whl", hash = "sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349"}, {file = "requests-2.28.1.tar.gz", hash = "sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983"}, ] -requests-mock = [ - {file = "requests-mock-1.9.3.tar.gz", hash = "sha256:8d72abe54546c1fc9696fa1516672f1031d72a55a1d66c85184f972a24ba0eba"}, - {file = "requests_mock-1.9.3-py2.py3-none-any.whl", hash = "sha256:0a2d38a117c08bb78939ec163522976ad59a6b7fdd82b709e23bb98004a44970"}, -] +requests-mock = [] six = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] +thrift = [] toml = [ {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, @@ -945,61 +859,7 @@ typing-extensions = [ {file = "typing_extensions-4.3.0-py3-none-any.whl", hash = "sha256:25642c956049920a5aa49edcdd6ab1e06d7e5d467fc00e0506c44ac86fbfca02"}, {file = "typing_extensions-4.3.0.tar.gz", hash = "sha256:e6d2677a32f47fc7eb2795db1dd15c1f34eff616bcaf2cfb5e997f854fa1c4a6"}, ] -urllib3 = [ - {file = "urllib3-1.26.10-py2.py3-none-any.whl", hash = "sha256:8298d6d56d39be0e3bc13c1c97d133f9b45d797169a0e11cdd0e0489d786f7ec"}, - {file = "urllib3-1.26.10.tar.gz", hash = "sha256:879ba4d1e89654d9769ce13121e0f94310ea32e8d2f8cf587b77c08bbcdb30d6"}, -] -virtualenv = [ - {file = "virtualenv-20.15.1-py2.py3-none-any.whl", hash = "sha256:b30aefac647e86af6d82bfc944c556f8f1a9c90427b2fb4e3bfbf338cb82becf"}, - {file = "virtualenv-20.15.1.tar.gz", hash = "sha256:288171134a2ff3bfb1a2f54f119e77cd1b81c29fc1265a2356f3e8d14c7d58c4"}, -] -zipp = [ - {file = "zipp-3.8.1-py3-none-any.whl", hash = "sha256:47c40d7fe183a6f21403a199b3e4192cca5774656965b0a4988ad2f8feb5f009"}, - {file = "zipp-3.8.1.tar.gz", hash = "sha256:05b45f1ee8f807d0cc928485ca40a07cb491cf092ff587c0df9cb1fd154848d2"}, -] -zstandard = [ - {file = "zstandard-0.18.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ef7e8a200e4c8ac9102ed3c90ed2aa379f6b880f63032200909c1be21951f556"}, - {file = "zstandard-0.18.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2dc466207016564805e56d28375f4f533b525ff50d6776946980dff5465566ac"}, - {file = "zstandard-0.18.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4a2ee1d4f98447f3e5183ecfce5626f983504a4a0c005fbe92e60fa8e5d547ec"}, - {file = "zstandard-0.18.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d956e2f03c7200d7e61345e0880c292783ec26618d0d921dcad470cb195bbce2"}, - {file = "zstandard-0.18.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:ce6f59cba9854fd14da5bfe34217a1501143057313966637b7291d1b0267bd1e"}, - {file = "zstandard-0.18.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a7fa67cba473623848b6e88acf8d799b1906178fd883fb3a1da24561c779593b"}, - {file = "zstandard-0.18.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:cdb44d7284c8c5dd1b66dfb86dda7f4560fa94bfbbc1d2da749ba44831335e32"}, - {file = "zstandard-0.18.0-cp310-cp310-win32.whl", hash = "sha256:63694a376cde0aa8b1971d06ca28e8f8b5f492779cb6ee1cc46bbc3f019a42a5"}, - {file = "zstandard-0.18.0-cp310-cp310-win_amd64.whl", hash = "sha256:702a8324cd90c74d9c8780d02bf55e79da3193c870c9665ad3a11647e3ad1435"}, - {file = "zstandard-0.18.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:46f679bc5dfd938db4fb058218d9dc4db1336ffaf1ea774ff152ecadabd40805"}, - {file = "zstandard-0.18.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dc2a4de9f363b3247d472362a65041fe4c0f59e01a2846b15d13046be866a885"}, - {file = "zstandard-0.18.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bd3220d7627fd4d26397211cb3b560ec7cc4a94b75cfce89e847e8ce7fabe32d"}, - {file = "zstandard-0.18.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:39e98cf4773234bd9cebf9f9db730e451dfcfe435e220f8921242afda8321887"}, - {file = "zstandard-0.18.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5228e596eb1554598c872a337bbe4e5afe41cd1f8b1b15f2e35b50d061e35244"}, - {file = "zstandard-0.18.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d4a8fd45746a6c31e729f35196e80b8f1e9987c59f5ccb8859d7c6a6fbeb9c63"}, - {file = "zstandard-0.18.0-cp36-cp36m-win32.whl", hash = "sha256:4cbb85f29a990c2fdbf7bc63246567061a362ddca886d7fae6f780267c0a9e67"}, - {file = "zstandard-0.18.0-cp36-cp36m-win_amd64.whl", hash = "sha256:bfa6c8549fa18e6497a738b7033c49f94a8e2e30c5fbe2d14d0b5aa8bbc1695d"}, - {file = "zstandard-0.18.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e02043297c1832f2666cd2204f381bef43b10d56929e13c42c10c732c6e3b4ed"}, - {file = "zstandard-0.18.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7231543d38d2b7e02ef7cc78ef7ffd86419437e1114ff08709fe25a160e24bd6"}, - {file = "zstandard-0.18.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c86befac87445927488f5c8f205d11566f64c11519db223e9d282b945fa60dab"}, - {file = "zstandard-0.18.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:999a4e1768f219826ba3fa2064fab1c86dd72fdd47a42536235478c3bb3ca3e2"}, - {file = "zstandard-0.18.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9df59cd1cf3c62075ee2a4da767089d19d874ac3ad42b04a71a167e91b384722"}, - {file = "zstandard-0.18.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:1be31e9e3f7607ee0cdd60915410a5968b205d3e7aa83b7fcf3dd76dbbdb39e0"}, - {file = "zstandard-0.18.0-cp37-cp37m-win32.whl", hash = "sha256:490d11b705b8ae9dc845431bacc8dd1cef2408aede176620a5cd0cd411027936"}, - {file = "zstandard-0.18.0-cp37-cp37m-win_amd64.whl", hash = "sha256:266aba27fa9cc5e9091d3d325ebab1fa260f64e83e42516d5e73947c70216a5b"}, - {file = "zstandard-0.18.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8b2260c4e07dd0723eadb586de7718b61acca4083a490dda69c5719d79bc715c"}, - {file = "zstandard-0.18.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:3af8c2383d02feb6650e9255491ec7d0824f6e6dd2bbe3e521c469c985f31fb1"}, - {file = "zstandard-0.18.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:28723a1d2e4df778573b76b321ebe9f3469ac98988104c2af116dd344802c3f8"}, - {file = "zstandard-0.18.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:19cac7108ff2c342317fad6dc97604b47a41f403c8f19d0bfc396dfadc3638b8"}, - {file = "zstandard-0.18.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:76725d1ee83a8915100a310bbad5d9c1fc6397410259c94033b8318d548d9990"}, - {file = "zstandard-0.18.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d716a7694ce1fa60b20bc10f35c4a22be446ef7f514c8dbc8f858b61976de2fb"}, - {file = "zstandard-0.18.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:49685bf9a55d1ab34bd8423ea22db836ba43a181ac6b045ac4272093d5cb874e"}, - {file = "zstandard-0.18.0-cp38-cp38-win32.whl", hash = "sha256:1af1268a7dc870eb27515fb8db1f3e6c5a555d2b7bcc476fc3bab8886c7265ab"}, - {file = "zstandard-0.18.0-cp38-cp38-win_amd64.whl", hash = "sha256:1dc2d3809e763055a1a6c1a73f2b677320cc9a5aa1a7c6cfb35aee59bddc42d9"}, - {file = "zstandard-0.18.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:eea18c1e7442f2aa9aff1bb84550dbb6a1f711faf6e48e7319de8f2b2e923c2a"}, - {file = "zstandard-0.18.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:8677ffc6a6096cccbd892e558471c901fd821aba12b7fbc63833c7346f549224"}, - {file = "zstandard-0.18.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:083dc08abf03807af9beeb2b6a91c23ad78add2499f828176a3c7b742c44df02"}, - {file = "zstandard-0.18.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c990063664c08169c84474acecc9251ee035871589025cac47c060ff4ec4bc1a"}, - {file = "zstandard-0.18.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:533db8a6fac6248b2cb2c935e7b92f994efbdeb72e1ffa0b354432e087bb5a3e"}, - {file = "zstandard-0.18.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dbb3cb8a082d62b8a73af42291569d266b05605e017a3d8a06a0e5c30b5f10f0"}, - {file = "zstandard-0.18.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d6c85ca5162049ede475b7ec98e87f9390501d44a3d6776ddd504e872464ec25"}, - {file = "zstandard-0.18.0-cp39-cp39-win32.whl", hash = "sha256:75479e7c2b3eebf402c59fbe57d21bc400cefa145ca356ee053b0a08908c5784"}, - {file = "zstandard-0.18.0-cp39-cp39-win_amd64.whl", hash = "sha256:d85bfabad444812133a92fc6fbe463e1d07581dba72f041f07a360e63808b23c"}, - {file = "zstandard-0.18.0.tar.gz", hash = "sha256:0ac0357a0d985b4ff31a854744040d7b5754385d1f98f7145c30e02c6865cb6f"}, -] +urllib3 = [] +virtualenv = [] +zipp = [] +zstandard = [] diff --git a/pyiceberg/catalog/base.py b/pyiceberg/catalog/base.py index a0e2e6296c..49eca489bb 100644 --- a/pyiceberg/catalog/base.py +++ b/pyiceberg/catalog/base.py @@ -91,7 +91,7 @@ def create_table( def load_table(self, identifier: str | Identifier) -> Table: """Loads the table's metadata and returns the table instance. - You can also use this method to check for table existence using 'try catalog.table() except TableNotFoundError' + You can also use this method to check for table existence using 'try catalog.table() except NoSuchTableError' Note: This method doesn't scan data stored in the table. Args: @@ -166,7 +166,7 @@ def drop_namespace(self, namespace: str | Identifier) -> None: """ @abstractmethod - def list_tables(self, namespace: str | Identifier | None = None) -> list[Identifier]: + def list_tables(self, namespace: str | Identifier) -> list[Identifier]: """List tables under the given namespace in the catalog. If namespace not provided, will list all tables in the catalog. diff --git a/pyiceberg/catalog/hive.py b/pyiceberg/catalog/hive.py new file mode 100644 index 0000000000..f04fc22338 --- /dev/null +++ b/pyiceberg/catalog/hive.py @@ -0,0 +1,459 @@ +# 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. +import getpass +import time +from typing import ( + Any, + Dict, + List, + Optional, + Set, + Tuple, + Type, + Union, +) +from urllib.parse import urlparse + +from hive_metastore.ThriftHiveMetastore import Client +from hive_metastore.ttypes import AlreadyExistsException +from hive_metastore.ttypes import Database as HiveDatabase +from hive_metastore.ttypes import ( + FieldSchema, + InvalidOperationException, + MetaException, + NoSuchObjectException, + SerDeInfo, + StorageDescriptor, +) +from hive_metastore.ttypes import Table as HiveTable +from thrift.protocol import TBinaryProtocol +from thrift.transport import TSocket, TTransport + +from pyiceberg.catalog import Identifier, Properties +from pyiceberg.catalog.base import Catalog, PropertiesUpdateSummary +from pyiceberg.exceptions import ( + NamespaceAlreadyExistsError, + NamespaceNotEmptyError, + NoSuchNamespaceError, + NoSuchTableError, + TableAlreadyExistsError, +) +from pyiceberg.schema import Schema +from pyiceberg.table.base import Table +from pyiceberg.table.partitioning import PartitionSpec +from pyiceberg.table.sorting import UNSORTED_SORT_ORDER, SortOrder +from pyiceberg.types import ( + BinaryType, + BooleanType, + DateType, + DecimalType, + DoubleType, + FixedType, + FloatType, + IcebergType, + IntegerType, + ListType, + LongType, + MapType, + StringType, + StructType, + TimestampType, + TimeType, + UUIDType, +) + +# Replace by visitor +hive_types = { + BooleanType: "boolean", + IntegerType: "int", + LongType: "bigint", + FloatType: "float", + DoubleType: "double", + DateType: "date", + TimeType: "string", + TimestampType: "timestamp", + StringType: "string", + UUIDType: "string", + BinaryType: "binary", + FixedType: "binary", + DecimalType: None, + StructType: None, + ListType: None, + MapType: None, +} + +OWNER = "owner" + + +class _HiveClient: + """Helper class to nicely open and close the transport""" + + _transport: TTransport + _client: Client + + def __init__(self, uri: str): + url_parts = urlparse(uri) + transport = TSocket.TSocket(url_parts.hostname, url_parts.port) + self._transport = TTransport.TBufferedTransport(transport) + protocol = TBinaryProtocol.TBinaryProtocol(transport) + + self._client = Client(protocol) + + def __enter__(self) -> Client: + self._transport.open() + return self._client + + def __exit__(self, exc_type, exc_val, exc_tb): + self._transport.close() + + +def _construct_hive_storage_descriptor(schema: Schema, location: Optional[str]) -> StorageDescriptor: + ser_de_info = SerDeInfo(serializationLib="org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe") + return StorageDescriptor( + _convert_schema_to_columns(schema), + location, + "org.apache.hadoop.mapred.FileInputFormat", + "org.apache.hadoop.mapred.FileOutputFormat", + serdeInfo=ser_de_info, + ) + + +def _convert_schema_to_columns(schema: Schema) -> List[FieldSchema]: + return [FieldSchema(field.name, _iceberg_type_to_hive_types(field.field_type), field.doc) for field in schema.fields] + + +def _iceberg_type_to_hive_types(col_type: IcebergType) -> str: + if hive_type := hive_types.get(type(col_type)): + return hive_type + raise NotImplementedError(f"Not yet implemented column type {col_type}") + + +PROP_EXTERNAL = "EXTERNAL" +PROP_TABLE_TYPE = "table_type" +PROP_METADATA_LOCATION = "metadata_location" +PROP_PREVIOUS_METADATA_LOCATION = "previous_metadata_location" + + +def _construct_parameters(metadata_location: str, previous_metadata_location: Optional[str] = None) -> Dict[str, Any]: + properties = {PROP_EXTERNAL: "TRUE", PROP_TABLE_TYPE: "ICEBERG", PROP_METADATA_LOCATION: metadata_location} + if previous_metadata_location: + properties[previous_metadata_location] = previous_metadata_location + + return properties + + +def _annotate_namespace(database: HiveDatabase, properties: Properties) -> HiveDatabase: + params = {} + for key, value in properties.items(): + if key == "comment": + database.description = value + elif key == "location": + database.locationUri = value + else: + params[key] = value + database.parameters = params + return database + + +class HiveCatalog(Catalog): + _client: _HiveClient + + @staticmethod + def identifier_to_database( + identifier: Union[str, Identifier], err: Union[Type[ValueError], Type[NoSuchNamespaceError]] = ValueError + ) -> str: + tuple_identifier = Catalog.identifier_to_tuple(identifier) + if len(tuple_identifier) != 1: + raise err(f"Invalid database, hierarchical namespaces are not supported: {identifier}") + + return tuple_identifier[0] + + @staticmethod + def identifier_to_database_and_table( + identifier: Union[str, Identifier], + err: Union[Type[ValueError], Type[NoSuchTableError], Type[NoSuchNamespaceError]] = ValueError, + ) -> Tuple[str, str]: + tuple_identifier = Catalog.identifier_to_tuple(identifier) + if len(tuple_identifier) != 2: + raise err(f"Invalid path, hierarchical namespaces are not supported: {identifier}") + + return tuple_identifier[0], tuple_identifier[1] + + def __init__(self, name: str, properties: Properties, uri: str): + super().__init__(name, properties) + self._client = _HiveClient(uri) + + def _convert_hive_into_iceberg(self, table: HiveTable) -> Table: + # Requires reading the manifest, will implement this in another PR + # Check the table type + return Table(identifier=(table.dbName, table.tableName)) + + def create_table( + self, + identifier: Union[str, Identifier], + schema: Schema, + location: Optional[str] = None, + partition_spec: Optional[PartitionSpec] = None, + sort_order: SortOrder = UNSORTED_SORT_ORDER, + properties: Optional[Properties] = None, + ) -> Table: + """Create a table + + Args: + identifier: Table identifier. + schema: Table's schema. + location: Location for the table. Optional Argument. + partition_spec: PartitionSpec for the table. + sort_order: SortOrder for the table. + properties: Table properties that can be a string based dictionary. Optional Argument. + + Returns: + Table: the created table instance + + Raises: + AlreadyExistsError: If a table with the name already exists + ValueError: If the identifier is invalid + """ + database_name, table_name = self.identifier_to_database_and_table(identifier) + current_time_millis = int(time.time()) + tbl = HiveTable( + dbName=database_name, + tableName=table_name, + owner=properties[OWNER] if properties and OWNER in properties else getpass.getuser(), + createTime=current_time_millis // 1000, + lastAccessTime=current_time_millis // 1000, + sd=_construct_hive_storage_descriptor(schema, location), + tableType="EXTERNAL_TABLE", + parameters=_construct_parameters("s3://"), + ) + try: + with self._client as open_client: + open_client.create_table(tbl) + hive_table = open_client.get_table(dbname=database_name, tbl_name=table_name) + except AlreadyExistsException as e: + raise TableAlreadyExistsError(f"Table {database_name}.{table_name} already exists") from e + return self._convert_hive_into_iceberg(hive_table) + + def load_table(self, identifier: Union[str, Identifier]) -> Table: + """Loads the table's metadata and returns the table instance. + + You can also use this method to check for table existence using 'try catalog.table() except TableNotFoundError' + Note: This method doesn't scan data stored in the table. + + Args: + identifier: Table identifier. + + Returns: + Table: the table instance with its metadata + + Raises: + NoSuchTableError: If a table with the name does not exist, or the identifier is invalid + """ + database_name, table_name = self.identifier_to_database_and_table(identifier, NoSuchTableError) + try: + with self._client as open_client: + hive_table = open_client.get_table(dbname=database_name, tbl_name=table_name) + except NoSuchObjectException as e: + raise NoSuchTableError(f"Table does not exists: {table_name}") from e + + return self._convert_hive_into_iceberg(hive_table) + + def drop_table(self, identifier: Union[str, Identifier]) -> None: + """Drop a table. + + Args: + identifier: Table identifier. + + Raises: + NoSuchTableError: If a table with the name does not exist, or the identifier is invalid + """ + database_name, table_name = self.identifier_to_database_and_table(identifier, NoSuchTableError) + try: + with self._client as open_client: + open_client.drop_table(dbname=database_name, name=table_name, deleteData=False) + except NoSuchObjectException as e: + # When the namespace doesn't exists, it throws the same error + raise NoSuchTableError(f"Table does not exists: {table_name}") from e + + def purge_table(self, identifier: Union[str, Identifier]) -> None: + # This requires to traverse the reachability set, and drop all the data files. + raise NotImplementedError("Not yet implemented") + + def rename_table(self, from_identifier: Union[str, Identifier], to_identifier: Union[str, Identifier]) -> Table: + """Rename a fully classified table name + + Args: + from_identifier: Existing table identifier. + to_identifier: New table identifier. + + Returns: + Table: the updated table instance with its metadata + + Raises: + ValueError: When the from table identifier is invalid + NoSuchTableError: When a table with the name does not exist + NoSuchNamespaceError: When the destination namespace doesn't exists + """ + from_database_name, from_table_name = self.identifier_to_database_and_table(from_identifier, NoSuchTableError) + to_database_name, to_table_name = self.identifier_to_database_and_table(to_identifier) + try: + with self._client as open_client: + tbl = open_client.get_table(dbname=from_database_name, tbl_name=from_table_name) + tbl.dbName = to_database_name + tbl.tableName = to_table_name + open_client.alter_table(dbname=from_database_name, tbl_name=from_table_name, new_tbl=tbl) + except NoSuchObjectException as e: + raise NoSuchTableError(f"Table does not exist: {from_table_name}") from e + except InvalidOperationException as e: + raise NoSuchNamespaceError(f"Database does not exists: {to_database_name}") from e + return Table() + + def create_namespace(self, namespace: Union[str, Identifier], properties: Optional[Properties] = None) -> None: + """Create a namespace in the catalog. + + Args: + namespace: Namespace identifier + properties: A string dictionary of properties for the given namespace + + Raises: + ValueError: If the identifier is invalid + AlreadyExistsError: If a namespace with the given name already exists + """ + database_name = self.identifier_to_database(namespace) + hive_database = HiveDatabase(name=database_name, parameters=properties) + + try: + with self._client as open_client: + open_client.create_database(_annotate_namespace(hive_database, properties or {})) + except AlreadyExistsException as e: + raise NamespaceAlreadyExistsError(f"Database {database_name} already exists") from e + + def drop_namespace(self, namespace: Union[str, Identifier]) -> None: + """Drop a namespace. + + Args: + namespace: Namespace identifier + + Raises: + NoSuchNamespaceError: If a namespace with the given name does not exist, or the identifier is invalid + NamespaceNotEmptyError: If the namespace is not empty + """ + database_name = self.identifier_to_database(namespace, NoSuchNamespaceError) + try: + with self._client as open_client: + open_client.drop_database(database_name, deleteData=False, cascade=False) + except InvalidOperationException as e: + raise NamespaceNotEmptyError(f"Database {database_name} is not empty") from e + except MetaException as e: + raise NoSuchNamespaceError(f"Database does not exists: {database_name}") from e + + def list_tables(self, namespace: Union[str, Identifier]) -> List[Identifier]: + """List tables under the given namespace in the catalog (including non-Iceberg tables) + + When the database doesn't exist, it will just return an empty list + + Args: + namespace: Database to list. + + Returns: + List[Identifier]: list of table identifiers. + + Raises: + NoSuchNamespaceError: If a namespace with the given name does not exist, or the identifier is invalid + """ + database_name = self.identifier_to_database(namespace, NoSuchNamespaceError) + with self._client as open_client: + return [(database_name, table_name) for table_name in open_client.get_all_tables(db_name=database_name)] + + def list_namespaces(self) -> List[Identifier]: + """List namespaces from the given namespace. If not given, list top-level namespaces from the catalog. + + Returns: + List[Identifier]: a List of namespace identifiers + """ + with self._client as open_client: + return list(map(self.identifier_to_tuple, open_client.get_all_databases())) + + def load_namespace_properties(self, namespace: Union[str, Identifier]) -> Properties: + """Get properties for a namespace. + + Args: + namespace: Namespace identifier + + Returns: + Properties: Properties for the given namespace + + Raises: + NoSuchNamespaceError: If a namespace with the given name does not exist, or identifier is invalid + """ + database_name = self.identifier_to_database(namespace, NoSuchNamespaceError) + try: + with self._client as open_client: + database = open_client.get_database(name=database_name) + properties = database.parameters + properties["location"] = database.locationUri + if comment := database.description: + properties["comment"] = comment + return properties + except NoSuchObjectException as e: + raise NoSuchNamespaceError(f"Database does not exists: {database_name}") from e + + def update_namespace_properties( + self, namespace: Union[str, Identifier], removals: Optional[Set[str]] = None, updates: Optional[Properties] = None + ) -> PropertiesUpdateSummary: + """Removes provided property keys and updates properties for a namespace. + + Args: + namespace: Namespace identifier + removals: Set of property keys that need to be removed. Optional Argument. + updates: Properties to be updated for the given namespace. Optional Argument. + + Raises: + NoSuchNamespaceError: If a namespace with the given name does not exist + ValueError: If removals and updates have overlapping keys. + """ + removed: Set[str] = set() + updated: Set[str] = set() + + if updates and removals: + overlap = set(removals) & set(updates.keys()) + if overlap: + raise ValueError(f"Updates and deletes have an overlap: {overlap}") + + database_name = self.identifier_to_database(namespace, NoSuchNamespaceError) + with self._client as open_client: + try: + database = open_client.get_database(database_name) + parameters = database.parameters + except NoSuchObjectException as e: + raise NoSuchNamespaceError(f"Database does not exists: {database_name}") from e + if removals: + for key in removals: + if key in parameters: + parameters[key] = None + removed.add(key) + if updates: + for key, value in updates.items(): + parameters[key] = value + updated.add(key) + open_client.alter_database(database_name, _annotate_namespace(database, parameters)) + + expected_to_change = (removals or set()).difference(removed) + + return PropertiesUpdateSummary( + removed=list(removed or []), updated=list(updates.keys() if updates else []), missing=list(expected_to_change) + ) diff --git a/pyiceberg/catalog/rest.py b/pyiceberg/catalog/rest.py index b5938267ba..bcedbc5cd4 100644 --- a/pyiceberg/catalog/rest.py +++ b/pyiceberg/catalog/rest.py @@ -327,8 +327,8 @@ def create_table( metadata=table_response.metadata, ) - def list_tables(self, namespace: Optional[Union[str, Identifier]] = None) -> List[Identifier]: - namespace_concat = NAMESPACE_SEPARATOR.join(self.identifier_to_tuple(namespace or "")) + def list_tables(self, namespace: Union[str, Identifier]) -> List[Identifier]: + namespace_concat = NAMESPACE_SEPARATOR.join(self.identifier_to_tuple(namespace)) response = requests.get( self.url(Endpoints.list_tables, namespace=namespace_concat), headers=self.headers, diff --git a/pyiceberg/table/base.py b/pyiceberg/table/base.py index 5e7c06a5b2..5ade9d7251 100644 --- a/pyiceberg/table/base.py +++ b/pyiceberg/table/base.py @@ -27,4 +27,4 @@ class Table(IcebergBaseModel): identifier: Identifier = Field() metadata_location: Optional[str] = Field() - metadata: Union[TableMetadataV1, TableMetadataV2] = Field() + metadata: Optional[Union[TableMetadataV1, TableMetadataV2]] = Field() diff --git a/pyproject.toml b/pyproject.toml index b5f9b1e1d2..438de24049 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,8 +35,11 @@ classifiers = [ packages = [ { include = "pyiceberg" }, + { from = "vendor", include = "fb303" }, + { from = "vendor", include = "hive_metastore" }, ] + [tool.poetry.dependencies] python = "^3.8" mmh3 = "^3.0.0" @@ -50,6 +53,8 @@ zstandard = { version = "^0.18.0", optional = true } python-snappy = { version = "^0.6.1", optional = true } +thrift = { version = "^0.16.0", optional = true } + [tool.poetry.dev-dependencies] pytest = "^7.0.0" pytest-checkdocs = "^2.0.0" @@ -66,6 +71,7 @@ build-backend = "poetry.core.masonry.api" pyarrow = ["pyarrow"] snappy = ["python-snappy"] python-snappy = ["zstandard"] +hive = ["thrift"] [tool.black] line-length = 130 @@ -114,6 +120,14 @@ ignore_missing_imports = true module = "mmh3.*" ignore_missing_imports = true +[[tool.mypy.overrides]] +module = "hive_metastore.*" +ignore_missing_imports = true + +[[tool.mypy.overrides]] +module = "thrift.*" +ignore_missing_imports = true + [[tool.mypy.overrides]] module = "requests_mock.*" ignore_missing_imports = true diff --git a/tests/catalog/test_hive.py b/tests/catalog/test_hive.py new file mode 100644 index 0000000000..77e0de02e7 --- /dev/null +++ b/tests/catalog/test_hive.py @@ -0,0 +1,446 @@ +# 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. +# pylint: disable=protected-access,redefined-outer-name +from unittest.mock import MagicMock, patch + +import pytest +from hive_metastore.ttypes import AlreadyExistsException +from hive_metastore.ttypes import Database as HiveDatabase +from hive_metastore.ttypes import ( + FieldSchema, + InvalidOperationException, + MetaException, + NoSuchObjectException, + SerDeInfo, + SkewedInfo, + StorageDescriptor, +) +from hive_metastore.ttypes import Table as HiveTable + +from pyiceberg.catalog.base import PropertiesUpdateSummary +from pyiceberg.catalog.hive import HiveCatalog +from pyiceberg.exceptions import ( + NamespaceAlreadyExistsError, + NamespaceNotEmptyError, + NoSuchNamespaceError, + NoSuchTableError, +) +from pyiceberg.schema import Schema + +HIVE_CATALOG_NAME = "hive" +HIVE_METASTORE_FAKE_URL = "thrift://unknown:9083" + + +@pytest.fixture +def hive_table() -> HiveTable: + return HiveTable( + tableName="new_tabl2e", + dbName="default", + owner="fokkodriesprong", + createTime=1659092339, + lastAccessTime=1659092, + retention=0, + sd=StorageDescriptor( + cols=[ + FieldSchema(name="foo", type="string", comment=None), + FieldSchema(name="bar", type="int", comment=None), + FieldSchema(name="baz", type="boolean", comment=None), + ], + location="file:/tmp/new_tabl2e", + inputFormat="org.apache.hadoop.mapred.FileInputFormat", + outputFormat="org.apache.hadoop.mapred.FileOutputFormat", + compressed=False, + numBuckets=0, + serdeInfo=SerDeInfo( + name=None, + serializationLib="org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe", + parameters={}, + description=None, + serializerClass=None, + deserializerClass=None, + serdeType=None, + ), + bucketCols=[], + sortCols=[], + parameters={}, + skewedInfo=SkewedInfo(skewedColNames=[], skewedColValues=[], skewedColValueLocationMaps={}), + storedAsSubDirectories=False, + ), + partitionKeys=[], + parameters={"EXTERNAL": "TRUE", "transient_lastDdlTime": "1659092339"}, + viewOriginalText=None, + viewExpandedText=None, + tableType="EXTERNAL_TABLE", + privileges=None, + temporary=False, + rewriteEnabled=False, + creationMetadata=None, + catName="hive", + ownerType=1, + writeId=-1, + isStatsCompliant=None, + colStats=None, + accessType=None, + requiredReadCapabilities=None, + requiredWriteCapabilities=None, + id=None, + fileMetadata=None, + dictionary=None, + txnId=None, + ) + + +@pytest.fixture +def hive_database() -> HiveDatabase: + return HiveDatabase( + name="default", + description=None, + locationUri="file:/tmp/default2.db", + parameters={"test": "property"}, + privileges=None, + ownerName=None, + ownerType=1, + catalogName="hive", + createTime=None, + managedLocationUri=None, + type=None, + connector_name=None, + remote_dbname=None, + ) + + +def test_check_number_of_namespaces(table_schema_simple: Schema): + catalog = HiveCatalog(HIVE_CATALOG_NAME, {}, uri=HIVE_METASTORE_FAKE_URL) + + with pytest.raises(ValueError): + catalog.create_table(("default", "namespace", "table"), schema=table_schema_simple) + + with pytest.raises(ValueError): + catalog.create_table("default.namespace.table", schema=table_schema_simple) + + with pytest.raises(ValueError): + catalog.create_table(("table",), schema=table_schema_simple) + + with pytest.raises(ValueError): + catalog.create_table("table", schema=table_schema_simple) + + +@patch("time.time", MagicMock(return_value=12345000)) +def test_create_table(table_schema_simple: Schema, hive_table: HiveTable): + catalog = HiveCatalog(HIVE_CATALOG_NAME, {}, uri=HIVE_METASTORE_FAKE_URL) + + catalog._client = MagicMock() + catalog._client.__enter__().create_table.return_value = hive_table + catalog._client.__enter__().get_table.return_value = hive_table + + catalog.create_table(("default", "table"), schema=table_schema_simple, properties={"owner": "javaberg"}) + + catalog._client.__enter__().create_table.assert_called_with( + HiveTable( + tableName="table", + dbName="default", + owner="javaberg", + createTime=12345, + lastAccessTime=12345, + retention=None, + sd=StorageDescriptor( + cols=[ + FieldSchema(name="foo", type="string", comment=None), + FieldSchema(name="bar", type="int", comment=None), + FieldSchema(name="baz", type="boolean", comment=None), + ], + location=None, + inputFormat="org.apache.hadoop.mapred.FileInputFormat", + outputFormat="org.apache.hadoop.mapred.FileOutputFormat", + compressed=None, + numBuckets=None, + serdeInfo=SerDeInfo( + name=None, + serializationLib="org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe", + parameters=None, + description=None, + serializerClass=None, + deserializerClass=None, + serdeType=None, + ), + bucketCols=None, + sortCols=None, + parameters=None, + skewedInfo=None, + storedAsSubDirectories=None, + ), + partitionKeys=None, + parameters={"EXTERNAL": "TRUE", "table_type": "ICEBERG", "metadata_location": "s3://"}, + viewOriginalText=None, + viewExpandedText=None, + tableType="EXTERNAL_TABLE", + privileges=None, + temporary=False, + rewriteEnabled=None, + creationMetadata=None, + catName=None, + ownerType=1, + writeId=-1, + isStatsCompliant=None, + colStats=None, + accessType=None, + requiredReadCapabilities=None, + requiredWriteCapabilities=None, + id=None, + fileMetadata=None, + dictionary=None, + txnId=None, + ) + ) + + +def test_load_table(hive_table: HiveTable): + catalog = HiveCatalog(HIVE_CATALOG_NAME, {}, uri=HIVE_METASTORE_FAKE_URL) + + catalog._client = MagicMock() + catalog._client.__enter__().get_table.return_value = hive_table + catalog.load_table(("default", "table")) + + catalog._client.__enter__().get_table.assert_called_with(dbname="default", tbl_name="table") + + +def test_rename_table_from_does_not_exists(): + catalog = HiveCatalog(HIVE_CATALOG_NAME, {}, uri=HIVE_METASTORE_FAKE_URL) + + catalog._client = MagicMock() + catalog._client.__enter__().alter_table.side_effect = NoSuchObjectException( + message="hive.default.does_not_exists table not found" + ) + + with pytest.raises(NoSuchTableError) as exc_info: + catalog.rename_table(("default", "does_not_exists"), ("default", "new_table")) + + assert "Table does not exist: does_not_exists" in str(exc_info.value) + + +def test_rename_table_to_namespace_does_not_exists(): + catalog = HiveCatalog(HIVE_CATALOG_NAME, {}, uri=HIVE_METASTORE_FAKE_URL) + + catalog._client = MagicMock() + catalog._client.__enter__().alter_table.side_effect = InvalidOperationException( + message="Unable to change partition or table. Database default does not exist Check metastore logs for detailed stack.does_not_exists" + ) + + with pytest.raises(NoSuchNamespaceError) as exc_info: + catalog.rename_table(("default", "does_exists"), ("default_does_not_exists", "new_table")) + + assert "Database does not exists: default_does_not_exists" in str(exc_info.value) + + +def test_drop_database_does_not_empty(): + catalog = HiveCatalog(HIVE_CATALOG_NAME, {}, uri=HIVE_METASTORE_FAKE_URL) + + catalog._client = MagicMock() + catalog._client.__enter__().drop_database.side_effect = InvalidOperationException( + message="Database not_empty is not empty. One or more tables exist." + ) + + with pytest.raises(NamespaceNotEmptyError) as exc_info: + catalog.drop_namespace(("not_empty",)) + + assert "Database not_empty is not empty" in str(exc_info.value) + + +def test_drop_database_does_not_exists(): + catalog = HiveCatalog(HIVE_CATALOG_NAME, {}, uri=HIVE_METASTORE_FAKE_URL) + + catalog._client = MagicMock() + catalog._client.__enter__().drop_database.side_effect = MetaException(message="java.lang.NullPointerException") + + with pytest.raises(NoSuchNamespaceError) as exc_info: + catalog.drop_namespace(("does_not_exists",)) + + assert "Database does not exists: does_not_exists" in str(exc_info.value) + + +def test_list_tables(): + catalog = HiveCatalog(HIVE_CATALOG_NAME, {}, uri=HIVE_METASTORE_FAKE_URL) + + catalog._client = MagicMock() + catalog._client.__enter__().get_all_tables.return_value = ["table1", "table2"] + + assert catalog.list_tables("database") == [ + ( + "database", + "table1", + ), + ( + "database", + "table2", + ), + ] + catalog._client.__enter__().get_all_tables.assert_called_with(db_name="database") + + +def test_list_namespaces(): + catalog = HiveCatalog(HIVE_CATALOG_NAME, {}, uri=HIVE_METASTORE_FAKE_URL) + + catalog._client = MagicMock() + catalog._client.__enter__().get_all_databases.return_value = ["namespace1", "namespace2"] + + assert catalog.list_namespaces() == [("namespace1",), ("namespace2",)] + + catalog._client.__enter__().get_all_databases.assert_called() + + +def test_drop_table(): + catalog = HiveCatalog(HIVE_CATALOG_NAME, {}, uri=HIVE_METASTORE_FAKE_URL) + + catalog._client = MagicMock() + catalog._client.__enter__().get_all_databases.return_value = ["namespace1", "namespace2"] + + catalog.drop_table(("default", "table")) + + catalog._client.__enter__().drop_table.assert_called_with(dbname="default", name="table", deleteData=False) + + +def test_drop_table_does_not_exists(): + catalog = HiveCatalog(HIVE_CATALOG_NAME, {}, uri=HIVE_METASTORE_FAKE_URL) + + catalog._client = MagicMock() + catalog._client.__enter__().drop_table.side_effect = NoSuchObjectException(message="does_not_exists") + + with pytest.raises(NoSuchTableError) as exc_info: + catalog.drop_table(("default", "does_not_exists")) + + assert "Table does not exists: does_not_exists" in str(exc_info.value) + + +def test_purge_table(): + catalog = HiveCatalog(HIVE_CATALOG_NAME, {}, uri=HIVE_METASTORE_FAKE_URL) + + with pytest.raises(NotImplementedError): + catalog.purge_table(("default", "does_not_exists")) + + +def test_create_database(): + catalog = HiveCatalog(HIVE_CATALOG_NAME, {}, uri=HIVE_METASTORE_FAKE_URL) + + catalog._client = MagicMock() + catalog._client.__enter__().create_database.return_value = None + + catalog.create_namespace("default", {"property": "true"}) + + catalog._client.__enter__().create_database.assert_called_with( + HiveDatabase( + name="default", + description=None, + locationUri=None, + parameters={"property": "true"}, + privileges=None, + ownerName=None, + ownerType=None, + catalogName=None, + createTime=None, + managedLocationUri=None, + type=None, + connector_name=None, + remote_dbname=None, + ) + ) + + +def test_create_database_already_exists(): + catalog = HiveCatalog(HIVE_CATALOG_NAME, {}, uri=HIVE_METASTORE_FAKE_URL) + + catalog._client = MagicMock() + catalog._client.__enter__().create_database.side_effect = AlreadyExistsException(message="Database default already exists") + + with pytest.raises(NamespaceAlreadyExistsError) as exc_info: + catalog.create_namespace("default") + + assert "Database default already exists" in str(exc_info.value) + + +def test_load_namespace_properties(hive_database: HiveDatabase): + catalog = HiveCatalog(HIVE_CATALOG_NAME, {}, uri=HIVE_METASTORE_FAKE_URL) + + catalog._client = MagicMock() + catalog._client.__enter__().get_database.return_value = hive_database + + assert catalog.load_namespace_properties("default2") == {"location": "file:/tmp/default2.db", "test": "property"} + + catalog._client.__enter__().get_database.assert_called_with(name="default2") + + +def test_load_namespace_properties_does_not_exists(): + catalog = HiveCatalog(HIVE_CATALOG_NAME, {}, uri=HIVE_METASTORE_FAKE_URL) + + catalog._client = MagicMock() + catalog._client.__enter__().get_database.side_effect = NoSuchObjectException(message="does_not_exists") + + with pytest.raises(NoSuchNamespaceError) as exc_info: + catalog.load_namespace_properties(("does_not_exists",)) + + assert "Database does not exists: does_not_exists" in str(exc_info.value) + + +def test_update_namespace_properties(hive_database: HiveDatabase): + catalog = HiveCatalog(HIVE_CATALOG_NAME, {}, uri=HIVE_METASTORE_FAKE_URL) + + catalog._client = MagicMock() + catalog._client.__enter__().get_database.return_value = hive_database + catalog._client.__enter__().alter_database.return_value = None + + assert catalog.update_namespace_properties( + namespace="default", removals={"test", "does_not_exists"}, updates={"label": "core"} + ) == PropertiesUpdateSummary(removed=["test"], updated=["label"], missing=["does_not_exists"]) + + catalog._client.__enter__().alter_database.assert_called_with( + "default", + HiveDatabase( + name="default", + description=None, + locationUri="file:/tmp/default2.db", + parameters={"test": None, "label": "core"}, + privileges=None, + ownerName=None, + ownerType=1, + catalogName="hive", + createTime=None, + managedLocationUri=None, + type=None, + connector_name=None, + remote_dbname=None, + ), + ) + + +def test_update_namespace_properties_namespace_does_not_exists(): + catalog = HiveCatalog(HIVE_CATALOG_NAME, {}, uri=HIVE_METASTORE_FAKE_URL) + + catalog._client = MagicMock() + catalog._client.__enter__().get_database.side_effect = NoSuchObjectException(message="does_not_exists") + + with pytest.raises(NoSuchNamespaceError) as exc_info: + catalog.update_namespace_properties(("does_not_exists",), removals=set(), updates={}) + + assert "Database does not exists: does_not_exists" in str(exc_info.value) + + +def test_update_namespace_properties_overlap(): + catalog = HiveCatalog(HIVE_CATALOG_NAME, {}, uri=HIVE_METASTORE_FAKE_URL) + + with pytest.raises(ValueError) as exc_info: + catalog.update_namespace_properties(("table",), removals=set("a"), updates={"a": "b"}) + + assert "Updates and deletes have an overlap: {'a'}" in str(exc_info.value) diff --git a/vendor/README.md b/vendor/README.md new file mode 100644 index 0000000000..0b55d9e5c6 --- /dev/null +++ b/vendor/README.md @@ -0,0 +1,45 @@ + +# Vendor packages + +Some packages we want to maintain in the repository itself, because there is no good 3rd party alternative. + +## FB303 Thrift client + +fb303 is a base Thrift service and a common set of functionality for querying stats, options, and other information from a service. + +```bash +rm -f /tmp/fb303.thrift +rm -rf fb303 +curl -s https://raw.githubusercontent.com/apache/thrift/master/contrib/fb303/if/fb303.thrift > /tmp/fb303.thrift +rm -rf /tmp/gen-py/ +thrift -gen py -o /tmp/ /tmp/fb303.thrift +mv /tmp/gen-py/fb303 fb303 +``` + +# Hive Metastore Thrift definition + +The thrift definition require the fb303 service as a dependency + +```bash +rm -rf /tmp/hive +mkdir -p /tmp/hive/share/fb303/if/ +curl -s https://raw.githubusercontent.com/apache/thrift/master/contrib/fb303/if/fb303.thrift > /tmp/hive/share/fb303/if/fb303.thrift +curl -s https://raw.githubusercontent.com/apache/hive/master/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift > /tmp/hive/hive_metastore.thrift +thrift -gen py -o /tmp/hive /tmp/hive/hive_metastore.thrift +mv /tmp/hive/gen-py/hive_metastore hive_metastore +``` diff --git a/vendor/fb303/FacebookService.py b/vendor/fb303/FacebookService.py new file mode 100644 index 0000000000..c46b0a82a2 --- /dev/null +++ b/vendor/fb303/FacebookService.py @@ -0,0 +1,2420 @@ +# 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. +# +# Autogenerated by Thrift Compiler (0.16.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py +# + +import logging +import sys + +from thrift.Thrift import ( + TApplicationException, + TMessageType, + TProcessor, + TType, +) +from thrift.transport import TTransport +from thrift.TRecursive import fix_spec + +from .ttypes import * + +all_structs = [] + + +class Iface: + """ + Standard base service + + """ + + def getName(self): + """ + Returns a descriptive name of the service + + """ + pass + + def getVersion(self): + """ + Returns the version of the service + + """ + pass + + def getStatus(self): + """ + Gets the status of this service + + """ + pass + + def getStatusDetails(self): + """ + User friendly description of status, such as why the service is in + the dead or warning state, or what is being started or stopped. + + """ + pass + + def getCounters(self): + """ + Gets the counters for this service + + """ + pass + + def getCounter(self, key): + """ + Gets the value of a single counter + + Parameters: + - key + + """ + pass + + def setOption(self, key, value): + """ + Sets an option + + Parameters: + - key + - value + + """ + pass + + def getOption(self, key): + """ + Gets an option + + Parameters: + - key + + """ + pass + + def getOptions(self): + """ + Gets all options + + """ + pass + + def getCpuProfile(self, profileDurationInSec): + """ + Returns a CPU profile over the given time interval (client and server + must agree on the profile format). + + Parameters: + - profileDurationInSec + + """ + pass + + def aliveSince(self): + """ + Returns the unix time that the server has been running since + + """ + pass + + def reinitialize(self): + """ + Tell the server to reload its configuration, reopen log files, etc + + """ + pass + + def shutdown(self): + """ + Suggest a shutdown to the server + + """ + pass + + +class Client(Iface): + """ + Standard base service + + """ + + def __init__(self, iprot, oprot=None): + self._iprot = self._oprot = iprot + if oprot is not None: + self._oprot = oprot + self._seqid = 0 + + def getName(self): + """ + Returns a descriptive name of the service + + """ + self.send_getName() + return self.recv_getName() + + def send_getName(self): + self._oprot.writeMessageBegin("getName", TMessageType.CALL, self._seqid) + args = getName_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getName(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getName_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getName failed: unknown result") + + def getVersion(self): + """ + Returns the version of the service + + """ + self.send_getVersion() + return self.recv_getVersion() + + def send_getVersion(self): + self._oprot.writeMessageBegin("getVersion", TMessageType.CALL, self._seqid) + args = getVersion_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getVersion(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getVersion_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getVersion failed: unknown result") + + def getStatus(self): + """ + Gets the status of this service + + """ + self.send_getStatus() + return self.recv_getStatus() + + def send_getStatus(self): + self._oprot.writeMessageBegin("getStatus", TMessageType.CALL, self._seqid) + args = getStatus_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getStatus(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getStatus_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getStatus failed: unknown result") + + def getStatusDetails(self): + """ + User friendly description of status, such as why the service is in + the dead or warning state, or what is being started or stopped. + + """ + self.send_getStatusDetails() + return self.recv_getStatusDetails() + + def send_getStatusDetails(self): + self._oprot.writeMessageBegin("getStatusDetails", TMessageType.CALL, self._seqid) + args = getStatusDetails_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getStatusDetails(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getStatusDetails_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getStatusDetails failed: unknown result") + + def getCounters(self): + """ + Gets the counters for this service + + """ + self.send_getCounters() + return self.recv_getCounters() + + def send_getCounters(self): + self._oprot.writeMessageBegin("getCounters", TMessageType.CALL, self._seqid) + args = getCounters_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getCounters(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getCounters_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getCounters failed: unknown result") + + def getCounter(self, key): + """ + Gets the value of a single counter + + Parameters: + - key + + """ + self.send_getCounter(key) + return self.recv_getCounter() + + def send_getCounter(self, key): + self._oprot.writeMessageBegin("getCounter", TMessageType.CALL, self._seqid) + args = getCounter_args() + args.key = key + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getCounter(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getCounter_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getCounter failed: unknown result") + + def setOption(self, key, value): + """ + Sets an option + + Parameters: + - key + - value + + """ + self.send_setOption(key, value) + self.recv_setOption() + + def send_setOption(self, key, value): + self._oprot.writeMessageBegin("setOption", TMessageType.CALL, self._seqid) + args = setOption_args() + args.key = key + args.value = value + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_setOption(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = setOption_result() + result.read(iprot) + iprot.readMessageEnd() + return + + def getOption(self, key): + """ + Gets an option + + Parameters: + - key + + """ + self.send_getOption(key) + return self.recv_getOption() + + def send_getOption(self, key): + self._oprot.writeMessageBegin("getOption", TMessageType.CALL, self._seqid) + args = getOption_args() + args.key = key + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getOption(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getOption_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getOption failed: unknown result") + + def getOptions(self): + """ + Gets all options + + """ + self.send_getOptions() + return self.recv_getOptions() + + def send_getOptions(self): + self._oprot.writeMessageBegin("getOptions", TMessageType.CALL, self._seqid) + args = getOptions_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getOptions(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getOptions_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getOptions failed: unknown result") + + def getCpuProfile(self, profileDurationInSec): + """ + Returns a CPU profile over the given time interval (client and server + must agree on the profile format). + + Parameters: + - profileDurationInSec + + """ + self.send_getCpuProfile(profileDurationInSec) + return self.recv_getCpuProfile() + + def send_getCpuProfile(self, profileDurationInSec): + self._oprot.writeMessageBegin("getCpuProfile", TMessageType.CALL, self._seqid) + args = getCpuProfile_args() + args.profileDurationInSec = profileDurationInSec + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getCpuProfile(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getCpuProfile_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getCpuProfile failed: unknown result") + + def aliveSince(self): + """ + Returns the unix time that the server has been running since + + """ + self.send_aliveSince() + return self.recv_aliveSince() + + def send_aliveSince(self): + self._oprot.writeMessageBegin("aliveSince", TMessageType.CALL, self._seqid) + args = aliveSince_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_aliveSince(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = aliveSince_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "aliveSince failed: unknown result") + + def reinitialize(self): + """ + Tell the server to reload its configuration, reopen log files, etc + + """ + self.send_reinitialize() + + def send_reinitialize(self): + self._oprot.writeMessageBegin("reinitialize", TMessageType.ONEWAY, self._seqid) + args = reinitialize_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def shutdown(self): + """ + Suggest a shutdown to the server + + """ + self.send_shutdown() + + def send_shutdown(self): + self._oprot.writeMessageBegin("shutdown", TMessageType.ONEWAY, self._seqid) + args = shutdown_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + +class Processor(Iface, TProcessor): + def __init__(self, handler): + self._handler = handler + self._processMap = {} + self._processMap["getName"] = Processor.process_getName + self._processMap["getVersion"] = Processor.process_getVersion + self._processMap["getStatus"] = Processor.process_getStatus + self._processMap["getStatusDetails"] = Processor.process_getStatusDetails + self._processMap["getCounters"] = Processor.process_getCounters + self._processMap["getCounter"] = Processor.process_getCounter + self._processMap["setOption"] = Processor.process_setOption + self._processMap["getOption"] = Processor.process_getOption + self._processMap["getOptions"] = Processor.process_getOptions + self._processMap["getCpuProfile"] = Processor.process_getCpuProfile + self._processMap["aliveSince"] = Processor.process_aliveSince + self._processMap["reinitialize"] = Processor.process_reinitialize + self._processMap["shutdown"] = Processor.process_shutdown + self._on_message_begin = None + + def on_message_begin(self, func): + self._on_message_begin = func + + def process(self, iprot, oprot): + (name, type, seqid) = iprot.readMessageBegin() + if self._on_message_begin: + self._on_message_begin(name, type, seqid) + if name not in self._processMap: + iprot.skip(TType.STRUCT) + iprot.readMessageEnd() + x = TApplicationException(TApplicationException.UNKNOWN_METHOD, "Unknown function %s" % (name)) + oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) + x.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + return + else: + self._processMap[name](self, seqid, iprot, oprot) + return True + + def process_getName(self, seqid, iprot, oprot): + args = getName_args() + args.read(iprot) + iprot.readMessageEnd() + result = getName_result() + try: + result.success = self._handler.getName() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("getName", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getVersion(self, seqid, iprot, oprot): + args = getVersion_args() + args.read(iprot) + iprot.readMessageEnd() + result = getVersion_result() + try: + result.success = self._handler.getVersion() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("getVersion", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getStatus(self, seqid, iprot, oprot): + args = getStatus_args() + args.read(iprot) + iprot.readMessageEnd() + result = getStatus_result() + try: + result.success = self._handler.getStatus() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("getStatus", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getStatusDetails(self, seqid, iprot, oprot): + args = getStatusDetails_args() + args.read(iprot) + iprot.readMessageEnd() + result = getStatusDetails_result() + try: + result.success = self._handler.getStatusDetails() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("getStatusDetails", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getCounters(self, seqid, iprot, oprot): + args = getCounters_args() + args.read(iprot) + iprot.readMessageEnd() + result = getCounters_result() + try: + result.success = self._handler.getCounters() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("getCounters", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getCounter(self, seqid, iprot, oprot): + args = getCounter_args() + args.read(iprot) + iprot.readMessageEnd() + result = getCounter_result() + try: + result.success = self._handler.getCounter(args.key) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("getCounter", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_setOption(self, seqid, iprot, oprot): + args = setOption_args() + args.read(iprot) + iprot.readMessageEnd() + result = setOption_result() + try: + self._handler.setOption(args.key, args.value) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("setOption", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getOption(self, seqid, iprot, oprot): + args = getOption_args() + args.read(iprot) + iprot.readMessageEnd() + result = getOption_result() + try: + result.success = self._handler.getOption(args.key) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("getOption", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getOptions(self, seqid, iprot, oprot): + args = getOptions_args() + args.read(iprot) + iprot.readMessageEnd() + result = getOptions_result() + try: + result.success = self._handler.getOptions() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("getOptions", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getCpuProfile(self, seqid, iprot, oprot): + args = getCpuProfile_args() + args.read(iprot) + iprot.readMessageEnd() + result = getCpuProfile_result() + try: + result.success = self._handler.getCpuProfile(args.profileDurationInSec) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("getCpuProfile", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_aliveSince(self, seqid, iprot, oprot): + args = aliveSince_args() + args.read(iprot) + iprot.readMessageEnd() + result = aliveSince_result() + try: + result.success = self._handler.aliveSince() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("aliveSince", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_reinitialize(self, seqid, iprot, oprot): + args = reinitialize_args() + args.read(iprot) + iprot.readMessageEnd() + try: + self._handler.reinitialize() + except TTransport.TTransportException: + raise + except Exception: + logging.exception("Exception in oneway handler") + + def process_shutdown(self, seqid, iprot, oprot): + args = shutdown_args() + args.read(iprot) + iprot.readMessageEnd() + try: + self._handler.shutdown() + except TTransport.TTransportException: + raise + except Exception: + logging.exception("Exception in oneway handler") + + +# HELPER FUNCTIONS AND STRUCTURES + + +class getName_args: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("getName_args") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(getName_args) +getName_args.thrift_spec = () + + +class getName_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRING: + self.success = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("getName_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString(self.success.encode("utf-8") if sys.version_info[0] == 2 else self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(getName_result) +getName_result.thrift_spec = ( + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 +) + + +class getVersion_args: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("getVersion_args") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(getVersion_args) +getVersion_args.thrift_spec = () + + +class getVersion_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRING: + self.success = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("getVersion_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString(self.success.encode("utf-8") if sys.version_info[0] == 2 else self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(getVersion_result) +getVersion_result.thrift_spec = ( + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 +) + + +class getStatus_args: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("getStatus_args") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(getStatus_args) +getStatus_args.thrift_spec = () + + +class getStatus_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I32: + self.success = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("getStatus_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(getStatus_result) +getStatus_result.thrift_spec = ( + ( + 0, + TType.I32, + "success", + None, + None, + ), # 0 +) + + +class getStatusDetails_args: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("getStatusDetails_args") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(getStatusDetails_args) +getStatusDetails_args.thrift_spec = () + + +class getStatusDetails_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRING: + self.success = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("getStatusDetails_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString(self.success.encode("utf-8") if sys.version_info[0] == 2 else self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(getStatusDetails_result) +getStatusDetails_result.thrift_spec = ( + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 +) + + +class getCounters_args: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("getCounters_args") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(getCounters_args) +getCounters_args.thrift_spec = () + + +class getCounters_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.MAP: + self.success = {} + (_ktype1, _vtype2, _size0) = iprot.readMapBegin() + for _i4 in range(_size0): + _key5 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val6 = iprot.readI64() + self.success[_key5] = _val6 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("getCounters_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.MAP, 0) + oprot.writeMapBegin(TType.STRING, TType.I64, len(self.success)) + for kiter7, viter8 in self.success.items(): + oprot.writeString(kiter7.encode("utf-8") if sys.version_info[0] == 2 else kiter7) + oprot.writeI64(viter8) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(getCounters_result) +getCounters_result.thrift_spec = ( + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.I64, None, False), + None, + ), # 0 +) + + +class getCounter_args: + """ + Attributes: + - key + + """ + + def __init__( + self, + key=None, + ): + self.key = key + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.key = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("getCounter_args") + if self.key is not None: + oprot.writeFieldBegin("key", TType.STRING, 1) + oprot.writeString(self.key.encode("utf-8") if sys.version_info[0] == 2 else self.key) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(getCounter_args) +getCounter_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "key", + "UTF8", + None, + ), # 1 +) + + +class getCounter_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I64: + self.success = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("getCounter_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.I64, 0) + oprot.writeI64(self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(getCounter_result) +getCounter_result.thrift_spec = ( + ( + 0, + TType.I64, + "success", + None, + None, + ), # 0 +) + + +class setOption_args: + """ + Attributes: + - key + - value + + """ + + def __init__( + self, + key=None, + value=None, + ): + self.key = key + self.value = value + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.key = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.value = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("setOption_args") + if self.key is not None: + oprot.writeFieldBegin("key", TType.STRING, 1) + oprot.writeString(self.key.encode("utf-8") if sys.version_info[0] == 2 else self.key) + oprot.writeFieldEnd() + if self.value is not None: + oprot.writeFieldBegin("value", TType.STRING, 2) + oprot.writeString(self.value.encode("utf-8") if sys.version_info[0] == 2 else self.value) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(setOption_args) +setOption_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "key", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "value", + "UTF8", + None, + ), # 2 +) + + +class setOption_result: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("setOption_result") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(setOption_result) +setOption_result.thrift_spec = () + + +class getOption_args: + """ + Attributes: + - key + + """ + + def __init__( + self, + key=None, + ): + self.key = key + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.key = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("getOption_args") + if self.key is not None: + oprot.writeFieldBegin("key", TType.STRING, 1) + oprot.writeString(self.key.encode("utf-8") if sys.version_info[0] == 2 else self.key) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(getOption_args) +getOption_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "key", + "UTF8", + None, + ), # 1 +) + + +class getOption_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRING: + self.success = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("getOption_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString(self.success.encode("utf-8") if sys.version_info[0] == 2 else self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(getOption_result) +getOption_result.thrift_spec = ( + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 +) + + +class getOptions_args: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("getOptions_args") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(getOptions_args) +getOptions_args.thrift_spec = () + + +class getOptions_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.MAP: + self.success = {} + (_ktype10, _vtype11, _size9) = iprot.readMapBegin() + for _i13 in range(_size9): + _key14 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val15 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success[_key14] = _val15 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("getOptions_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.MAP, 0) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) + for kiter16, viter17 in self.success.items(): + oprot.writeString(kiter16.encode("utf-8") if sys.version_info[0] == 2 else kiter16) + oprot.writeString(viter17.encode("utf-8") if sys.version_info[0] == 2 else viter17) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(getOptions_result) +getOptions_result.thrift_spec = ( + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 +) + + +class getCpuProfile_args: + """ + Attributes: + - profileDurationInSec + + """ + + def __init__( + self, + profileDurationInSec=None, + ): + self.profileDurationInSec = profileDurationInSec + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.profileDurationInSec = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("getCpuProfile_args") + if self.profileDurationInSec is not None: + oprot.writeFieldBegin("profileDurationInSec", TType.I32, 1) + oprot.writeI32(self.profileDurationInSec) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(getCpuProfile_args) +getCpuProfile_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.I32, + "profileDurationInSec", + None, + None, + ), # 1 +) + + +class getCpuProfile_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRING: + self.success = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("getCpuProfile_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString(self.success.encode("utf-8") if sys.version_info[0] == 2 else self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(getCpuProfile_result) +getCpuProfile_result.thrift_spec = ( + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 +) + + +class aliveSince_args: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("aliveSince_args") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(aliveSince_args) +aliveSince_args.thrift_spec = () + + +class aliveSince_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I64: + self.success = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("aliveSince_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.I64, 0) + oprot.writeI64(self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(aliveSince_result) +aliveSince_result.thrift_spec = ( + ( + 0, + TType.I64, + "success", + None, + None, + ), # 0 +) + + +class reinitialize_args: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("reinitialize_args") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(reinitialize_args) +reinitialize_args.thrift_spec = () + + +class shutdown_args: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("shutdown_args") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(shutdown_args) +shutdown_args.thrift_spec = () +fix_spec(all_structs) +del all_structs diff --git a/vendor/fb303/__init__.py b/vendor/fb303/__init__.py new file mode 100644 index 0000000000..398041beaf --- /dev/null +++ b/vendor/fb303/__init__.py @@ -0,0 +1,18 @@ +# 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. + +__all__ = ["ttypes", "constants", "FacebookService"] diff --git a/vendor/fb303/constants.py b/vendor/fb303/constants.py new file mode 100644 index 0000000000..3361fd3904 --- /dev/null +++ b/vendor/fb303/constants.py @@ -0,0 +1,26 @@ +# 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. +# +# Autogenerated by Thrift Compiler (0.16.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py +# + + + diff --git a/vendor/fb303/ttypes.py b/vendor/fb303/ttypes.py new file mode 100644 index 0000000000..bf2c4e2955 --- /dev/null +++ b/vendor/fb303/ttypes.py @@ -0,0 +1,64 @@ +# 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. +# +# Autogenerated by Thrift Compiler (0.16.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py +# + + +from thrift.TRecursive import fix_spec + +all_structs = [] + + +class fb_status: + """ + Common status reporting mechanism across all services + + """ + + DEAD = 0 + STARTING = 1 + ALIVE = 2 + STOPPING = 3 + STOPPED = 4 + WARNING = 5 + + _VALUES_TO_NAMES = { + 0: "DEAD", + 1: "STARTING", + 2: "ALIVE", + 3: "STOPPING", + 4: "STOPPED", + 5: "WARNING", + } + + _NAMES_TO_VALUES = { + "DEAD": 0, + "STARTING": 1, + "ALIVE": 2, + "STOPPING": 3, + "STOPPED": 4, + "WARNING": 5, + } + + +fix_spec(all_structs) +del all_structs diff --git a/vendor/hive_metastore/ThriftHiveMetastore.py b/vendor/hive_metastore/ThriftHiveMetastore.py new file mode 100644 index 0000000000..4d25c087c7 --- /dev/null +++ b/vendor/hive_metastore/ThriftHiveMetastore.py @@ -0,0 +1,72960 @@ +# 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. +# +# Autogenerated by Thrift Compiler (0.16.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py +# + +import logging +import sys + +import fb303.FacebookService +from thrift.Thrift import ( + TApplicationException, + TMessageType, + TProcessor, + TType, +) +from thrift.transport import TTransport +from thrift.TRecursive import fix_spec + +from .ttypes import * + +all_structs = [] + + +class Iface(fb303.FacebookService.Iface): + """ + This interface is live. + + """ + + def getMetaConf(self, key): + """ + Parameters: + - key + + """ + pass + + def setMetaConf(self, key, value): + """ + Parameters: + - key + - value + + """ + pass + + def create_catalog(self, catalog): + """ + Parameters: + - catalog + + """ + pass + + def alter_catalog(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def get_catalog(self, catName): + """ + Parameters: + - catName + + """ + pass + + def get_catalogs(self): + pass + + def drop_catalog(self, catName): + """ + Parameters: + - catName + + """ + pass + + def create_database(self, database): + """ + Parameters: + - database + + """ + pass + + def get_database(self, name): + """ + Parameters: + - name + + """ + pass + + def get_database_req(self, request): + """ + Parameters: + - request + + """ + pass + + def drop_database(self, name, deleteData, cascade): + """ + Parameters: + - name + - deleteData + - cascade + + """ + pass + + def drop_database_req(self, req): + """ + Parameters: + - req + + """ + pass + + def get_databases(self, pattern): + """ + Parameters: + - pattern + + """ + pass + + def get_all_databases(self): + pass + + def alter_database(self, dbname, db): + """ + Parameters: + - dbname + - db + + """ + pass + + def create_dataconnector(self, connector): + """ + Parameters: + - connector + + """ + pass + + def get_dataconnector_req(self, request): + """ + Parameters: + - request + + """ + pass + + def drop_dataconnector(self, name, ifNotExists, checkReferences): + """ + Parameters: + - name + - ifNotExists + - checkReferences + + """ + pass + + def get_dataconnectors(self): + pass + + def alter_dataconnector(self, name, connector): + """ + Parameters: + - name + - connector + + """ + pass + + def get_type(self, name): + """ + Parameters: + - name + + """ + pass + + def create_type(self, type): + """ + Parameters: + - type + + """ + pass + + def drop_type(self, type): + """ + Parameters: + - type + + """ + pass + + def get_type_all(self, name): + """ + Parameters: + - name + + """ + pass + + def get_fields(self, db_name, table_name): + """ + Parameters: + - db_name + - table_name + + """ + pass + + def get_fields_with_environment_context(self, db_name, table_name, environment_context): + """ + Parameters: + - db_name + - table_name + - environment_context + + """ + pass + + def get_fields_req(self, req): + """ + Parameters: + - req + + """ + pass + + def get_schema(self, db_name, table_name): + """ + Parameters: + - db_name + - table_name + + """ + pass + + def get_schema_with_environment_context(self, db_name, table_name, environment_context): + """ + Parameters: + - db_name + - table_name + - environment_context + + """ + pass + + def get_schema_req(self, req): + """ + Parameters: + - req + + """ + pass + + def create_table(self, tbl): + """ + Parameters: + - tbl + + """ + pass + + def create_table_with_environment_context(self, tbl, environment_context): + """ + Parameters: + - tbl + - environment_context + + """ + pass + + def create_table_with_constraints( + self, tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints, defaultConstraints, checkConstraints + ): + """ + Parameters: + - tbl + - primaryKeys + - foreignKeys + - uniqueConstraints + - notNullConstraints + - defaultConstraints + - checkConstraints + + """ + pass + + def create_table_req(self, request): + """ + Parameters: + - request + + """ + pass + + def drop_constraint(self, req): + """ + Parameters: + - req + + """ + pass + + def add_primary_key(self, req): + """ + Parameters: + - req + + """ + pass + + def add_foreign_key(self, req): + """ + Parameters: + - req + + """ + pass + + def add_unique_constraint(self, req): + """ + Parameters: + - req + + """ + pass + + def add_not_null_constraint(self, req): + """ + Parameters: + - req + + """ + pass + + def add_default_constraint(self, req): + """ + Parameters: + - req + + """ + pass + + def add_check_constraint(self, req): + """ + Parameters: + - req + + """ + pass + + def translate_table_dryrun(self, request): + """ + Parameters: + - request + + """ + pass + + def drop_table(self, dbname, name, deleteData): + """ + Parameters: + - dbname + - name + - deleteData + + """ + pass + + def drop_table_with_environment_context(self, dbname, name, deleteData, environment_context): + """ + Parameters: + - dbname + - name + - deleteData + - environment_context + + """ + pass + + def truncate_table(self, dbName, tableName, partNames): + """ + Parameters: + - dbName + - tableName + - partNames + + """ + pass + + def truncate_table_req(self, req): + """ + Parameters: + - req + + """ + pass + + def get_tables(self, db_name, pattern): + """ + Parameters: + - db_name + - pattern + + """ + pass + + def get_tables_by_type(self, db_name, pattern, tableType): + """ + Parameters: + - db_name + - pattern + - tableType + + """ + pass + + def get_all_materialized_view_objects_for_rewriting(self): + pass + + def get_materialized_views_for_rewriting(self, db_name): + """ + Parameters: + - db_name + + """ + pass + + def get_table_meta(self, db_patterns, tbl_patterns, tbl_types): + """ + Parameters: + - db_patterns + - tbl_patterns + - tbl_types + + """ + pass + + def get_all_tables(self, db_name): + """ + Parameters: + - db_name + + """ + pass + + def get_table(self, dbname, tbl_name): + """ + Parameters: + - dbname + - tbl_name + + """ + pass + + def get_table_objects_by_name(self, dbname, tbl_names): + """ + Parameters: + - dbname + - tbl_names + + """ + pass + + def get_tables_ext(self, req): + """ + Parameters: + - req + + """ + pass + + def get_table_req(self, req): + """ + Parameters: + - req + + """ + pass + + def get_table_objects_by_name_req(self, req): + """ + Parameters: + - req + + """ + pass + + def get_materialization_invalidation_info(self, creation_metadata, validTxnList): + """ + Parameters: + - creation_metadata + - validTxnList + + """ + pass + + def update_creation_metadata(self, catName, dbname, tbl_name, creation_metadata): + """ + Parameters: + - catName + - dbname + - tbl_name + - creation_metadata + + """ + pass + + def get_table_names_by_filter(self, dbname, filter, max_tables): + """ + Parameters: + - dbname + - filter + - max_tables + + """ + pass + + def alter_table(self, dbname, tbl_name, new_tbl): + """ + Parameters: + - dbname + - tbl_name + - new_tbl + + """ + pass + + def alter_table_with_environment_context(self, dbname, tbl_name, new_tbl, environment_context): + """ + Parameters: + - dbname + - tbl_name + - new_tbl + - environment_context + + """ + pass + + def alter_table_with_cascade(self, dbname, tbl_name, new_tbl, cascade): + """ + Parameters: + - dbname + - tbl_name + - new_tbl + - cascade + + """ + pass + + def alter_table_req(self, req): + """ + Parameters: + - req + + """ + pass + + def add_partition(self, new_part): + """ + Parameters: + - new_part + + """ + pass + + def add_partition_with_environment_context(self, new_part, environment_context): + """ + Parameters: + - new_part + - environment_context + + """ + pass + + def add_partitions(self, new_parts): + """ + Parameters: + - new_parts + + """ + pass + + def add_partitions_pspec(self, new_parts): + """ + Parameters: + - new_parts + + """ + pass + + def append_partition(self, db_name, tbl_name, part_vals): + """ + Parameters: + - db_name + - tbl_name + - part_vals + + """ + pass + + def add_partitions_req(self, request): + """ + Parameters: + - request + + """ + pass + + def append_partition_with_environment_context(self, db_name, tbl_name, part_vals, environment_context): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - environment_context + + """ + pass + + def append_partition_by_name(self, db_name, tbl_name, part_name): + """ + Parameters: + - db_name + - tbl_name + - part_name + + """ + pass + + def append_partition_by_name_with_environment_context(self, db_name, tbl_name, part_name, environment_context): + """ + Parameters: + - db_name + - tbl_name + - part_name + - environment_context + + """ + pass + + def drop_partition(self, db_name, tbl_name, part_vals, deleteData): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - deleteData + + """ + pass + + def drop_partition_with_environment_context(self, db_name, tbl_name, part_vals, deleteData, environment_context): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - deleteData + - environment_context + + """ + pass + + def drop_partition_by_name(self, db_name, tbl_name, part_name, deleteData): + """ + Parameters: + - db_name + - tbl_name + - part_name + - deleteData + + """ + pass + + def drop_partition_by_name_with_environment_context(self, db_name, tbl_name, part_name, deleteData, environment_context): + """ + Parameters: + - db_name + - tbl_name + - part_name + - deleteData + - environment_context + + """ + pass + + def drop_partitions_req(self, req): + """ + Parameters: + - req + + """ + pass + + def get_partition(self, db_name, tbl_name, part_vals): + """ + Parameters: + - db_name + - tbl_name + - part_vals + + """ + pass + + def get_partition_req(self, req): + """ + Parameters: + - req + + """ + pass + + def exchange_partition(self, partitionSpecs, source_db, source_table_name, dest_db, dest_table_name): + """ + Parameters: + - partitionSpecs + - source_db + - source_table_name + - dest_db + - dest_table_name + + """ + pass + + def exchange_partitions(self, partitionSpecs, source_db, source_table_name, dest_db, dest_table_name): + """ + Parameters: + - partitionSpecs + - source_db + - source_table_name + - dest_db + - dest_table_name + + """ + pass + + def get_partition_with_auth(self, db_name, tbl_name, part_vals, user_name, group_names): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - user_name + - group_names + + """ + pass + + def get_partition_by_name(self, db_name, tbl_name, part_name): + """ + Parameters: + - db_name + - tbl_name + - part_name + + """ + pass + + def get_partitions(self, db_name, tbl_name, max_parts): + """ + Parameters: + - db_name + - tbl_name + - max_parts + + """ + pass + + def get_partitions_req(self, req): + """ + Parameters: + - req + + """ + pass + + def get_partitions_with_auth(self, db_name, tbl_name, max_parts, user_name, group_names): + """ + Parameters: + - db_name + - tbl_name + - max_parts + - user_name + - group_names + + """ + pass + + def get_partitions_pspec(self, db_name, tbl_name, max_parts): + """ + Parameters: + - db_name + - tbl_name + - max_parts + + """ + pass + + def get_partition_names(self, db_name, tbl_name, max_parts): + """ + Parameters: + - db_name + - tbl_name + - max_parts + + """ + pass + + def get_partition_values(self, request): + """ + Parameters: + - request + + """ + pass + + def get_partitions_ps(self, db_name, tbl_name, part_vals, max_parts): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - max_parts + + """ + pass + + def get_partitions_ps_with_auth(self, db_name, tbl_name, part_vals, max_parts, user_name, group_names): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - max_parts + - user_name + - group_names + + """ + pass + + def get_partitions_ps_with_auth_req(self, req): + """ + Parameters: + - req + + """ + pass + + def get_partition_names_ps(self, db_name, tbl_name, part_vals, max_parts): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - max_parts + + """ + pass + + def get_partition_names_ps_req(self, req): + """ + Parameters: + - req + + """ + pass + + def get_partition_names_req(self, req): + """ + Parameters: + - req + + """ + pass + + def get_partitions_by_filter(self, db_name, tbl_name, filter, max_parts): + """ + Parameters: + - db_name + - tbl_name + - filter + - max_parts + + """ + pass + + def get_part_specs_by_filter(self, db_name, tbl_name, filter, max_parts): + """ + Parameters: + - db_name + - tbl_name + - filter + - max_parts + + """ + pass + + def get_partitions_by_expr(self, req): + """ + Parameters: + - req + + """ + pass + + def get_partitions_spec_by_expr(self, req): + """ + Parameters: + - req + + """ + pass + + def get_num_partitions_by_filter(self, db_name, tbl_name, filter): + """ + Parameters: + - db_name + - tbl_name + - filter + + """ + pass + + def get_partitions_by_names(self, db_name, tbl_name, names): + """ + Parameters: + - db_name + - tbl_name + - names + + """ + pass + + def get_partitions_by_names_req(self, req): + """ + Parameters: + - req + + """ + pass + + def alter_partition(self, db_name, tbl_name, new_part): + """ + Parameters: + - db_name + - tbl_name + - new_part + + """ + pass + + def alter_partitions(self, db_name, tbl_name, new_parts): + """ + Parameters: + - db_name + - tbl_name + - new_parts + + """ + pass + + def alter_partitions_with_environment_context(self, db_name, tbl_name, new_parts, environment_context): + """ + Parameters: + - db_name + - tbl_name + - new_parts + - environment_context + + """ + pass + + def alter_partitions_req(self, req): + """ + Parameters: + - req + + """ + pass + + def alter_partition_with_environment_context(self, db_name, tbl_name, new_part, environment_context): + """ + Parameters: + - db_name + - tbl_name + - new_part + - environment_context + + """ + pass + + def rename_partition(self, db_name, tbl_name, part_vals, new_part): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - new_part + + """ + pass + + def rename_partition_req(self, req): + """ + Parameters: + - req + + """ + pass + + def partition_name_has_valid_characters(self, part_vals, throw_exception): + """ + Parameters: + - part_vals + - throw_exception + + """ + pass + + def get_config_value(self, name, defaultValue): + """ + Parameters: + - name + - defaultValue + + """ + pass + + def partition_name_to_vals(self, part_name): + """ + Parameters: + - part_name + + """ + pass + + def partition_name_to_spec(self, part_name): + """ + Parameters: + - part_name + + """ + pass + + def markPartitionForEvent(self, db_name, tbl_name, part_vals, eventType): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - eventType + + """ + pass + + def isPartitionMarkedForEvent(self, db_name, tbl_name, part_vals, eventType): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - eventType + + """ + pass + + def get_primary_keys(self, request): + """ + Parameters: + - request + + """ + pass + + def get_foreign_keys(self, request): + """ + Parameters: + - request + + """ + pass + + def get_unique_constraints(self, request): + """ + Parameters: + - request + + """ + pass + + def get_not_null_constraints(self, request): + """ + Parameters: + - request + + """ + pass + + def get_default_constraints(self, request): + """ + Parameters: + - request + + """ + pass + + def get_check_constraints(self, request): + """ + Parameters: + - request + + """ + pass + + def get_all_table_constraints(self, request): + """ + Parameters: + - request + + """ + pass + + def update_table_column_statistics(self, stats_obj): + """ + Parameters: + - stats_obj + + """ + pass + + def update_partition_column_statistics(self, stats_obj): + """ + Parameters: + - stats_obj + + """ + pass + + def update_table_column_statistics_req(self, req): + """ + Parameters: + - req + + """ + pass + + def update_partition_column_statistics_req(self, req): + """ + Parameters: + - req + + """ + pass + + def update_transaction_statistics(self, req): + """ + Parameters: + - req + + """ + pass + + def get_table_column_statistics(self, db_name, tbl_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - col_name + + """ + pass + + def get_partition_column_statistics(self, db_name, tbl_name, part_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - part_name + - col_name + + """ + pass + + def get_table_statistics_req(self, request): + """ + Parameters: + - request + + """ + pass + + def get_partitions_statistics_req(self, request): + """ + Parameters: + - request + + """ + pass + + def get_aggr_stats_for(self, request): + """ + Parameters: + - request + + """ + pass + + def set_aggr_stats_for(self, request): + """ + Parameters: + - request + + """ + pass + + def delete_partition_column_statistics(self, db_name, tbl_name, part_name, col_name, engine): + """ + Parameters: + - db_name + - tbl_name + - part_name + - col_name + - engine + + """ + pass + + def delete_table_column_statistics(self, db_name, tbl_name, col_name, engine): + """ + Parameters: + - db_name + - tbl_name + - col_name + - engine + + """ + pass + + def create_function(self, func): + """ + Parameters: + - func + + """ + pass + + def drop_function(self, dbName, funcName): + """ + Parameters: + - dbName + - funcName + + """ + pass + + def alter_function(self, dbName, funcName, newFunc): + """ + Parameters: + - dbName + - funcName + - newFunc + + """ + pass + + def get_functions(self, dbName, pattern): + """ + Parameters: + - dbName + - pattern + + """ + pass + + def get_function(self, dbName, funcName): + """ + Parameters: + - dbName + - funcName + + """ + pass + + def get_all_functions(self): + pass + + def create_role(self, role): + """ + Parameters: + - role + + """ + pass + + def drop_role(self, role_name): + """ + Parameters: + - role_name + + """ + pass + + def get_role_names(self): + pass + + def grant_role(self, role_name, principal_name, principal_type, grantor, grantorType, grant_option): + """ + Parameters: + - role_name + - principal_name + - principal_type + - grantor + - grantorType + - grant_option + + """ + pass + + def revoke_role(self, role_name, principal_name, principal_type): + """ + Parameters: + - role_name + - principal_name + - principal_type + + """ + pass + + def list_roles(self, principal_name, principal_type): + """ + Parameters: + - principal_name + - principal_type + + """ + pass + + def grant_revoke_role(self, request): + """ + Parameters: + - request + + """ + pass + + def get_principals_in_role(self, request): + """ + Parameters: + - request + + """ + pass + + def get_role_grants_for_principal(self, request): + """ + Parameters: + - request + + """ + pass + + def get_privilege_set(self, hiveObject, user_name, group_names): + """ + Parameters: + - hiveObject + - user_name + - group_names + + """ + pass + + def list_privileges(self, principal_name, principal_type, hiveObject): + """ + Parameters: + - principal_name + - principal_type + - hiveObject + + """ + pass + + def grant_privileges(self, privileges): + """ + Parameters: + - privileges + + """ + pass + + def revoke_privileges(self, privileges): + """ + Parameters: + - privileges + + """ + pass + + def grant_revoke_privileges(self, request): + """ + Parameters: + - request + + """ + pass + + def refresh_privileges(self, objToRefresh, authorizer, grantRequest): + """ + Parameters: + - objToRefresh + - authorizer + - grantRequest + + """ + pass + + def set_ugi(self, user_name, group_names): + """ + Parameters: + - user_name + - group_names + + """ + pass + + def get_delegation_token(self, token_owner, renewer_kerberos_principal_name): + """ + Parameters: + - token_owner + - renewer_kerberos_principal_name + + """ + pass + + def renew_delegation_token(self, token_str_form): + """ + Parameters: + - token_str_form + + """ + pass + + def cancel_delegation_token(self, token_str_form): + """ + Parameters: + - token_str_form + + """ + pass + + def add_token(self, token_identifier, delegation_token): + """ + Parameters: + - token_identifier + - delegation_token + + """ + pass + + def remove_token(self, token_identifier): + """ + Parameters: + - token_identifier + + """ + pass + + def get_token(self, token_identifier): + """ + Parameters: + - token_identifier + + """ + pass + + def get_all_token_identifiers(self): + pass + + def add_master_key(self, key): + """ + Parameters: + - key + + """ + pass + + def update_master_key(self, seq_number, key): + """ + Parameters: + - seq_number + - key + + """ + pass + + def remove_master_key(self, key_seq): + """ + Parameters: + - key_seq + + """ + pass + + def get_master_keys(self): + pass + + def get_open_txns(self): + pass + + def get_open_txns_info(self): + pass + + def open_txns(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def abort_txn(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def abort_txns(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def commit_txn(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def get_latest_txnid_in_conflict(self, txnId): + """ + Parameters: + - txnId + + """ + pass + + def repl_tbl_writeid_state(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def get_valid_write_ids(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def allocate_table_write_ids(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def get_max_allocated_table_write_id(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def seed_write_id(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def seed_txn_id(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def lock(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def check_lock(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def unlock(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def show_locks(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def heartbeat(self, ids): + """ + Parameters: + - ids + + """ + pass + + def heartbeat_txn_range(self, txns): + """ + Parameters: + - txns + + """ + pass + + def compact(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def compact2(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def show_compact(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def add_dynamic_partitions(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def find_next_compact(self, workerId): + """ + Parameters: + - workerId + + """ + pass + + def find_next_compact2(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def update_compactor_state(self, cr, txn_id): + """ + Parameters: + - cr + - txn_id + + """ + pass + + def find_columns_with_stats(self, cr): + """ + Parameters: + - cr + + """ + pass + + def mark_cleaned(self, cr): + """ + Parameters: + - cr + + """ + pass + + def mark_compacted(self, cr): + """ + Parameters: + - cr + + """ + pass + + def mark_failed(self, cr): + """ + Parameters: + - cr + + """ + pass + + def mark_refused(self, cr): + """ + Parameters: + - cr + + """ + pass + + def update_compaction_metrics_data(self, data): + """ + Parameters: + - data + + """ + pass + + def remove_compaction_metrics_data(self, request): + """ + Parameters: + - request + + """ + pass + + def set_hadoop_jobid(self, jobId, cq_id): + """ + Parameters: + - jobId + - cq_id + + """ + pass + + def get_latest_committed_compaction_info(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def get_next_notification(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def get_current_notificationEventId(self): + pass + + def get_notification_events_count(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def fire_listener_event(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def flushCache(self): + pass + + def add_write_notification_log(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def add_write_notification_log_in_batch(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def cm_recycle(self, request): + """ + Parameters: + - request + + """ + pass + + def get_file_metadata_by_expr(self, req): + """ + Parameters: + - req + + """ + pass + + def get_file_metadata(self, req): + """ + Parameters: + - req + + """ + pass + + def put_file_metadata(self, req): + """ + Parameters: + - req + + """ + pass + + def clear_file_metadata(self, req): + """ + Parameters: + - req + + """ + pass + + def cache_file_metadata(self, req): + """ + Parameters: + - req + + """ + pass + + def get_metastore_db_uuid(self): + pass + + def create_resource_plan(self, request): + """ + Parameters: + - request + + """ + pass + + def get_resource_plan(self, request): + """ + Parameters: + - request + + """ + pass + + def get_active_resource_plan(self, request): + """ + Parameters: + - request + + """ + pass + + def get_all_resource_plans(self, request): + """ + Parameters: + - request + + """ + pass + + def alter_resource_plan(self, request): + """ + Parameters: + - request + + """ + pass + + def validate_resource_plan(self, request): + """ + Parameters: + - request + + """ + pass + + def drop_resource_plan(self, request): + """ + Parameters: + - request + + """ + pass + + def create_wm_trigger(self, request): + """ + Parameters: + - request + + """ + pass + + def alter_wm_trigger(self, request): + """ + Parameters: + - request + + """ + pass + + def drop_wm_trigger(self, request): + """ + Parameters: + - request + + """ + pass + + def get_triggers_for_resourceplan(self, request): + """ + Parameters: + - request + + """ + pass + + def create_wm_pool(self, request): + """ + Parameters: + - request + + """ + pass + + def alter_wm_pool(self, request): + """ + Parameters: + - request + + """ + pass + + def drop_wm_pool(self, request): + """ + Parameters: + - request + + """ + pass + + def create_or_update_wm_mapping(self, request): + """ + Parameters: + - request + + """ + pass + + def drop_wm_mapping(self, request): + """ + Parameters: + - request + + """ + pass + + def create_or_drop_wm_trigger_to_pool_mapping(self, request): + """ + Parameters: + - request + + """ + pass + + def create_ischema(self, schema): + """ + Parameters: + - schema + + """ + pass + + def alter_ischema(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def get_ischema(self, name): + """ + Parameters: + - name + + """ + pass + + def drop_ischema(self, name): + """ + Parameters: + - name + + """ + pass + + def add_schema_version(self, schemaVersion): + """ + Parameters: + - schemaVersion + + """ + pass + + def get_schema_version(self, schemaVersion): + """ + Parameters: + - schemaVersion + + """ + pass + + def get_schema_latest_version(self, schemaName): + """ + Parameters: + - schemaName + + """ + pass + + def get_schema_all_versions(self, schemaName): + """ + Parameters: + - schemaName + + """ + pass + + def drop_schema_version(self, schemaVersion): + """ + Parameters: + - schemaVersion + + """ + pass + + def get_schemas_by_cols(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def map_schema_version_to_serde(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def set_schema_version_state(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def add_serde(self, serde): + """ + Parameters: + - serde + + """ + pass + + def get_serde(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def get_lock_materialization_rebuild(self, dbName, tableName, txnId): + """ + Parameters: + - dbName + - tableName + - txnId + + """ + pass + + def heartbeat_lock_materialization_rebuild(self, dbName, tableName, txnId): + """ + Parameters: + - dbName + - tableName + - txnId + + """ + pass + + def add_runtime_stats(self, stat): + """ + Parameters: + - stat + + """ + pass + + def get_runtime_stats(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def get_partitions_with_specs(self, request): + """ + Parameters: + - request + + """ + pass + + def scheduled_query_poll(self, request): + """ + Parameters: + - request + + """ + pass + + def scheduled_query_maintenance(self, request): + """ + Parameters: + - request + + """ + pass + + def scheduled_query_progress(self, info): + """ + Parameters: + - info + + """ + pass + + def get_scheduled_query(self, scheduleKey): + """ + Parameters: + - scheduleKey + + """ + pass + + def add_replication_metrics(self, replicationMetricList): + """ + Parameters: + - replicationMetricList + + """ + pass + + def get_replication_metrics(self, rqst): + """ + Parameters: + - rqst + + """ + pass + + def get_open_txns_req(self, getOpenTxnsRequest): + """ + Parameters: + - getOpenTxnsRequest + + """ + pass + + def create_stored_procedure(self, proc): + """ + Parameters: + - proc + + """ + pass + + def get_stored_procedure(self, request): + """ + Parameters: + - request + + """ + pass + + def drop_stored_procedure(self, request): + """ + Parameters: + - request + + """ + pass + + def get_all_stored_procedures(self, request): + """ + Parameters: + - request + + """ + pass + + def find_package(self, request): + """ + Parameters: + - request + + """ + pass + + def add_package(self, request): + """ + Parameters: + - request + + """ + pass + + def get_all_packages(self, request): + """ + Parameters: + - request + + """ + pass + + def drop_package(self, request): + """ + Parameters: + - request + + """ + pass + + def get_all_write_event_info(self, request): + """ + Parameters: + - request + + """ + pass + + +class Client(fb303.FacebookService.Client, Iface): + """ + This interface is live. + + """ + + def __init__(self, iprot, oprot=None): + fb303.FacebookService.Client.__init__(self, iprot, oprot) + + def getMetaConf(self, key): + """ + Parameters: + - key + + """ + self.send_getMetaConf(key) + return self.recv_getMetaConf() + + def send_getMetaConf(self, key): + self._oprot.writeMessageBegin("getMetaConf", TMessageType.CALL, self._seqid) + args = getMetaConf_args() + args.key = key + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getMetaConf(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getMetaConf_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "getMetaConf failed: unknown result") + + def setMetaConf(self, key, value): + """ + Parameters: + - key + - value + + """ + self.send_setMetaConf(key, value) + self.recv_setMetaConf() + + def send_setMetaConf(self, key, value): + self._oprot.writeMessageBegin("setMetaConf", TMessageType.CALL, self._seqid) + args = setMetaConf_args() + args.key = key + args.value = value + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_setMetaConf(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = setMetaConf_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + return + + def create_catalog(self, catalog): + """ + Parameters: + - catalog + + """ + self.send_create_catalog(catalog) + self.recv_create_catalog() + + def send_create_catalog(self, catalog): + self._oprot.writeMessageBegin("create_catalog", TMessageType.CALL, self._seqid) + args = create_catalog_args() + args.catalog = catalog + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_catalog(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = create_catalog_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + return + + def alter_catalog(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_alter_catalog(rqst) + self.recv_alter_catalog() + + def send_alter_catalog(self, rqst): + self._oprot.writeMessageBegin("alter_catalog", TMessageType.CALL, self._seqid) + args = alter_catalog_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_catalog(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = alter_catalog_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + return + + def get_catalog(self, catName): + """ + Parameters: + - catName + + """ + self.send_get_catalog(catName) + return self.recv_get_catalog() + + def send_get_catalog(self, catName): + self._oprot.writeMessageBegin("get_catalog", TMessageType.CALL, self._seqid) + args = get_catalog_args() + args.catName = catName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_catalog(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_catalog_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_catalog failed: unknown result") + + def get_catalogs(self): + self.send_get_catalogs() + return self.recv_get_catalogs() + + def send_get_catalogs(self): + self._oprot.writeMessageBegin("get_catalogs", TMessageType.CALL, self._seqid) + args = get_catalogs_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_catalogs(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_catalogs_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_catalogs failed: unknown result") + + def drop_catalog(self, catName): + """ + Parameters: + - catName + + """ + self.send_drop_catalog(catName) + self.recv_drop_catalog() + + def send_drop_catalog(self, catName): + self._oprot.writeMessageBegin("drop_catalog", TMessageType.CALL, self._seqid) + args = drop_catalog_args() + args.catName = catName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_catalog(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_catalog_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + return + + def create_database(self, database): + """ + Parameters: + - database + + """ + self.send_create_database(database) + self.recv_create_database() + + def send_create_database(self, database): + self._oprot.writeMessageBegin("create_database", TMessageType.CALL, self._seqid) + args = create_database_args() + args.database = database + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_database(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = create_database_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + return + + def get_database(self, name): + """ + Parameters: + - name + + """ + self.send_get_database(name) + return self.recv_get_database() + + def send_get_database(self, name): + self._oprot.writeMessageBegin("get_database", TMessageType.CALL, self._seqid) + args = get_database_args() + args.name = name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_database(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_database_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_database failed: unknown result") + + def get_database_req(self, request): + """ + Parameters: + - request + + """ + self.send_get_database_req(request) + return self.recv_get_database_req() + + def send_get_database_req(self, request): + self._oprot.writeMessageBegin("get_database_req", TMessageType.CALL, self._seqid) + args = get_database_req_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_database_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_database_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_database_req failed: unknown result") + + def drop_database(self, name, deleteData, cascade): + """ + Parameters: + - name + - deleteData + - cascade + + """ + self.send_drop_database(name, deleteData, cascade) + self.recv_drop_database() + + def send_drop_database(self, name, deleteData, cascade): + self._oprot.writeMessageBegin("drop_database", TMessageType.CALL, self._seqid) + args = drop_database_args() + args.name = name + args.deleteData = deleteData + args.cascade = cascade + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_database(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_database_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + return + + def drop_database_req(self, req): + """ + Parameters: + - req + + """ + self.send_drop_database_req(req) + self.recv_drop_database_req() + + def send_drop_database_req(self, req): + self._oprot.writeMessageBegin("drop_database_req", TMessageType.CALL, self._seqid) + args = drop_database_req_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_database_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_database_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + return + + def get_databases(self, pattern): + """ + Parameters: + - pattern + + """ + self.send_get_databases(pattern) + return self.recv_get_databases() + + def send_get_databases(self, pattern): + self._oprot.writeMessageBegin("get_databases", TMessageType.CALL, self._seqid) + args = get_databases_args() + args.pattern = pattern + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_databases(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_databases_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_databases failed: unknown result") + + def get_all_databases(self): + self.send_get_all_databases() + return self.recv_get_all_databases() + + def send_get_all_databases(self): + self._oprot.writeMessageBegin("get_all_databases", TMessageType.CALL, self._seqid) + args = get_all_databases_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_all_databases(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_all_databases_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_databases failed: unknown result") + + def alter_database(self, dbname, db): + """ + Parameters: + - dbname + - db + + """ + self.send_alter_database(dbname, db) + self.recv_alter_database() + + def send_alter_database(self, dbname, db): + self._oprot.writeMessageBegin("alter_database", TMessageType.CALL, self._seqid) + args = alter_database_args() + args.dbname = dbname + args.db = db + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_database(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = alter_database_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def create_dataconnector(self, connector): + """ + Parameters: + - connector + + """ + self.send_create_dataconnector(connector) + self.recv_create_dataconnector() + + def send_create_dataconnector(self, connector): + self._oprot.writeMessageBegin("create_dataconnector", TMessageType.CALL, self._seqid) + args = create_dataconnector_args() + args.connector = connector + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_dataconnector(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = create_dataconnector_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + return + + def get_dataconnector_req(self, request): + """ + Parameters: + - request + + """ + self.send_get_dataconnector_req(request) + return self.recv_get_dataconnector_req() + + def send_get_dataconnector_req(self, request): + self._oprot.writeMessageBegin("get_dataconnector_req", TMessageType.CALL, self._seqid) + args = get_dataconnector_req_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_dataconnector_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_dataconnector_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_dataconnector_req failed: unknown result") + + def drop_dataconnector(self, name, ifNotExists, checkReferences): + """ + Parameters: + - name + - ifNotExists + - checkReferences + + """ + self.send_drop_dataconnector(name, ifNotExists, checkReferences) + self.recv_drop_dataconnector() + + def send_drop_dataconnector(self, name, ifNotExists, checkReferences): + self._oprot.writeMessageBegin("drop_dataconnector", TMessageType.CALL, self._seqid) + args = drop_dataconnector_args() + args.name = name + args.ifNotExists = ifNotExists + args.checkReferences = checkReferences + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_dataconnector(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_dataconnector_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + return + + def get_dataconnectors(self): + self.send_get_dataconnectors() + return self.recv_get_dataconnectors() + + def send_get_dataconnectors(self): + self._oprot.writeMessageBegin("get_dataconnectors", TMessageType.CALL, self._seqid) + args = get_dataconnectors_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_dataconnectors(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_dataconnectors_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_dataconnectors failed: unknown result") + + def alter_dataconnector(self, name, connector): + """ + Parameters: + - name + - connector + + """ + self.send_alter_dataconnector(name, connector) + self.recv_alter_dataconnector() + + def send_alter_dataconnector(self, name, connector): + self._oprot.writeMessageBegin("alter_dataconnector", TMessageType.CALL, self._seqid) + args = alter_dataconnector_args() + args.name = name + args.connector = connector + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_dataconnector(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = alter_dataconnector_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def get_type(self, name): + """ + Parameters: + - name + + """ + self.send_get_type(name) + return self.recv_get_type() + + def send_get_type(self, name): + self._oprot.writeMessageBegin("get_type", TMessageType.CALL, self._seqid) + args = get_type_args() + args.name = name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_type(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_type_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_type failed: unknown result") + + def create_type(self, type): + """ + Parameters: + - type + + """ + self.send_create_type(type) + return self.recv_create_type() + + def send_create_type(self, type): + self._oprot.writeMessageBegin("create_type", TMessageType.CALL, self._seqid) + args = create_type_args() + args.type = type + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_type(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = create_type_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_type failed: unknown result") + + def drop_type(self, type): + """ + Parameters: + - type + + """ + self.send_drop_type(type) + return self.recv_drop_type() + + def send_drop_type(self, type): + self._oprot.writeMessageBegin("drop_type", TMessageType.CALL, self._seqid) + args = drop_type_args() + args.type = type + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_type(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_type_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_type failed: unknown result") + + def get_type_all(self, name): + """ + Parameters: + - name + + """ + self.send_get_type_all(name) + return self.recv_get_type_all() + + def send_get_type_all(self, name): + self._oprot.writeMessageBegin("get_type_all", TMessageType.CALL, self._seqid) + args = get_type_all_args() + args.name = name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_type_all(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_type_all_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_type_all failed: unknown result") + + def get_fields(self, db_name, table_name): + """ + Parameters: + - db_name + - table_name + + """ + self.send_get_fields(db_name, table_name) + return self.recv_get_fields() + + def send_get_fields(self, db_name, table_name): + self._oprot.writeMessageBegin("get_fields", TMessageType.CALL, self._seqid) + args = get_fields_args() + args.db_name = db_name + args.table_name = table_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_fields(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_fields_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_fields failed: unknown result") + + def get_fields_with_environment_context(self, db_name, table_name, environment_context): + """ + Parameters: + - db_name + - table_name + - environment_context + + """ + self.send_get_fields_with_environment_context(db_name, table_name, environment_context) + return self.recv_get_fields_with_environment_context() + + def send_get_fields_with_environment_context(self, db_name, table_name, environment_context): + self._oprot.writeMessageBegin("get_fields_with_environment_context", TMessageType.CALL, self._seqid) + args = get_fields_with_environment_context_args() + args.db_name = db_name + args.table_name = table_name + args.environment_context = environment_context + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_fields_with_environment_context(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_fields_with_environment_context_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_fields_with_environment_context failed: unknown result" + ) + + def get_fields_req(self, req): + """ + Parameters: + - req + + """ + self.send_get_fields_req(req) + return self.recv_get_fields_req() + + def send_get_fields_req(self, req): + self._oprot.writeMessageBegin("get_fields_req", TMessageType.CALL, self._seqid) + args = get_fields_req_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_fields_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_fields_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_fields_req failed: unknown result") + + def get_schema(self, db_name, table_name): + """ + Parameters: + - db_name + - table_name + + """ + self.send_get_schema(db_name, table_name) + return self.recv_get_schema() + + def send_get_schema(self, db_name, table_name): + self._oprot.writeMessageBegin("get_schema", TMessageType.CALL, self._seqid) + args = get_schema_args() + args.db_name = db_name + args.table_name = table_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_schema(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_schema_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_schema failed: unknown result") + + def get_schema_with_environment_context(self, db_name, table_name, environment_context): + """ + Parameters: + - db_name + - table_name + - environment_context + + """ + self.send_get_schema_with_environment_context(db_name, table_name, environment_context) + return self.recv_get_schema_with_environment_context() + + def send_get_schema_with_environment_context(self, db_name, table_name, environment_context): + self._oprot.writeMessageBegin("get_schema_with_environment_context", TMessageType.CALL, self._seqid) + args = get_schema_with_environment_context_args() + args.db_name = db_name + args.table_name = table_name + args.environment_context = environment_context + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_schema_with_environment_context(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_schema_with_environment_context_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_schema_with_environment_context failed: unknown result" + ) + + def get_schema_req(self, req): + """ + Parameters: + - req + + """ + self.send_get_schema_req(req) + return self.recv_get_schema_req() + + def send_get_schema_req(self, req): + self._oprot.writeMessageBegin("get_schema_req", TMessageType.CALL, self._seqid) + args = get_schema_req_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_schema_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_schema_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_schema_req failed: unknown result") + + def create_table(self, tbl): + """ + Parameters: + - tbl + + """ + self.send_create_table(tbl) + self.recv_create_table() + + def send_create_table(self, tbl): + self._oprot.writeMessageBegin("create_table", TMessageType.CALL, self._seqid) + args = create_table_args() + args.tbl = tbl + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_table(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = create_table_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + return + + def create_table_with_environment_context(self, tbl, environment_context): + """ + Parameters: + - tbl + - environment_context + + """ + self.send_create_table_with_environment_context(tbl, environment_context) + self.recv_create_table_with_environment_context() + + def send_create_table_with_environment_context(self, tbl, environment_context): + self._oprot.writeMessageBegin("create_table_with_environment_context", TMessageType.CALL, self._seqid) + args = create_table_with_environment_context_args() + args.tbl = tbl + args.environment_context = environment_context + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_table_with_environment_context(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = create_table_with_environment_context_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + return + + def create_table_with_constraints( + self, tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints, defaultConstraints, checkConstraints + ): + """ + Parameters: + - tbl + - primaryKeys + - foreignKeys + - uniqueConstraints + - notNullConstraints + - defaultConstraints + - checkConstraints + + """ + self.send_create_table_with_constraints( + tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints, defaultConstraints, checkConstraints + ) + self.recv_create_table_with_constraints() + + def send_create_table_with_constraints( + self, tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints, defaultConstraints, checkConstraints + ): + self._oprot.writeMessageBegin("create_table_with_constraints", TMessageType.CALL, self._seqid) + args = create_table_with_constraints_args() + args.tbl = tbl + args.primaryKeys = primaryKeys + args.foreignKeys = foreignKeys + args.uniqueConstraints = uniqueConstraints + args.notNullConstraints = notNullConstraints + args.defaultConstraints = defaultConstraints + args.checkConstraints = checkConstraints + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_table_with_constraints(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = create_table_with_constraints_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + return + + def create_table_req(self, request): + """ + Parameters: + - request + + """ + self.send_create_table_req(request) + self.recv_create_table_req() + + def send_create_table_req(self, request): + self._oprot.writeMessageBegin("create_table_req", TMessageType.CALL, self._seqid) + args = create_table_req_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_table_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = create_table_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + return + + def drop_constraint(self, req): + """ + Parameters: + - req + + """ + self.send_drop_constraint(req) + self.recv_drop_constraint() + + def send_drop_constraint(self, req): + self._oprot.writeMessageBegin("drop_constraint", TMessageType.CALL, self._seqid) + args = drop_constraint_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_constraint(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_constraint_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o3 is not None: + raise result.o3 + return + + def add_primary_key(self, req): + """ + Parameters: + - req + + """ + self.send_add_primary_key(req) + self.recv_add_primary_key() + + def send_add_primary_key(self, req): + self._oprot.writeMessageBegin("add_primary_key", TMessageType.CALL, self._seqid) + args = add_primary_key_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_primary_key(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_primary_key_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def add_foreign_key(self, req): + """ + Parameters: + - req + + """ + self.send_add_foreign_key(req) + self.recv_add_foreign_key() + + def send_add_foreign_key(self, req): + self._oprot.writeMessageBegin("add_foreign_key", TMessageType.CALL, self._seqid) + args = add_foreign_key_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_foreign_key(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_foreign_key_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def add_unique_constraint(self, req): + """ + Parameters: + - req + + """ + self.send_add_unique_constraint(req) + self.recv_add_unique_constraint() + + def send_add_unique_constraint(self, req): + self._oprot.writeMessageBegin("add_unique_constraint", TMessageType.CALL, self._seqid) + args = add_unique_constraint_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_unique_constraint(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_unique_constraint_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def add_not_null_constraint(self, req): + """ + Parameters: + - req + + """ + self.send_add_not_null_constraint(req) + self.recv_add_not_null_constraint() + + def send_add_not_null_constraint(self, req): + self._oprot.writeMessageBegin("add_not_null_constraint", TMessageType.CALL, self._seqid) + args = add_not_null_constraint_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_not_null_constraint(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_not_null_constraint_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def add_default_constraint(self, req): + """ + Parameters: + - req + + """ + self.send_add_default_constraint(req) + self.recv_add_default_constraint() + + def send_add_default_constraint(self, req): + self._oprot.writeMessageBegin("add_default_constraint", TMessageType.CALL, self._seqid) + args = add_default_constraint_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_default_constraint(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_default_constraint_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def add_check_constraint(self, req): + """ + Parameters: + - req + + """ + self.send_add_check_constraint(req) + self.recv_add_check_constraint() + + def send_add_check_constraint(self, req): + self._oprot.writeMessageBegin("add_check_constraint", TMessageType.CALL, self._seqid) + args = add_check_constraint_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_check_constraint(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_check_constraint_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def translate_table_dryrun(self, request): + """ + Parameters: + - request + + """ + self.send_translate_table_dryrun(request) + return self.recv_translate_table_dryrun() + + def send_translate_table_dryrun(self, request): + self._oprot.writeMessageBegin("translate_table_dryrun", TMessageType.CALL, self._seqid) + args = translate_table_dryrun_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_translate_table_dryrun(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = translate_table_dryrun_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException(TApplicationException.MISSING_RESULT, "translate_table_dryrun failed: unknown result") + + def drop_table(self, dbname, name, deleteData): + """ + Parameters: + - dbname + - name + - deleteData + + """ + self.send_drop_table(dbname, name, deleteData) + self.recv_drop_table() + + def send_drop_table(self, dbname, name, deleteData): + self._oprot.writeMessageBegin("drop_table", TMessageType.CALL, self._seqid) + args = drop_table_args() + args.dbname = dbname + args.name = name + args.deleteData = deleteData + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_table(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_table_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o3 is not None: + raise result.o3 + return + + def drop_table_with_environment_context(self, dbname, name, deleteData, environment_context): + """ + Parameters: + - dbname + - name + - deleteData + - environment_context + + """ + self.send_drop_table_with_environment_context(dbname, name, deleteData, environment_context) + self.recv_drop_table_with_environment_context() + + def send_drop_table_with_environment_context(self, dbname, name, deleteData, environment_context): + self._oprot.writeMessageBegin("drop_table_with_environment_context", TMessageType.CALL, self._seqid) + args = drop_table_with_environment_context_args() + args.dbname = dbname + args.name = name + args.deleteData = deleteData + args.environment_context = environment_context + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_table_with_environment_context(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_table_with_environment_context_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o3 is not None: + raise result.o3 + return + + def truncate_table(self, dbName, tableName, partNames): + """ + Parameters: + - dbName + - tableName + - partNames + + """ + self.send_truncate_table(dbName, tableName, partNames) + self.recv_truncate_table() + + def send_truncate_table(self, dbName, tableName, partNames): + self._oprot.writeMessageBegin("truncate_table", TMessageType.CALL, self._seqid) + args = truncate_table_args() + args.dbName = dbName + args.tableName = tableName + args.partNames = partNames + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_truncate_table(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = truncate_table_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + return + + def truncate_table_req(self, req): + """ + Parameters: + - req + + """ + self.send_truncate_table_req(req) + return self.recv_truncate_table_req() + + def send_truncate_table_req(self, req): + self._oprot.writeMessageBegin("truncate_table_req", TMessageType.CALL, self._seqid) + args = truncate_table_req_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_truncate_table_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = truncate_table_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "truncate_table_req failed: unknown result") + + def get_tables(self, db_name, pattern): + """ + Parameters: + - db_name + - pattern + + """ + self.send_get_tables(db_name, pattern) + return self.recv_get_tables() + + def send_get_tables(self, db_name, pattern): + self._oprot.writeMessageBegin("get_tables", TMessageType.CALL, self._seqid) + args = get_tables_args() + args.db_name = db_name + args.pattern = pattern + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_tables(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_tables_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_tables failed: unknown result") + + def get_tables_by_type(self, db_name, pattern, tableType): + """ + Parameters: + - db_name + - pattern + - tableType + + """ + self.send_get_tables_by_type(db_name, pattern, tableType) + return self.recv_get_tables_by_type() + + def send_get_tables_by_type(self, db_name, pattern, tableType): + self._oprot.writeMessageBegin("get_tables_by_type", TMessageType.CALL, self._seqid) + args = get_tables_by_type_args() + args.db_name = db_name + args.pattern = pattern + args.tableType = tableType + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_tables_by_type(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_tables_by_type_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_tables_by_type failed: unknown result") + + def get_all_materialized_view_objects_for_rewriting(self): + self.send_get_all_materialized_view_objects_for_rewriting() + return self.recv_get_all_materialized_view_objects_for_rewriting() + + def send_get_all_materialized_view_objects_for_rewriting(self): + self._oprot.writeMessageBegin("get_all_materialized_view_objects_for_rewriting", TMessageType.CALL, self._seqid) + args = get_all_materialized_view_objects_for_rewriting_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_all_materialized_view_objects_for_rewriting(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_all_materialized_view_objects_for_rewriting_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_all_materialized_view_objects_for_rewriting failed: unknown result" + ) + + def get_materialized_views_for_rewriting(self, db_name): + """ + Parameters: + - db_name + + """ + self.send_get_materialized_views_for_rewriting(db_name) + return self.recv_get_materialized_views_for_rewriting() + + def send_get_materialized_views_for_rewriting(self, db_name): + self._oprot.writeMessageBegin("get_materialized_views_for_rewriting", TMessageType.CALL, self._seqid) + args = get_materialized_views_for_rewriting_args() + args.db_name = db_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_materialized_views_for_rewriting(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_materialized_views_for_rewriting_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_materialized_views_for_rewriting failed: unknown result" + ) + + def get_table_meta(self, db_patterns, tbl_patterns, tbl_types): + """ + Parameters: + - db_patterns + - tbl_patterns + - tbl_types + + """ + self.send_get_table_meta(db_patterns, tbl_patterns, tbl_types) + return self.recv_get_table_meta() + + def send_get_table_meta(self, db_patterns, tbl_patterns, tbl_types): + self._oprot.writeMessageBegin("get_table_meta", TMessageType.CALL, self._seqid) + args = get_table_meta_args() + args.db_patterns = db_patterns + args.tbl_patterns = tbl_patterns + args.tbl_types = tbl_types + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_table_meta(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_table_meta_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table_meta failed: unknown result") + + def get_all_tables(self, db_name): + """ + Parameters: + - db_name + + """ + self.send_get_all_tables(db_name) + return self.recv_get_all_tables() + + def send_get_all_tables(self, db_name): + self._oprot.writeMessageBegin("get_all_tables", TMessageType.CALL, self._seqid) + args = get_all_tables_args() + args.db_name = db_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_all_tables(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_all_tables_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_tables failed: unknown result") + + def get_table(self, dbname, tbl_name): + """ + Parameters: + - dbname + - tbl_name + + """ + self.send_get_table(dbname, tbl_name) + return self.recv_get_table() + + def send_get_table(self, dbname, tbl_name): + self._oprot.writeMessageBegin("get_table", TMessageType.CALL, self._seqid) + args = get_table_args() + args.dbname = dbname + args.tbl_name = tbl_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_table(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_table_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table failed: unknown result") + + def get_table_objects_by_name(self, dbname, tbl_names): + """ + Parameters: + - dbname + - tbl_names + + """ + self.send_get_table_objects_by_name(dbname, tbl_names) + return self.recv_get_table_objects_by_name() + + def send_get_table_objects_by_name(self, dbname, tbl_names): + self._oprot.writeMessageBegin("get_table_objects_by_name", TMessageType.CALL, self._seqid) + args = get_table_objects_by_name_args() + args.dbname = dbname + args.tbl_names = tbl_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_table_objects_by_name(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_table_objects_by_name_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table_objects_by_name failed: unknown result") + + def get_tables_ext(self, req): + """ + Parameters: + - req + + """ + self.send_get_tables_ext(req) + return self.recv_get_tables_ext() + + def send_get_tables_ext(self, req): + self._oprot.writeMessageBegin("get_tables_ext", TMessageType.CALL, self._seqid) + args = get_tables_ext_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_tables_ext(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_tables_ext_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_tables_ext failed: unknown result") + + def get_table_req(self, req): + """ + Parameters: + - req + + """ + self.send_get_table_req(req) + return self.recv_get_table_req() + + def send_get_table_req(self, req): + self._oprot.writeMessageBegin("get_table_req", TMessageType.CALL, self._seqid) + args = get_table_req_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_table_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_table_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table_req failed: unknown result") + + def get_table_objects_by_name_req(self, req): + """ + Parameters: + - req + + """ + self.send_get_table_objects_by_name_req(req) + return self.recv_get_table_objects_by_name_req() + + def send_get_table_objects_by_name_req(self, req): + self._oprot.writeMessageBegin("get_table_objects_by_name_req", TMessageType.CALL, self._seqid) + args = get_table_objects_by_name_req_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_table_objects_by_name_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_table_objects_by_name_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table_objects_by_name_req failed: unknown result") + + def get_materialization_invalidation_info(self, creation_metadata, validTxnList): + """ + Parameters: + - creation_metadata + - validTxnList + + """ + self.send_get_materialization_invalidation_info(creation_metadata, validTxnList) + return self.recv_get_materialization_invalidation_info() + + def send_get_materialization_invalidation_info(self, creation_metadata, validTxnList): + self._oprot.writeMessageBegin("get_materialization_invalidation_info", TMessageType.CALL, self._seqid) + args = get_materialization_invalidation_info_args() + args.creation_metadata = creation_metadata + args.validTxnList = validTxnList + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_materialization_invalidation_info(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_materialization_invalidation_info_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_materialization_invalidation_info failed: unknown result" + ) + + def update_creation_metadata(self, catName, dbname, tbl_name, creation_metadata): + """ + Parameters: + - catName + - dbname + - tbl_name + - creation_metadata + + """ + self.send_update_creation_metadata(catName, dbname, tbl_name, creation_metadata) + self.recv_update_creation_metadata() + + def send_update_creation_metadata(self, catName, dbname, tbl_name, creation_metadata): + self._oprot.writeMessageBegin("update_creation_metadata", TMessageType.CALL, self._seqid) + args = update_creation_metadata_args() + args.catName = catName + args.dbname = dbname + args.tbl_name = tbl_name + args.creation_metadata = creation_metadata + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_update_creation_metadata(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = update_creation_metadata_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + return + + def get_table_names_by_filter(self, dbname, filter, max_tables): + """ + Parameters: + - dbname + - filter + - max_tables + + """ + self.send_get_table_names_by_filter(dbname, filter, max_tables) + return self.recv_get_table_names_by_filter() + + def send_get_table_names_by_filter(self, dbname, filter, max_tables): + self._oprot.writeMessageBegin("get_table_names_by_filter", TMessageType.CALL, self._seqid) + args = get_table_names_by_filter_args() + args.dbname = dbname + args.filter = filter + args.max_tables = max_tables + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_table_names_by_filter(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_table_names_by_filter_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table_names_by_filter failed: unknown result") + + def alter_table(self, dbname, tbl_name, new_tbl): + """ + Parameters: + - dbname + - tbl_name + - new_tbl + + """ + self.send_alter_table(dbname, tbl_name, new_tbl) + self.recv_alter_table() + + def send_alter_table(self, dbname, tbl_name, new_tbl): + self._oprot.writeMessageBegin("alter_table", TMessageType.CALL, self._seqid) + args = alter_table_args() + args.dbname = dbname + args.tbl_name = tbl_name + args.new_tbl = new_tbl + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_table(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = alter_table_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def alter_table_with_environment_context(self, dbname, tbl_name, new_tbl, environment_context): + """ + Parameters: + - dbname + - tbl_name + - new_tbl + - environment_context + + """ + self.send_alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context) + self.recv_alter_table_with_environment_context() + + def send_alter_table_with_environment_context(self, dbname, tbl_name, new_tbl, environment_context): + self._oprot.writeMessageBegin("alter_table_with_environment_context", TMessageType.CALL, self._seqid) + args = alter_table_with_environment_context_args() + args.dbname = dbname + args.tbl_name = tbl_name + args.new_tbl = new_tbl + args.environment_context = environment_context + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_table_with_environment_context(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = alter_table_with_environment_context_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def alter_table_with_cascade(self, dbname, tbl_name, new_tbl, cascade): + """ + Parameters: + - dbname + - tbl_name + - new_tbl + - cascade + + """ + self.send_alter_table_with_cascade(dbname, tbl_name, new_tbl, cascade) + self.recv_alter_table_with_cascade() + + def send_alter_table_with_cascade(self, dbname, tbl_name, new_tbl, cascade): + self._oprot.writeMessageBegin("alter_table_with_cascade", TMessageType.CALL, self._seqid) + args = alter_table_with_cascade_args() + args.dbname = dbname + args.tbl_name = tbl_name + args.new_tbl = new_tbl + args.cascade = cascade + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_table_with_cascade(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = alter_table_with_cascade_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def alter_table_req(self, req): + """ + Parameters: + - req + + """ + self.send_alter_table_req(req) + return self.recv_alter_table_req() + + def send_alter_table_req(self, req): + self._oprot.writeMessageBegin("alter_table_req", TMessageType.CALL, self._seqid) + args = alter_table_req_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_table_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = alter_table_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "alter_table_req failed: unknown result") + + def add_partition(self, new_part): + """ + Parameters: + - new_part + + """ + self.send_add_partition(new_part) + return self.recv_add_partition() + + def send_add_partition(self, new_part): + self._oprot.writeMessageBegin("add_partition", TMessageType.CALL, self._seqid) + args = add_partition_args() + args.new_part = new_part + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_partition(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_partition_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_partition failed: unknown result") + + def add_partition_with_environment_context(self, new_part, environment_context): + """ + Parameters: + - new_part + - environment_context + + """ + self.send_add_partition_with_environment_context(new_part, environment_context) + return self.recv_add_partition_with_environment_context() + + def send_add_partition_with_environment_context(self, new_part, environment_context): + self._oprot.writeMessageBegin("add_partition_with_environment_context", TMessageType.CALL, self._seqid) + args = add_partition_with_environment_context_args() + args.new_part = new_part + args.environment_context = environment_context + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_partition_with_environment_context(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_partition_with_environment_context_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException( + TApplicationException.MISSING_RESULT, "add_partition_with_environment_context failed: unknown result" + ) + + def add_partitions(self, new_parts): + """ + Parameters: + - new_parts + + """ + self.send_add_partitions(new_parts) + return self.recv_add_partitions() + + def send_add_partitions(self, new_parts): + self._oprot.writeMessageBegin("add_partitions", TMessageType.CALL, self._seqid) + args = add_partitions_args() + args.new_parts = new_parts + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_partitions(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_partitions_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_partitions failed: unknown result") + + def add_partitions_pspec(self, new_parts): + """ + Parameters: + - new_parts + + """ + self.send_add_partitions_pspec(new_parts) + return self.recv_add_partitions_pspec() + + def send_add_partitions_pspec(self, new_parts): + self._oprot.writeMessageBegin("add_partitions_pspec", TMessageType.CALL, self._seqid) + args = add_partitions_pspec_args() + args.new_parts = new_parts + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_partitions_pspec(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_partitions_pspec_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_partitions_pspec failed: unknown result") + + def append_partition(self, db_name, tbl_name, part_vals): + """ + Parameters: + - db_name + - tbl_name + - part_vals + + """ + self.send_append_partition(db_name, tbl_name, part_vals) + return self.recv_append_partition() + + def send_append_partition(self, db_name, tbl_name, part_vals): + self._oprot.writeMessageBegin("append_partition", TMessageType.CALL, self._seqid) + args = append_partition_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_append_partition(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = append_partition_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "append_partition failed: unknown result") + + def add_partitions_req(self, request): + """ + Parameters: + - request + + """ + self.send_add_partitions_req(request) + return self.recv_add_partitions_req() + + def send_add_partitions_req(self, request): + self._oprot.writeMessageBegin("add_partitions_req", TMessageType.CALL, self._seqid) + args = add_partitions_req_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_partitions_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_partitions_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_partitions_req failed: unknown result") + + def append_partition_with_environment_context(self, db_name, tbl_name, part_vals, environment_context): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - environment_context + + """ + self.send_append_partition_with_environment_context(db_name, tbl_name, part_vals, environment_context) + return self.recv_append_partition_with_environment_context() + + def send_append_partition_with_environment_context(self, db_name, tbl_name, part_vals, environment_context): + self._oprot.writeMessageBegin("append_partition_with_environment_context", TMessageType.CALL, self._seqid) + args = append_partition_with_environment_context_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.environment_context = environment_context + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_append_partition_with_environment_context(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = append_partition_with_environment_context_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException( + TApplicationException.MISSING_RESULT, "append_partition_with_environment_context failed: unknown result" + ) + + def append_partition_by_name(self, db_name, tbl_name, part_name): + """ + Parameters: + - db_name + - tbl_name + - part_name + + """ + self.send_append_partition_by_name(db_name, tbl_name, part_name) + return self.recv_append_partition_by_name() + + def send_append_partition_by_name(self, db_name, tbl_name, part_name): + self._oprot.writeMessageBegin("append_partition_by_name", TMessageType.CALL, self._seqid) + args = append_partition_by_name_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_name = part_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_append_partition_by_name(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = append_partition_by_name_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "append_partition_by_name failed: unknown result") + + def append_partition_by_name_with_environment_context(self, db_name, tbl_name, part_name, environment_context): + """ + Parameters: + - db_name + - tbl_name + - part_name + - environment_context + + """ + self.send_append_partition_by_name_with_environment_context(db_name, tbl_name, part_name, environment_context) + return self.recv_append_partition_by_name_with_environment_context() + + def send_append_partition_by_name_with_environment_context(self, db_name, tbl_name, part_name, environment_context): + self._oprot.writeMessageBegin("append_partition_by_name_with_environment_context", TMessageType.CALL, self._seqid) + args = append_partition_by_name_with_environment_context_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_name = part_name + args.environment_context = environment_context + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_append_partition_by_name_with_environment_context(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = append_partition_by_name_with_environment_context_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException( + TApplicationException.MISSING_RESULT, "append_partition_by_name_with_environment_context failed: unknown result" + ) + + def drop_partition(self, db_name, tbl_name, part_vals, deleteData): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - deleteData + + """ + self.send_drop_partition(db_name, tbl_name, part_vals, deleteData) + return self.recv_drop_partition() + + def send_drop_partition(self, db_name, tbl_name, part_vals, deleteData): + self._oprot.writeMessageBegin("drop_partition", TMessageType.CALL, self._seqid) + args = drop_partition_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.deleteData = deleteData + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_partition(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_partition_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_partition failed: unknown result") + + def drop_partition_with_environment_context(self, db_name, tbl_name, part_vals, deleteData, environment_context): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - deleteData + - environment_context + + """ + self.send_drop_partition_with_environment_context(db_name, tbl_name, part_vals, deleteData, environment_context) + return self.recv_drop_partition_with_environment_context() + + def send_drop_partition_with_environment_context(self, db_name, tbl_name, part_vals, deleteData, environment_context): + self._oprot.writeMessageBegin("drop_partition_with_environment_context", TMessageType.CALL, self._seqid) + args = drop_partition_with_environment_context_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.deleteData = deleteData + args.environment_context = environment_context + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_partition_with_environment_context(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_partition_with_environment_context_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException( + TApplicationException.MISSING_RESULT, "drop_partition_with_environment_context failed: unknown result" + ) + + def drop_partition_by_name(self, db_name, tbl_name, part_name, deleteData): + """ + Parameters: + - db_name + - tbl_name + - part_name + - deleteData + + """ + self.send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData) + return self.recv_drop_partition_by_name() + + def send_drop_partition_by_name(self, db_name, tbl_name, part_name, deleteData): + self._oprot.writeMessageBegin("drop_partition_by_name", TMessageType.CALL, self._seqid) + args = drop_partition_by_name_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_name = part_name + args.deleteData = deleteData + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_partition_by_name(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_partition_by_name_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_partition_by_name failed: unknown result") + + def drop_partition_by_name_with_environment_context(self, db_name, tbl_name, part_name, deleteData, environment_context): + """ + Parameters: + - db_name + - tbl_name + - part_name + - deleteData + - environment_context + + """ + self.send_drop_partition_by_name_with_environment_context(db_name, tbl_name, part_name, deleteData, environment_context) + return self.recv_drop_partition_by_name_with_environment_context() + + def send_drop_partition_by_name_with_environment_context(self, db_name, tbl_name, part_name, deleteData, environment_context): + self._oprot.writeMessageBegin("drop_partition_by_name_with_environment_context", TMessageType.CALL, self._seqid) + args = drop_partition_by_name_with_environment_context_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_name = part_name + args.deleteData = deleteData + args.environment_context = environment_context + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_partition_by_name_with_environment_context(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_partition_by_name_with_environment_context_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException( + TApplicationException.MISSING_RESULT, "drop_partition_by_name_with_environment_context failed: unknown result" + ) + + def drop_partitions_req(self, req): + """ + Parameters: + - req + + """ + self.send_drop_partitions_req(req) + return self.recv_drop_partitions_req() + + def send_drop_partitions_req(self, req): + self._oprot.writeMessageBegin("drop_partitions_req", TMessageType.CALL, self._seqid) + args = drop_partitions_req_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_partitions_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_partitions_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_partitions_req failed: unknown result") + + def get_partition(self, db_name, tbl_name, part_vals): + """ + Parameters: + - db_name + - tbl_name + - part_vals + + """ + self.send_get_partition(db_name, tbl_name, part_vals) + return self.recv_get_partition() + + def send_get_partition(self, db_name, tbl_name, part_vals): + self._oprot.writeMessageBegin("get_partition", TMessageType.CALL, self._seqid) + args = get_partition_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partition(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partition_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition failed: unknown result") + + def get_partition_req(self, req): + """ + Parameters: + - req + + """ + self.send_get_partition_req(req) + return self.recv_get_partition_req() + + def send_get_partition_req(self, req): + self._oprot.writeMessageBegin("get_partition_req", TMessageType.CALL, self._seqid) + args = get_partition_req_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partition_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partition_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_req failed: unknown result") + + def exchange_partition(self, partitionSpecs, source_db, source_table_name, dest_db, dest_table_name): + """ + Parameters: + - partitionSpecs + - source_db + - source_table_name + - dest_db + - dest_table_name + + """ + self.send_exchange_partition(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name) + return self.recv_exchange_partition() + + def send_exchange_partition(self, partitionSpecs, source_db, source_table_name, dest_db, dest_table_name): + self._oprot.writeMessageBegin("exchange_partition", TMessageType.CALL, self._seqid) + args = exchange_partition_args() + args.partitionSpecs = partitionSpecs + args.source_db = source_db + args.source_table_name = source_table_name + args.dest_db = dest_db + args.dest_table_name = dest_table_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_exchange_partition(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = exchange_partition_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException(TApplicationException.MISSING_RESULT, "exchange_partition failed: unknown result") + + def exchange_partitions(self, partitionSpecs, source_db, source_table_name, dest_db, dest_table_name): + """ + Parameters: + - partitionSpecs + - source_db + - source_table_name + - dest_db + - dest_table_name + + """ + self.send_exchange_partitions(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name) + return self.recv_exchange_partitions() + + def send_exchange_partitions(self, partitionSpecs, source_db, source_table_name, dest_db, dest_table_name): + self._oprot.writeMessageBegin("exchange_partitions", TMessageType.CALL, self._seqid) + args = exchange_partitions_args() + args.partitionSpecs = partitionSpecs + args.source_db = source_db + args.source_table_name = source_table_name + args.dest_db = dest_db + args.dest_table_name = dest_table_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_exchange_partitions(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = exchange_partitions_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException(TApplicationException.MISSING_RESULT, "exchange_partitions failed: unknown result") + + def get_partition_with_auth(self, db_name, tbl_name, part_vals, user_name, group_names): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - user_name + - group_names + + """ + self.send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names) + return self.recv_get_partition_with_auth() + + def send_get_partition_with_auth(self, db_name, tbl_name, part_vals, user_name, group_names): + self._oprot.writeMessageBegin("get_partition_with_auth", TMessageType.CALL, self._seqid) + args = get_partition_with_auth_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.user_name = user_name + args.group_names = group_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partition_with_auth(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partition_with_auth_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_with_auth failed: unknown result") + + def get_partition_by_name(self, db_name, tbl_name, part_name): + """ + Parameters: + - db_name + - tbl_name + - part_name + + """ + self.send_get_partition_by_name(db_name, tbl_name, part_name) + return self.recv_get_partition_by_name() + + def send_get_partition_by_name(self, db_name, tbl_name, part_name): + self._oprot.writeMessageBegin("get_partition_by_name", TMessageType.CALL, self._seqid) + args = get_partition_by_name_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_name = part_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partition_by_name(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partition_by_name_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_by_name failed: unknown result") + + def get_partitions(self, db_name, tbl_name, max_parts): + """ + Parameters: + - db_name + - tbl_name + - max_parts + + """ + self.send_get_partitions(db_name, tbl_name, max_parts) + return self.recv_get_partitions() + + def send_get_partitions(self, db_name, tbl_name, max_parts): + self._oprot.writeMessageBegin("get_partitions", TMessageType.CALL, self._seqid) + args = get_partitions_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.max_parts = max_parts + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partitions_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions failed: unknown result") + + def get_partitions_req(self, req): + """ + Parameters: + - req + + """ + self.send_get_partitions_req(req) + return self.recv_get_partitions_req() + + def send_get_partitions_req(self, req): + self._oprot.writeMessageBegin("get_partitions_req", TMessageType.CALL, self._seqid) + args = get_partitions_req_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partitions_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_req failed: unknown result") + + def get_partitions_with_auth(self, db_name, tbl_name, max_parts, user_name, group_names): + """ + Parameters: + - db_name + - tbl_name + - max_parts + - user_name + - group_names + + """ + self.send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names) + return self.recv_get_partitions_with_auth() + + def send_get_partitions_with_auth(self, db_name, tbl_name, max_parts, user_name, group_names): + self._oprot.writeMessageBegin("get_partitions_with_auth", TMessageType.CALL, self._seqid) + args = get_partitions_with_auth_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.max_parts = max_parts + args.user_name = user_name + args.group_names = group_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions_with_auth(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partitions_with_auth_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_with_auth failed: unknown result") + + def get_partitions_pspec(self, db_name, tbl_name, max_parts): + """ + Parameters: + - db_name + - tbl_name + - max_parts + + """ + self.send_get_partitions_pspec(db_name, tbl_name, max_parts) + return self.recv_get_partitions_pspec() + + def send_get_partitions_pspec(self, db_name, tbl_name, max_parts): + self._oprot.writeMessageBegin("get_partitions_pspec", TMessageType.CALL, self._seqid) + args = get_partitions_pspec_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.max_parts = max_parts + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions_pspec(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partitions_pspec_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_pspec failed: unknown result") + + def get_partition_names(self, db_name, tbl_name, max_parts): + """ + Parameters: + - db_name + - tbl_name + - max_parts + + """ + self.send_get_partition_names(db_name, tbl_name, max_parts) + return self.recv_get_partition_names() + + def send_get_partition_names(self, db_name, tbl_name, max_parts): + self._oprot.writeMessageBegin("get_partition_names", TMessageType.CALL, self._seqid) + args = get_partition_names_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.max_parts = max_parts + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partition_names(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partition_names_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_names failed: unknown result") + + def get_partition_values(self, request): + """ + Parameters: + - request + + """ + self.send_get_partition_values(request) + return self.recv_get_partition_values() + + def send_get_partition_values(self, request): + self._oprot.writeMessageBegin("get_partition_values", TMessageType.CALL, self._seqid) + args = get_partition_values_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partition_values(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partition_values_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_values failed: unknown result") + + def get_partitions_ps(self, db_name, tbl_name, part_vals, max_parts): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - max_parts + + """ + self.send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts) + return self.recv_get_partitions_ps() + + def send_get_partitions_ps(self, db_name, tbl_name, part_vals, max_parts): + self._oprot.writeMessageBegin("get_partitions_ps", TMessageType.CALL, self._seqid) + args = get_partitions_ps_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.max_parts = max_parts + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions_ps(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partitions_ps_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_ps failed: unknown result") + + def get_partitions_ps_with_auth(self, db_name, tbl_name, part_vals, max_parts, user_name, group_names): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - max_parts + - user_name + - group_names + + """ + self.send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names) + return self.recv_get_partitions_ps_with_auth() + + def send_get_partitions_ps_with_auth(self, db_name, tbl_name, part_vals, max_parts, user_name, group_names): + self._oprot.writeMessageBegin("get_partitions_ps_with_auth", TMessageType.CALL, self._seqid) + args = get_partitions_ps_with_auth_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.max_parts = max_parts + args.user_name = user_name + args.group_names = group_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions_ps_with_auth(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partitions_ps_with_auth_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_ps_with_auth failed: unknown result") + + def get_partitions_ps_with_auth_req(self, req): + """ + Parameters: + - req + + """ + self.send_get_partitions_ps_with_auth_req(req) + return self.recv_get_partitions_ps_with_auth_req() + + def send_get_partitions_ps_with_auth_req(self, req): + self._oprot.writeMessageBegin("get_partitions_ps_with_auth_req", TMessageType.CALL, self._seqid) + args = get_partitions_ps_with_auth_req_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions_ps_with_auth_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partitions_ps_with_auth_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_partitions_ps_with_auth_req failed: unknown result" + ) + + def get_partition_names_ps(self, db_name, tbl_name, part_vals, max_parts): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - max_parts + + """ + self.send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts) + return self.recv_get_partition_names_ps() + + def send_get_partition_names_ps(self, db_name, tbl_name, part_vals, max_parts): + self._oprot.writeMessageBegin("get_partition_names_ps", TMessageType.CALL, self._seqid) + args = get_partition_names_ps_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.max_parts = max_parts + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partition_names_ps(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partition_names_ps_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_names_ps failed: unknown result") + + def get_partition_names_ps_req(self, req): + """ + Parameters: + - req + + """ + self.send_get_partition_names_ps_req(req) + return self.recv_get_partition_names_ps_req() + + def send_get_partition_names_ps_req(self, req): + self._oprot.writeMessageBegin("get_partition_names_ps_req", TMessageType.CALL, self._seqid) + args = get_partition_names_ps_req_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partition_names_ps_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partition_names_ps_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_names_ps_req failed: unknown result") + + def get_partition_names_req(self, req): + """ + Parameters: + - req + + """ + self.send_get_partition_names_req(req) + return self.recv_get_partition_names_req() + + def send_get_partition_names_req(self, req): + self._oprot.writeMessageBegin("get_partition_names_req", TMessageType.CALL, self._seqid) + args = get_partition_names_req_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partition_names_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partition_names_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_names_req failed: unknown result") + + def get_partitions_by_filter(self, db_name, tbl_name, filter, max_parts): + """ + Parameters: + - db_name + - tbl_name + - filter + - max_parts + + """ + self.send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts) + return self.recv_get_partitions_by_filter() + + def send_get_partitions_by_filter(self, db_name, tbl_name, filter, max_parts): + self._oprot.writeMessageBegin("get_partitions_by_filter", TMessageType.CALL, self._seqid) + args = get_partitions_by_filter_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.filter = filter + args.max_parts = max_parts + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions_by_filter(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partitions_by_filter_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_by_filter failed: unknown result") + + def get_part_specs_by_filter(self, db_name, tbl_name, filter, max_parts): + """ + Parameters: + - db_name + - tbl_name + - filter + - max_parts + + """ + self.send_get_part_specs_by_filter(db_name, tbl_name, filter, max_parts) + return self.recv_get_part_specs_by_filter() + + def send_get_part_specs_by_filter(self, db_name, tbl_name, filter, max_parts): + self._oprot.writeMessageBegin("get_part_specs_by_filter", TMessageType.CALL, self._seqid) + args = get_part_specs_by_filter_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.filter = filter + args.max_parts = max_parts + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_part_specs_by_filter(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_part_specs_by_filter_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_part_specs_by_filter failed: unknown result") + + def get_partitions_by_expr(self, req): + """ + Parameters: + - req + + """ + self.send_get_partitions_by_expr(req) + return self.recv_get_partitions_by_expr() + + def send_get_partitions_by_expr(self, req): + self._oprot.writeMessageBegin("get_partitions_by_expr", TMessageType.CALL, self._seqid) + args = get_partitions_by_expr_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions_by_expr(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partitions_by_expr_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_by_expr failed: unknown result") + + def get_partitions_spec_by_expr(self, req): + """ + Parameters: + - req + + """ + self.send_get_partitions_spec_by_expr(req) + return self.recv_get_partitions_spec_by_expr() + + def send_get_partitions_spec_by_expr(self, req): + self._oprot.writeMessageBegin("get_partitions_spec_by_expr", TMessageType.CALL, self._seqid) + args = get_partitions_spec_by_expr_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions_spec_by_expr(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partitions_spec_by_expr_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_spec_by_expr failed: unknown result") + + def get_num_partitions_by_filter(self, db_name, tbl_name, filter): + """ + Parameters: + - db_name + - tbl_name + - filter + + """ + self.send_get_num_partitions_by_filter(db_name, tbl_name, filter) + return self.recv_get_num_partitions_by_filter() + + def send_get_num_partitions_by_filter(self, db_name, tbl_name, filter): + self._oprot.writeMessageBegin("get_num_partitions_by_filter", TMessageType.CALL, self._seqid) + args = get_num_partitions_by_filter_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.filter = filter + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_num_partitions_by_filter(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_num_partitions_by_filter_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_num_partitions_by_filter failed: unknown result") + + def get_partitions_by_names(self, db_name, tbl_name, names): + """ + Parameters: + - db_name + - tbl_name + - names + + """ + self.send_get_partitions_by_names(db_name, tbl_name, names) + return self.recv_get_partitions_by_names() + + def send_get_partitions_by_names(self, db_name, tbl_name, names): + self._oprot.writeMessageBegin("get_partitions_by_names", TMessageType.CALL, self._seqid) + args = get_partitions_by_names_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.names = names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions_by_names(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partitions_by_names_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_by_names failed: unknown result") + + def get_partitions_by_names_req(self, req): + """ + Parameters: + - req + + """ + self.send_get_partitions_by_names_req(req) + return self.recv_get_partitions_by_names_req() + + def send_get_partitions_by_names_req(self, req): + self._oprot.writeMessageBegin("get_partitions_by_names_req", TMessageType.CALL, self._seqid) + args = get_partitions_by_names_req_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions_by_names_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partitions_by_names_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_by_names_req failed: unknown result") + + def alter_partition(self, db_name, tbl_name, new_part): + """ + Parameters: + - db_name + - tbl_name + - new_part + + """ + self.send_alter_partition(db_name, tbl_name, new_part) + self.recv_alter_partition() + + def send_alter_partition(self, db_name, tbl_name, new_part): + self._oprot.writeMessageBegin("alter_partition", TMessageType.CALL, self._seqid) + args = alter_partition_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.new_part = new_part + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_partition(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = alter_partition_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def alter_partitions(self, db_name, tbl_name, new_parts): + """ + Parameters: + - db_name + - tbl_name + - new_parts + + """ + self.send_alter_partitions(db_name, tbl_name, new_parts) + self.recv_alter_partitions() + + def send_alter_partitions(self, db_name, tbl_name, new_parts): + self._oprot.writeMessageBegin("alter_partitions", TMessageType.CALL, self._seqid) + args = alter_partitions_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.new_parts = new_parts + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_partitions(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = alter_partitions_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def alter_partitions_with_environment_context(self, db_name, tbl_name, new_parts, environment_context): + """ + Parameters: + - db_name + - tbl_name + - new_parts + - environment_context + + """ + self.send_alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environment_context) + self.recv_alter_partitions_with_environment_context() + + def send_alter_partitions_with_environment_context(self, db_name, tbl_name, new_parts, environment_context): + self._oprot.writeMessageBegin("alter_partitions_with_environment_context", TMessageType.CALL, self._seqid) + args = alter_partitions_with_environment_context_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.new_parts = new_parts + args.environment_context = environment_context + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_partitions_with_environment_context(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = alter_partitions_with_environment_context_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def alter_partitions_req(self, req): + """ + Parameters: + - req + + """ + self.send_alter_partitions_req(req) + return self.recv_alter_partitions_req() + + def send_alter_partitions_req(self, req): + self._oprot.writeMessageBegin("alter_partitions_req", TMessageType.CALL, self._seqid) + args = alter_partitions_req_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_partitions_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = alter_partitions_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "alter_partitions_req failed: unknown result") + + def alter_partition_with_environment_context(self, db_name, tbl_name, new_part, environment_context): + """ + Parameters: + - db_name + - tbl_name + - new_part + - environment_context + + """ + self.send_alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context) + self.recv_alter_partition_with_environment_context() + + def send_alter_partition_with_environment_context(self, db_name, tbl_name, new_part, environment_context): + self._oprot.writeMessageBegin("alter_partition_with_environment_context", TMessageType.CALL, self._seqid) + args = alter_partition_with_environment_context_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.new_part = new_part + args.environment_context = environment_context + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_partition_with_environment_context(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = alter_partition_with_environment_context_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def rename_partition(self, db_name, tbl_name, part_vals, new_part): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - new_part + + """ + self.send_rename_partition(db_name, tbl_name, part_vals, new_part) + self.recv_rename_partition() + + def send_rename_partition(self, db_name, tbl_name, part_vals, new_part): + self._oprot.writeMessageBegin("rename_partition", TMessageType.CALL, self._seqid) + args = rename_partition_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.new_part = new_part + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_rename_partition(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = rename_partition_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def rename_partition_req(self, req): + """ + Parameters: + - req + + """ + self.send_rename_partition_req(req) + return self.recv_rename_partition_req() + + def send_rename_partition_req(self, req): + self._oprot.writeMessageBegin("rename_partition_req", TMessageType.CALL, self._seqid) + args = rename_partition_req_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_rename_partition_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = rename_partition_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "rename_partition_req failed: unknown result") + + def partition_name_has_valid_characters(self, part_vals, throw_exception): + """ + Parameters: + - part_vals + - throw_exception + + """ + self.send_partition_name_has_valid_characters(part_vals, throw_exception) + return self.recv_partition_name_has_valid_characters() + + def send_partition_name_has_valid_characters(self, part_vals, throw_exception): + self._oprot.writeMessageBegin("partition_name_has_valid_characters", TMessageType.CALL, self._seqid) + args = partition_name_has_valid_characters_args() + args.part_vals = part_vals + args.throw_exception = throw_exception + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_partition_name_has_valid_characters(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = partition_name_has_valid_characters_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException( + TApplicationException.MISSING_RESULT, "partition_name_has_valid_characters failed: unknown result" + ) + + def get_config_value(self, name, defaultValue): + """ + Parameters: + - name + - defaultValue + + """ + self.send_get_config_value(name, defaultValue) + return self.recv_get_config_value() + + def send_get_config_value(self, name, defaultValue): + self._oprot.writeMessageBegin("get_config_value", TMessageType.CALL, self._seqid) + args = get_config_value_args() + args.name = name + args.defaultValue = defaultValue + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_config_value(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_config_value_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_config_value failed: unknown result") + + def partition_name_to_vals(self, part_name): + """ + Parameters: + - part_name + + """ + self.send_partition_name_to_vals(part_name) + return self.recv_partition_name_to_vals() + + def send_partition_name_to_vals(self, part_name): + self._oprot.writeMessageBegin("partition_name_to_vals", TMessageType.CALL, self._seqid) + args = partition_name_to_vals_args() + args.part_name = part_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_partition_name_to_vals(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = partition_name_to_vals_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "partition_name_to_vals failed: unknown result") + + def partition_name_to_spec(self, part_name): + """ + Parameters: + - part_name + + """ + self.send_partition_name_to_spec(part_name) + return self.recv_partition_name_to_spec() + + def send_partition_name_to_spec(self, part_name): + self._oprot.writeMessageBegin("partition_name_to_spec", TMessageType.CALL, self._seqid) + args = partition_name_to_spec_args() + args.part_name = part_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_partition_name_to_spec(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = partition_name_to_spec_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "partition_name_to_spec failed: unknown result") + + def markPartitionForEvent(self, db_name, tbl_name, part_vals, eventType): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - eventType + + """ + self.send_markPartitionForEvent(db_name, tbl_name, part_vals, eventType) + self.recv_markPartitionForEvent() + + def send_markPartitionForEvent(self, db_name, tbl_name, part_vals, eventType): + self._oprot.writeMessageBegin("markPartitionForEvent", TMessageType.CALL, self._seqid) + args = markPartitionForEvent_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.eventType = eventType + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_markPartitionForEvent(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = markPartitionForEvent_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + if result.o5 is not None: + raise result.o5 + if result.o6 is not None: + raise result.o6 + return + + def isPartitionMarkedForEvent(self, db_name, tbl_name, part_vals, eventType): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - eventType + + """ + self.send_isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType) + return self.recv_isPartitionMarkedForEvent() + + def send_isPartitionMarkedForEvent(self, db_name, tbl_name, part_vals, eventType): + self._oprot.writeMessageBegin("isPartitionMarkedForEvent", TMessageType.CALL, self._seqid) + args = isPartitionMarkedForEvent_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.eventType = eventType + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_isPartitionMarkedForEvent(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = isPartitionMarkedForEvent_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + if result.o5 is not None: + raise result.o5 + if result.o6 is not None: + raise result.o6 + raise TApplicationException(TApplicationException.MISSING_RESULT, "isPartitionMarkedForEvent failed: unknown result") + + def get_primary_keys(self, request): + """ + Parameters: + - request + + """ + self.send_get_primary_keys(request) + return self.recv_get_primary_keys() + + def send_get_primary_keys(self, request): + self._oprot.writeMessageBegin("get_primary_keys", TMessageType.CALL, self._seqid) + args = get_primary_keys_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_primary_keys(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_primary_keys_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_primary_keys failed: unknown result") + + def get_foreign_keys(self, request): + """ + Parameters: + - request + + """ + self.send_get_foreign_keys(request) + return self.recv_get_foreign_keys() + + def send_get_foreign_keys(self, request): + self._oprot.writeMessageBegin("get_foreign_keys", TMessageType.CALL, self._seqid) + args = get_foreign_keys_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_foreign_keys(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_foreign_keys_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_foreign_keys failed: unknown result") + + def get_unique_constraints(self, request): + """ + Parameters: + - request + + """ + self.send_get_unique_constraints(request) + return self.recv_get_unique_constraints() + + def send_get_unique_constraints(self, request): + self._oprot.writeMessageBegin("get_unique_constraints", TMessageType.CALL, self._seqid) + args = get_unique_constraints_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_unique_constraints(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_unique_constraints_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_unique_constraints failed: unknown result") + + def get_not_null_constraints(self, request): + """ + Parameters: + - request + + """ + self.send_get_not_null_constraints(request) + return self.recv_get_not_null_constraints() + + def send_get_not_null_constraints(self, request): + self._oprot.writeMessageBegin("get_not_null_constraints", TMessageType.CALL, self._seqid) + args = get_not_null_constraints_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_not_null_constraints(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_not_null_constraints_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_not_null_constraints failed: unknown result") + + def get_default_constraints(self, request): + """ + Parameters: + - request + + """ + self.send_get_default_constraints(request) + return self.recv_get_default_constraints() + + def send_get_default_constraints(self, request): + self._oprot.writeMessageBegin("get_default_constraints", TMessageType.CALL, self._seqid) + args = get_default_constraints_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_default_constraints(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_default_constraints_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_default_constraints failed: unknown result") + + def get_check_constraints(self, request): + """ + Parameters: + - request + + """ + self.send_get_check_constraints(request) + return self.recv_get_check_constraints() + + def send_get_check_constraints(self, request): + self._oprot.writeMessageBegin("get_check_constraints", TMessageType.CALL, self._seqid) + args = get_check_constraints_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_check_constraints(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_check_constraints_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_check_constraints failed: unknown result") + + def get_all_table_constraints(self, request): + """ + Parameters: + - request + + """ + self.send_get_all_table_constraints(request) + return self.recv_get_all_table_constraints() + + def send_get_all_table_constraints(self, request): + self._oprot.writeMessageBegin("get_all_table_constraints", TMessageType.CALL, self._seqid) + args = get_all_table_constraints_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_all_table_constraints(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_all_table_constraints_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_table_constraints failed: unknown result") + + def update_table_column_statistics(self, stats_obj): + """ + Parameters: + - stats_obj + + """ + self.send_update_table_column_statistics(stats_obj) + return self.recv_update_table_column_statistics() + + def send_update_table_column_statistics(self, stats_obj): + self._oprot.writeMessageBegin("update_table_column_statistics", TMessageType.CALL, self._seqid) + args = update_table_column_statistics_args() + args.stats_obj = stats_obj + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_update_table_column_statistics(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = update_table_column_statistics_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException(TApplicationException.MISSING_RESULT, "update_table_column_statistics failed: unknown result") + + def update_partition_column_statistics(self, stats_obj): + """ + Parameters: + - stats_obj + + """ + self.send_update_partition_column_statistics(stats_obj) + return self.recv_update_partition_column_statistics() + + def send_update_partition_column_statistics(self, stats_obj): + self._oprot.writeMessageBegin("update_partition_column_statistics", TMessageType.CALL, self._seqid) + args = update_partition_column_statistics_args() + args.stats_obj = stats_obj + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_update_partition_column_statistics(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = update_partition_column_statistics_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException( + TApplicationException.MISSING_RESULT, "update_partition_column_statistics failed: unknown result" + ) + + def update_table_column_statistics_req(self, req): + """ + Parameters: + - req + + """ + self.send_update_table_column_statistics_req(req) + return self.recv_update_table_column_statistics_req() + + def send_update_table_column_statistics_req(self, req): + self._oprot.writeMessageBegin("update_table_column_statistics_req", TMessageType.CALL, self._seqid) + args = update_table_column_statistics_req_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_update_table_column_statistics_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = update_table_column_statistics_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException( + TApplicationException.MISSING_RESULT, "update_table_column_statistics_req failed: unknown result" + ) + + def update_partition_column_statistics_req(self, req): + """ + Parameters: + - req + + """ + self.send_update_partition_column_statistics_req(req) + return self.recv_update_partition_column_statistics_req() + + def send_update_partition_column_statistics_req(self, req): + self._oprot.writeMessageBegin("update_partition_column_statistics_req", TMessageType.CALL, self._seqid) + args = update_partition_column_statistics_req_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_update_partition_column_statistics_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = update_partition_column_statistics_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException( + TApplicationException.MISSING_RESULT, "update_partition_column_statistics_req failed: unknown result" + ) + + def update_transaction_statistics(self, req): + """ + Parameters: + - req + + """ + self.send_update_transaction_statistics(req) + self.recv_update_transaction_statistics() + + def send_update_transaction_statistics(self, req): + self._oprot.writeMessageBegin("update_transaction_statistics", TMessageType.CALL, self._seqid) + args = update_transaction_statistics_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_update_transaction_statistics(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = update_transaction_statistics_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + return + + def get_table_column_statistics(self, db_name, tbl_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - col_name + + """ + self.send_get_table_column_statistics(db_name, tbl_name, col_name) + return self.recv_get_table_column_statistics() + + def send_get_table_column_statistics(self, db_name, tbl_name, col_name): + self._oprot.writeMessageBegin("get_table_column_statistics", TMessageType.CALL, self._seqid) + args = get_table_column_statistics_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.col_name = col_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_table_column_statistics(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_table_column_statistics_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table_column_statistics failed: unknown result") + + def get_partition_column_statistics(self, db_name, tbl_name, part_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - part_name + - col_name + + """ + self.send_get_partition_column_statistics(db_name, tbl_name, part_name, col_name) + return self.recv_get_partition_column_statistics() + + def send_get_partition_column_statistics(self, db_name, tbl_name, part_name, col_name): + self._oprot.writeMessageBegin("get_partition_column_statistics", TMessageType.CALL, self._seqid) + args = get_partition_column_statistics_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_name = part_name + args.col_name = col_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partition_column_statistics(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partition_column_statistics_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_partition_column_statistics failed: unknown result" + ) + + def get_table_statistics_req(self, request): + """ + Parameters: + - request + + """ + self.send_get_table_statistics_req(request) + return self.recv_get_table_statistics_req() + + def send_get_table_statistics_req(self, request): + self._oprot.writeMessageBegin("get_table_statistics_req", TMessageType.CALL, self._seqid) + args = get_table_statistics_req_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_table_statistics_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_table_statistics_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table_statistics_req failed: unknown result") + + def get_partitions_statistics_req(self, request): + """ + Parameters: + - request + + """ + self.send_get_partitions_statistics_req(request) + return self.recv_get_partitions_statistics_req() + + def send_get_partitions_statistics_req(self, request): + self._oprot.writeMessageBegin("get_partitions_statistics_req", TMessageType.CALL, self._seqid) + args = get_partitions_statistics_req_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions_statistics_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partitions_statistics_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_statistics_req failed: unknown result") + + def get_aggr_stats_for(self, request): + """ + Parameters: + - request + + """ + self.send_get_aggr_stats_for(request) + return self.recv_get_aggr_stats_for() + + def send_get_aggr_stats_for(self, request): + self._oprot.writeMessageBegin("get_aggr_stats_for", TMessageType.CALL, self._seqid) + args = get_aggr_stats_for_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_aggr_stats_for(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_aggr_stats_for_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_aggr_stats_for failed: unknown result") + + def set_aggr_stats_for(self, request): + """ + Parameters: + - request + + """ + self.send_set_aggr_stats_for(request) + return self.recv_set_aggr_stats_for() + + def send_set_aggr_stats_for(self, request): + self._oprot.writeMessageBegin("set_aggr_stats_for", TMessageType.CALL, self._seqid) + args = set_aggr_stats_for_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_set_aggr_stats_for(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = set_aggr_stats_for_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException(TApplicationException.MISSING_RESULT, "set_aggr_stats_for failed: unknown result") + + def delete_partition_column_statistics(self, db_name, tbl_name, part_name, col_name, engine): + """ + Parameters: + - db_name + - tbl_name + - part_name + - col_name + - engine + + """ + self.send_delete_partition_column_statistics(db_name, tbl_name, part_name, col_name, engine) + return self.recv_delete_partition_column_statistics() + + def send_delete_partition_column_statistics(self, db_name, tbl_name, part_name, col_name, engine): + self._oprot.writeMessageBegin("delete_partition_column_statistics", TMessageType.CALL, self._seqid) + args = delete_partition_column_statistics_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_name = part_name + args.col_name = col_name + args.engine = engine + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_delete_partition_column_statistics(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = delete_partition_column_statistics_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException( + TApplicationException.MISSING_RESULT, "delete_partition_column_statistics failed: unknown result" + ) + + def delete_table_column_statistics(self, db_name, tbl_name, col_name, engine): + """ + Parameters: + - db_name + - tbl_name + - col_name + - engine + + """ + self.send_delete_table_column_statistics(db_name, tbl_name, col_name, engine) + return self.recv_delete_table_column_statistics() + + def send_delete_table_column_statistics(self, db_name, tbl_name, col_name, engine): + self._oprot.writeMessageBegin("delete_table_column_statistics", TMessageType.CALL, self._seqid) + args = delete_table_column_statistics_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.col_name = col_name + args.engine = engine + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_delete_table_column_statistics(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = delete_table_column_statistics_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException(TApplicationException.MISSING_RESULT, "delete_table_column_statistics failed: unknown result") + + def create_function(self, func): + """ + Parameters: + - func + + """ + self.send_create_function(func) + self.recv_create_function() + + def send_create_function(self, func): + self._oprot.writeMessageBegin("create_function", TMessageType.CALL, self._seqid) + args = create_function_args() + args.func = func + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_function(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = create_function_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + return + + def drop_function(self, dbName, funcName): + """ + Parameters: + - dbName + - funcName + + """ + self.send_drop_function(dbName, funcName) + self.recv_drop_function() + + def send_drop_function(self, dbName, funcName): + self._oprot.writeMessageBegin("drop_function", TMessageType.CALL, self._seqid) + args = drop_function_args() + args.dbName = dbName + args.funcName = funcName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_function(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_function_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o3 is not None: + raise result.o3 + return + + def alter_function(self, dbName, funcName, newFunc): + """ + Parameters: + - dbName + - funcName + - newFunc + + """ + self.send_alter_function(dbName, funcName, newFunc) + self.recv_alter_function() + + def send_alter_function(self, dbName, funcName, newFunc): + self._oprot.writeMessageBegin("alter_function", TMessageType.CALL, self._seqid) + args = alter_function_args() + args.dbName = dbName + args.funcName = funcName + args.newFunc = newFunc + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_function(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = alter_function_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def get_functions(self, dbName, pattern): + """ + Parameters: + - dbName + - pattern + + """ + self.send_get_functions(dbName, pattern) + return self.recv_get_functions() + + def send_get_functions(self, dbName, pattern): + self._oprot.writeMessageBegin("get_functions", TMessageType.CALL, self._seqid) + args = get_functions_args() + args.dbName = dbName + args.pattern = pattern + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_functions(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_functions_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_functions failed: unknown result") + + def get_function(self, dbName, funcName): + """ + Parameters: + - dbName + - funcName + + """ + self.send_get_function(dbName, funcName) + return self.recv_get_function() + + def send_get_function(self, dbName, funcName): + self._oprot.writeMessageBegin("get_function", TMessageType.CALL, self._seqid) + args = get_function_args() + args.dbName = dbName + args.funcName = funcName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_function(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_function_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_function failed: unknown result") + + def get_all_functions(self): + self.send_get_all_functions() + return self.recv_get_all_functions() + + def send_get_all_functions(self): + self._oprot.writeMessageBegin("get_all_functions", TMessageType.CALL, self._seqid) + args = get_all_functions_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_all_functions(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_all_functions_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_functions failed: unknown result") + + def create_role(self, role): + """ + Parameters: + - role + + """ + self.send_create_role(role) + return self.recv_create_role() + + def send_create_role(self, role): + self._oprot.writeMessageBegin("create_role", TMessageType.CALL, self._seqid) + args = create_role_args() + args.role = role + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_role(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = create_role_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_role failed: unknown result") + + def drop_role(self, role_name): + """ + Parameters: + - role_name + + """ + self.send_drop_role(role_name) + return self.recv_drop_role() + + def send_drop_role(self, role_name): + self._oprot.writeMessageBegin("drop_role", TMessageType.CALL, self._seqid) + args = drop_role_args() + args.role_name = role_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_role(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_role_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_role failed: unknown result") + + def get_role_names(self): + self.send_get_role_names() + return self.recv_get_role_names() + + def send_get_role_names(self): + self._oprot.writeMessageBegin("get_role_names", TMessageType.CALL, self._seqid) + args = get_role_names_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_role_names(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_role_names_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_role_names failed: unknown result") + + def grant_role(self, role_name, principal_name, principal_type, grantor, grantorType, grant_option): + """ + Parameters: + - role_name + - principal_name + - principal_type + - grantor + - grantorType + - grant_option + + """ + self.send_grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option) + return self.recv_grant_role() + + def send_grant_role(self, role_name, principal_name, principal_type, grantor, grantorType, grant_option): + self._oprot.writeMessageBegin("grant_role", TMessageType.CALL, self._seqid) + args = grant_role_args() + args.role_name = role_name + args.principal_name = principal_name + args.principal_type = principal_type + args.grantor = grantor + args.grantorType = grantorType + args.grant_option = grant_option + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_grant_role(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = grant_role_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "grant_role failed: unknown result") + + def revoke_role(self, role_name, principal_name, principal_type): + """ + Parameters: + - role_name + - principal_name + - principal_type + + """ + self.send_revoke_role(role_name, principal_name, principal_type) + return self.recv_revoke_role() + + def send_revoke_role(self, role_name, principal_name, principal_type): + self._oprot.writeMessageBegin("revoke_role", TMessageType.CALL, self._seqid) + args = revoke_role_args() + args.role_name = role_name + args.principal_name = principal_name + args.principal_type = principal_type + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_revoke_role(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = revoke_role_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "revoke_role failed: unknown result") + + def list_roles(self, principal_name, principal_type): + """ + Parameters: + - principal_name + - principal_type + + """ + self.send_list_roles(principal_name, principal_type) + return self.recv_list_roles() + + def send_list_roles(self, principal_name, principal_type): + self._oprot.writeMessageBegin("list_roles", TMessageType.CALL, self._seqid) + args = list_roles_args() + args.principal_name = principal_name + args.principal_type = principal_type + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_list_roles(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = list_roles_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "list_roles failed: unknown result") + + def grant_revoke_role(self, request): + """ + Parameters: + - request + + """ + self.send_grant_revoke_role(request) + return self.recv_grant_revoke_role() + + def send_grant_revoke_role(self, request): + self._oprot.writeMessageBegin("grant_revoke_role", TMessageType.CALL, self._seqid) + args = grant_revoke_role_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_grant_revoke_role(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = grant_revoke_role_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "grant_revoke_role failed: unknown result") + + def get_principals_in_role(self, request): + """ + Parameters: + - request + + """ + self.send_get_principals_in_role(request) + return self.recv_get_principals_in_role() + + def send_get_principals_in_role(self, request): + self._oprot.writeMessageBegin("get_principals_in_role", TMessageType.CALL, self._seqid) + args = get_principals_in_role_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_principals_in_role(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_principals_in_role_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_principals_in_role failed: unknown result") + + def get_role_grants_for_principal(self, request): + """ + Parameters: + - request + + """ + self.send_get_role_grants_for_principal(request) + return self.recv_get_role_grants_for_principal() + + def send_get_role_grants_for_principal(self, request): + self._oprot.writeMessageBegin("get_role_grants_for_principal", TMessageType.CALL, self._seqid) + args = get_role_grants_for_principal_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_role_grants_for_principal(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_role_grants_for_principal_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_role_grants_for_principal failed: unknown result") + + def get_privilege_set(self, hiveObject, user_name, group_names): + """ + Parameters: + - hiveObject + - user_name + - group_names + + """ + self.send_get_privilege_set(hiveObject, user_name, group_names) + return self.recv_get_privilege_set() + + def send_get_privilege_set(self, hiveObject, user_name, group_names): + self._oprot.writeMessageBegin("get_privilege_set", TMessageType.CALL, self._seqid) + args = get_privilege_set_args() + args.hiveObject = hiveObject + args.user_name = user_name + args.group_names = group_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_privilege_set(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_privilege_set_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_privilege_set failed: unknown result") + + def list_privileges(self, principal_name, principal_type, hiveObject): + """ + Parameters: + - principal_name + - principal_type + - hiveObject + + """ + self.send_list_privileges(principal_name, principal_type, hiveObject) + return self.recv_list_privileges() + + def send_list_privileges(self, principal_name, principal_type, hiveObject): + self._oprot.writeMessageBegin("list_privileges", TMessageType.CALL, self._seqid) + args = list_privileges_args() + args.principal_name = principal_name + args.principal_type = principal_type + args.hiveObject = hiveObject + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_list_privileges(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = list_privileges_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "list_privileges failed: unknown result") + + def grant_privileges(self, privileges): + """ + Parameters: + - privileges + + """ + self.send_grant_privileges(privileges) + return self.recv_grant_privileges() + + def send_grant_privileges(self, privileges): + self._oprot.writeMessageBegin("grant_privileges", TMessageType.CALL, self._seqid) + args = grant_privileges_args() + args.privileges = privileges + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_grant_privileges(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = grant_privileges_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "grant_privileges failed: unknown result") + + def revoke_privileges(self, privileges): + """ + Parameters: + - privileges + + """ + self.send_revoke_privileges(privileges) + return self.recv_revoke_privileges() + + def send_revoke_privileges(self, privileges): + self._oprot.writeMessageBegin("revoke_privileges", TMessageType.CALL, self._seqid) + args = revoke_privileges_args() + args.privileges = privileges + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_revoke_privileges(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = revoke_privileges_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "revoke_privileges failed: unknown result") + + def grant_revoke_privileges(self, request): + """ + Parameters: + - request + + """ + self.send_grant_revoke_privileges(request) + return self.recv_grant_revoke_privileges() + + def send_grant_revoke_privileges(self, request): + self._oprot.writeMessageBegin("grant_revoke_privileges", TMessageType.CALL, self._seqid) + args = grant_revoke_privileges_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_grant_revoke_privileges(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = grant_revoke_privileges_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "grant_revoke_privileges failed: unknown result") + + def refresh_privileges(self, objToRefresh, authorizer, grantRequest): + """ + Parameters: + - objToRefresh + - authorizer + - grantRequest + + """ + self.send_refresh_privileges(objToRefresh, authorizer, grantRequest) + return self.recv_refresh_privileges() + + def send_refresh_privileges(self, objToRefresh, authorizer, grantRequest): + self._oprot.writeMessageBegin("refresh_privileges", TMessageType.CALL, self._seqid) + args = refresh_privileges_args() + args.objToRefresh = objToRefresh + args.authorizer = authorizer + args.grantRequest = grantRequest + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_refresh_privileges(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = refresh_privileges_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "refresh_privileges failed: unknown result") + + def set_ugi(self, user_name, group_names): + """ + Parameters: + - user_name + - group_names + + """ + self.send_set_ugi(user_name, group_names) + return self.recv_set_ugi() + + def send_set_ugi(self, user_name, group_names): + self._oprot.writeMessageBegin("set_ugi", TMessageType.CALL, self._seqid) + args = set_ugi_args() + args.user_name = user_name + args.group_names = group_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_set_ugi(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = set_ugi_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "set_ugi failed: unknown result") + + def get_delegation_token(self, token_owner, renewer_kerberos_principal_name): + """ + Parameters: + - token_owner + - renewer_kerberos_principal_name + + """ + self.send_get_delegation_token(token_owner, renewer_kerberos_principal_name) + return self.recv_get_delegation_token() + + def send_get_delegation_token(self, token_owner, renewer_kerberos_principal_name): + self._oprot.writeMessageBegin("get_delegation_token", TMessageType.CALL, self._seqid) + args = get_delegation_token_args() + args.token_owner = token_owner + args.renewer_kerberos_principal_name = renewer_kerberos_principal_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_delegation_token(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_delegation_token_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_delegation_token failed: unknown result") + + def renew_delegation_token(self, token_str_form): + """ + Parameters: + - token_str_form + + """ + self.send_renew_delegation_token(token_str_form) + return self.recv_renew_delegation_token() + + def send_renew_delegation_token(self, token_str_form): + self._oprot.writeMessageBegin("renew_delegation_token", TMessageType.CALL, self._seqid) + args = renew_delegation_token_args() + args.token_str_form = token_str_form + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_renew_delegation_token(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = renew_delegation_token_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "renew_delegation_token failed: unknown result") + + def cancel_delegation_token(self, token_str_form): + """ + Parameters: + - token_str_form + + """ + self.send_cancel_delegation_token(token_str_form) + self.recv_cancel_delegation_token() + + def send_cancel_delegation_token(self, token_str_form): + self._oprot.writeMessageBegin("cancel_delegation_token", TMessageType.CALL, self._seqid) + args = cancel_delegation_token_args() + args.token_str_form = token_str_form + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_cancel_delegation_token(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = cancel_delegation_token_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + return + + def add_token(self, token_identifier, delegation_token): + """ + Parameters: + - token_identifier + - delegation_token + + """ + self.send_add_token(token_identifier, delegation_token) + return self.recv_add_token() + + def send_add_token(self, token_identifier, delegation_token): + self._oprot.writeMessageBegin("add_token", TMessageType.CALL, self._seqid) + args = add_token_args() + args.token_identifier = token_identifier + args.delegation_token = delegation_token + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_token(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_token_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_token failed: unknown result") + + def remove_token(self, token_identifier): + """ + Parameters: + - token_identifier + + """ + self.send_remove_token(token_identifier) + return self.recv_remove_token() + + def send_remove_token(self, token_identifier): + self._oprot.writeMessageBegin("remove_token", TMessageType.CALL, self._seqid) + args = remove_token_args() + args.token_identifier = token_identifier + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_remove_token(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = remove_token_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "remove_token failed: unknown result") + + def get_token(self, token_identifier): + """ + Parameters: + - token_identifier + + """ + self.send_get_token(token_identifier) + return self.recv_get_token() + + def send_get_token(self, token_identifier): + self._oprot.writeMessageBegin("get_token", TMessageType.CALL, self._seqid) + args = get_token_args() + args.token_identifier = token_identifier + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_token(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_token_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_token failed: unknown result") + + def get_all_token_identifiers(self): + self.send_get_all_token_identifiers() + return self.recv_get_all_token_identifiers() + + def send_get_all_token_identifiers(self): + self._oprot.writeMessageBegin("get_all_token_identifiers", TMessageType.CALL, self._seqid) + args = get_all_token_identifiers_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_all_token_identifiers(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_all_token_identifiers_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_token_identifiers failed: unknown result") + + def add_master_key(self, key): + """ + Parameters: + - key + + """ + self.send_add_master_key(key) + return self.recv_add_master_key() + + def send_add_master_key(self, key): + self._oprot.writeMessageBegin("add_master_key", TMessageType.CALL, self._seqid) + args = add_master_key_args() + args.key = key + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_master_key(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_master_key_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_master_key failed: unknown result") + + def update_master_key(self, seq_number, key): + """ + Parameters: + - seq_number + - key + + """ + self.send_update_master_key(seq_number, key) + self.recv_update_master_key() + + def send_update_master_key(self, seq_number, key): + self._oprot.writeMessageBegin("update_master_key", TMessageType.CALL, self._seqid) + args = update_master_key_args() + args.seq_number = seq_number + args.key = key + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_update_master_key(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = update_master_key_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def remove_master_key(self, key_seq): + """ + Parameters: + - key_seq + + """ + self.send_remove_master_key(key_seq) + return self.recv_remove_master_key() + + def send_remove_master_key(self, key_seq): + self._oprot.writeMessageBegin("remove_master_key", TMessageType.CALL, self._seqid) + args = remove_master_key_args() + args.key_seq = key_seq + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_remove_master_key(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = remove_master_key_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "remove_master_key failed: unknown result") + + def get_master_keys(self): + self.send_get_master_keys() + return self.recv_get_master_keys() + + def send_get_master_keys(self): + self._oprot.writeMessageBegin("get_master_keys", TMessageType.CALL, self._seqid) + args = get_master_keys_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_master_keys(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_master_keys_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_master_keys failed: unknown result") + + def get_open_txns(self): + self.send_get_open_txns() + return self.recv_get_open_txns() + + def send_get_open_txns(self): + self._oprot.writeMessageBegin("get_open_txns", TMessageType.CALL, self._seqid) + args = get_open_txns_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_open_txns(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_open_txns_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_open_txns failed: unknown result") + + def get_open_txns_info(self): + self.send_get_open_txns_info() + return self.recv_get_open_txns_info() + + def send_get_open_txns_info(self): + self._oprot.writeMessageBegin("get_open_txns_info", TMessageType.CALL, self._seqid) + args = get_open_txns_info_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_open_txns_info(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_open_txns_info_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_open_txns_info failed: unknown result") + + def open_txns(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_open_txns(rqst) + return self.recv_open_txns() + + def send_open_txns(self, rqst): + self._oprot.writeMessageBegin("open_txns", TMessageType.CALL, self._seqid) + args = open_txns_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_open_txns(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = open_txns_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "open_txns failed: unknown result") + + def abort_txn(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_abort_txn(rqst) + self.recv_abort_txn() + + def send_abort_txn(self, rqst): + self._oprot.writeMessageBegin("abort_txn", TMessageType.CALL, self._seqid) + args = abort_txn_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_abort_txn(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = abort_txn_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + return + + def abort_txns(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_abort_txns(rqst) + self.recv_abort_txns() + + def send_abort_txns(self, rqst): + self._oprot.writeMessageBegin("abort_txns", TMessageType.CALL, self._seqid) + args = abort_txns_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_abort_txns(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = abort_txns_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + return + + def commit_txn(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_commit_txn(rqst) + self.recv_commit_txn() + + def send_commit_txn(self, rqst): + self._oprot.writeMessageBegin("commit_txn", TMessageType.CALL, self._seqid) + args = commit_txn_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_commit_txn(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = commit_txn_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def get_latest_txnid_in_conflict(self, txnId): + """ + Parameters: + - txnId + + """ + self.send_get_latest_txnid_in_conflict(txnId) + return self.recv_get_latest_txnid_in_conflict() + + def send_get_latest_txnid_in_conflict(self, txnId): + self._oprot.writeMessageBegin("get_latest_txnid_in_conflict", TMessageType.CALL, self._seqid) + args = get_latest_txnid_in_conflict_args() + args.txnId = txnId + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_latest_txnid_in_conflict(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_latest_txnid_in_conflict_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_latest_txnid_in_conflict failed: unknown result") + + def repl_tbl_writeid_state(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_repl_tbl_writeid_state(rqst) + self.recv_repl_tbl_writeid_state() + + def send_repl_tbl_writeid_state(self, rqst): + self._oprot.writeMessageBegin("repl_tbl_writeid_state", TMessageType.CALL, self._seqid) + args = repl_tbl_writeid_state_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_repl_tbl_writeid_state(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = repl_tbl_writeid_state_result() + result.read(iprot) + iprot.readMessageEnd() + return + + def get_valid_write_ids(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_get_valid_write_ids(rqst) + return self.recv_get_valid_write_ids() + + def send_get_valid_write_ids(self, rqst): + self._oprot.writeMessageBegin("get_valid_write_ids", TMessageType.CALL, self._seqid) + args = get_valid_write_ids_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_valid_write_ids(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_valid_write_ids_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_valid_write_ids failed: unknown result") + + def allocate_table_write_ids(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_allocate_table_write_ids(rqst) + return self.recv_allocate_table_write_ids() + + def send_allocate_table_write_ids(self, rqst): + self._oprot.writeMessageBegin("allocate_table_write_ids", TMessageType.CALL, self._seqid) + args = allocate_table_write_ids_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_allocate_table_write_ids(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = allocate_table_write_ids_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "allocate_table_write_ids failed: unknown result") + + def get_max_allocated_table_write_id(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_get_max_allocated_table_write_id(rqst) + return self.recv_get_max_allocated_table_write_id() + + def send_get_max_allocated_table_write_id(self, rqst): + self._oprot.writeMessageBegin("get_max_allocated_table_write_id", TMessageType.CALL, self._seqid) + args = get_max_allocated_table_write_id_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_max_allocated_table_write_id(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_max_allocated_table_write_id_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_max_allocated_table_write_id failed: unknown result" + ) + + def seed_write_id(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_seed_write_id(rqst) + self.recv_seed_write_id() + + def send_seed_write_id(self, rqst): + self._oprot.writeMessageBegin("seed_write_id", TMessageType.CALL, self._seqid) + args = seed_write_id_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_seed_write_id(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = seed_write_id_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + return + + def seed_txn_id(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_seed_txn_id(rqst) + self.recv_seed_txn_id() + + def send_seed_txn_id(self, rqst): + self._oprot.writeMessageBegin("seed_txn_id", TMessageType.CALL, self._seqid) + args = seed_txn_id_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_seed_txn_id(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = seed_txn_id_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + return + + def lock(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_lock(rqst) + return self.recv_lock() + + def send_lock(self, rqst): + self._oprot.writeMessageBegin("lock", TMessageType.CALL, self._seqid) + args = lock_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_lock(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = lock_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "lock failed: unknown result") + + def check_lock(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_check_lock(rqst) + return self.recv_check_lock() + + def send_check_lock(self, rqst): + self._oprot.writeMessageBegin("check_lock", TMessageType.CALL, self._seqid) + args = check_lock_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_check_lock(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = check_lock_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "check_lock failed: unknown result") + + def unlock(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_unlock(rqst) + self.recv_unlock() + + def send_unlock(self, rqst): + self._oprot.writeMessageBegin("unlock", TMessageType.CALL, self._seqid) + args = unlock_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_unlock(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = unlock_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def show_locks(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_show_locks(rqst) + return self.recv_show_locks() + + def send_show_locks(self, rqst): + self._oprot.writeMessageBegin("show_locks", TMessageType.CALL, self._seqid) + args = show_locks_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_show_locks(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = show_locks_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "show_locks failed: unknown result") + + def heartbeat(self, ids): + """ + Parameters: + - ids + + """ + self.send_heartbeat(ids) + self.recv_heartbeat() + + def send_heartbeat(self, ids): + self._oprot.writeMessageBegin("heartbeat", TMessageType.CALL, self._seqid) + args = heartbeat_args() + args.ids = ids + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_heartbeat(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = heartbeat_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + return + + def heartbeat_txn_range(self, txns): + """ + Parameters: + - txns + + """ + self.send_heartbeat_txn_range(txns) + return self.recv_heartbeat_txn_range() + + def send_heartbeat_txn_range(self, txns): + self._oprot.writeMessageBegin("heartbeat_txn_range", TMessageType.CALL, self._seqid) + args = heartbeat_txn_range_args() + args.txns = txns + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_heartbeat_txn_range(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = heartbeat_txn_range_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "heartbeat_txn_range failed: unknown result") + + def compact(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_compact(rqst) + self.recv_compact() + + def send_compact(self, rqst): + self._oprot.writeMessageBegin("compact", TMessageType.CALL, self._seqid) + args = compact_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_compact(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = compact_result() + result.read(iprot) + iprot.readMessageEnd() + return + + def compact2(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_compact2(rqst) + return self.recv_compact2() + + def send_compact2(self, rqst): + self._oprot.writeMessageBegin("compact2", TMessageType.CALL, self._seqid) + args = compact2_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_compact2(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = compact2_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "compact2 failed: unknown result") + + def show_compact(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_show_compact(rqst) + return self.recv_show_compact() + + def send_show_compact(self, rqst): + self._oprot.writeMessageBegin("show_compact", TMessageType.CALL, self._seqid) + args = show_compact_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_show_compact(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = show_compact_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "show_compact failed: unknown result") + + def add_dynamic_partitions(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_add_dynamic_partitions(rqst) + self.recv_add_dynamic_partitions() + + def send_add_dynamic_partitions(self, rqst): + self._oprot.writeMessageBegin("add_dynamic_partitions", TMessageType.CALL, self._seqid) + args = add_dynamic_partitions_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_dynamic_partitions(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_dynamic_partitions_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def find_next_compact(self, workerId): + """ + Parameters: + - workerId + + """ + self.send_find_next_compact(workerId) + return self.recv_find_next_compact() + + def send_find_next_compact(self, workerId): + self._oprot.writeMessageBegin("find_next_compact", TMessageType.CALL, self._seqid) + args = find_next_compact_args() + args.workerId = workerId + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_find_next_compact(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = find_next_compact_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "find_next_compact failed: unknown result") + + def find_next_compact2(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_find_next_compact2(rqst) + return self.recv_find_next_compact2() + + def send_find_next_compact2(self, rqst): + self._oprot.writeMessageBegin("find_next_compact2", TMessageType.CALL, self._seqid) + args = find_next_compact2_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_find_next_compact2(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = find_next_compact2_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "find_next_compact2 failed: unknown result") + + def update_compactor_state(self, cr, txn_id): + """ + Parameters: + - cr + - txn_id + + """ + self.send_update_compactor_state(cr, txn_id) + self.recv_update_compactor_state() + + def send_update_compactor_state(self, cr, txn_id): + self._oprot.writeMessageBegin("update_compactor_state", TMessageType.CALL, self._seqid) + args = update_compactor_state_args() + args.cr = cr + args.txn_id = txn_id + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_update_compactor_state(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = update_compactor_state_result() + result.read(iprot) + iprot.readMessageEnd() + return + + def find_columns_with_stats(self, cr): + """ + Parameters: + - cr + + """ + self.send_find_columns_with_stats(cr) + return self.recv_find_columns_with_stats() + + def send_find_columns_with_stats(self, cr): + self._oprot.writeMessageBegin("find_columns_with_stats", TMessageType.CALL, self._seqid) + args = find_columns_with_stats_args() + args.cr = cr + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_find_columns_with_stats(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = find_columns_with_stats_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "find_columns_with_stats failed: unknown result") + + def mark_cleaned(self, cr): + """ + Parameters: + - cr + + """ + self.send_mark_cleaned(cr) + self.recv_mark_cleaned() + + def send_mark_cleaned(self, cr): + self._oprot.writeMessageBegin("mark_cleaned", TMessageType.CALL, self._seqid) + args = mark_cleaned_args() + args.cr = cr + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_mark_cleaned(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = mark_cleaned_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + return + + def mark_compacted(self, cr): + """ + Parameters: + - cr + + """ + self.send_mark_compacted(cr) + self.recv_mark_compacted() + + def send_mark_compacted(self, cr): + self._oprot.writeMessageBegin("mark_compacted", TMessageType.CALL, self._seqid) + args = mark_compacted_args() + args.cr = cr + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_mark_compacted(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = mark_compacted_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + return + + def mark_failed(self, cr): + """ + Parameters: + - cr + + """ + self.send_mark_failed(cr) + self.recv_mark_failed() + + def send_mark_failed(self, cr): + self._oprot.writeMessageBegin("mark_failed", TMessageType.CALL, self._seqid) + args = mark_failed_args() + args.cr = cr + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_mark_failed(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = mark_failed_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + return + + def mark_refused(self, cr): + """ + Parameters: + - cr + + """ + self.send_mark_refused(cr) + self.recv_mark_refused() + + def send_mark_refused(self, cr): + self._oprot.writeMessageBegin("mark_refused", TMessageType.CALL, self._seqid) + args = mark_refused_args() + args.cr = cr + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_mark_refused(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = mark_refused_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + return + + def update_compaction_metrics_data(self, data): + """ + Parameters: + - data + + """ + self.send_update_compaction_metrics_data(data) + return self.recv_update_compaction_metrics_data() + + def send_update_compaction_metrics_data(self, data): + self._oprot.writeMessageBegin("update_compaction_metrics_data", TMessageType.CALL, self._seqid) + args = update_compaction_metrics_data_args() + args.data = data + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_update_compaction_metrics_data(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = update_compaction_metrics_data_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "update_compaction_metrics_data failed: unknown result") + + def remove_compaction_metrics_data(self, request): + """ + Parameters: + - request + + """ + self.send_remove_compaction_metrics_data(request) + self.recv_remove_compaction_metrics_data() + + def send_remove_compaction_metrics_data(self, request): + self._oprot.writeMessageBegin("remove_compaction_metrics_data", TMessageType.CALL, self._seqid) + args = remove_compaction_metrics_data_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_remove_compaction_metrics_data(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = remove_compaction_metrics_data_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + return + + def set_hadoop_jobid(self, jobId, cq_id): + """ + Parameters: + - jobId + - cq_id + + """ + self.send_set_hadoop_jobid(jobId, cq_id) + self.recv_set_hadoop_jobid() + + def send_set_hadoop_jobid(self, jobId, cq_id): + self._oprot.writeMessageBegin("set_hadoop_jobid", TMessageType.CALL, self._seqid) + args = set_hadoop_jobid_args() + args.jobId = jobId + args.cq_id = cq_id + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_set_hadoop_jobid(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = set_hadoop_jobid_result() + result.read(iprot) + iprot.readMessageEnd() + return + + def get_latest_committed_compaction_info(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_get_latest_committed_compaction_info(rqst) + return self.recv_get_latest_committed_compaction_info() + + def send_get_latest_committed_compaction_info(self, rqst): + self._oprot.writeMessageBegin("get_latest_committed_compaction_info", TMessageType.CALL, self._seqid) + args = get_latest_committed_compaction_info_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_latest_committed_compaction_info(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_latest_committed_compaction_info_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_latest_committed_compaction_info failed: unknown result" + ) + + def get_next_notification(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_get_next_notification(rqst) + return self.recv_get_next_notification() + + def send_get_next_notification(self, rqst): + self._oprot.writeMessageBegin("get_next_notification", TMessageType.CALL, self._seqid) + args = get_next_notification_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_next_notification(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_next_notification_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_next_notification failed: unknown result") + + def get_current_notificationEventId(self): + self.send_get_current_notificationEventId() + return self.recv_get_current_notificationEventId() + + def send_get_current_notificationEventId(self): + self._oprot.writeMessageBegin("get_current_notificationEventId", TMessageType.CALL, self._seqid) + args = get_current_notificationEventId_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_current_notificationEventId(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_current_notificationEventId_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_current_notificationEventId failed: unknown result" + ) + + def get_notification_events_count(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_get_notification_events_count(rqst) + return self.recv_get_notification_events_count() + + def send_get_notification_events_count(self, rqst): + self._oprot.writeMessageBegin("get_notification_events_count", TMessageType.CALL, self._seqid) + args = get_notification_events_count_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_notification_events_count(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_notification_events_count_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_notification_events_count failed: unknown result") + + def fire_listener_event(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_fire_listener_event(rqst) + return self.recv_fire_listener_event() + + def send_fire_listener_event(self, rqst): + self._oprot.writeMessageBegin("fire_listener_event", TMessageType.CALL, self._seqid) + args = fire_listener_event_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_fire_listener_event(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = fire_listener_event_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "fire_listener_event failed: unknown result") + + def flushCache(self): + self.send_flushCache() + self.recv_flushCache() + + def send_flushCache(self): + self._oprot.writeMessageBegin("flushCache", TMessageType.CALL, self._seqid) + args = flushCache_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_flushCache(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = flushCache_result() + result.read(iprot) + iprot.readMessageEnd() + return + + def add_write_notification_log(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_add_write_notification_log(rqst) + return self.recv_add_write_notification_log() + + def send_add_write_notification_log(self, rqst): + self._oprot.writeMessageBegin("add_write_notification_log", TMessageType.CALL, self._seqid) + args = add_write_notification_log_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_write_notification_log(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_write_notification_log_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_write_notification_log failed: unknown result") + + def add_write_notification_log_in_batch(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_add_write_notification_log_in_batch(rqst) + return self.recv_add_write_notification_log_in_batch() + + def send_add_write_notification_log_in_batch(self, rqst): + self._oprot.writeMessageBegin("add_write_notification_log_in_batch", TMessageType.CALL, self._seqid) + args = add_write_notification_log_in_batch_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_write_notification_log_in_batch(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_write_notification_log_in_batch_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException( + TApplicationException.MISSING_RESULT, "add_write_notification_log_in_batch failed: unknown result" + ) + + def cm_recycle(self, request): + """ + Parameters: + - request + + """ + self.send_cm_recycle(request) + return self.recv_cm_recycle() + + def send_cm_recycle(self, request): + self._oprot.writeMessageBegin("cm_recycle", TMessageType.CALL, self._seqid) + args = cm_recycle_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_cm_recycle(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = cm_recycle_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "cm_recycle failed: unknown result") + + def get_file_metadata_by_expr(self, req): + """ + Parameters: + - req + + """ + self.send_get_file_metadata_by_expr(req) + return self.recv_get_file_metadata_by_expr() + + def send_get_file_metadata_by_expr(self, req): + self._oprot.writeMessageBegin("get_file_metadata_by_expr", TMessageType.CALL, self._seqid) + args = get_file_metadata_by_expr_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_file_metadata_by_expr(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_file_metadata_by_expr_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_file_metadata_by_expr failed: unknown result") + + def get_file_metadata(self, req): + """ + Parameters: + - req + + """ + self.send_get_file_metadata(req) + return self.recv_get_file_metadata() + + def send_get_file_metadata(self, req): + self._oprot.writeMessageBegin("get_file_metadata", TMessageType.CALL, self._seqid) + args = get_file_metadata_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_file_metadata(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_file_metadata_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_file_metadata failed: unknown result") + + def put_file_metadata(self, req): + """ + Parameters: + - req + + """ + self.send_put_file_metadata(req) + return self.recv_put_file_metadata() + + def send_put_file_metadata(self, req): + self._oprot.writeMessageBegin("put_file_metadata", TMessageType.CALL, self._seqid) + args = put_file_metadata_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_put_file_metadata(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = put_file_metadata_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "put_file_metadata failed: unknown result") + + def clear_file_metadata(self, req): + """ + Parameters: + - req + + """ + self.send_clear_file_metadata(req) + return self.recv_clear_file_metadata() + + def send_clear_file_metadata(self, req): + self._oprot.writeMessageBegin("clear_file_metadata", TMessageType.CALL, self._seqid) + args = clear_file_metadata_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_clear_file_metadata(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = clear_file_metadata_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "clear_file_metadata failed: unknown result") + + def cache_file_metadata(self, req): + """ + Parameters: + - req + + """ + self.send_cache_file_metadata(req) + return self.recv_cache_file_metadata() + + def send_cache_file_metadata(self, req): + self._oprot.writeMessageBegin("cache_file_metadata", TMessageType.CALL, self._seqid) + args = cache_file_metadata_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_cache_file_metadata(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = cache_file_metadata_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "cache_file_metadata failed: unknown result") + + def get_metastore_db_uuid(self): + self.send_get_metastore_db_uuid() + return self.recv_get_metastore_db_uuid() + + def send_get_metastore_db_uuid(self): + self._oprot.writeMessageBegin("get_metastore_db_uuid", TMessageType.CALL, self._seqid) + args = get_metastore_db_uuid_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_metastore_db_uuid(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_metastore_db_uuid_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_metastore_db_uuid failed: unknown result") + + def create_resource_plan(self, request): + """ + Parameters: + - request + + """ + self.send_create_resource_plan(request) + return self.recv_create_resource_plan() + + def send_create_resource_plan(self, request): + self._oprot.writeMessageBegin("create_resource_plan", TMessageType.CALL, self._seqid) + args = create_resource_plan_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_resource_plan(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = create_resource_plan_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_resource_plan failed: unknown result") + + def get_resource_plan(self, request): + """ + Parameters: + - request + + """ + self.send_get_resource_plan(request) + return self.recv_get_resource_plan() + + def send_get_resource_plan(self, request): + self._oprot.writeMessageBegin("get_resource_plan", TMessageType.CALL, self._seqid) + args = get_resource_plan_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_resource_plan(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_resource_plan_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_resource_plan failed: unknown result") + + def get_active_resource_plan(self, request): + """ + Parameters: + - request + + """ + self.send_get_active_resource_plan(request) + return self.recv_get_active_resource_plan() + + def send_get_active_resource_plan(self, request): + self._oprot.writeMessageBegin("get_active_resource_plan", TMessageType.CALL, self._seqid) + args = get_active_resource_plan_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_active_resource_plan(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_active_resource_plan_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_active_resource_plan failed: unknown result") + + def get_all_resource_plans(self, request): + """ + Parameters: + - request + + """ + self.send_get_all_resource_plans(request) + return self.recv_get_all_resource_plans() + + def send_get_all_resource_plans(self, request): + self._oprot.writeMessageBegin("get_all_resource_plans", TMessageType.CALL, self._seqid) + args = get_all_resource_plans_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_all_resource_plans(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_all_resource_plans_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_resource_plans failed: unknown result") + + def alter_resource_plan(self, request): + """ + Parameters: + - request + + """ + self.send_alter_resource_plan(request) + return self.recv_alter_resource_plan() + + def send_alter_resource_plan(self, request): + self._oprot.writeMessageBegin("alter_resource_plan", TMessageType.CALL, self._seqid) + args = alter_resource_plan_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_resource_plan(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = alter_resource_plan_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "alter_resource_plan failed: unknown result") + + def validate_resource_plan(self, request): + """ + Parameters: + - request + + """ + self.send_validate_resource_plan(request) + return self.recv_validate_resource_plan() + + def send_validate_resource_plan(self, request): + self._oprot.writeMessageBegin("validate_resource_plan", TMessageType.CALL, self._seqid) + args = validate_resource_plan_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_validate_resource_plan(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = validate_resource_plan_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "validate_resource_plan failed: unknown result") + + def drop_resource_plan(self, request): + """ + Parameters: + - request + + """ + self.send_drop_resource_plan(request) + return self.recv_drop_resource_plan() + + def send_drop_resource_plan(self, request): + self._oprot.writeMessageBegin("drop_resource_plan", TMessageType.CALL, self._seqid) + args = drop_resource_plan_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_resource_plan(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_resource_plan_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_resource_plan failed: unknown result") + + def create_wm_trigger(self, request): + """ + Parameters: + - request + + """ + self.send_create_wm_trigger(request) + return self.recv_create_wm_trigger() + + def send_create_wm_trigger(self, request): + self._oprot.writeMessageBegin("create_wm_trigger", TMessageType.CALL, self._seqid) + args = create_wm_trigger_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_wm_trigger(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = create_wm_trigger_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_wm_trigger failed: unknown result") + + def alter_wm_trigger(self, request): + """ + Parameters: + - request + + """ + self.send_alter_wm_trigger(request) + return self.recv_alter_wm_trigger() + + def send_alter_wm_trigger(self, request): + self._oprot.writeMessageBegin("alter_wm_trigger", TMessageType.CALL, self._seqid) + args = alter_wm_trigger_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_wm_trigger(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = alter_wm_trigger_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "alter_wm_trigger failed: unknown result") + + def drop_wm_trigger(self, request): + """ + Parameters: + - request + + """ + self.send_drop_wm_trigger(request) + return self.recv_drop_wm_trigger() + + def send_drop_wm_trigger(self, request): + self._oprot.writeMessageBegin("drop_wm_trigger", TMessageType.CALL, self._seqid) + args = drop_wm_trigger_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_wm_trigger(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_wm_trigger_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_wm_trigger failed: unknown result") + + def get_triggers_for_resourceplan(self, request): + """ + Parameters: + - request + + """ + self.send_get_triggers_for_resourceplan(request) + return self.recv_get_triggers_for_resourceplan() + + def send_get_triggers_for_resourceplan(self, request): + self._oprot.writeMessageBegin("get_triggers_for_resourceplan", TMessageType.CALL, self._seqid) + args = get_triggers_for_resourceplan_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_triggers_for_resourceplan(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_triggers_for_resourceplan_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_triggers_for_resourceplan failed: unknown result") + + def create_wm_pool(self, request): + """ + Parameters: + - request + + """ + self.send_create_wm_pool(request) + return self.recv_create_wm_pool() + + def send_create_wm_pool(self, request): + self._oprot.writeMessageBegin("create_wm_pool", TMessageType.CALL, self._seqid) + args = create_wm_pool_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_wm_pool(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = create_wm_pool_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_wm_pool failed: unknown result") + + def alter_wm_pool(self, request): + """ + Parameters: + - request + + """ + self.send_alter_wm_pool(request) + return self.recv_alter_wm_pool() + + def send_alter_wm_pool(self, request): + self._oprot.writeMessageBegin("alter_wm_pool", TMessageType.CALL, self._seqid) + args = alter_wm_pool_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_wm_pool(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = alter_wm_pool_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException(TApplicationException.MISSING_RESULT, "alter_wm_pool failed: unknown result") + + def drop_wm_pool(self, request): + """ + Parameters: + - request + + """ + self.send_drop_wm_pool(request) + return self.recv_drop_wm_pool() + + def send_drop_wm_pool(self, request): + self._oprot.writeMessageBegin("drop_wm_pool", TMessageType.CALL, self._seqid) + args = drop_wm_pool_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_wm_pool(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_wm_pool_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_wm_pool failed: unknown result") + + def create_or_update_wm_mapping(self, request): + """ + Parameters: + - request + + """ + self.send_create_or_update_wm_mapping(request) + return self.recv_create_or_update_wm_mapping() + + def send_create_or_update_wm_mapping(self, request): + self._oprot.writeMessageBegin("create_or_update_wm_mapping", TMessageType.CALL, self._seqid) + args = create_or_update_wm_mapping_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_or_update_wm_mapping(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = create_or_update_wm_mapping_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_or_update_wm_mapping failed: unknown result") + + def drop_wm_mapping(self, request): + """ + Parameters: + - request + + """ + self.send_drop_wm_mapping(request) + return self.recv_drop_wm_mapping() + + def send_drop_wm_mapping(self, request): + self._oprot.writeMessageBegin("drop_wm_mapping", TMessageType.CALL, self._seqid) + args = drop_wm_mapping_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_wm_mapping(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_wm_mapping_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_wm_mapping failed: unknown result") + + def create_or_drop_wm_trigger_to_pool_mapping(self, request): + """ + Parameters: + - request + + """ + self.send_create_or_drop_wm_trigger_to_pool_mapping(request) + return self.recv_create_or_drop_wm_trigger_to_pool_mapping() + + def send_create_or_drop_wm_trigger_to_pool_mapping(self, request): + self._oprot.writeMessageBegin("create_or_drop_wm_trigger_to_pool_mapping", TMessageType.CALL, self._seqid) + args = create_or_drop_wm_trigger_to_pool_mapping_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_or_drop_wm_trigger_to_pool_mapping(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = create_or_drop_wm_trigger_to_pool_mapping_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException( + TApplicationException.MISSING_RESULT, "create_or_drop_wm_trigger_to_pool_mapping failed: unknown result" + ) + + def create_ischema(self, schema): + """ + Parameters: + - schema + + """ + self.send_create_ischema(schema) + self.recv_create_ischema() + + def send_create_ischema(self, schema): + self._oprot.writeMessageBegin("create_ischema", TMessageType.CALL, self._seqid) + args = create_ischema_args() + args.schema = schema + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_ischema(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = create_ischema_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + return + + def alter_ischema(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_alter_ischema(rqst) + self.recv_alter_ischema() + + def send_alter_ischema(self, rqst): + self._oprot.writeMessageBegin("alter_ischema", TMessageType.CALL, self._seqid) + args = alter_ischema_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_ischema(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = alter_ischema_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def get_ischema(self, name): + """ + Parameters: + - name + + """ + self.send_get_ischema(name) + return self.recv_get_ischema() + + def send_get_ischema(self, name): + self._oprot.writeMessageBegin("get_ischema", TMessageType.CALL, self._seqid) + args = get_ischema_args() + args.name = name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_ischema(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_ischema_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_ischema failed: unknown result") + + def drop_ischema(self, name): + """ + Parameters: + - name + + """ + self.send_drop_ischema(name) + self.recv_drop_ischema() + + def send_drop_ischema(self, name): + self._oprot.writeMessageBegin("drop_ischema", TMessageType.CALL, self._seqid) + args = drop_ischema_args() + args.name = name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_ischema(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_ischema_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + return + + def add_schema_version(self, schemaVersion): + """ + Parameters: + - schemaVersion + + """ + self.send_add_schema_version(schemaVersion) + self.recv_add_schema_version() + + def send_add_schema_version(self, schemaVersion): + self._oprot.writeMessageBegin("add_schema_version", TMessageType.CALL, self._seqid) + args = add_schema_version_args() + args.schemaVersion = schemaVersion + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_schema_version(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_schema_version_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + return + + def get_schema_version(self, schemaVersion): + """ + Parameters: + - schemaVersion + + """ + self.send_get_schema_version(schemaVersion) + return self.recv_get_schema_version() + + def send_get_schema_version(self, schemaVersion): + self._oprot.writeMessageBegin("get_schema_version", TMessageType.CALL, self._seqid) + args = get_schema_version_args() + args.schemaVersion = schemaVersion + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_schema_version(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_schema_version_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_schema_version failed: unknown result") + + def get_schema_latest_version(self, schemaName): + """ + Parameters: + - schemaName + + """ + self.send_get_schema_latest_version(schemaName) + return self.recv_get_schema_latest_version() + + def send_get_schema_latest_version(self, schemaName): + self._oprot.writeMessageBegin("get_schema_latest_version", TMessageType.CALL, self._seqid) + args = get_schema_latest_version_args() + args.schemaName = schemaName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_schema_latest_version(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_schema_latest_version_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_schema_latest_version failed: unknown result") + + def get_schema_all_versions(self, schemaName): + """ + Parameters: + - schemaName + + """ + self.send_get_schema_all_versions(schemaName) + return self.recv_get_schema_all_versions() + + def send_get_schema_all_versions(self, schemaName): + self._oprot.writeMessageBegin("get_schema_all_versions", TMessageType.CALL, self._seqid) + args = get_schema_all_versions_args() + args.schemaName = schemaName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_schema_all_versions(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_schema_all_versions_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_schema_all_versions failed: unknown result") + + def drop_schema_version(self, schemaVersion): + """ + Parameters: + - schemaVersion + + """ + self.send_drop_schema_version(schemaVersion) + self.recv_drop_schema_version() + + def send_drop_schema_version(self, schemaVersion): + self._oprot.writeMessageBegin("drop_schema_version", TMessageType.CALL, self._seqid) + args = drop_schema_version_args() + args.schemaVersion = schemaVersion + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_schema_version(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_schema_version_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def get_schemas_by_cols(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_get_schemas_by_cols(rqst) + return self.recv_get_schemas_by_cols() + + def send_get_schemas_by_cols(self, rqst): + self._oprot.writeMessageBegin("get_schemas_by_cols", TMessageType.CALL, self._seqid) + args = get_schemas_by_cols_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_schemas_by_cols(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_schemas_by_cols_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_schemas_by_cols failed: unknown result") + + def map_schema_version_to_serde(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_map_schema_version_to_serde(rqst) + self.recv_map_schema_version_to_serde() + + def send_map_schema_version_to_serde(self, rqst): + self._oprot.writeMessageBegin("map_schema_version_to_serde", TMessageType.CALL, self._seqid) + args = map_schema_version_to_serde_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_map_schema_version_to_serde(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = map_schema_version_to_serde_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def set_schema_version_state(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_set_schema_version_state(rqst) + self.recv_set_schema_version_state() + + def send_set_schema_version_state(self, rqst): + self._oprot.writeMessageBegin("set_schema_version_state", TMessageType.CALL, self._seqid) + args = set_schema_version_state_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_set_schema_version_state(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = set_schema_version_state_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + return + + def add_serde(self, serde): + """ + Parameters: + - serde + + """ + self.send_add_serde(serde) + self.recv_add_serde() + + def send_add_serde(self, serde): + self._oprot.writeMessageBegin("add_serde", TMessageType.CALL, self._seqid) + args = add_serde_args() + args.serde = serde + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_serde(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_serde_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def get_serde(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_get_serde(rqst) + return self.recv_get_serde() + + def send_get_serde(self, rqst): + self._oprot.writeMessageBegin("get_serde", TMessageType.CALL, self._seqid) + args = get_serde_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_serde(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_serde_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_serde failed: unknown result") + + def get_lock_materialization_rebuild(self, dbName, tableName, txnId): + """ + Parameters: + - dbName + - tableName + - txnId + + """ + self.send_get_lock_materialization_rebuild(dbName, tableName, txnId) + return self.recv_get_lock_materialization_rebuild() + + def send_get_lock_materialization_rebuild(self, dbName, tableName, txnId): + self._oprot.writeMessageBegin("get_lock_materialization_rebuild", TMessageType.CALL, self._seqid) + args = get_lock_materialization_rebuild_args() + args.dbName = dbName + args.tableName = tableName + args.txnId = txnId + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_lock_materialization_rebuild(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_lock_materialization_rebuild_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_lock_materialization_rebuild failed: unknown result" + ) + + def heartbeat_lock_materialization_rebuild(self, dbName, tableName, txnId): + """ + Parameters: + - dbName + - tableName + - txnId + + """ + self.send_heartbeat_lock_materialization_rebuild(dbName, tableName, txnId) + return self.recv_heartbeat_lock_materialization_rebuild() + + def send_heartbeat_lock_materialization_rebuild(self, dbName, tableName, txnId): + self._oprot.writeMessageBegin("heartbeat_lock_materialization_rebuild", TMessageType.CALL, self._seqid) + args = heartbeat_lock_materialization_rebuild_args() + args.dbName = dbName + args.tableName = tableName + args.txnId = txnId + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_heartbeat_lock_materialization_rebuild(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = heartbeat_lock_materialization_rebuild_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException( + TApplicationException.MISSING_RESULT, "heartbeat_lock_materialization_rebuild failed: unknown result" + ) + + def add_runtime_stats(self, stat): + """ + Parameters: + - stat + + """ + self.send_add_runtime_stats(stat) + self.recv_add_runtime_stats() + + def send_add_runtime_stats(self, stat): + self._oprot.writeMessageBegin("add_runtime_stats", TMessageType.CALL, self._seqid) + args = add_runtime_stats_args() + args.stat = stat + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_runtime_stats(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_runtime_stats_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + return + + def get_runtime_stats(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_get_runtime_stats(rqst) + return self.recv_get_runtime_stats() + + def send_get_runtime_stats(self, rqst): + self._oprot.writeMessageBegin("get_runtime_stats", TMessageType.CALL, self._seqid) + args = get_runtime_stats_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_runtime_stats(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_runtime_stats_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_runtime_stats failed: unknown result") + + def get_partitions_with_specs(self, request): + """ + Parameters: + - request + + """ + self.send_get_partitions_with_specs(request) + return self.recv_get_partitions_with_specs() + + def send_get_partitions_with_specs(self, request): + self._oprot.writeMessageBegin("get_partitions_with_specs", TMessageType.CALL, self._seqid) + args = get_partitions_with_specs_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions_with_specs(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partitions_with_specs_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_with_specs failed: unknown result") + + def scheduled_query_poll(self, request): + """ + Parameters: + - request + + """ + self.send_scheduled_query_poll(request) + return self.recv_scheduled_query_poll() + + def send_scheduled_query_poll(self, request): + self._oprot.writeMessageBegin("scheduled_query_poll", TMessageType.CALL, self._seqid) + args = scheduled_query_poll_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_scheduled_query_poll(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = scheduled_query_poll_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "scheduled_query_poll failed: unknown result") + + def scheduled_query_maintenance(self, request): + """ + Parameters: + - request + + """ + self.send_scheduled_query_maintenance(request) + self.recv_scheduled_query_maintenance() + + def send_scheduled_query_maintenance(self, request): + self._oprot.writeMessageBegin("scheduled_query_maintenance", TMessageType.CALL, self._seqid) + args = scheduled_query_maintenance_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_scheduled_query_maintenance(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = scheduled_query_maintenance_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + return + + def scheduled_query_progress(self, info): + """ + Parameters: + - info + + """ + self.send_scheduled_query_progress(info) + self.recv_scheduled_query_progress() + + def send_scheduled_query_progress(self, info): + self._oprot.writeMessageBegin("scheduled_query_progress", TMessageType.CALL, self._seqid) + args = scheduled_query_progress_args() + args.info = info + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_scheduled_query_progress(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = scheduled_query_progress_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def get_scheduled_query(self, scheduleKey): + """ + Parameters: + - scheduleKey + + """ + self.send_get_scheduled_query(scheduleKey) + return self.recv_get_scheduled_query() + + def send_get_scheduled_query(self, scheduleKey): + self._oprot.writeMessageBegin("get_scheduled_query", TMessageType.CALL, self._seqid) + args = get_scheduled_query_args() + args.scheduleKey = scheduleKey + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_scheduled_query(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_scheduled_query_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_scheduled_query failed: unknown result") + + def add_replication_metrics(self, replicationMetricList): + """ + Parameters: + - replicationMetricList + + """ + self.send_add_replication_metrics(replicationMetricList) + self.recv_add_replication_metrics() + + def send_add_replication_metrics(self, replicationMetricList): + self._oprot.writeMessageBegin("add_replication_metrics", TMessageType.CALL, self._seqid) + args = add_replication_metrics_args() + args.replicationMetricList = replicationMetricList + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_replication_metrics(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_replication_metrics_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + return + + def get_replication_metrics(self, rqst): + """ + Parameters: + - rqst + + """ + self.send_get_replication_metrics(rqst) + return self.recv_get_replication_metrics() + + def send_get_replication_metrics(self, rqst): + self._oprot.writeMessageBegin("get_replication_metrics", TMessageType.CALL, self._seqid) + args = get_replication_metrics_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_replication_metrics(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_replication_metrics_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_replication_metrics failed: unknown result") + + def get_open_txns_req(self, getOpenTxnsRequest): + """ + Parameters: + - getOpenTxnsRequest + + """ + self.send_get_open_txns_req(getOpenTxnsRequest) + return self.recv_get_open_txns_req() + + def send_get_open_txns_req(self, getOpenTxnsRequest): + self._oprot.writeMessageBegin("get_open_txns_req", TMessageType.CALL, self._seqid) + args = get_open_txns_req_args() + args.getOpenTxnsRequest = getOpenTxnsRequest + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_open_txns_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_open_txns_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_open_txns_req failed: unknown result") + + def create_stored_procedure(self, proc): + """ + Parameters: + - proc + + """ + self.send_create_stored_procedure(proc) + self.recv_create_stored_procedure() + + def send_create_stored_procedure(self, proc): + self._oprot.writeMessageBegin("create_stored_procedure", TMessageType.CALL, self._seqid) + args = create_stored_procedure_args() + args.proc = proc + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_stored_procedure(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = create_stored_procedure_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def get_stored_procedure(self, request): + """ + Parameters: + - request + + """ + self.send_get_stored_procedure(request) + return self.recv_get_stored_procedure() + + def send_get_stored_procedure(self, request): + self._oprot.writeMessageBegin("get_stored_procedure", TMessageType.CALL, self._seqid) + args = get_stored_procedure_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_stored_procedure(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_stored_procedure_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_stored_procedure failed: unknown result") + + def drop_stored_procedure(self, request): + """ + Parameters: + - request + + """ + self.send_drop_stored_procedure(request) + self.recv_drop_stored_procedure() + + def send_drop_stored_procedure(self, request): + self._oprot.writeMessageBegin("drop_stored_procedure", TMessageType.CALL, self._seqid) + args = drop_stored_procedure_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_stored_procedure(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_stored_procedure_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + return + + def get_all_stored_procedures(self, request): + """ + Parameters: + - request + + """ + self.send_get_all_stored_procedures(request) + return self.recv_get_all_stored_procedures() + + def send_get_all_stored_procedures(self, request): + self._oprot.writeMessageBegin("get_all_stored_procedures", TMessageType.CALL, self._seqid) + args = get_all_stored_procedures_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_all_stored_procedures(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_all_stored_procedures_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_stored_procedures failed: unknown result") + + def find_package(self, request): + """ + Parameters: + - request + + """ + self.send_find_package(request) + return self.recv_find_package() + + def send_find_package(self, request): + self._oprot.writeMessageBegin("find_package", TMessageType.CALL, self._seqid) + args = find_package_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_find_package(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = find_package_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "find_package failed: unknown result") + + def add_package(self, request): + """ + Parameters: + - request + + """ + self.send_add_package(request) + self.recv_add_package() + + def send_add_package(self, request): + self._oprot.writeMessageBegin("add_package", TMessageType.CALL, self._seqid) + args = add_package_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_package(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_package_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + return + + def get_all_packages(self, request): + """ + Parameters: + - request + + """ + self.send_get_all_packages(request) + return self.recv_get_all_packages() + + def send_get_all_packages(self, request): + self._oprot.writeMessageBegin("get_all_packages", TMessageType.CALL, self._seqid) + args = get_all_packages_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_all_packages(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_all_packages_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_packages failed: unknown result") + + def drop_package(self, request): + """ + Parameters: + - request + + """ + self.send_drop_package(request) + self.recv_drop_package() + + def send_drop_package(self, request): + self._oprot.writeMessageBegin("drop_package", TMessageType.CALL, self._seqid) + args = drop_package_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_package(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_package_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + return + + def get_all_write_event_info(self, request): + """ + Parameters: + - request + + """ + self.send_get_all_write_event_info(request) + return self.recv_get_all_write_event_info() + + def send_get_all_write_event_info(self, request): + self._oprot.writeMessageBegin("get_all_write_event_info", TMessageType.CALL, self._seqid) + args = get_all_write_event_info_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_all_write_event_info(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_all_write_event_info_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_write_event_info failed: unknown result") + + +class Processor(fb303.FacebookService.Processor, Iface, TProcessor): + def __init__(self, handler): + fb303.FacebookService.Processor.__init__(self, handler) + self._processMap["getMetaConf"] = Processor.process_getMetaConf + self._processMap["setMetaConf"] = Processor.process_setMetaConf + self._processMap["create_catalog"] = Processor.process_create_catalog + self._processMap["alter_catalog"] = Processor.process_alter_catalog + self._processMap["get_catalog"] = Processor.process_get_catalog + self._processMap["get_catalogs"] = Processor.process_get_catalogs + self._processMap["drop_catalog"] = Processor.process_drop_catalog + self._processMap["create_database"] = Processor.process_create_database + self._processMap["get_database"] = Processor.process_get_database + self._processMap["get_database_req"] = Processor.process_get_database_req + self._processMap["drop_database"] = Processor.process_drop_database + self._processMap["drop_database_req"] = Processor.process_drop_database_req + self._processMap["get_databases"] = Processor.process_get_databases + self._processMap["get_all_databases"] = Processor.process_get_all_databases + self._processMap["alter_database"] = Processor.process_alter_database + self._processMap["create_dataconnector"] = Processor.process_create_dataconnector + self._processMap["get_dataconnector_req"] = Processor.process_get_dataconnector_req + self._processMap["drop_dataconnector"] = Processor.process_drop_dataconnector + self._processMap["get_dataconnectors"] = Processor.process_get_dataconnectors + self._processMap["alter_dataconnector"] = Processor.process_alter_dataconnector + self._processMap["get_type"] = Processor.process_get_type + self._processMap["create_type"] = Processor.process_create_type + self._processMap["drop_type"] = Processor.process_drop_type + self._processMap["get_type_all"] = Processor.process_get_type_all + self._processMap["get_fields"] = Processor.process_get_fields + self._processMap["get_fields_with_environment_context"] = Processor.process_get_fields_with_environment_context + self._processMap["get_fields_req"] = Processor.process_get_fields_req + self._processMap["get_schema"] = Processor.process_get_schema + self._processMap["get_schema_with_environment_context"] = Processor.process_get_schema_with_environment_context + self._processMap["get_schema_req"] = Processor.process_get_schema_req + self._processMap["create_table"] = Processor.process_create_table + self._processMap["create_table_with_environment_context"] = Processor.process_create_table_with_environment_context + self._processMap["create_table_with_constraints"] = Processor.process_create_table_with_constraints + self._processMap["create_table_req"] = Processor.process_create_table_req + self._processMap["drop_constraint"] = Processor.process_drop_constraint + self._processMap["add_primary_key"] = Processor.process_add_primary_key + self._processMap["add_foreign_key"] = Processor.process_add_foreign_key + self._processMap["add_unique_constraint"] = Processor.process_add_unique_constraint + self._processMap["add_not_null_constraint"] = Processor.process_add_not_null_constraint + self._processMap["add_default_constraint"] = Processor.process_add_default_constraint + self._processMap["add_check_constraint"] = Processor.process_add_check_constraint + self._processMap["translate_table_dryrun"] = Processor.process_translate_table_dryrun + self._processMap["drop_table"] = Processor.process_drop_table + self._processMap["drop_table_with_environment_context"] = Processor.process_drop_table_with_environment_context + self._processMap["truncate_table"] = Processor.process_truncate_table + self._processMap["truncate_table_req"] = Processor.process_truncate_table_req + self._processMap["get_tables"] = Processor.process_get_tables + self._processMap["get_tables_by_type"] = Processor.process_get_tables_by_type + self._processMap[ + "get_all_materialized_view_objects_for_rewriting" + ] = Processor.process_get_all_materialized_view_objects_for_rewriting + self._processMap["get_materialized_views_for_rewriting"] = Processor.process_get_materialized_views_for_rewriting + self._processMap["get_table_meta"] = Processor.process_get_table_meta + self._processMap["get_all_tables"] = Processor.process_get_all_tables + self._processMap["get_table"] = Processor.process_get_table + self._processMap["get_table_objects_by_name"] = Processor.process_get_table_objects_by_name + self._processMap["get_tables_ext"] = Processor.process_get_tables_ext + self._processMap["get_table_req"] = Processor.process_get_table_req + self._processMap["get_table_objects_by_name_req"] = Processor.process_get_table_objects_by_name_req + self._processMap["get_materialization_invalidation_info"] = Processor.process_get_materialization_invalidation_info + self._processMap["update_creation_metadata"] = Processor.process_update_creation_metadata + self._processMap["get_table_names_by_filter"] = Processor.process_get_table_names_by_filter + self._processMap["alter_table"] = Processor.process_alter_table + self._processMap["alter_table_with_environment_context"] = Processor.process_alter_table_with_environment_context + self._processMap["alter_table_with_cascade"] = Processor.process_alter_table_with_cascade + self._processMap["alter_table_req"] = Processor.process_alter_table_req + self._processMap["add_partition"] = Processor.process_add_partition + self._processMap["add_partition_with_environment_context"] = Processor.process_add_partition_with_environment_context + self._processMap["add_partitions"] = Processor.process_add_partitions + self._processMap["add_partitions_pspec"] = Processor.process_add_partitions_pspec + self._processMap["append_partition"] = Processor.process_append_partition + self._processMap["add_partitions_req"] = Processor.process_add_partitions_req + self._processMap[ + "append_partition_with_environment_context" + ] = Processor.process_append_partition_with_environment_context + self._processMap["append_partition_by_name"] = Processor.process_append_partition_by_name + self._processMap[ + "append_partition_by_name_with_environment_context" + ] = Processor.process_append_partition_by_name_with_environment_context + self._processMap["drop_partition"] = Processor.process_drop_partition + self._processMap["drop_partition_with_environment_context"] = Processor.process_drop_partition_with_environment_context + self._processMap["drop_partition_by_name"] = Processor.process_drop_partition_by_name + self._processMap[ + "drop_partition_by_name_with_environment_context" + ] = Processor.process_drop_partition_by_name_with_environment_context + self._processMap["drop_partitions_req"] = Processor.process_drop_partitions_req + self._processMap["get_partition"] = Processor.process_get_partition + self._processMap["get_partition_req"] = Processor.process_get_partition_req + self._processMap["exchange_partition"] = Processor.process_exchange_partition + self._processMap["exchange_partitions"] = Processor.process_exchange_partitions + self._processMap["get_partition_with_auth"] = Processor.process_get_partition_with_auth + self._processMap["get_partition_by_name"] = Processor.process_get_partition_by_name + self._processMap["get_partitions"] = Processor.process_get_partitions + self._processMap["get_partitions_req"] = Processor.process_get_partitions_req + self._processMap["get_partitions_with_auth"] = Processor.process_get_partitions_with_auth + self._processMap["get_partitions_pspec"] = Processor.process_get_partitions_pspec + self._processMap["get_partition_names"] = Processor.process_get_partition_names + self._processMap["get_partition_values"] = Processor.process_get_partition_values + self._processMap["get_partitions_ps"] = Processor.process_get_partitions_ps + self._processMap["get_partitions_ps_with_auth"] = Processor.process_get_partitions_ps_with_auth + self._processMap["get_partitions_ps_with_auth_req"] = Processor.process_get_partitions_ps_with_auth_req + self._processMap["get_partition_names_ps"] = Processor.process_get_partition_names_ps + self._processMap["get_partition_names_ps_req"] = Processor.process_get_partition_names_ps_req + self._processMap["get_partition_names_req"] = Processor.process_get_partition_names_req + self._processMap["get_partitions_by_filter"] = Processor.process_get_partitions_by_filter + self._processMap["get_part_specs_by_filter"] = Processor.process_get_part_specs_by_filter + self._processMap["get_partitions_by_expr"] = Processor.process_get_partitions_by_expr + self._processMap["get_partitions_spec_by_expr"] = Processor.process_get_partitions_spec_by_expr + self._processMap["get_num_partitions_by_filter"] = Processor.process_get_num_partitions_by_filter + self._processMap["get_partitions_by_names"] = Processor.process_get_partitions_by_names + self._processMap["get_partitions_by_names_req"] = Processor.process_get_partitions_by_names_req + self._processMap["alter_partition"] = Processor.process_alter_partition + self._processMap["alter_partitions"] = Processor.process_alter_partitions + self._processMap[ + "alter_partitions_with_environment_context" + ] = Processor.process_alter_partitions_with_environment_context + self._processMap["alter_partitions_req"] = Processor.process_alter_partitions_req + self._processMap["alter_partition_with_environment_context"] = Processor.process_alter_partition_with_environment_context + self._processMap["rename_partition"] = Processor.process_rename_partition + self._processMap["rename_partition_req"] = Processor.process_rename_partition_req + self._processMap["partition_name_has_valid_characters"] = Processor.process_partition_name_has_valid_characters + self._processMap["get_config_value"] = Processor.process_get_config_value + self._processMap["partition_name_to_vals"] = Processor.process_partition_name_to_vals + self._processMap["partition_name_to_spec"] = Processor.process_partition_name_to_spec + self._processMap["markPartitionForEvent"] = Processor.process_markPartitionForEvent + self._processMap["isPartitionMarkedForEvent"] = Processor.process_isPartitionMarkedForEvent + self._processMap["get_primary_keys"] = Processor.process_get_primary_keys + self._processMap["get_foreign_keys"] = Processor.process_get_foreign_keys + self._processMap["get_unique_constraints"] = Processor.process_get_unique_constraints + self._processMap["get_not_null_constraints"] = Processor.process_get_not_null_constraints + self._processMap["get_default_constraints"] = Processor.process_get_default_constraints + self._processMap["get_check_constraints"] = Processor.process_get_check_constraints + self._processMap["get_all_table_constraints"] = Processor.process_get_all_table_constraints + self._processMap["update_table_column_statistics"] = Processor.process_update_table_column_statistics + self._processMap["update_partition_column_statistics"] = Processor.process_update_partition_column_statistics + self._processMap["update_table_column_statistics_req"] = Processor.process_update_table_column_statistics_req + self._processMap["update_partition_column_statistics_req"] = Processor.process_update_partition_column_statistics_req + self._processMap["update_transaction_statistics"] = Processor.process_update_transaction_statistics + self._processMap["get_table_column_statistics"] = Processor.process_get_table_column_statistics + self._processMap["get_partition_column_statistics"] = Processor.process_get_partition_column_statistics + self._processMap["get_table_statistics_req"] = Processor.process_get_table_statistics_req + self._processMap["get_partitions_statistics_req"] = Processor.process_get_partitions_statistics_req + self._processMap["get_aggr_stats_for"] = Processor.process_get_aggr_stats_for + self._processMap["set_aggr_stats_for"] = Processor.process_set_aggr_stats_for + self._processMap["delete_partition_column_statistics"] = Processor.process_delete_partition_column_statistics + self._processMap["delete_table_column_statistics"] = Processor.process_delete_table_column_statistics + self._processMap["create_function"] = Processor.process_create_function + self._processMap["drop_function"] = Processor.process_drop_function + self._processMap["alter_function"] = Processor.process_alter_function + self._processMap["get_functions"] = Processor.process_get_functions + self._processMap["get_function"] = Processor.process_get_function + self._processMap["get_all_functions"] = Processor.process_get_all_functions + self._processMap["create_role"] = Processor.process_create_role + self._processMap["drop_role"] = Processor.process_drop_role + self._processMap["get_role_names"] = Processor.process_get_role_names + self._processMap["grant_role"] = Processor.process_grant_role + self._processMap["revoke_role"] = Processor.process_revoke_role + self._processMap["list_roles"] = Processor.process_list_roles + self._processMap["grant_revoke_role"] = Processor.process_grant_revoke_role + self._processMap["get_principals_in_role"] = Processor.process_get_principals_in_role + self._processMap["get_role_grants_for_principal"] = Processor.process_get_role_grants_for_principal + self._processMap["get_privilege_set"] = Processor.process_get_privilege_set + self._processMap["list_privileges"] = Processor.process_list_privileges + self._processMap["grant_privileges"] = Processor.process_grant_privileges + self._processMap["revoke_privileges"] = Processor.process_revoke_privileges + self._processMap["grant_revoke_privileges"] = Processor.process_grant_revoke_privileges + self._processMap["refresh_privileges"] = Processor.process_refresh_privileges + self._processMap["set_ugi"] = Processor.process_set_ugi + self._processMap["get_delegation_token"] = Processor.process_get_delegation_token + self._processMap["renew_delegation_token"] = Processor.process_renew_delegation_token + self._processMap["cancel_delegation_token"] = Processor.process_cancel_delegation_token + self._processMap["add_token"] = Processor.process_add_token + self._processMap["remove_token"] = Processor.process_remove_token + self._processMap["get_token"] = Processor.process_get_token + self._processMap["get_all_token_identifiers"] = Processor.process_get_all_token_identifiers + self._processMap["add_master_key"] = Processor.process_add_master_key + self._processMap["update_master_key"] = Processor.process_update_master_key + self._processMap["remove_master_key"] = Processor.process_remove_master_key + self._processMap["get_master_keys"] = Processor.process_get_master_keys + self._processMap["get_open_txns"] = Processor.process_get_open_txns + self._processMap["get_open_txns_info"] = Processor.process_get_open_txns_info + self._processMap["open_txns"] = Processor.process_open_txns + self._processMap["abort_txn"] = Processor.process_abort_txn + self._processMap["abort_txns"] = Processor.process_abort_txns + self._processMap["commit_txn"] = Processor.process_commit_txn + self._processMap["get_latest_txnid_in_conflict"] = Processor.process_get_latest_txnid_in_conflict + self._processMap["repl_tbl_writeid_state"] = Processor.process_repl_tbl_writeid_state + self._processMap["get_valid_write_ids"] = Processor.process_get_valid_write_ids + self._processMap["allocate_table_write_ids"] = Processor.process_allocate_table_write_ids + self._processMap["get_max_allocated_table_write_id"] = Processor.process_get_max_allocated_table_write_id + self._processMap["seed_write_id"] = Processor.process_seed_write_id + self._processMap["seed_txn_id"] = Processor.process_seed_txn_id + self._processMap["lock"] = Processor.process_lock + self._processMap["check_lock"] = Processor.process_check_lock + self._processMap["unlock"] = Processor.process_unlock + self._processMap["show_locks"] = Processor.process_show_locks + self._processMap["heartbeat"] = Processor.process_heartbeat + self._processMap["heartbeat_txn_range"] = Processor.process_heartbeat_txn_range + self._processMap["compact"] = Processor.process_compact + self._processMap["compact2"] = Processor.process_compact2 + self._processMap["show_compact"] = Processor.process_show_compact + self._processMap["add_dynamic_partitions"] = Processor.process_add_dynamic_partitions + self._processMap["find_next_compact"] = Processor.process_find_next_compact + self._processMap["find_next_compact2"] = Processor.process_find_next_compact2 + self._processMap["update_compactor_state"] = Processor.process_update_compactor_state + self._processMap["find_columns_with_stats"] = Processor.process_find_columns_with_stats + self._processMap["mark_cleaned"] = Processor.process_mark_cleaned + self._processMap["mark_compacted"] = Processor.process_mark_compacted + self._processMap["mark_failed"] = Processor.process_mark_failed + self._processMap["mark_refused"] = Processor.process_mark_refused + self._processMap["update_compaction_metrics_data"] = Processor.process_update_compaction_metrics_data + self._processMap["remove_compaction_metrics_data"] = Processor.process_remove_compaction_metrics_data + self._processMap["set_hadoop_jobid"] = Processor.process_set_hadoop_jobid + self._processMap["get_latest_committed_compaction_info"] = Processor.process_get_latest_committed_compaction_info + self._processMap["get_next_notification"] = Processor.process_get_next_notification + self._processMap["get_current_notificationEventId"] = Processor.process_get_current_notificationEventId + self._processMap["get_notification_events_count"] = Processor.process_get_notification_events_count + self._processMap["fire_listener_event"] = Processor.process_fire_listener_event + self._processMap["flushCache"] = Processor.process_flushCache + self._processMap["add_write_notification_log"] = Processor.process_add_write_notification_log + self._processMap["add_write_notification_log_in_batch"] = Processor.process_add_write_notification_log_in_batch + self._processMap["cm_recycle"] = Processor.process_cm_recycle + self._processMap["get_file_metadata_by_expr"] = Processor.process_get_file_metadata_by_expr + self._processMap["get_file_metadata"] = Processor.process_get_file_metadata + self._processMap["put_file_metadata"] = Processor.process_put_file_metadata + self._processMap["clear_file_metadata"] = Processor.process_clear_file_metadata + self._processMap["cache_file_metadata"] = Processor.process_cache_file_metadata + self._processMap["get_metastore_db_uuid"] = Processor.process_get_metastore_db_uuid + self._processMap["create_resource_plan"] = Processor.process_create_resource_plan + self._processMap["get_resource_plan"] = Processor.process_get_resource_plan + self._processMap["get_active_resource_plan"] = Processor.process_get_active_resource_plan + self._processMap["get_all_resource_plans"] = Processor.process_get_all_resource_plans + self._processMap["alter_resource_plan"] = Processor.process_alter_resource_plan + self._processMap["validate_resource_plan"] = Processor.process_validate_resource_plan + self._processMap["drop_resource_plan"] = Processor.process_drop_resource_plan + self._processMap["create_wm_trigger"] = Processor.process_create_wm_trigger + self._processMap["alter_wm_trigger"] = Processor.process_alter_wm_trigger + self._processMap["drop_wm_trigger"] = Processor.process_drop_wm_trigger + self._processMap["get_triggers_for_resourceplan"] = Processor.process_get_triggers_for_resourceplan + self._processMap["create_wm_pool"] = Processor.process_create_wm_pool + self._processMap["alter_wm_pool"] = Processor.process_alter_wm_pool + self._processMap["drop_wm_pool"] = Processor.process_drop_wm_pool + self._processMap["create_or_update_wm_mapping"] = Processor.process_create_or_update_wm_mapping + self._processMap["drop_wm_mapping"] = Processor.process_drop_wm_mapping + self._processMap[ + "create_or_drop_wm_trigger_to_pool_mapping" + ] = Processor.process_create_or_drop_wm_trigger_to_pool_mapping + self._processMap["create_ischema"] = Processor.process_create_ischema + self._processMap["alter_ischema"] = Processor.process_alter_ischema + self._processMap["get_ischema"] = Processor.process_get_ischema + self._processMap["drop_ischema"] = Processor.process_drop_ischema + self._processMap["add_schema_version"] = Processor.process_add_schema_version + self._processMap["get_schema_version"] = Processor.process_get_schema_version + self._processMap["get_schema_latest_version"] = Processor.process_get_schema_latest_version + self._processMap["get_schema_all_versions"] = Processor.process_get_schema_all_versions + self._processMap["drop_schema_version"] = Processor.process_drop_schema_version + self._processMap["get_schemas_by_cols"] = Processor.process_get_schemas_by_cols + self._processMap["map_schema_version_to_serde"] = Processor.process_map_schema_version_to_serde + self._processMap["set_schema_version_state"] = Processor.process_set_schema_version_state + self._processMap["add_serde"] = Processor.process_add_serde + self._processMap["get_serde"] = Processor.process_get_serde + self._processMap["get_lock_materialization_rebuild"] = Processor.process_get_lock_materialization_rebuild + self._processMap["heartbeat_lock_materialization_rebuild"] = Processor.process_heartbeat_lock_materialization_rebuild + self._processMap["add_runtime_stats"] = Processor.process_add_runtime_stats + self._processMap["get_runtime_stats"] = Processor.process_get_runtime_stats + self._processMap["get_partitions_with_specs"] = Processor.process_get_partitions_with_specs + self._processMap["scheduled_query_poll"] = Processor.process_scheduled_query_poll + self._processMap["scheduled_query_maintenance"] = Processor.process_scheduled_query_maintenance + self._processMap["scheduled_query_progress"] = Processor.process_scheduled_query_progress + self._processMap["get_scheduled_query"] = Processor.process_get_scheduled_query + self._processMap["add_replication_metrics"] = Processor.process_add_replication_metrics + self._processMap["get_replication_metrics"] = Processor.process_get_replication_metrics + self._processMap["get_open_txns_req"] = Processor.process_get_open_txns_req + self._processMap["create_stored_procedure"] = Processor.process_create_stored_procedure + self._processMap["get_stored_procedure"] = Processor.process_get_stored_procedure + self._processMap["drop_stored_procedure"] = Processor.process_drop_stored_procedure + self._processMap["get_all_stored_procedures"] = Processor.process_get_all_stored_procedures + self._processMap["find_package"] = Processor.process_find_package + self._processMap["add_package"] = Processor.process_add_package + self._processMap["get_all_packages"] = Processor.process_get_all_packages + self._processMap["drop_package"] = Processor.process_drop_package + self._processMap["get_all_write_event_info"] = Processor.process_get_all_write_event_info + self._on_message_begin = None + + def on_message_begin(self, func): + self._on_message_begin = func + + def process(self, iprot, oprot): + (name, type, seqid) = iprot.readMessageBegin() + if self._on_message_begin: + self._on_message_begin(name, type, seqid) + if name not in self._processMap: + iprot.skip(TType.STRUCT) + iprot.readMessageEnd() + x = TApplicationException(TApplicationException.UNKNOWN_METHOD, "Unknown function %s" % (name)) + oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) + x.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + return + else: + self._processMap[name](self, seqid, iprot, oprot) + return True + + def process_getMetaConf(self, seqid, iprot, oprot): + args = getMetaConf_args() + args.read(iprot) + iprot.readMessageEnd() + result = getMetaConf_result() + try: + result.success = self._handler.getMetaConf(args.key) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("getMetaConf", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_setMetaConf(self, seqid, iprot, oprot): + args = setMetaConf_args() + args.read(iprot) + iprot.readMessageEnd() + result = setMetaConf_result() + try: + self._handler.setMetaConf(args.key, args.value) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("setMetaConf", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_catalog(self, seqid, iprot, oprot): + args = create_catalog_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_catalog_result() + try: + self._handler.create_catalog(args.catalog) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except AlreadyExistsException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("create_catalog", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_catalog(self, seqid, iprot, oprot): + args = alter_catalog_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_catalog_result() + try: + self._handler.alter_catalog(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidOperationException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("alter_catalog", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_catalog(self, seqid, iprot, oprot): + args = get_catalog_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_catalog_result() + try: + result.success = self._handler.get_catalog(args.catName) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_catalog", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_catalogs(self, seqid, iprot, oprot): + args = get_catalogs_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_catalogs_result() + try: + result.success = self._handler.get_catalogs() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_catalogs", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_catalog(self, seqid, iprot, oprot): + args = drop_catalog_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_catalog_result() + try: + self._handler.drop_catalog(args.catName) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidOperationException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("drop_catalog", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_database(self, seqid, iprot, oprot): + args = create_database_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_database_result() + try: + self._handler.create_database(args.database) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except AlreadyExistsException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("create_database", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_database(self, seqid, iprot, oprot): + args = get_database_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_database_result() + try: + result.success = self._handler.get_database(args.name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_database", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_database_req(self, seqid, iprot, oprot): + args = get_database_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_database_req_result() + try: + result.success = self._handler.get_database_req(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_database_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_database(self, seqid, iprot, oprot): + args = drop_database_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_database_result() + try: + self._handler.drop_database(args.name, args.deleteData, args.cascade) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidOperationException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("drop_database", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_database_req(self, seqid, iprot, oprot): + args = drop_database_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_database_req_result() + try: + self._handler.drop_database_req(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidOperationException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("drop_database_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_databases(self, seqid, iprot, oprot): + args = get_databases_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_databases_result() + try: + result.success = self._handler.get_databases(args.pattern) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_databases", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_all_databases(self, seqid, iprot, oprot): + args = get_all_databases_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_all_databases_result() + try: + result.success = self._handler.get_all_databases() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_all_databases", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_database(self, seqid, iprot, oprot): + args = alter_database_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_database_result() + try: + self._handler.alter_database(args.dbname, args.db) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("alter_database", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_dataconnector(self, seqid, iprot, oprot): + args = create_dataconnector_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_dataconnector_result() + try: + self._handler.create_dataconnector(args.connector) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except AlreadyExistsException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("create_dataconnector", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_dataconnector_req(self, seqid, iprot, oprot): + args = get_dataconnector_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_dataconnector_req_result() + try: + result.success = self._handler.get_dataconnector_req(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_dataconnector_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_dataconnector(self, seqid, iprot, oprot): + args = drop_dataconnector_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_dataconnector_result() + try: + self._handler.drop_dataconnector(args.name, args.ifNotExists, args.checkReferences) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidOperationException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("drop_dataconnector", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_dataconnectors(self, seqid, iprot, oprot): + args = get_dataconnectors_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_dataconnectors_result() + try: + result.success = self._handler.get_dataconnectors() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_dataconnectors", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_dataconnector(self, seqid, iprot, oprot): + args = alter_dataconnector_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_dataconnector_result() + try: + self._handler.alter_dataconnector(args.name, args.connector) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("alter_dataconnector", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_type(self, seqid, iprot, oprot): + args = get_type_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_type_result() + try: + result.success = self._handler.get_type(args.name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_type", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_type(self, seqid, iprot, oprot): + args = create_type_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_type_result() + try: + result.success = self._handler.create_type(args.type) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except AlreadyExistsException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("create_type", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_type(self, seqid, iprot, oprot): + args = drop_type_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_type_result() + try: + result.success = self._handler.drop_type(args.type) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("drop_type", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_type_all(self, seqid, iprot, oprot): + args = get_type_all_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_type_all_result() + try: + result.success = self._handler.get_type_all(args.name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_type_all", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_fields(self, seqid, iprot, oprot): + args = get_fields_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_fields_result() + try: + result.success = self._handler.get_fields(args.db_name, args.table_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except UnknownTableException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except UnknownDBException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_fields", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_fields_with_environment_context(self, seqid, iprot, oprot): + args = get_fields_with_environment_context_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_fields_with_environment_context_result() + try: + result.success = self._handler.get_fields_with_environment_context( + args.db_name, args.table_name, args.environment_context + ) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except UnknownTableException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except UnknownDBException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_fields_with_environment_context", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_fields_req(self, seqid, iprot, oprot): + args = get_fields_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_fields_req_result() + try: + result.success = self._handler.get_fields_req(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except UnknownTableException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except UnknownDBException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_fields_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_schema(self, seqid, iprot, oprot): + args = get_schema_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_schema_result() + try: + result.success = self._handler.get_schema(args.db_name, args.table_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except UnknownTableException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except UnknownDBException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_schema", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_schema_with_environment_context(self, seqid, iprot, oprot): + args = get_schema_with_environment_context_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_schema_with_environment_context_result() + try: + result.success = self._handler.get_schema_with_environment_context( + args.db_name, args.table_name, args.environment_context + ) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except UnknownTableException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except UnknownDBException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_schema_with_environment_context", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_schema_req(self, seqid, iprot, oprot): + args = get_schema_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_schema_req_result() + try: + result.success = self._handler.get_schema_req(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except UnknownTableException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except UnknownDBException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_schema_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_table(self, seqid, iprot, oprot): + args = create_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_table_result() + try: + self._handler.create_table(args.tbl) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except AlreadyExistsException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except NoSuchObjectException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("create_table", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_table_with_environment_context(self, seqid, iprot, oprot): + args = create_table_with_environment_context_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_table_with_environment_context_result() + try: + self._handler.create_table_with_environment_context(args.tbl, args.environment_context) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except AlreadyExistsException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except NoSuchObjectException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("create_table_with_environment_context", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_table_with_constraints(self, seqid, iprot, oprot): + args = create_table_with_constraints_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_table_with_constraints_result() + try: + self._handler.create_table_with_constraints( + args.tbl, + args.primaryKeys, + args.foreignKeys, + args.uniqueConstraints, + args.notNullConstraints, + args.defaultConstraints, + args.checkConstraints, + ) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except AlreadyExistsException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except NoSuchObjectException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("create_table_with_constraints", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_table_req(self, seqid, iprot, oprot): + args = create_table_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_table_req_result() + try: + self._handler.create_table_req(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except AlreadyExistsException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except NoSuchObjectException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("create_table_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_constraint(self, seqid, iprot, oprot): + args = drop_constraint_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_constraint_result() + try: + self._handler.drop_constraint(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("drop_constraint", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_primary_key(self, seqid, iprot, oprot): + args = add_primary_key_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_primary_key_result() + try: + self._handler.add_primary_key(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("add_primary_key", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_foreign_key(self, seqid, iprot, oprot): + args = add_foreign_key_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_foreign_key_result() + try: + self._handler.add_foreign_key(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("add_foreign_key", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_unique_constraint(self, seqid, iprot, oprot): + args = add_unique_constraint_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_unique_constraint_result() + try: + self._handler.add_unique_constraint(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("add_unique_constraint", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_not_null_constraint(self, seqid, iprot, oprot): + args = add_not_null_constraint_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_not_null_constraint_result() + try: + self._handler.add_not_null_constraint(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("add_not_null_constraint", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_default_constraint(self, seqid, iprot, oprot): + args = add_default_constraint_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_default_constraint_result() + try: + self._handler.add_default_constraint(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("add_default_constraint", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_check_constraint(self, seqid, iprot, oprot): + args = add_check_constraint_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_check_constraint_result() + try: + self._handler.add_check_constraint(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("add_check_constraint", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_translate_table_dryrun(self, seqid, iprot, oprot): + args = translate_table_dryrun_args() + args.read(iprot) + iprot.readMessageEnd() + result = translate_table_dryrun_result() + try: + result.success = self._handler.translate_table_dryrun(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except AlreadyExistsException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except NoSuchObjectException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("translate_table_dryrun", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_table(self, seqid, iprot, oprot): + args = drop_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_table_result() + try: + self._handler.drop_table(args.dbname, args.name, args.deleteData) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("drop_table", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_table_with_environment_context(self, seqid, iprot, oprot): + args = drop_table_with_environment_context_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_table_with_environment_context_result() + try: + self._handler.drop_table_with_environment_context(args.dbname, args.name, args.deleteData, args.environment_context) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("drop_table_with_environment_context", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_truncate_table(self, seqid, iprot, oprot): + args = truncate_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = truncate_table_result() + try: + self._handler.truncate_table(args.dbName, args.tableName, args.partNames) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("truncate_table", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_truncate_table_req(self, seqid, iprot, oprot): + args = truncate_table_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = truncate_table_req_result() + try: + result.success = self._handler.truncate_table_req(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("truncate_table_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_tables(self, seqid, iprot, oprot): + args = get_tables_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_tables_result() + try: + result.success = self._handler.get_tables(args.db_name, args.pattern) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_tables", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_tables_by_type(self, seqid, iprot, oprot): + args = get_tables_by_type_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_tables_by_type_result() + try: + result.success = self._handler.get_tables_by_type(args.db_name, args.pattern, args.tableType) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_tables_by_type", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_all_materialized_view_objects_for_rewriting(self, seqid, iprot, oprot): + args = get_all_materialized_view_objects_for_rewriting_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_all_materialized_view_objects_for_rewriting_result() + try: + result.success = self._handler.get_all_materialized_view_objects_for_rewriting() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_all_materialized_view_objects_for_rewriting", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_materialized_views_for_rewriting(self, seqid, iprot, oprot): + args = get_materialized_views_for_rewriting_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_materialized_views_for_rewriting_result() + try: + result.success = self._handler.get_materialized_views_for_rewriting(args.db_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_materialized_views_for_rewriting", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_table_meta(self, seqid, iprot, oprot): + args = get_table_meta_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_table_meta_result() + try: + result.success = self._handler.get_table_meta(args.db_patterns, args.tbl_patterns, args.tbl_types) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_table_meta", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_all_tables(self, seqid, iprot, oprot): + args = get_all_tables_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_all_tables_result() + try: + result.success = self._handler.get_all_tables(args.db_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_all_tables", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_table(self, seqid, iprot, oprot): + args = get_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_table_result() + try: + result.success = self._handler.get_table(args.dbname, args.tbl_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_table", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_table_objects_by_name(self, seqid, iprot, oprot): + args = get_table_objects_by_name_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_table_objects_by_name_result() + try: + result.success = self._handler.get_table_objects_by_name(args.dbname, args.tbl_names) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_table_objects_by_name", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_tables_ext(self, seqid, iprot, oprot): + args = get_tables_ext_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_tables_ext_result() + try: + result.success = self._handler.get_tables_ext(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_tables_ext", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_table_req(self, seqid, iprot, oprot): + args = get_table_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_table_req_result() + try: + result.success = self._handler.get_table_req(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_table_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_table_objects_by_name_req(self, seqid, iprot, oprot): + args = get_table_objects_by_name_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_table_objects_by_name_req_result() + try: + result.success = self._handler.get_table_objects_by_name_req(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidOperationException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except UnknownDBException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_table_objects_by_name_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_materialization_invalidation_info(self, seqid, iprot, oprot): + args = get_materialization_invalidation_info_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_materialization_invalidation_info_result() + try: + result.success = self._handler.get_materialization_invalidation_info(args.creation_metadata, args.validTxnList) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidOperationException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except UnknownDBException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_materialization_invalidation_info", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_update_creation_metadata(self, seqid, iprot, oprot): + args = update_creation_metadata_args() + args.read(iprot) + iprot.readMessageEnd() + result = update_creation_metadata_result() + try: + self._handler.update_creation_metadata(args.catName, args.dbname, args.tbl_name, args.creation_metadata) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidOperationException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except UnknownDBException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("update_creation_metadata", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_table_names_by_filter(self, seqid, iprot, oprot): + args = get_table_names_by_filter_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_table_names_by_filter_result() + try: + result.success = self._handler.get_table_names_by_filter(args.dbname, args.filter, args.max_tables) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidOperationException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except UnknownDBException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_table_names_by_filter", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_table(self, seqid, iprot, oprot): + args = alter_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_table_result() + try: + self._handler.alter_table(args.dbname, args.tbl_name, args.new_tbl) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidOperationException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("alter_table", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_table_with_environment_context(self, seqid, iprot, oprot): + args = alter_table_with_environment_context_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_table_with_environment_context_result() + try: + self._handler.alter_table_with_environment_context(args.dbname, args.tbl_name, args.new_tbl, args.environment_context) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidOperationException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("alter_table_with_environment_context", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_table_with_cascade(self, seqid, iprot, oprot): + args = alter_table_with_cascade_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_table_with_cascade_result() + try: + self._handler.alter_table_with_cascade(args.dbname, args.tbl_name, args.new_tbl, args.cascade) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidOperationException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("alter_table_with_cascade", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_table_req(self, seqid, iprot, oprot): + args = alter_table_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_table_req_result() + try: + result.success = self._handler.alter_table_req(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidOperationException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("alter_table_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_partition(self, seqid, iprot, oprot): + args = add_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_partition_result() + try: + result.success = self._handler.add_partition(args.new_part) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except AlreadyExistsException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("add_partition", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_partition_with_environment_context(self, seqid, iprot, oprot): + args = add_partition_with_environment_context_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_partition_with_environment_context_result() + try: + result.success = self._handler.add_partition_with_environment_context(args.new_part, args.environment_context) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except AlreadyExistsException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("add_partition_with_environment_context", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_partitions(self, seqid, iprot, oprot): + args = add_partitions_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_partitions_result() + try: + result.success = self._handler.add_partitions(args.new_parts) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except AlreadyExistsException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("add_partitions", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_partitions_pspec(self, seqid, iprot, oprot): + args = add_partitions_pspec_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_partitions_pspec_result() + try: + result.success = self._handler.add_partitions_pspec(args.new_parts) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except AlreadyExistsException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("add_partitions_pspec", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_append_partition(self, seqid, iprot, oprot): + args = append_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = append_partition_result() + try: + result.success = self._handler.append_partition(args.db_name, args.tbl_name, args.part_vals) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except AlreadyExistsException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("append_partition", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_partitions_req(self, seqid, iprot, oprot): + args = add_partitions_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_partitions_req_result() + try: + result.success = self._handler.add_partitions_req(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except AlreadyExistsException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("add_partitions_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_append_partition_with_environment_context(self, seqid, iprot, oprot): + args = append_partition_with_environment_context_args() + args.read(iprot) + iprot.readMessageEnd() + result = append_partition_with_environment_context_result() + try: + result.success = self._handler.append_partition_with_environment_context( + args.db_name, args.tbl_name, args.part_vals, args.environment_context + ) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except AlreadyExistsException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("append_partition_with_environment_context", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_append_partition_by_name(self, seqid, iprot, oprot): + args = append_partition_by_name_args() + args.read(iprot) + iprot.readMessageEnd() + result = append_partition_by_name_result() + try: + result.success = self._handler.append_partition_by_name(args.db_name, args.tbl_name, args.part_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except AlreadyExistsException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("append_partition_by_name", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_append_partition_by_name_with_environment_context(self, seqid, iprot, oprot): + args = append_partition_by_name_with_environment_context_args() + args.read(iprot) + iprot.readMessageEnd() + result = append_partition_by_name_with_environment_context_result() + try: + result.success = self._handler.append_partition_by_name_with_environment_context( + args.db_name, args.tbl_name, args.part_name, args.environment_context + ) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except AlreadyExistsException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("append_partition_by_name_with_environment_context", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_partition(self, seqid, iprot, oprot): + args = drop_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_partition_result() + try: + result.success = self._handler.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("drop_partition", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_partition_with_environment_context(self, seqid, iprot, oprot): + args = drop_partition_with_environment_context_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_partition_with_environment_context_result() + try: + result.success = self._handler.drop_partition_with_environment_context( + args.db_name, args.tbl_name, args.part_vals, args.deleteData, args.environment_context + ) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("drop_partition_with_environment_context", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_partition_by_name(self, seqid, iprot, oprot): + args = drop_partition_by_name_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_partition_by_name_result() + try: + result.success = self._handler.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("drop_partition_by_name", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_partition_by_name_with_environment_context(self, seqid, iprot, oprot): + args = drop_partition_by_name_with_environment_context_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_partition_by_name_with_environment_context_result() + try: + result.success = self._handler.drop_partition_by_name_with_environment_context( + args.db_name, args.tbl_name, args.part_name, args.deleteData, args.environment_context + ) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("drop_partition_by_name_with_environment_context", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_partitions_req(self, seqid, iprot, oprot): + args = drop_partitions_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_partitions_req_result() + try: + result.success = self._handler.drop_partitions_req(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("drop_partitions_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition(self, seqid, iprot, oprot): + args = get_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_result() + try: + result.success = self._handler.get_partition(args.db_name, args.tbl_name, args.part_vals) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_partition", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_req(self, seqid, iprot, oprot): + args = get_partition_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_req_result() + try: + result.success = self._handler.get_partition_req(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_partition_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_exchange_partition(self, seqid, iprot, oprot): + args = exchange_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = exchange_partition_result() + try: + result.success = self._handler.exchange_partition( + args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name + ) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except InvalidObjectException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except InvalidInputException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("exchange_partition", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_exchange_partitions(self, seqid, iprot, oprot): + args = exchange_partitions_args() + args.read(iprot) + iprot.readMessageEnd() + result = exchange_partitions_result() + try: + result.success = self._handler.exchange_partitions( + args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name + ) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except InvalidObjectException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except InvalidInputException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("exchange_partitions", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_with_auth(self, seqid, iprot, oprot): + args = get_partition_with_auth_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_with_auth_result() + try: + result.success = self._handler.get_partition_with_auth( + args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names + ) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_partition_with_auth", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_by_name(self, seqid, iprot, oprot): + args = get_partition_by_name_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_by_name_result() + try: + result.success = self._handler.get_partition_by_name(args.db_name, args.tbl_name, args.part_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_partition_by_name", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions(self, seqid, iprot, oprot): + args = get_partitions_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_result() + try: + result.success = self._handler.get_partitions(args.db_name, args.tbl_name, args.max_parts) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_partitions", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_req(self, seqid, iprot, oprot): + args = get_partitions_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_req_result() + try: + result.success = self._handler.get_partitions_req(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_partitions_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_with_auth(self, seqid, iprot, oprot): + args = get_partitions_with_auth_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_with_auth_result() + try: + result.success = self._handler.get_partitions_with_auth( + args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names + ) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_partitions_with_auth", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_pspec(self, seqid, iprot, oprot): + args = get_partitions_pspec_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_pspec_result() + try: + result.success = self._handler.get_partitions_pspec(args.db_name, args.tbl_name, args.max_parts) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_partitions_pspec", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_names(self, seqid, iprot, oprot): + args = get_partition_names_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_names_result() + try: + result.success = self._handler.get_partition_names(args.db_name, args.tbl_name, args.max_parts) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_partition_names", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_values(self, seqid, iprot, oprot): + args = get_partition_values_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_values_result() + try: + result.success = self._handler.get_partition_values(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_partition_values", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_ps(self, seqid, iprot, oprot): + args = get_partitions_ps_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_ps_result() + try: + result.success = self._handler.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_partitions_ps", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_ps_with_auth(self, seqid, iprot, oprot): + args = get_partitions_ps_with_auth_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_ps_with_auth_result() + try: + result.success = self._handler.get_partitions_ps_with_auth( + args.db_name, args.tbl_name, args.part_vals, args.max_parts, args.user_name, args.group_names + ) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_partitions_ps_with_auth", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_ps_with_auth_req(self, seqid, iprot, oprot): + args = get_partitions_ps_with_auth_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_ps_with_auth_req_result() + try: + result.success = self._handler.get_partitions_ps_with_auth_req(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_partitions_ps_with_auth_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_names_ps(self, seqid, iprot, oprot): + args = get_partition_names_ps_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_names_ps_result() + try: + result.success = self._handler.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_partition_names_ps", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_names_ps_req(self, seqid, iprot, oprot): + args = get_partition_names_ps_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_names_ps_req_result() + try: + result.success = self._handler.get_partition_names_ps_req(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_partition_names_ps_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_names_req(self, seqid, iprot, oprot): + args = get_partition_names_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_names_req_result() + try: + result.success = self._handler.get_partition_names_req(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_partition_names_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_by_filter(self, seqid, iprot, oprot): + args = get_partitions_by_filter_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_by_filter_result() + try: + result.success = self._handler.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_partitions_by_filter", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_part_specs_by_filter(self, seqid, iprot, oprot): + args = get_part_specs_by_filter_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_part_specs_by_filter_result() + try: + result.success = self._handler.get_part_specs_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_part_specs_by_filter", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_by_expr(self, seqid, iprot, oprot): + args = get_partitions_by_expr_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_by_expr_result() + try: + result.success = self._handler.get_partitions_by_expr(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_partitions_by_expr", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_spec_by_expr(self, seqid, iprot, oprot): + args = get_partitions_spec_by_expr_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_spec_by_expr_result() + try: + result.success = self._handler.get_partitions_spec_by_expr(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_partitions_spec_by_expr", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_num_partitions_by_filter(self, seqid, iprot, oprot): + args = get_num_partitions_by_filter_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_num_partitions_by_filter_result() + try: + result.success = self._handler.get_num_partitions_by_filter(args.db_name, args.tbl_name, args.filter) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_num_partitions_by_filter", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_by_names(self, seqid, iprot, oprot): + args = get_partitions_by_names_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_by_names_result() + try: + result.success = self._handler.get_partitions_by_names(args.db_name, args.tbl_name, args.names) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_partitions_by_names", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_by_names_req(self, seqid, iprot, oprot): + args = get_partitions_by_names_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_by_names_req_result() + try: + result.success = self._handler.get_partitions_by_names_req(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_partitions_by_names_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_partition(self, seqid, iprot, oprot): + args = alter_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_partition_result() + try: + self._handler.alter_partition(args.db_name, args.tbl_name, args.new_part) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidOperationException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("alter_partition", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_partitions(self, seqid, iprot, oprot): + args = alter_partitions_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_partitions_result() + try: + self._handler.alter_partitions(args.db_name, args.tbl_name, args.new_parts) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidOperationException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("alter_partitions", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_partitions_with_environment_context(self, seqid, iprot, oprot): + args = alter_partitions_with_environment_context_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_partitions_with_environment_context_result() + try: + self._handler.alter_partitions_with_environment_context( + args.db_name, args.tbl_name, args.new_parts, args.environment_context + ) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidOperationException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("alter_partitions_with_environment_context", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_partitions_req(self, seqid, iprot, oprot): + args = alter_partitions_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_partitions_req_result() + try: + result.success = self._handler.alter_partitions_req(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidOperationException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("alter_partitions_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_partition_with_environment_context(self, seqid, iprot, oprot): + args = alter_partition_with_environment_context_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_partition_with_environment_context_result() + try: + self._handler.alter_partition_with_environment_context( + args.db_name, args.tbl_name, args.new_part, args.environment_context + ) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidOperationException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("alter_partition_with_environment_context", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_rename_partition(self, seqid, iprot, oprot): + args = rename_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = rename_partition_result() + try: + self._handler.rename_partition(args.db_name, args.tbl_name, args.part_vals, args.new_part) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidOperationException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("rename_partition", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_rename_partition_req(self, seqid, iprot, oprot): + args = rename_partition_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = rename_partition_req_result() + try: + result.success = self._handler.rename_partition_req(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidOperationException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("rename_partition_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_partition_name_has_valid_characters(self, seqid, iprot, oprot): + args = partition_name_has_valid_characters_args() + args.read(iprot) + iprot.readMessageEnd() + result = partition_name_has_valid_characters_result() + try: + result.success = self._handler.partition_name_has_valid_characters(args.part_vals, args.throw_exception) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("partition_name_has_valid_characters", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_config_value(self, seqid, iprot, oprot): + args = get_config_value_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_config_value_result() + try: + result.success = self._handler.get_config_value(args.name, args.defaultValue) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except ConfigValSecurityException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_config_value", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_partition_name_to_vals(self, seqid, iprot, oprot): + args = partition_name_to_vals_args() + args.read(iprot) + iprot.readMessageEnd() + result = partition_name_to_vals_result() + try: + result.success = self._handler.partition_name_to_vals(args.part_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("partition_name_to_vals", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_partition_name_to_spec(self, seqid, iprot, oprot): + args = partition_name_to_spec_args() + args.read(iprot) + iprot.readMessageEnd() + result = partition_name_to_spec_result() + try: + result.success = self._handler.partition_name_to_spec(args.part_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("partition_name_to_spec", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_markPartitionForEvent(self, seqid, iprot, oprot): + args = markPartitionForEvent_args() + args.read(iprot) + iprot.readMessageEnd() + result = markPartitionForEvent_result() + try: + self._handler.markPartitionForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except UnknownDBException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except UnknownTableException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except UnknownPartitionException as o5: + msg_type = TMessageType.REPLY + result.o5 = o5 + except InvalidPartitionException as o6: + msg_type = TMessageType.REPLY + result.o6 = o6 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("markPartitionForEvent", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_isPartitionMarkedForEvent(self, seqid, iprot, oprot): + args = isPartitionMarkedForEvent_args() + args.read(iprot) + iprot.readMessageEnd() + result = isPartitionMarkedForEvent_result() + try: + result.success = self._handler.isPartitionMarkedForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except UnknownDBException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except UnknownTableException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except UnknownPartitionException as o5: + msg_type = TMessageType.REPLY + result.o5 = o5 + except InvalidPartitionException as o6: + msg_type = TMessageType.REPLY + result.o6 = o6 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("isPartitionMarkedForEvent", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_primary_keys(self, seqid, iprot, oprot): + args = get_primary_keys_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_primary_keys_result() + try: + result.success = self._handler.get_primary_keys(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_primary_keys", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_foreign_keys(self, seqid, iprot, oprot): + args = get_foreign_keys_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_foreign_keys_result() + try: + result.success = self._handler.get_foreign_keys(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_foreign_keys", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_unique_constraints(self, seqid, iprot, oprot): + args = get_unique_constraints_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_unique_constraints_result() + try: + result.success = self._handler.get_unique_constraints(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_unique_constraints", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_not_null_constraints(self, seqid, iprot, oprot): + args = get_not_null_constraints_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_not_null_constraints_result() + try: + result.success = self._handler.get_not_null_constraints(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_not_null_constraints", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_default_constraints(self, seqid, iprot, oprot): + args = get_default_constraints_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_default_constraints_result() + try: + result.success = self._handler.get_default_constraints(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_default_constraints", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_check_constraints(self, seqid, iprot, oprot): + args = get_check_constraints_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_check_constraints_result() + try: + result.success = self._handler.get_check_constraints(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_check_constraints", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_all_table_constraints(self, seqid, iprot, oprot): + args = get_all_table_constraints_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_all_table_constraints_result() + try: + result.success = self._handler.get_all_table_constraints(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_all_table_constraints", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_update_table_column_statistics(self, seqid, iprot, oprot): + args = update_table_column_statistics_args() + args.read(iprot) + iprot.readMessageEnd() + result = update_table_column_statistics_result() + try: + result.success = self._handler.update_table_column_statistics(args.stats_obj) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except InvalidInputException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("update_table_column_statistics", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_update_partition_column_statistics(self, seqid, iprot, oprot): + args = update_partition_column_statistics_args() + args.read(iprot) + iprot.readMessageEnd() + result = update_partition_column_statistics_result() + try: + result.success = self._handler.update_partition_column_statistics(args.stats_obj) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except InvalidInputException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("update_partition_column_statistics", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_update_table_column_statistics_req(self, seqid, iprot, oprot): + args = update_table_column_statistics_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = update_table_column_statistics_req_result() + try: + result.success = self._handler.update_table_column_statistics_req(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except InvalidInputException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("update_table_column_statistics_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_update_partition_column_statistics_req(self, seqid, iprot, oprot): + args = update_partition_column_statistics_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = update_partition_column_statistics_req_result() + try: + result.success = self._handler.update_partition_column_statistics_req(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except InvalidInputException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("update_partition_column_statistics_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_update_transaction_statistics(self, seqid, iprot, oprot): + args = update_transaction_statistics_args() + args.read(iprot) + iprot.readMessageEnd() + result = update_transaction_statistics_result() + try: + self._handler.update_transaction_statistics(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("update_transaction_statistics", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_table_column_statistics(self, seqid, iprot, oprot): + args = get_table_column_statistics_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_table_column_statistics_result() + try: + result.success = self._handler.get_table_column_statistics(args.db_name, args.tbl_name, args.col_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except InvalidInputException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except InvalidObjectException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_table_column_statistics", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_column_statistics(self, seqid, iprot, oprot): + args = get_partition_column_statistics_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_column_statistics_result() + try: + result.success = self._handler.get_partition_column_statistics( + args.db_name, args.tbl_name, args.part_name, args.col_name + ) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except InvalidInputException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except InvalidObjectException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_partition_column_statistics", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_table_statistics_req(self, seqid, iprot, oprot): + args = get_table_statistics_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_table_statistics_req_result() + try: + result.success = self._handler.get_table_statistics_req(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_table_statistics_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_statistics_req(self, seqid, iprot, oprot): + args = get_partitions_statistics_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_statistics_req_result() + try: + result.success = self._handler.get_partitions_statistics_req(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_partitions_statistics_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_aggr_stats_for(self, seqid, iprot, oprot): + args = get_aggr_stats_for_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_aggr_stats_for_result() + try: + result.success = self._handler.get_aggr_stats_for(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_aggr_stats_for", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_set_aggr_stats_for(self, seqid, iprot, oprot): + args = set_aggr_stats_for_args() + args.read(iprot) + iprot.readMessageEnd() + result = set_aggr_stats_for_result() + try: + result.success = self._handler.set_aggr_stats_for(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except InvalidInputException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("set_aggr_stats_for", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_delete_partition_column_statistics(self, seqid, iprot, oprot): + args = delete_partition_column_statistics_args() + args.read(iprot) + iprot.readMessageEnd() + result = delete_partition_column_statistics_result() + try: + result.success = self._handler.delete_partition_column_statistics( + args.db_name, args.tbl_name, args.part_name, args.col_name, args.engine + ) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except InvalidObjectException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except InvalidInputException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("delete_partition_column_statistics", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_delete_table_column_statistics(self, seqid, iprot, oprot): + args = delete_table_column_statistics_args() + args.read(iprot) + iprot.readMessageEnd() + result = delete_table_column_statistics_result() + try: + result.success = self._handler.delete_table_column_statistics(args.db_name, args.tbl_name, args.col_name, args.engine) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except InvalidObjectException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except InvalidInputException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("delete_table_column_statistics", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_function(self, seqid, iprot, oprot): + args = create_function_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_function_result() + try: + self._handler.create_function(args.func) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except AlreadyExistsException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except NoSuchObjectException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("create_function", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_function(self, seqid, iprot, oprot): + args = drop_function_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_function_result() + try: + self._handler.drop_function(args.dbName, args.funcName) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("drop_function", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_function(self, seqid, iprot, oprot): + args = alter_function_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_function_result() + try: + self._handler.alter_function(args.dbName, args.funcName, args.newFunc) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidOperationException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("alter_function", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_functions(self, seqid, iprot, oprot): + args = get_functions_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_functions_result() + try: + result.success = self._handler.get_functions(args.dbName, args.pattern) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_functions", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_function(self, seqid, iprot, oprot): + args = get_function_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_function_result() + try: + result.success = self._handler.get_function(args.dbName, args.funcName) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_function", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_all_functions(self, seqid, iprot, oprot): + args = get_all_functions_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_all_functions_result() + try: + result.success = self._handler.get_all_functions() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_all_functions", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_role(self, seqid, iprot, oprot): + args = create_role_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_role_result() + try: + result.success = self._handler.create_role(args.role) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("create_role", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_role(self, seqid, iprot, oprot): + args = drop_role_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_role_result() + try: + result.success = self._handler.drop_role(args.role_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("drop_role", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_role_names(self, seqid, iprot, oprot): + args = get_role_names_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_role_names_result() + try: + result.success = self._handler.get_role_names() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_role_names", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_grant_role(self, seqid, iprot, oprot): + args = grant_role_args() + args.read(iprot) + iprot.readMessageEnd() + result = grant_role_result() + try: + result.success = self._handler.grant_role( + args.role_name, args.principal_name, args.principal_type, args.grantor, args.grantorType, args.grant_option + ) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("grant_role", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_revoke_role(self, seqid, iprot, oprot): + args = revoke_role_args() + args.read(iprot) + iprot.readMessageEnd() + result = revoke_role_result() + try: + result.success = self._handler.revoke_role(args.role_name, args.principal_name, args.principal_type) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("revoke_role", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_list_roles(self, seqid, iprot, oprot): + args = list_roles_args() + args.read(iprot) + iprot.readMessageEnd() + result = list_roles_result() + try: + result.success = self._handler.list_roles(args.principal_name, args.principal_type) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("list_roles", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_grant_revoke_role(self, seqid, iprot, oprot): + args = grant_revoke_role_args() + args.read(iprot) + iprot.readMessageEnd() + result = grant_revoke_role_result() + try: + result.success = self._handler.grant_revoke_role(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("grant_revoke_role", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_principals_in_role(self, seqid, iprot, oprot): + args = get_principals_in_role_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_principals_in_role_result() + try: + result.success = self._handler.get_principals_in_role(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_principals_in_role", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_role_grants_for_principal(self, seqid, iprot, oprot): + args = get_role_grants_for_principal_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_role_grants_for_principal_result() + try: + result.success = self._handler.get_role_grants_for_principal(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_role_grants_for_principal", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_privilege_set(self, seqid, iprot, oprot): + args = get_privilege_set_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_privilege_set_result() + try: + result.success = self._handler.get_privilege_set(args.hiveObject, args.user_name, args.group_names) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_privilege_set", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_list_privileges(self, seqid, iprot, oprot): + args = list_privileges_args() + args.read(iprot) + iprot.readMessageEnd() + result = list_privileges_result() + try: + result.success = self._handler.list_privileges(args.principal_name, args.principal_type, args.hiveObject) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("list_privileges", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_grant_privileges(self, seqid, iprot, oprot): + args = grant_privileges_args() + args.read(iprot) + iprot.readMessageEnd() + result = grant_privileges_result() + try: + result.success = self._handler.grant_privileges(args.privileges) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("grant_privileges", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_revoke_privileges(self, seqid, iprot, oprot): + args = revoke_privileges_args() + args.read(iprot) + iprot.readMessageEnd() + result = revoke_privileges_result() + try: + result.success = self._handler.revoke_privileges(args.privileges) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("revoke_privileges", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_grant_revoke_privileges(self, seqid, iprot, oprot): + args = grant_revoke_privileges_args() + args.read(iprot) + iprot.readMessageEnd() + result = grant_revoke_privileges_result() + try: + result.success = self._handler.grant_revoke_privileges(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("grant_revoke_privileges", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_refresh_privileges(self, seqid, iprot, oprot): + args = refresh_privileges_args() + args.read(iprot) + iprot.readMessageEnd() + result = refresh_privileges_result() + try: + result.success = self._handler.refresh_privileges(args.objToRefresh, args.authorizer, args.grantRequest) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("refresh_privileges", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_set_ugi(self, seqid, iprot, oprot): + args = set_ugi_args() + args.read(iprot) + iprot.readMessageEnd() + result = set_ugi_result() + try: + result.success = self._handler.set_ugi(args.user_name, args.group_names) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("set_ugi", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_delegation_token(self, seqid, iprot, oprot): + args = get_delegation_token_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_delegation_token_result() + try: + result.success = self._handler.get_delegation_token(args.token_owner, args.renewer_kerberos_principal_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_delegation_token", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_renew_delegation_token(self, seqid, iprot, oprot): + args = renew_delegation_token_args() + args.read(iprot) + iprot.readMessageEnd() + result = renew_delegation_token_result() + try: + result.success = self._handler.renew_delegation_token(args.token_str_form) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("renew_delegation_token", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_cancel_delegation_token(self, seqid, iprot, oprot): + args = cancel_delegation_token_args() + args.read(iprot) + iprot.readMessageEnd() + result = cancel_delegation_token_result() + try: + self._handler.cancel_delegation_token(args.token_str_form) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("cancel_delegation_token", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_token(self, seqid, iprot, oprot): + args = add_token_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_token_result() + try: + result.success = self._handler.add_token(args.token_identifier, args.delegation_token) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("add_token", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_remove_token(self, seqid, iprot, oprot): + args = remove_token_args() + args.read(iprot) + iprot.readMessageEnd() + result = remove_token_result() + try: + result.success = self._handler.remove_token(args.token_identifier) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("remove_token", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_token(self, seqid, iprot, oprot): + args = get_token_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_token_result() + try: + result.success = self._handler.get_token(args.token_identifier) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_token", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_all_token_identifiers(self, seqid, iprot, oprot): + args = get_all_token_identifiers_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_all_token_identifiers_result() + try: + result.success = self._handler.get_all_token_identifiers() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_all_token_identifiers", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_master_key(self, seqid, iprot, oprot): + args = add_master_key_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_master_key_result() + try: + result.success = self._handler.add_master_key(args.key) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("add_master_key", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_update_master_key(self, seqid, iprot, oprot): + args = update_master_key_args() + args.read(iprot) + iprot.readMessageEnd() + result = update_master_key_result() + try: + self._handler.update_master_key(args.seq_number, args.key) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("update_master_key", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_remove_master_key(self, seqid, iprot, oprot): + args = remove_master_key_args() + args.read(iprot) + iprot.readMessageEnd() + result = remove_master_key_result() + try: + result.success = self._handler.remove_master_key(args.key_seq) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("remove_master_key", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_master_keys(self, seqid, iprot, oprot): + args = get_master_keys_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_master_keys_result() + try: + result.success = self._handler.get_master_keys() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_master_keys", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_open_txns(self, seqid, iprot, oprot): + args = get_open_txns_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_open_txns_result() + try: + result.success = self._handler.get_open_txns() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_open_txns", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_open_txns_info(self, seqid, iprot, oprot): + args = get_open_txns_info_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_open_txns_info_result() + try: + result.success = self._handler.get_open_txns_info() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_open_txns_info", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_open_txns(self, seqid, iprot, oprot): + args = open_txns_args() + args.read(iprot) + iprot.readMessageEnd() + result = open_txns_result() + try: + result.success = self._handler.open_txns(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("open_txns", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_abort_txn(self, seqid, iprot, oprot): + args = abort_txn_args() + args.read(iprot) + iprot.readMessageEnd() + result = abort_txn_result() + try: + self._handler.abort_txn(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchTxnException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("abort_txn", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_abort_txns(self, seqid, iprot, oprot): + args = abort_txns_args() + args.read(iprot) + iprot.readMessageEnd() + result = abort_txns_result() + try: + self._handler.abort_txns(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchTxnException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("abort_txns", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_commit_txn(self, seqid, iprot, oprot): + args = commit_txn_args() + args.read(iprot) + iprot.readMessageEnd() + result = commit_txn_result() + try: + self._handler.commit_txn(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchTxnException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TxnAbortedException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("commit_txn", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_latest_txnid_in_conflict(self, seqid, iprot, oprot): + args = get_latest_txnid_in_conflict_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_latest_txnid_in_conflict_result() + try: + result.success = self._handler.get_latest_txnid_in_conflict(args.txnId) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_latest_txnid_in_conflict", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_repl_tbl_writeid_state(self, seqid, iprot, oprot): + args = repl_tbl_writeid_state_args() + args.read(iprot) + iprot.readMessageEnd() + result = repl_tbl_writeid_state_result() + try: + self._handler.repl_tbl_writeid_state(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("repl_tbl_writeid_state", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_valid_write_ids(self, seqid, iprot, oprot): + args = get_valid_write_ids_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_valid_write_ids_result() + try: + result.success = self._handler.get_valid_write_ids(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchTxnException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_valid_write_ids", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_allocate_table_write_ids(self, seqid, iprot, oprot): + args = allocate_table_write_ids_args() + args.read(iprot) + iprot.readMessageEnd() + result = allocate_table_write_ids_result() + try: + result.success = self._handler.allocate_table_write_ids(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchTxnException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TxnAbortedException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("allocate_table_write_ids", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_max_allocated_table_write_id(self, seqid, iprot, oprot): + args = get_max_allocated_table_write_id_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_max_allocated_table_write_id_result() + try: + result.success = self._handler.get_max_allocated_table_write_id(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_max_allocated_table_write_id", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_seed_write_id(self, seqid, iprot, oprot): + args = seed_write_id_args() + args.read(iprot) + iprot.readMessageEnd() + result = seed_write_id_result() + try: + self._handler.seed_write_id(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("seed_write_id", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_seed_txn_id(self, seqid, iprot, oprot): + args = seed_txn_id_args() + args.read(iprot) + iprot.readMessageEnd() + result = seed_txn_id_result() + try: + self._handler.seed_txn_id(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("seed_txn_id", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_lock(self, seqid, iprot, oprot): + args = lock_args() + args.read(iprot) + iprot.readMessageEnd() + result = lock_result() + try: + result.success = self._handler.lock(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchTxnException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TxnAbortedException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("lock", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_check_lock(self, seqid, iprot, oprot): + args = check_lock_args() + args.read(iprot) + iprot.readMessageEnd() + result = check_lock_result() + try: + result.success = self._handler.check_lock(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchTxnException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TxnAbortedException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except NoSuchLockException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("check_lock", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_unlock(self, seqid, iprot, oprot): + args = unlock_args() + args.read(iprot) + iprot.readMessageEnd() + result = unlock_result() + try: + self._handler.unlock(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchLockException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TxnOpenException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("unlock", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_show_locks(self, seqid, iprot, oprot): + args = show_locks_args() + args.read(iprot) + iprot.readMessageEnd() + result = show_locks_result() + try: + result.success = self._handler.show_locks(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("show_locks", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_heartbeat(self, seqid, iprot, oprot): + args = heartbeat_args() + args.read(iprot) + iprot.readMessageEnd() + result = heartbeat_result() + try: + self._handler.heartbeat(args.ids) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchLockException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchTxnException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TxnAbortedException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("heartbeat", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_heartbeat_txn_range(self, seqid, iprot, oprot): + args = heartbeat_txn_range_args() + args.read(iprot) + iprot.readMessageEnd() + result = heartbeat_txn_range_result() + try: + result.success = self._handler.heartbeat_txn_range(args.txns) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("heartbeat_txn_range", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_compact(self, seqid, iprot, oprot): + args = compact_args() + args.read(iprot) + iprot.readMessageEnd() + result = compact_result() + try: + self._handler.compact(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("compact", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_compact2(self, seqid, iprot, oprot): + args = compact2_args() + args.read(iprot) + iprot.readMessageEnd() + result = compact2_result() + try: + result.success = self._handler.compact2(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("compact2", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_show_compact(self, seqid, iprot, oprot): + args = show_compact_args() + args.read(iprot) + iprot.readMessageEnd() + result = show_compact_result() + try: + result.success = self._handler.show_compact(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("show_compact", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_dynamic_partitions(self, seqid, iprot, oprot): + args = add_dynamic_partitions_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_dynamic_partitions_result() + try: + self._handler.add_dynamic_partitions(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchTxnException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TxnAbortedException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("add_dynamic_partitions", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_find_next_compact(self, seqid, iprot, oprot): + args = find_next_compact_args() + args.read(iprot) + iprot.readMessageEnd() + result = find_next_compact_result() + try: + result.success = self._handler.find_next_compact(args.workerId) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("find_next_compact", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_find_next_compact2(self, seqid, iprot, oprot): + args = find_next_compact2_args() + args.read(iprot) + iprot.readMessageEnd() + result = find_next_compact2_result() + try: + result.success = self._handler.find_next_compact2(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("find_next_compact2", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_update_compactor_state(self, seqid, iprot, oprot): + args = update_compactor_state_args() + args.read(iprot) + iprot.readMessageEnd() + result = update_compactor_state_result() + try: + self._handler.update_compactor_state(args.cr, args.txn_id) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("update_compactor_state", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_find_columns_with_stats(self, seqid, iprot, oprot): + args = find_columns_with_stats_args() + args.read(iprot) + iprot.readMessageEnd() + result = find_columns_with_stats_result() + try: + result.success = self._handler.find_columns_with_stats(args.cr) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("find_columns_with_stats", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_mark_cleaned(self, seqid, iprot, oprot): + args = mark_cleaned_args() + args.read(iprot) + iprot.readMessageEnd() + result = mark_cleaned_result() + try: + self._handler.mark_cleaned(args.cr) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("mark_cleaned", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_mark_compacted(self, seqid, iprot, oprot): + args = mark_compacted_args() + args.read(iprot) + iprot.readMessageEnd() + result = mark_compacted_result() + try: + self._handler.mark_compacted(args.cr) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("mark_compacted", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_mark_failed(self, seqid, iprot, oprot): + args = mark_failed_args() + args.read(iprot) + iprot.readMessageEnd() + result = mark_failed_result() + try: + self._handler.mark_failed(args.cr) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("mark_failed", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_mark_refused(self, seqid, iprot, oprot): + args = mark_refused_args() + args.read(iprot) + iprot.readMessageEnd() + result = mark_refused_result() + try: + self._handler.mark_refused(args.cr) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("mark_refused", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_update_compaction_metrics_data(self, seqid, iprot, oprot): + args = update_compaction_metrics_data_args() + args.read(iprot) + iprot.readMessageEnd() + result = update_compaction_metrics_data_result() + try: + result.success = self._handler.update_compaction_metrics_data(args.data) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("update_compaction_metrics_data", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_remove_compaction_metrics_data(self, seqid, iprot, oprot): + args = remove_compaction_metrics_data_args() + args.read(iprot) + iprot.readMessageEnd() + result = remove_compaction_metrics_data_result() + try: + self._handler.remove_compaction_metrics_data(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("remove_compaction_metrics_data", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_set_hadoop_jobid(self, seqid, iprot, oprot): + args = set_hadoop_jobid_args() + args.read(iprot) + iprot.readMessageEnd() + result = set_hadoop_jobid_result() + try: + self._handler.set_hadoop_jobid(args.jobId, args.cq_id) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("set_hadoop_jobid", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_latest_committed_compaction_info(self, seqid, iprot, oprot): + args = get_latest_committed_compaction_info_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_latest_committed_compaction_info_result() + try: + result.success = self._handler.get_latest_committed_compaction_info(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_latest_committed_compaction_info", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_next_notification(self, seqid, iprot, oprot): + args = get_next_notification_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_next_notification_result() + try: + result.success = self._handler.get_next_notification(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_next_notification", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_current_notificationEventId(self, seqid, iprot, oprot): + args = get_current_notificationEventId_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_current_notificationEventId_result() + try: + result.success = self._handler.get_current_notificationEventId() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_current_notificationEventId", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_notification_events_count(self, seqid, iprot, oprot): + args = get_notification_events_count_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_notification_events_count_result() + try: + result.success = self._handler.get_notification_events_count(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_notification_events_count", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_fire_listener_event(self, seqid, iprot, oprot): + args = fire_listener_event_args() + args.read(iprot) + iprot.readMessageEnd() + result = fire_listener_event_result() + try: + result.success = self._handler.fire_listener_event(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("fire_listener_event", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_flushCache(self, seqid, iprot, oprot): + args = flushCache_args() + args.read(iprot) + iprot.readMessageEnd() + result = flushCache_result() + try: + self._handler.flushCache() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("flushCache", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_write_notification_log(self, seqid, iprot, oprot): + args = add_write_notification_log_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_write_notification_log_result() + try: + result.success = self._handler.add_write_notification_log(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("add_write_notification_log", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_write_notification_log_in_batch(self, seqid, iprot, oprot): + args = add_write_notification_log_in_batch_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_write_notification_log_in_batch_result() + try: + result.success = self._handler.add_write_notification_log_in_batch(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("add_write_notification_log_in_batch", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_cm_recycle(self, seqid, iprot, oprot): + args = cm_recycle_args() + args.read(iprot) + iprot.readMessageEnd() + result = cm_recycle_result() + try: + result.success = self._handler.cm_recycle(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("cm_recycle", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_file_metadata_by_expr(self, seqid, iprot, oprot): + args = get_file_metadata_by_expr_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_file_metadata_by_expr_result() + try: + result.success = self._handler.get_file_metadata_by_expr(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_file_metadata_by_expr", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_file_metadata(self, seqid, iprot, oprot): + args = get_file_metadata_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_file_metadata_result() + try: + result.success = self._handler.get_file_metadata(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_file_metadata", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_put_file_metadata(self, seqid, iprot, oprot): + args = put_file_metadata_args() + args.read(iprot) + iprot.readMessageEnd() + result = put_file_metadata_result() + try: + result.success = self._handler.put_file_metadata(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("put_file_metadata", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_clear_file_metadata(self, seqid, iprot, oprot): + args = clear_file_metadata_args() + args.read(iprot) + iprot.readMessageEnd() + result = clear_file_metadata_result() + try: + result.success = self._handler.clear_file_metadata(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("clear_file_metadata", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_cache_file_metadata(self, seqid, iprot, oprot): + args = cache_file_metadata_args() + args.read(iprot) + iprot.readMessageEnd() + result = cache_file_metadata_result() + try: + result.success = self._handler.cache_file_metadata(args.req) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("cache_file_metadata", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_metastore_db_uuid(self, seqid, iprot, oprot): + args = get_metastore_db_uuid_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_metastore_db_uuid_result() + try: + result.success = self._handler.get_metastore_db_uuid() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_metastore_db_uuid", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_resource_plan(self, seqid, iprot, oprot): + args = create_resource_plan_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_resource_plan_result() + try: + result.success = self._handler.create_resource_plan(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except AlreadyExistsException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("create_resource_plan", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_resource_plan(self, seqid, iprot, oprot): + args = get_resource_plan_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_resource_plan_result() + try: + result.success = self._handler.get_resource_plan(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_resource_plan", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_active_resource_plan(self, seqid, iprot, oprot): + args = get_active_resource_plan_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_active_resource_plan_result() + try: + result.success = self._handler.get_active_resource_plan(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_active_resource_plan", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_all_resource_plans(self, seqid, iprot, oprot): + args = get_all_resource_plans_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_all_resource_plans_result() + try: + result.success = self._handler.get_all_resource_plans(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_all_resource_plans", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_resource_plan(self, seqid, iprot, oprot): + args = alter_resource_plan_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_resource_plan_result() + try: + result.success = self._handler.alter_resource_plan(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidOperationException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("alter_resource_plan", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_validate_resource_plan(self, seqid, iprot, oprot): + args = validate_resource_plan_args() + args.read(iprot) + iprot.readMessageEnd() + result = validate_resource_plan_result() + try: + result.success = self._handler.validate_resource_plan(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("validate_resource_plan", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_resource_plan(self, seqid, iprot, oprot): + args = drop_resource_plan_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_resource_plan_result() + try: + result.success = self._handler.drop_resource_plan(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidOperationException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("drop_resource_plan", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_wm_trigger(self, seqid, iprot, oprot): + args = create_wm_trigger_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_wm_trigger_result() + try: + result.success = self._handler.create_wm_trigger(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except AlreadyExistsException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except InvalidObjectException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except MetaException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("create_wm_trigger", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_wm_trigger(self, seqid, iprot, oprot): + args = alter_wm_trigger_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_wm_trigger_result() + try: + result.success = self._handler.alter_wm_trigger(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("alter_wm_trigger", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_wm_trigger(self, seqid, iprot, oprot): + args = drop_wm_trigger_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_wm_trigger_result() + try: + result.success = self._handler.drop_wm_trigger(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidOperationException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("drop_wm_trigger", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_triggers_for_resourceplan(self, seqid, iprot, oprot): + args = get_triggers_for_resourceplan_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_triggers_for_resourceplan_result() + try: + result.success = self._handler.get_triggers_for_resourceplan(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_triggers_for_resourceplan", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_wm_pool(self, seqid, iprot, oprot): + args = create_wm_pool_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_wm_pool_result() + try: + result.success = self._handler.create_wm_pool(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except AlreadyExistsException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except InvalidObjectException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except MetaException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("create_wm_pool", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_wm_pool(self, seqid, iprot, oprot): + args = alter_wm_pool_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_wm_pool_result() + try: + result.success = self._handler.alter_wm_pool(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except AlreadyExistsException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except InvalidObjectException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except MetaException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("alter_wm_pool", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_wm_pool(self, seqid, iprot, oprot): + args = drop_wm_pool_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_wm_pool_result() + try: + result.success = self._handler.drop_wm_pool(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidOperationException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("drop_wm_pool", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_or_update_wm_mapping(self, seqid, iprot, oprot): + args = create_or_update_wm_mapping_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_or_update_wm_mapping_result() + try: + result.success = self._handler.create_or_update_wm_mapping(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except AlreadyExistsException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except InvalidObjectException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except MetaException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("create_or_update_wm_mapping", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_wm_mapping(self, seqid, iprot, oprot): + args = drop_wm_mapping_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_wm_mapping_result() + try: + result.success = self._handler.drop_wm_mapping(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidOperationException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("drop_wm_mapping", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_or_drop_wm_trigger_to_pool_mapping(self, seqid, iprot, oprot): + args = create_or_drop_wm_trigger_to_pool_mapping_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_or_drop_wm_trigger_to_pool_mapping_result() + try: + result.success = self._handler.create_or_drop_wm_trigger_to_pool_mapping(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except AlreadyExistsException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except InvalidObjectException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except MetaException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("create_or_drop_wm_trigger_to_pool_mapping", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_ischema(self, seqid, iprot, oprot): + args = create_ischema_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_ischema_result() + try: + self._handler.create_ischema(args.schema) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except AlreadyExistsException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("create_ischema", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_ischema(self, seqid, iprot, oprot): + args = alter_ischema_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_ischema_result() + try: + self._handler.alter_ischema(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("alter_ischema", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_ischema(self, seqid, iprot, oprot): + args = get_ischema_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_ischema_result() + try: + result.success = self._handler.get_ischema(args.name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_ischema", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_ischema(self, seqid, iprot, oprot): + args = drop_ischema_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_ischema_result() + try: + self._handler.drop_ischema(args.name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidOperationException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("drop_ischema", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_schema_version(self, seqid, iprot, oprot): + args = add_schema_version_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_schema_version_result() + try: + self._handler.add_schema_version(args.schemaVersion) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except AlreadyExistsException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("add_schema_version", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_schema_version(self, seqid, iprot, oprot): + args = get_schema_version_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_schema_version_result() + try: + result.success = self._handler.get_schema_version(args.schemaVersion) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_schema_version", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_schema_latest_version(self, seqid, iprot, oprot): + args = get_schema_latest_version_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_schema_latest_version_result() + try: + result.success = self._handler.get_schema_latest_version(args.schemaName) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_schema_latest_version", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_schema_all_versions(self, seqid, iprot, oprot): + args = get_schema_all_versions_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_schema_all_versions_result() + try: + result.success = self._handler.get_schema_all_versions(args.schemaName) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_schema_all_versions", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_schema_version(self, seqid, iprot, oprot): + args = drop_schema_version_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_schema_version_result() + try: + self._handler.drop_schema_version(args.schemaVersion) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("drop_schema_version", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_schemas_by_cols(self, seqid, iprot, oprot): + args = get_schemas_by_cols_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_schemas_by_cols_result() + try: + result.success = self._handler.get_schemas_by_cols(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_schemas_by_cols", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_map_schema_version_to_serde(self, seqid, iprot, oprot): + args = map_schema_version_to_serde_args() + args.read(iprot) + iprot.readMessageEnd() + result = map_schema_version_to_serde_result() + try: + self._handler.map_schema_version_to_serde(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("map_schema_version_to_serde", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_set_schema_version_state(self, seqid, iprot, oprot): + args = set_schema_version_state_args() + args.read(iprot) + iprot.readMessageEnd() + result = set_schema_version_state_result() + try: + self._handler.set_schema_version_state(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidOperationException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("set_schema_version_state", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_serde(self, seqid, iprot, oprot): + args = add_serde_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_serde_result() + try: + self._handler.add_serde(args.serde) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except AlreadyExistsException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("add_serde", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_serde(self, seqid, iprot, oprot): + args = get_serde_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_serde_result() + try: + result.success = self._handler.get_serde(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_serde", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_lock_materialization_rebuild(self, seqid, iprot, oprot): + args = get_lock_materialization_rebuild_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_lock_materialization_rebuild_result() + try: + result.success = self._handler.get_lock_materialization_rebuild(args.dbName, args.tableName, args.txnId) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_lock_materialization_rebuild", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_heartbeat_lock_materialization_rebuild(self, seqid, iprot, oprot): + args = heartbeat_lock_materialization_rebuild_args() + args.read(iprot) + iprot.readMessageEnd() + result = heartbeat_lock_materialization_rebuild_result() + try: + result.success = self._handler.heartbeat_lock_materialization_rebuild(args.dbName, args.tableName, args.txnId) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("heartbeat_lock_materialization_rebuild", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_runtime_stats(self, seqid, iprot, oprot): + args = add_runtime_stats_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_runtime_stats_result() + try: + self._handler.add_runtime_stats(args.stat) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("add_runtime_stats", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_runtime_stats(self, seqid, iprot, oprot): + args = get_runtime_stats_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_runtime_stats_result() + try: + result.success = self._handler.get_runtime_stats(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_runtime_stats", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_with_specs(self, seqid, iprot, oprot): + args = get_partitions_with_specs_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_with_specs_result() + try: + result.success = self._handler.get_partitions_with_specs(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_partitions_with_specs", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_scheduled_query_poll(self, seqid, iprot, oprot): + args = scheduled_query_poll_args() + args.read(iprot) + iprot.readMessageEnd() + result = scheduled_query_poll_result() + try: + result.success = self._handler.scheduled_query_poll(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("scheduled_query_poll", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_scheduled_query_maintenance(self, seqid, iprot, oprot): + args = scheduled_query_maintenance_args() + args.read(iprot) + iprot.readMessageEnd() + result = scheduled_query_maintenance_result() + try: + self._handler.scheduled_query_maintenance(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except AlreadyExistsException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except InvalidInputException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("scheduled_query_maintenance", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_scheduled_query_progress(self, seqid, iprot, oprot): + args = scheduled_query_progress_args() + args.read(iprot) + iprot.readMessageEnd() + result = scheduled_query_progress_result() + try: + self._handler.scheduled_query_progress(args.info) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidOperationException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("scheduled_query_progress", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_scheduled_query(self, seqid, iprot, oprot): + args = get_scheduled_query_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_scheduled_query_result() + try: + result.success = self._handler.get_scheduled_query(args.scheduleKey) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_scheduled_query", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_replication_metrics(self, seqid, iprot, oprot): + args = add_replication_metrics_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_replication_metrics_result() + try: + self._handler.add_replication_metrics(args.replicationMetricList) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("add_replication_metrics", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_replication_metrics(self, seqid, iprot, oprot): + args = get_replication_metrics_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_replication_metrics_result() + try: + result.success = self._handler.get_replication_metrics(args.rqst) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_replication_metrics", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_open_txns_req(self, seqid, iprot, oprot): + args = get_open_txns_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_open_txns_req_result() + try: + result.success = self._handler.get_open_txns_req(args.getOpenTxnsRequest) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_open_txns_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_stored_procedure(self, seqid, iprot, oprot): + args = create_stored_procedure_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_stored_procedure_result() + try: + self._handler.create_stored_procedure(args.proc) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("create_stored_procedure", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_stored_procedure(self, seqid, iprot, oprot): + args = get_stored_procedure_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_stored_procedure_result() + try: + result.success = self._handler.get_stored_procedure(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_stored_procedure", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_stored_procedure(self, seqid, iprot, oprot): + args = drop_stored_procedure_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_stored_procedure_result() + try: + self._handler.drop_stored_procedure(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("drop_stored_procedure", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_all_stored_procedures(self, seqid, iprot, oprot): + args = get_all_stored_procedures_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_all_stored_procedures_result() + try: + result.success = self._handler.get_all_stored_procedures(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_all_stored_procedures", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_find_package(self, seqid, iprot, oprot): + args = find_package_args() + args.read(iprot) + iprot.readMessageEnd() + result = find_package_result() + try: + result.success = self._handler.find_package(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("find_package", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_package(self, seqid, iprot, oprot): + args = add_package_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_package_result() + try: + self._handler.add_package(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("add_package", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_all_packages(self, seqid, iprot, oprot): + args = get_all_packages_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_all_packages_result() + try: + result.success = self._handler.get_all_packages(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_all_packages", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_package(self, seqid, iprot, oprot): + args = drop_package_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_package_result() + try: + self._handler.drop_package(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("drop_package", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_all_write_event_info(self, seqid, iprot, oprot): + args = get_all_write_event_info_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_all_write_event_info_result() + try: + result.success = self._handler.get_all_write_event_info(args.request) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error") + oprot.writeMessageBegin("get_all_write_event_info", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + +# HELPER FUNCTIONS AND STRUCTURES + + +class getMetaConf_args: + """ + Attributes: + - key + + """ + + def __init__( + self, + key=None, + ): + self.key = key + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.key = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("getMetaConf_args") + if self.key is not None: + oprot.writeFieldBegin("key", TType.STRING, 1) + oprot.writeString(self.key.encode("utf-8") if sys.version_info[0] == 2 else self.key) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(getMetaConf_args) +getMetaConf_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "key", + "UTF8", + None, + ), # 1 +) + + +class getMetaConf_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRING: + self.success = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("getMetaConf_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString(self.success.encode("utf-8") if sys.version_info[0] == 2 else self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(getMetaConf_result) +getMetaConf_result.thrift_spec = ( + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class setMetaConf_args: + """ + Attributes: + - key + - value + + """ + + def __init__( + self, + key=None, + value=None, + ): + self.key = key + self.value = value + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.key = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.value = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("setMetaConf_args") + if self.key is not None: + oprot.writeFieldBegin("key", TType.STRING, 1) + oprot.writeString(self.key.encode("utf-8") if sys.version_info[0] == 2 else self.key) + oprot.writeFieldEnd() + if self.value is not None: + oprot.writeFieldBegin("value", TType.STRING, 2) + oprot.writeString(self.value.encode("utf-8") if sys.version_info[0] == 2 else self.value) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(setMetaConf_args) +setMetaConf_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "key", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "value", + "UTF8", + None, + ), # 2 +) + + +class setMetaConf_result: + """ + Attributes: + - o1 + + """ + + def __init__( + self, + o1=None, + ): + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("setMetaConf_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(setMetaConf_result) +setMetaConf_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class create_catalog_args: + """ + Attributes: + - catalog + + """ + + def __init__( + self, + catalog=None, + ): + self.catalog = catalog + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.catalog = CreateCatalogRequest() + self.catalog.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_catalog_args") + if self.catalog is not None: + oprot.writeFieldBegin("catalog", TType.STRUCT, 1) + self.catalog.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_catalog_args) +create_catalog_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "catalog", + [CreateCatalogRequest, None], + None, + ), # 1 +) + + +class create_catalog_result: + """ + Attributes: + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + o1=None, + o2=None, + o3=None, + ): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_catalog_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_catalog_result) +create_catalog_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [AlreadyExistsException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class alter_catalog_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = AlterCatalogRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_catalog_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_catalog_args) +alter_catalog_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [AlterCatalogRequest, None], + None, + ), # 1 +) + + +class alter_catalog_result: + """ + Attributes: + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + o1=None, + o2=None, + o3=None, + ): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_catalog_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_catalog_result) +alter_catalog_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidOperationException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class get_catalog_args: + """ + Attributes: + - catName + + """ + + def __init__( + self, + catName=None, + ): + self.catName = catName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.catName = GetCatalogRequest() + self.catName.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_catalog_args") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRUCT, 1) + self.catName.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_catalog_args) +get_catalog_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "catName", + [GetCatalogRequest, None], + None, + ), # 1 +) + + +class get_catalog_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetCatalogResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_catalog_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_catalog_result) +get_catalog_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [GetCatalogResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class get_catalogs_args: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_catalogs_args") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_catalogs_args) +get_catalogs_args.thrift_spec = () + + +class get_catalogs_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetCatalogsResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_catalogs_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_catalogs_result) +get_catalogs_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [GetCatalogsResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class drop_catalog_args: + """ + Attributes: + - catName + + """ + + def __init__( + self, + catName=None, + ): + self.catName = catName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.catName = DropCatalogRequest() + self.catName.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_catalog_args") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRUCT, 1) + self.catName.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_catalog_args) +drop_catalog_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "catName", + [DropCatalogRequest, None], + None, + ), # 1 +) + + +class drop_catalog_result: + """ + Attributes: + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + o1=None, + o2=None, + o3=None, + ): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_catalog_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_catalog_result) +drop_catalog_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidOperationException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class create_database_args: + """ + Attributes: + - database + + """ + + def __init__( + self, + database=None, + ): + self.database = database + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.database = Database() + self.database.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_database_args") + if self.database is not None: + oprot.writeFieldBegin("database", TType.STRUCT, 1) + self.database.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_database_args) +create_database_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "database", + [Database, None], + None, + ), # 1 +) + + +class create_database_result: + """ + Attributes: + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + o1=None, + o2=None, + o3=None, + ): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_database_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_database_result) +create_database_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [AlreadyExistsException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class get_database_args: + """ + Attributes: + - name + + """ + + def __init__( + self, + name=None, + ): + self.name = name + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_database_args") + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRING, 1) + oprot.writeString(self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_database_args) +get_database_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "name", + "UTF8", + None, + ), # 1 +) + + +class get_database_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Database() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_database_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_database_result) +get_database_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [Database, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class get_database_req_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = GetDatabaseRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_database_req_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_database_req_args) +get_database_req_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [GetDatabaseRequest, None], + None, + ), # 1 +) + + +class get_database_req_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Database() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_database_req_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_database_req_result) +get_database_req_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [Database, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class drop_database_args: + """ + Attributes: + - name + - deleteData + - cascade + + """ + + def __init__( + self, + name=None, + deleteData=None, + cascade=None, + ): + self.name = name + self.deleteData = deleteData + self.cascade = cascade + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.cascade = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_database_args") + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRING, 1) + oprot.writeString(self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + if self.deleteData is not None: + oprot.writeFieldBegin("deleteData", TType.BOOL, 2) + oprot.writeBool(self.deleteData) + oprot.writeFieldEnd() + if self.cascade is not None: + oprot.writeFieldBegin("cascade", TType.BOOL, 3) + oprot.writeBool(self.cascade) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_database_args) +drop_database_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.BOOL, + "deleteData", + None, + None, + ), # 2 + ( + 3, + TType.BOOL, + "cascade", + None, + None, + ), # 3 +) + + +class drop_database_result: + """ + Attributes: + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + o1=None, + o2=None, + o3=None, + ): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_database_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_database_result) +drop_database_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidOperationException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class drop_database_req_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = DropDatabaseRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_database_req_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_database_req_args) +drop_database_req_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [DropDatabaseRequest, None], + None, + ), # 1 +) + + +class drop_database_req_result: + """ + Attributes: + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + o1=None, + o2=None, + o3=None, + ): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_database_req_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_database_req_result) +drop_database_req_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidOperationException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class get_databases_args: + """ + Attributes: + - pattern + + """ + + def __init__( + self, + pattern=None, + ): + self.pattern = pattern + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.pattern = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_databases_args") + if self.pattern is not None: + oprot.writeFieldBegin("pattern", TType.STRING, 1) + oprot.writeString(self.pattern.encode("utf-8") if sys.version_info[0] == 2 else self.pattern) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_databases_args) +get_databases_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "pattern", + "UTF8", + None, + ), # 1 +) + + +class get_databases_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1252, _size1249) = iprot.readListBegin() + for _i1253 in range(_size1249): + _elem1254 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success.append(_elem1254) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_databases_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter1255 in self.success: + oprot.writeString(iter1255.encode("utf-8") if sys.version_info[0] == 2 else iter1255) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_databases_result) +get_databases_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class get_all_databases_args: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_all_databases_args") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_all_databases_args) +get_all_databases_args.thrift_spec = () + + +class get_all_databases_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1259, _size1256) = iprot.readListBegin() + for _i1260 in range(_size1256): + _elem1261 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success.append(_elem1261) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_all_databases_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter1262 in self.success: + oprot.writeString(iter1262.encode("utf-8") if sys.version_info[0] == 2 else iter1262) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_all_databases_result) +get_all_databases_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class alter_database_args: + """ + Attributes: + - dbname + - db + + """ + + def __init__( + self, + dbname=None, + db=None, + ): + self.dbname = dbname + self.db = db + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.db = Database() + self.db.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_database_args") + if self.dbname is not None: + oprot.writeFieldBegin("dbname", TType.STRING, 1) + oprot.writeString(self.dbname.encode("utf-8") if sys.version_info[0] == 2 else self.dbname) + oprot.writeFieldEnd() + if self.db is not None: + oprot.writeFieldBegin("db", TType.STRUCT, 2) + self.db.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_database_args) +alter_database_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbname", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRUCT, + "db", + [Database, None], + None, + ), # 2 +) + + +class alter_database_result: + """ + Attributes: + - o1 + - o2 + + """ + + def __init__( + self, + o1=None, + o2=None, + ): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_database_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_database_result) +alter_database_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class create_dataconnector_args: + """ + Attributes: + - connector + + """ + + def __init__( + self, + connector=None, + ): + self.connector = connector + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.connector = DataConnector() + self.connector.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_dataconnector_args") + if self.connector is not None: + oprot.writeFieldBegin("connector", TType.STRUCT, 1) + self.connector.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_dataconnector_args) +create_dataconnector_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "connector", + [DataConnector, None], + None, + ), # 1 +) + + +class create_dataconnector_result: + """ + Attributes: + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + o1=None, + o2=None, + o3=None, + ): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_dataconnector_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_dataconnector_result) +create_dataconnector_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [AlreadyExistsException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class get_dataconnector_req_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = GetDataConnectorRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_dataconnector_req_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_dataconnector_req_args) +get_dataconnector_req_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [GetDataConnectorRequest, None], + None, + ), # 1 +) + + +class get_dataconnector_req_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = DataConnector() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_dataconnector_req_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_dataconnector_req_result) +get_dataconnector_req_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [DataConnector, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class drop_dataconnector_args: + """ + Attributes: + - name + - ifNotExists + - checkReferences + + """ + + def __init__( + self, + name=None, + ifNotExists=None, + checkReferences=None, + ): + self.name = name + self.ifNotExists = ifNotExists + self.checkReferences = checkReferences + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == -1: + if ftype == TType.BOOL: + self.ifNotExists = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == -2: + if ftype == TType.BOOL: + self.checkReferences = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_dataconnector_args") + if self.checkReferences is not None: + oprot.writeFieldBegin("checkReferences", TType.BOOL, -2) + oprot.writeBool(self.checkReferences) + oprot.writeFieldEnd() + if self.ifNotExists is not None: + oprot.writeFieldBegin("ifNotExists", TType.BOOL, -1) + oprot.writeBool(self.ifNotExists) + oprot.writeFieldEnd() + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRING, 1) + oprot.writeString(self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_dataconnector_args) +drop_dataconnector_args.thrift_spec = () + + +class drop_dataconnector_result: + """ + Attributes: + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + o1=None, + o2=None, + o3=None, + ): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_dataconnector_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_dataconnector_result) +drop_dataconnector_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidOperationException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class get_dataconnectors_args: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_dataconnectors_args") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_dataconnectors_args) +get_dataconnectors_args.thrift_spec = () + + +class get_dataconnectors_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1266, _size1263) = iprot.readListBegin() + for _i1267 in range(_size1263): + _elem1268 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success.append(_elem1268) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_dataconnectors_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter1269 in self.success: + oprot.writeString(iter1269.encode("utf-8") if sys.version_info[0] == 2 else iter1269) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_dataconnectors_result) +get_dataconnectors_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class alter_dataconnector_args: + """ + Attributes: + - name + - connector + + """ + + def __init__( + self, + name=None, + connector=None, + ): + self.name = name + self.connector = connector + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.connector = DataConnector() + self.connector.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_dataconnector_args") + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRING, 1) + oprot.writeString(self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + if self.connector is not None: + oprot.writeFieldBegin("connector", TType.STRUCT, 2) + self.connector.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_dataconnector_args) +alter_dataconnector_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRUCT, + "connector", + [DataConnector, None], + None, + ), # 2 +) + + +class alter_dataconnector_result: + """ + Attributes: + - o1 + - o2 + + """ + + def __init__( + self, + o1=None, + o2=None, + ): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_dataconnector_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_dataconnector_result) +alter_dataconnector_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class get_type_args: + """ + Attributes: + - name + + """ + + def __init__( + self, + name=None, + ): + self.name = name + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_type_args") + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRING, 1) + oprot.writeString(self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_type_args) +get_type_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "name", + "UTF8", + None, + ), # 1 +) + + +class get_type_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Type() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_type_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_type_result) +get_type_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [Type, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class create_type_args: + """ + Attributes: + - type + + """ + + def __init__( + self, + type=None, + ): + self.type = type + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.type = Type() + self.type.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_type_args") + if self.type is not None: + oprot.writeFieldBegin("type", TType.STRUCT, 1) + self.type.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_type_args) +create_type_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "type", + [Type, None], + None, + ), # 1 +) + + +class create_type_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_type_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_type_result) +create_type_result.thrift_spec = ( + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [AlreadyExistsException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class drop_type_args: + """ + Attributes: + - type + + """ + + def __init__( + self, + type=None, + ): + self.type = type + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.type = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_type_args") + if self.type is not None: + oprot.writeFieldBegin("type", TType.STRING, 1) + oprot.writeString(self.type.encode("utf-8") if sys.version_info[0] == 2 else self.type) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_type_args) +drop_type_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "type", + "UTF8", + None, + ), # 1 +) + + +class drop_type_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_type_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_type_result) +drop_type_result.thrift_spec = ( + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class get_type_all_args: + """ + Attributes: + - name + + """ + + def __init__( + self, + name=None, + ): + self.name = name + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_type_all_args") + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRING, 1) + oprot.writeString(self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_type_all_args) +get_type_all_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "name", + "UTF8", + None, + ), # 1 +) + + +class get_type_all_result: + """ + Attributes: + - success + - o2 + + """ + + def __init__( + self, + success=None, + o2=None, + ): + self.success = success + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.MAP: + self.success = {} + (_ktype1271, _vtype1272, _size1270) = iprot.readMapBegin() + for _i1274 in range(_size1270): + _key1275 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val1276 = Type() + _val1276.read(iprot) + self.success[_key1275] = _val1276 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_type_all_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.MAP, 0) + oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success)) + for kiter1277, viter1278 in self.success.items(): + oprot.writeString(kiter1277.encode("utf-8") if sys.version_info[0] == 2 else kiter1277) + viter1278.write(oprot) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 1) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_type_all_result) +get_type_all_result.thrift_spec = ( + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRUCT, [Type, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 1 +) + + +class get_fields_args: + """ + Attributes: + - db_name + - table_name + + """ + + def __init__( + self, + db_name=None, + table_name=None, + ): + self.db_name = db_name + self.table_name = table_name + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.table_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_fields_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.table_name is not None: + oprot.writeFieldBegin("table_name", TType.STRING, 2) + oprot.writeString(self.table_name.encode("utf-8") if sys.version_info[0] == 2 else self.table_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_fields_args) +get_fields_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "table_name", + "UTF8", + None, + ), # 2 +) + + +class get_fields_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1282, _size1279) = iprot.readListBegin() + for _i1283 in range(_size1279): + _elem1284 = FieldSchema() + _elem1284.read(iprot) + self.success.append(_elem1284) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = UnknownTableException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = UnknownDBException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_fields_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter1285 in self.success: + iter1285.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_fields_result) +get_fields_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [FieldSchema, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [UnknownTableException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [UnknownDBException, None], + None, + ), # 3 +) + + +class get_fields_with_environment_context_args: + """ + Attributes: + - db_name + - table_name + - environment_context + + """ + + def __init__( + self, + db_name=None, + table_name=None, + environment_context=None, + ): + self.db_name = db_name + self.table_name = table_name + self.environment_context = environment_context + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.table_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.environment_context = EnvironmentContext() + self.environment_context.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_fields_with_environment_context_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.table_name is not None: + oprot.writeFieldBegin("table_name", TType.STRING, 2) + oprot.writeString(self.table_name.encode("utf-8") if sys.version_info[0] == 2 else self.table_name) + oprot.writeFieldEnd() + if self.environment_context is not None: + oprot.writeFieldBegin("environment_context", TType.STRUCT, 3) + self.environment_context.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_fields_with_environment_context_args) +get_fields_with_environment_context_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "table_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRUCT, + "environment_context", + [EnvironmentContext, None], + None, + ), # 3 +) + + +class get_fields_with_environment_context_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1289, _size1286) = iprot.readListBegin() + for _i1290 in range(_size1286): + _elem1291 = FieldSchema() + _elem1291.read(iprot) + self.success.append(_elem1291) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = UnknownTableException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = UnknownDBException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_fields_with_environment_context_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter1292 in self.success: + iter1292.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_fields_with_environment_context_result) +get_fields_with_environment_context_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [FieldSchema, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [UnknownTableException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [UnknownDBException, None], + None, + ), # 3 +) + + +class get_fields_req_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = GetFieldsRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_fields_req_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_fields_req_args) +get_fields_req_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [GetFieldsRequest, None], + None, + ), # 1 +) + + +class get_fields_req_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetFieldsResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = UnknownTableException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = UnknownDBException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_fields_req_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_fields_req_result) +get_fields_req_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [GetFieldsResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [UnknownTableException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [UnknownDBException, None], + None, + ), # 3 +) + + +class get_schema_args: + """ + Attributes: + - db_name + - table_name + + """ + + def __init__( + self, + db_name=None, + table_name=None, + ): + self.db_name = db_name + self.table_name = table_name + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.table_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_schema_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.table_name is not None: + oprot.writeFieldBegin("table_name", TType.STRING, 2) + oprot.writeString(self.table_name.encode("utf-8") if sys.version_info[0] == 2 else self.table_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_schema_args) +get_schema_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "table_name", + "UTF8", + None, + ), # 2 +) + + +class get_schema_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1296, _size1293) = iprot.readListBegin() + for _i1297 in range(_size1293): + _elem1298 = FieldSchema() + _elem1298.read(iprot) + self.success.append(_elem1298) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = UnknownTableException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = UnknownDBException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_schema_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter1299 in self.success: + iter1299.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_schema_result) +get_schema_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [FieldSchema, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [UnknownTableException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [UnknownDBException, None], + None, + ), # 3 +) + + +class get_schema_with_environment_context_args: + """ + Attributes: + - db_name + - table_name + - environment_context + + """ + + def __init__( + self, + db_name=None, + table_name=None, + environment_context=None, + ): + self.db_name = db_name + self.table_name = table_name + self.environment_context = environment_context + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.table_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.environment_context = EnvironmentContext() + self.environment_context.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_schema_with_environment_context_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.table_name is not None: + oprot.writeFieldBegin("table_name", TType.STRING, 2) + oprot.writeString(self.table_name.encode("utf-8") if sys.version_info[0] == 2 else self.table_name) + oprot.writeFieldEnd() + if self.environment_context is not None: + oprot.writeFieldBegin("environment_context", TType.STRUCT, 3) + self.environment_context.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_schema_with_environment_context_args) +get_schema_with_environment_context_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "table_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRUCT, + "environment_context", + [EnvironmentContext, None], + None, + ), # 3 +) + + +class get_schema_with_environment_context_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1303, _size1300) = iprot.readListBegin() + for _i1304 in range(_size1300): + _elem1305 = FieldSchema() + _elem1305.read(iprot) + self.success.append(_elem1305) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = UnknownTableException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = UnknownDBException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_schema_with_environment_context_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter1306 in self.success: + iter1306.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_schema_with_environment_context_result) +get_schema_with_environment_context_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [FieldSchema, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [UnknownTableException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [UnknownDBException, None], + None, + ), # 3 +) + + +class get_schema_req_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = GetSchemaRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_schema_req_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_schema_req_args) +get_schema_req_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [GetSchemaRequest, None], + None, + ), # 1 +) + + +class get_schema_req_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetSchemaResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = UnknownTableException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = UnknownDBException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_schema_req_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_schema_req_result) +get_schema_req_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [GetSchemaResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [UnknownTableException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [UnknownDBException, None], + None, + ), # 3 +) + + +class create_table_args: + """ + Attributes: + - tbl + + """ + + def __init__( + self, + tbl=None, + ): + self.tbl = tbl + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.tbl = Table() + self.tbl.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_table_args") + if self.tbl is not None: + oprot.writeFieldBegin("tbl", TType.STRUCT, 1) + self.tbl.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_table_args) +create_table_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "tbl", + [Table, None], + None, + ), # 1 +) + + +class create_table_result: + """ + Attributes: + - o1 + - o2 + - o3 + - o4 + + """ + + def __init__( + self, + o1=None, + o2=None, + o3=None, + o4=None, + ): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_table_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin("o4", TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_table_result) +create_table_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [AlreadyExistsException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "o4", + [NoSuchObjectException, None], + None, + ), # 4 +) + + +class create_table_with_environment_context_args: + """ + Attributes: + - tbl + - environment_context + + """ + + def __init__( + self, + tbl=None, + environment_context=None, + ): + self.tbl = tbl + self.environment_context = environment_context + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.tbl = Table() + self.tbl.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.environment_context = EnvironmentContext() + self.environment_context.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_table_with_environment_context_args") + if self.tbl is not None: + oprot.writeFieldBegin("tbl", TType.STRUCT, 1) + self.tbl.write(oprot) + oprot.writeFieldEnd() + if self.environment_context is not None: + oprot.writeFieldBegin("environment_context", TType.STRUCT, 2) + self.environment_context.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_table_with_environment_context_args) +create_table_with_environment_context_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "tbl", + [Table, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "environment_context", + [EnvironmentContext, None], + None, + ), # 2 +) + + +class create_table_with_environment_context_result: + """ + Attributes: + - o1 + - o2 + - o3 + - o4 + + """ + + def __init__( + self, + o1=None, + o2=None, + o3=None, + o4=None, + ): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_table_with_environment_context_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin("o4", TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_table_with_environment_context_result) +create_table_with_environment_context_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [AlreadyExistsException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "o4", + [NoSuchObjectException, None], + None, + ), # 4 +) + + +class create_table_with_constraints_args: + """ + Attributes: + - tbl + - primaryKeys + - foreignKeys + - uniqueConstraints + - notNullConstraints + - defaultConstraints + - checkConstraints + + """ + + def __init__( + self, + tbl=None, + primaryKeys=None, + foreignKeys=None, + uniqueConstraints=None, + notNullConstraints=None, + defaultConstraints=None, + checkConstraints=None, + ): + self.tbl = tbl + self.primaryKeys = primaryKeys + self.foreignKeys = foreignKeys + self.uniqueConstraints = uniqueConstraints + self.notNullConstraints = notNullConstraints + self.defaultConstraints = defaultConstraints + self.checkConstraints = checkConstraints + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.tbl = Table() + self.tbl.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.primaryKeys = [] + (_etype1310, _size1307) = iprot.readListBegin() + for _i1311 in range(_size1307): + _elem1312 = SQLPrimaryKey() + _elem1312.read(iprot) + self.primaryKeys.append(_elem1312) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.foreignKeys = [] + (_etype1316, _size1313) = iprot.readListBegin() + for _i1317 in range(_size1313): + _elem1318 = SQLForeignKey() + _elem1318.read(iprot) + self.foreignKeys.append(_elem1318) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.uniqueConstraints = [] + (_etype1322, _size1319) = iprot.readListBegin() + for _i1323 in range(_size1319): + _elem1324 = SQLUniqueConstraint() + _elem1324.read(iprot) + self.uniqueConstraints.append(_elem1324) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.notNullConstraints = [] + (_etype1328, _size1325) = iprot.readListBegin() + for _i1329 in range(_size1325): + _elem1330 = SQLNotNullConstraint() + _elem1330.read(iprot) + self.notNullConstraints.append(_elem1330) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.LIST: + self.defaultConstraints = [] + (_etype1334, _size1331) = iprot.readListBegin() + for _i1335 in range(_size1331): + _elem1336 = SQLDefaultConstraint() + _elem1336.read(iprot) + self.defaultConstraints.append(_elem1336) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.LIST: + self.checkConstraints = [] + (_etype1340, _size1337) = iprot.readListBegin() + for _i1341 in range(_size1337): + _elem1342 = SQLCheckConstraint() + _elem1342.read(iprot) + self.checkConstraints.append(_elem1342) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_table_with_constraints_args") + if self.tbl is not None: + oprot.writeFieldBegin("tbl", TType.STRUCT, 1) + self.tbl.write(oprot) + oprot.writeFieldEnd() + if self.primaryKeys is not None: + oprot.writeFieldBegin("primaryKeys", TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.primaryKeys)) + for iter1343 in self.primaryKeys: + iter1343.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.foreignKeys is not None: + oprot.writeFieldBegin("foreignKeys", TType.LIST, 3) + oprot.writeListBegin(TType.STRUCT, len(self.foreignKeys)) + for iter1344 in self.foreignKeys: + iter1344.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.uniqueConstraints is not None: + oprot.writeFieldBegin("uniqueConstraints", TType.LIST, 4) + oprot.writeListBegin(TType.STRUCT, len(self.uniqueConstraints)) + for iter1345 in self.uniqueConstraints: + iter1345.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.notNullConstraints is not None: + oprot.writeFieldBegin("notNullConstraints", TType.LIST, 5) + oprot.writeListBegin(TType.STRUCT, len(self.notNullConstraints)) + for iter1346 in self.notNullConstraints: + iter1346.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.defaultConstraints is not None: + oprot.writeFieldBegin("defaultConstraints", TType.LIST, 6) + oprot.writeListBegin(TType.STRUCT, len(self.defaultConstraints)) + for iter1347 in self.defaultConstraints: + iter1347.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.checkConstraints is not None: + oprot.writeFieldBegin("checkConstraints", TType.LIST, 7) + oprot.writeListBegin(TType.STRUCT, len(self.checkConstraints)) + for iter1348 in self.checkConstraints: + iter1348.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_table_with_constraints_args) +create_table_with_constraints_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "tbl", + [Table, None], + None, + ), # 1 + ( + 2, + TType.LIST, + "primaryKeys", + (TType.STRUCT, [SQLPrimaryKey, None], False), + None, + ), # 2 + ( + 3, + TType.LIST, + "foreignKeys", + (TType.STRUCT, [SQLForeignKey, None], False), + None, + ), # 3 + ( + 4, + TType.LIST, + "uniqueConstraints", + (TType.STRUCT, [SQLUniqueConstraint, None], False), + None, + ), # 4 + ( + 5, + TType.LIST, + "notNullConstraints", + (TType.STRUCT, [SQLNotNullConstraint, None], False), + None, + ), # 5 + ( + 6, + TType.LIST, + "defaultConstraints", + (TType.STRUCT, [SQLDefaultConstraint, None], False), + None, + ), # 6 + ( + 7, + TType.LIST, + "checkConstraints", + (TType.STRUCT, [SQLCheckConstraint, None], False), + None, + ), # 7 +) + + +class create_table_with_constraints_result: + """ + Attributes: + - o1 + - o2 + - o3 + - o4 + + """ + + def __init__( + self, + o1=None, + o2=None, + o3=None, + o4=None, + ): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_table_with_constraints_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin("o4", TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_table_with_constraints_result) +create_table_with_constraints_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [AlreadyExistsException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "o4", + [NoSuchObjectException, None], + None, + ), # 4 +) + + +class create_table_req_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = CreateTableRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_table_req_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_table_req_args) +create_table_req_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [CreateTableRequest, None], + None, + ), # 1 +) + + +class create_table_req_result: + """ + Attributes: + - o1 + - o2 + - o3 + - o4 + + """ + + def __init__( + self, + o1=None, + o2=None, + o3=None, + o4=None, + ): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_table_req_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin("o4", TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_table_req_result) +create_table_req_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [AlreadyExistsException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "o4", + [NoSuchObjectException, None], + None, + ), # 4 +) + + +class drop_constraint_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = DropConstraintRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_constraint_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_constraint_args) +drop_constraint_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [DropConstraintRequest, None], + None, + ), # 1 +) + + +class drop_constraint_result: + """ + Attributes: + - o1 + - o3 + + """ + + def __init__( + self, + o1=None, + o3=None, + ): + self.o1 = o1 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_constraint_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 2) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_constraint_result) +drop_constraint_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 2 +) + + +class add_primary_key_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = AddPrimaryKeyRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_primary_key_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_primary_key_args) +add_primary_key_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [AddPrimaryKeyRequest, None], + None, + ), # 1 +) + + +class add_primary_key_result: + """ + Attributes: + - o1 + - o2 + + """ + + def __init__( + self, + o1=None, + o2=None, + ): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_primary_key_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_primary_key_result) +add_primary_key_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class add_foreign_key_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = AddForeignKeyRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_foreign_key_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_foreign_key_args) +add_foreign_key_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [AddForeignKeyRequest, None], + None, + ), # 1 +) + + +class add_foreign_key_result: + """ + Attributes: + - o1 + - o2 + + """ + + def __init__( + self, + o1=None, + o2=None, + ): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_foreign_key_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_foreign_key_result) +add_foreign_key_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class add_unique_constraint_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = AddUniqueConstraintRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_unique_constraint_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_unique_constraint_args) +add_unique_constraint_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [AddUniqueConstraintRequest, None], + None, + ), # 1 +) + + +class add_unique_constraint_result: + """ + Attributes: + - o1 + - o2 + + """ + + def __init__( + self, + o1=None, + o2=None, + ): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_unique_constraint_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_unique_constraint_result) +add_unique_constraint_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class add_not_null_constraint_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = AddNotNullConstraintRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_not_null_constraint_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_not_null_constraint_args) +add_not_null_constraint_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [AddNotNullConstraintRequest, None], + None, + ), # 1 +) + + +class add_not_null_constraint_result: + """ + Attributes: + - o1 + - o2 + + """ + + def __init__( + self, + o1=None, + o2=None, + ): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_not_null_constraint_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_not_null_constraint_result) +add_not_null_constraint_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class add_default_constraint_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = AddDefaultConstraintRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_default_constraint_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_default_constraint_args) +add_default_constraint_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [AddDefaultConstraintRequest, None], + None, + ), # 1 +) + + +class add_default_constraint_result: + """ + Attributes: + - o1 + - o2 + + """ + + def __init__( + self, + o1=None, + o2=None, + ): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_default_constraint_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_default_constraint_result) +add_default_constraint_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class add_check_constraint_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = AddCheckConstraintRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_check_constraint_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_check_constraint_args) +add_check_constraint_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [AddCheckConstraintRequest, None], + None, + ), # 1 +) + + +class add_check_constraint_result: + """ + Attributes: + - o1 + - o2 + + """ + + def __init__( + self, + o1=None, + o2=None, + ): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_check_constraint_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_check_constraint_result) +add_check_constraint_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class translate_table_dryrun_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = CreateTableRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("translate_table_dryrun_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(translate_table_dryrun_args) +translate_table_dryrun_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [CreateTableRequest, None], + None, + ), # 1 +) + + +class translate_table_dryrun_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + o4=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Table() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("translate_table_dryrun_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin("o4", TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(translate_table_dryrun_result) +translate_table_dryrun_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [Table, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [AlreadyExistsException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "o4", + [NoSuchObjectException, None], + None, + ), # 4 +) + + +class drop_table_args: + """ + Attributes: + - dbname + - name + - deleteData + + """ + + def __init__( + self, + dbname=None, + name=None, + deleteData=None, + ): + self.dbname = dbname + self.name = name + self.deleteData = deleteData + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_table_args") + if self.dbname is not None: + oprot.writeFieldBegin("dbname", TType.STRING, 1) + oprot.writeString(self.dbname.encode("utf-8") if sys.version_info[0] == 2 else self.dbname) + oprot.writeFieldEnd() + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRING, 2) + oprot.writeString(self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + if self.deleteData is not None: + oprot.writeFieldBegin("deleteData", TType.BOOL, 3) + oprot.writeBool(self.deleteData) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_table_args) +drop_table_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbname", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.BOOL, + "deleteData", + None, + None, + ), # 3 +) + + +class drop_table_result: + """ + Attributes: + - o1 + - o3 + + """ + + def __init__( + self, + o1=None, + o3=None, + ): + self.o1 = o1 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_table_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 2) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_table_result) +drop_table_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 2 +) + + +class drop_table_with_environment_context_args: + """ + Attributes: + - dbname + - name + - deleteData + - environment_context + + """ + + def __init__( + self, + dbname=None, + name=None, + deleteData=None, + environment_context=None, + ): + self.dbname = dbname + self.name = name + self.deleteData = deleteData + self.environment_context = environment_context + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.environment_context = EnvironmentContext() + self.environment_context.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_table_with_environment_context_args") + if self.dbname is not None: + oprot.writeFieldBegin("dbname", TType.STRING, 1) + oprot.writeString(self.dbname.encode("utf-8") if sys.version_info[0] == 2 else self.dbname) + oprot.writeFieldEnd() + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRING, 2) + oprot.writeString(self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + if self.deleteData is not None: + oprot.writeFieldBegin("deleteData", TType.BOOL, 3) + oprot.writeBool(self.deleteData) + oprot.writeFieldEnd() + if self.environment_context is not None: + oprot.writeFieldBegin("environment_context", TType.STRUCT, 4) + self.environment_context.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_table_with_environment_context_args) +drop_table_with_environment_context_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbname", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.BOOL, + "deleteData", + None, + None, + ), # 3 + ( + 4, + TType.STRUCT, + "environment_context", + [EnvironmentContext, None], + None, + ), # 4 +) + + +class drop_table_with_environment_context_result: + """ + Attributes: + - o1 + - o3 + + """ + + def __init__( + self, + o1=None, + o3=None, + ): + self.o1 = o1 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_table_with_environment_context_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 2) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_table_with_environment_context_result) +drop_table_with_environment_context_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 2 +) + + +class truncate_table_args: + """ + Attributes: + - dbName + - tableName + - partNames + + """ + + def __init__( + self, + dbName=None, + tableName=None, + partNames=None, + ): + self.dbName = dbName + self.tableName = tableName + self.partNames = partNames + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tableName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.partNames = [] + (_etype1352, _size1349) = iprot.readListBegin() + for _i1353 in range(_size1349): + _elem1354 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.partNames.append(_elem1354) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("truncate_table_args") + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 1) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tableName is not None: + oprot.writeFieldBegin("tableName", TType.STRING, 2) + oprot.writeString(self.tableName.encode("utf-8") if sys.version_info[0] == 2 else self.tableName) + oprot.writeFieldEnd() + if self.partNames is not None: + oprot.writeFieldBegin("partNames", TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.partNames)) + for iter1355 in self.partNames: + oprot.writeString(iter1355.encode("utf-8") if sys.version_info[0] == 2 else iter1355) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(truncate_table_args) +truncate_table_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tableName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "partNames", + (TType.STRING, "UTF8", False), + None, + ), # 3 +) + + +class truncate_table_result: + """ + Attributes: + - o1 + + """ + + def __init__( + self, + o1=None, + ): + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("truncate_table_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(truncate_table_result) +truncate_table_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class truncate_table_req_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = TruncateTableRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("truncate_table_req_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(truncate_table_req_args) +truncate_table_req_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [TruncateTableRequest, None], + None, + ), # 1 +) + + +class truncate_table_req_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = TruncateTableResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("truncate_table_req_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(truncate_table_req_result) +truncate_table_req_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [TruncateTableResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class get_tables_args: + """ + Attributes: + - db_name + - pattern + + """ + + def __init__( + self, + db_name=None, + pattern=None, + ): + self.db_name = db_name + self.pattern = pattern + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.pattern = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_tables_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.pattern is not None: + oprot.writeFieldBegin("pattern", TType.STRING, 2) + oprot.writeString(self.pattern.encode("utf-8") if sys.version_info[0] == 2 else self.pattern) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_tables_args) +get_tables_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "pattern", + "UTF8", + None, + ), # 2 +) + + +class get_tables_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1359, _size1356) = iprot.readListBegin() + for _i1360 in range(_size1356): + _elem1361 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success.append(_elem1361) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_tables_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter1362 in self.success: + oprot.writeString(iter1362.encode("utf-8") if sys.version_info[0] == 2 else iter1362) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_tables_result) +get_tables_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class get_tables_by_type_args: + """ + Attributes: + - db_name + - pattern + - tableType + + """ + + def __init__( + self, + db_name=None, + pattern=None, + tableType=None, + ): + self.db_name = db_name + self.pattern = pattern + self.tableType = tableType + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.pattern = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tableType = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_tables_by_type_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.pattern is not None: + oprot.writeFieldBegin("pattern", TType.STRING, 2) + oprot.writeString(self.pattern.encode("utf-8") if sys.version_info[0] == 2 else self.pattern) + oprot.writeFieldEnd() + if self.tableType is not None: + oprot.writeFieldBegin("tableType", TType.STRING, 3) + oprot.writeString(self.tableType.encode("utf-8") if sys.version_info[0] == 2 else self.tableType) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_tables_by_type_args) +get_tables_by_type_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "pattern", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "tableType", + "UTF8", + None, + ), # 3 +) + + +class get_tables_by_type_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1366, _size1363) = iprot.readListBegin() + for _i1367 in range(_size1363): + _elem1368 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success.append(_elem1368) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_tables_by_type_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter1369 in self.success: + oprot.writeString(iter1369.encode("utf-8") if sys.version_info[0] == 2 else iter1369) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_tables_by_type_result) +get_tables_by_type_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class get_all_materialized_view_objects_for_rewriting_args: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_all_materialized_view_objects_for_rewriting_args") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_all_materialized_view_objects_for_rewriting_args) +get_all_materialized_view_objects_for_rewriting_args.thrift_spec = () + + +class get_all_materialized_view_objects_for_rewriting_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1373, _size1370) = iprot.readListBegin() + for _i1374 in range(_size1370): + _elem1375 = Table() + _elem1375.read(iprot) + self.success.append(_elem1375) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_all_materialized_view_objects_for_rewriting_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter1376 in self.success: + iter1376.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_all_materialized_view_objects_for_rewriting_result) +get_all_materialized_view_objects_for_rewriting_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Table, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class get_materialized_views_for_rewriting_args: + """ + Attributes: + - db_name + + """ + + def __init__( + self, + db_name=None, + ): + self.db_name = db_name + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_materialized_views_for_rewriting_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_materialized_views_for_rewriting_args) +get_materialized_views_for_rewriting_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 +) + + +class get_materialized_views_for_rewriting_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1380, _size1377) = iprot.readListBegin() + for _i1381 in range(_size1377): + _elem1382 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success.append(_elem1382) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_materialized_views_for_rewriting_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter1383 in self.success: + oprot.writeString(iter1383.encode("utf-8") if sys.version_info[0] == 2 else iter1383) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_materialized_views_for_rewriting_result) +get_materialized_views_for_rewriting_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class get_table_meta_args: + """ + Attributes: + - db_patterns + - tbl_patterns + - tbl_types + + """ + + def __init__( + self, + db_patterns=None, + tbl_patterns=None, + tbl_types=None, + ): + self.db_patterns = db_patterns + self.tbl_patterns = tbl_patterns + self.tbl_types = tbl_types + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_patterns = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_patterns = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.tbl_types = [] + (_etype1387, _size1384) = iprot.readListBegin() + for _i1388 in range(_size1384): + _elem1389 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.tbl_types.append(_elem1389) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_table_meta_args") + if self.db_patterns is not None: + oprot.writeFieldBegin("db_patterns", TType.STRING, 1) + oprot.writeString(self.db_patterns.encode("utf-8") if sys.version_info[0] == 2 else self.db_patterns) + oprot.writeFieldEnd() + if self.tbl_patterns is not None: + oprot.writeFieldBegin("tbl_patterns", TType.STRING, 2) + oprot.writeString(self.tbl_patterns.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_patterns) + oprot.writeFieldEnd() + if self.tbl_types is not None: + oprot.writeFieldBegin("tbl_types", TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.tbl_types)) + for iter1390 in self.tbl_types: + oprot.writeString(iter1390.encode("utf-8") if sys.version_info[0] == 2 else iter1390) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_table_meta_args) +get_table_meta_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_patterns", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_patterns", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "tbl_types", + (TType.STRING, "UTF8", False), + None, + ), # 3 +) + + +class get_table_meta_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1394, _size1391) = iprot.readListBegin() + for _i1395 in range(_size1391): + _elem1396 = TableMeta() + _elem1396.read(iprot) + self.success.append(_elem1396) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_table_meta_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter1397 in self.success: + iter1397.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_table_meta_result) +get_table_meta_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [TableMeta, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class get_all_tables_args: + """ + Attributes: + - db_name + + """ + + def __init__( + self, + db_name=None, + ): + self.db_name = db_name + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_all_tables_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_all_tables_args) +get_all_tables_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 +) + + +class get_all_tables_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1401, _size1398) = iprot.readListBegin() + for _i1402 in range(_size1398): + _elem1403 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success.append(_elem1403) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_all_tables_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter1404 in self.success: + oprot.writeString(iter1404.encode("utf-8") if sys.version_info[0] == 2 else iter1404) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_all_tables_result) +get_all_tables_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class get_table_args: + """ + Attributes: + - dbname + - tbl_name + + """ + + def __init__( + self, + dbname=None, + tbl_name=None, + ): + self.dbname = dbname + self.tbl_name = tbl_name + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_table_args") + if self.dbname is not None: + oprot.writeFieldBegin("dbname", TType.STRING, 1) + oprot.writeString(self.dbname.encode("utf-8") if sys.version_info[0] == 2 else self.dbname) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_table_args) +get_table_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbname", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 +) + + +class get_table_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Table() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_table_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_table_result) +get_table_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [Table, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class get_table_objects_by_name_args: + """ + Attributes: + - dbname + - tbl_names + + """ + + def __init__( + self, + dbname=None, + tbl_names=None, + ): + self.dbname = dbname + self.tbl_names = tbl_names + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.tbl_names = [] + (_etype1408, _size1405) = iprot.readListBegin() + for _i1409 in range(_size1405): + _elem1410 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.tbl_names.append(_elem1410) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_table_objects_by_name_args") + if self.dbname is not None: + oprot.writeFieldBegin("dbname", TType.STRING, 1) + oprot.writeString(self.dbname.encode("utf-8") if sys.version_info[0] == 2 else self.dbname) + oprot.writeFieldEnd() + if self.tbl_names is not None: + oprot.writeFieldBegin("tbl_names", TType.LIST, 2) + oprot.writeListBegin(TType.STRING, len(self.tbl_names)) + for iter1411 in self.tbl_names: + oprot.writeString(iter1411.encode("utf-8") if sys.version_info[0] == 2 else iter1411) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_table_objects_by_name_args) +get_table_objects_by_name_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbname", + "UTF8", + None, + ), # 1 + ( + 2, + TType.LIST, + "tbl_names", + (TType.STRING, "UTF8", False), + None, + ), # 2 +) + + +class get_table_objects_by_name_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1415, _size1412) = iprot.readListBegin() + for _i1416 in range(_size1412): + _elem1417 = Table() + _elem1417.read(iprot) + self.success.append(_elem1417) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_table_objects_by_name_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter1418 in self.success: + iter1418.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_table_objects_by_name_result) +get_table_objects_by_name_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Table, None], False), + None, + ), # 0 +) + + +class get_tables_ext_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = GetTablesExtRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_tables_ext_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_tables_ext_args) +get_tables_ext_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [GetTablesExtRequest, None], + None, + ), # 1 +) + + +class get_tables_ext_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1422, _size1419) = iprot.readListBegin() + for _i1423 in range(_size1419): + _elem1424 = ExtendedTableInfo() + _elem1424.read(iprot) + self.success.append(_elem1424) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_tables_ext_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter1425 in self.success: + iter1425.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_tables_ext_result) +get_tables_ext_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [ExtendedTableInfo, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class get_table_req_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = GetTableRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_table_req_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_table_req_args) +get_table_req_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [GetTableRequest, None], + None, + ), # 1 +) + + +class get_table_req_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetTableResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_table_req_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_table_req_result) +get_table_req_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [GetTableResult, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class get_table_objects_by_name_req_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = GetTablesRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_table_objects_by_name_req_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_table_objects_by_name_req_args) +get_table_objects_by_name_req_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [GetTablesRequest, None], + None, + ), # 1 +) + + +class get_table_objects_by_name_req_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetTablesResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = UnknownDBException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_table_objects_by_name_req_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_table_objects_by_name_req_result) +get_table_objects_by_name_req_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [GetTablesResult, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidOperationException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [UnknownDBException, None], + None, + ), # 3 +) + + +class get_materialization_invalidation_info_args: + """ + Attributes: + - creation_metadata + - validTxnList + + """ + + def __init__( + self, + creation_metadata=None, + validTxnList=None, + ): + self.creation_metadata = creation_metadata + self.validTxnList = validTxnList + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.creation_metadata = CreationMetadata() + self.creation_metadata.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.validTxnList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_materialization_invalidation_info_args") + if self.creation_metadata is not None: + oprot.writeFieldBegin("creation_metadata", TType.STRUCT, 1) + self.creation_metadata.write(oprot) + oprot.writeFieldEnd() + if self.validTxnList is not None: + oprot.writeFieldBegin("validTxnList", TType.STRING, 2) + oprot.writeString(self.validTxnList.encode("utf-8") if sys.version_info[0] == 2 else self.validTxnList) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_materialization_invalidation_info_args) +get_materialization_invalidation_info_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "creation_metadata", + [CreationMetadata, None], + None, + ), # 1 + ( + 2, + TType.STRING, + "validTxnList", + "UTF8", + None, + ), # 2 +) + + +class get_materialization_invalidation_info_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Materialization() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = UnknownDBException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_materialization_invalidation_info_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_materialization_invalidation_info_result) +get_materialization_invalidation_info_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [Materialization, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidOperationException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [UnknownDBException, None], + None, + ), # 3 +) + + +class update_creation_metadata_args: + """ + Attributes: + - catName + - dbname + - tbl_name + - creation_metadata + + """ + + def __init__( + self, + catName=None, + dbname=None, + tbl_name=None, + creation_metadata=None, + ): + self.catName = catName + self.dbname = dbname + self.tbl_name = tbl_name + self.creation_metadata = creation_metadata + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.creation_metadata = CreationMetadata() + self.creation_metadata.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("update_creation_metadata_args") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.dbname is not None: + oprot.writeFieldBegin("dbname", TType.STRING, 2) + oprot.writeString(self.dbname.encode("utf-8") if sys.version_info[0] == 2 else self.dbname) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 3) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.creation_metadata is not None: + oprot.writeFieldBegin("creation_metadata", TType.STRUCT, 4) + self.creation_metadata.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(update_creation_metadata_args) +update_creation_metadata_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "dbname", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRUCT, + "creation_metadata", + [CreationMetadata, None], + None, + ), # 4 +) + + +class update_creation_metadata_result: + """ + Attributes: + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + o1=None, + o2=None, + o3=None, + ): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = UnknownDBException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("update_creation_metadata_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(update_creation_metadata_result) +update_creation_metadata_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidOperationException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [UnknownDBException, None], + None, + ), # 3 +) + + +class get_table_names_by_filter_args: + """ + Attributes: + - dbname + - filter + - max_tables + + """ + + def __init__( + self, + dbname=None, + filter=None, + max_tables=-1, + ): + self.dbname = dbname + self.filter = filter + self.max_tables = max_tables + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.filter = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I16: + self.max_tables = iprot.readI16() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_table_names_by_filter_args") + if self.dbname is not None: + oprot.writeFieldBegin("dbname", TType.STRING, 1) + oprot.writeString(self.dbname.encode("utf-8") if sys.version_info[0] == 2 else self.dbname) + oprot.writeFieldEnd() + if self.filter is not None: + oprot.writeFieldBegin("filter", TType.STRING, 2) + oprot.writeString(self.filter.encode("utf-8") if sys.version_info[0] == 2 else self.filter) + oprot.writeFieldEnd() + if self.max_tables is not None: + oprot.writeFieldBegin("max_tables", TType.I16, 3) + oprot.writeI16(self.max_tables) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_table_names_by_filter_args) +get_table_names_by_filter_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbname", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "filter", + "UTF8", + None, + ), # 2 + ( + 3, + TType.I16, + "max_tables", + None, + -1, + ), # 3 +) + + +class get_table_names_by_filter_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1429, _size1426) = iprot.readListBegin() + for _i1430 in range(_size1426): + _elem1431 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success.append(_elem1431) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = UnknownDBException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_table_names_by_filter_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter1432 in self.success: + oprot.writeString(iter1432.encode("utf-8") if sys.version_info[0] == 2 else iter1432) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_table_names_by_filter_result) +get_table_names_by_filter_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidOperationException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [UnknownDBException, None], + None, + ), # 3 +) + + +class alter_table_args: + """ + Attributes: + - dbname + - tbl_name + - new_tbl + + """ + + def __init__( + self, + dbname=None, + tbl_name=None, + new_tbl=None, + ): + self.dbname = dbname + self.tbl_name = tbl_name + self.new_tbl = new_tbl + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.new_tbl = Table() + self.new_tbl.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_table_args") + if self.dbname is not None: + oprot.writeFieldBegin("dbname", TType.STRING, 1) + oprot.writeString(self.dbname.encode("utf-8") if sys.version_info[0] == 2 else self.dbname) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.new_tbl is not None: + oprot.writeFieldBegin("new_tbl", TType.STRUCT, 3) + self.new_tbl.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_table_args) +alter_table_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbname", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRUCT, + "new_tbl", + [Table, None], + None, + ), # 3 +) + + +class alter_table_result: + """ + Attributes: + - o1 + - o2 + + """ + + def __init__( + self, + o1=None, + o2=None, + ): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_table_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_table_result) +alter_table_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [InvalidOperationException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class alter_table_with_environment_context_args: + """ + Attributes: + - dbname + - tbl_name + - new_tbl + - environment_context + + """ + + def __init__( + self, + dbname=None, + tbl_name=None, + new_tbl=None, + environment_context=None, + ): + self.dbname = dbname + self.tbl_name = tbl_name + self.new_tbl = new_tbl + self.environment_context = environment_context + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.new_tbl = Table() + self.new_tbl.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.environment_context = EnvironmentContext() + self.environment_context.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_table_with_environment_context_args") + if self.dbname is not None: + oprot.writeFieldBegin("dbname", TType.STRING, 1) + oprot.writeString(self.dbname.encode("utf-8") if sys.version_info[0] == 2 else self.dbname) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.new_tbl is not None: + oprot.writeFieldBegin("new_tbl", TType.STRUCT, 3) + self.new_tbl.write(oprot) + oprot.writeFieldEnd() + if self.environment_context is not None: + oprot.writeFieldBegin("environment_context", TType.STRUCT, 4) + self.environment_context.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_table_with_environment_context_args) +alter_table_with_environment_context_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbname", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRUCT, + "new_tbl", + [Table, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "environment_context", + [EnvironmentContext, None], + None, + ), # 4 +) + + +class alter_table_with_environment_context_result: + """ + Attributes: + - o1 + - o2 + + """ + + def __init__( + self, + o1=None, + o2=None, + ): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_table_with_environment_context_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_table_with_environment_context_result) +alter_table_with_environment_context_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [InvalidOperationException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class alter_table_with_cascade_args: + """ + Attributes: + - dbname + - tbl_name + - new_tbl + - cascade + + """ + + def __init__( + self, + dbname=None, + tbl_name=None, + new_tbl=None, + cascade=None, + ): + self.dbname = dbname + self.tbl_name = tbl_name + self.new_tbl = new_tbl + self.cascade = cascade + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.new_tbl = Table() + self.new_tbl.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.cascade = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_table_with_cascade_args") + if self.dbname is not None: + oprot.writeFieldBegin("dbname", TType.STRING, 1) + oprot.writeString(self.dbname.encode("utf-8") if sys.version_info[0] == 2 else self.dbname) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.new_tbl is not None: + oprot.writeFieldBegin("new_tbl", TType.STRUCT, 3) + self.new_tbl.write(oprot) + oprot.writeFieldEnd() + if self.cascade is not None: + oprot.writeFieldBegin("cascade", TType.BOOL, 4) + oprot.writeBool(self.cascade) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_table_with_cascade_args) +alter_table_with_cascade_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbname", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRUCT, + "new_tbl", + [Table, None], + None, + ), # 3 + ( + 4, + TType.BOOL, + "cascade", + None, + None, + ), # 4 +) + + +class alter_table_with_cascade_result: + """ + Attributes: + - o1 + - o2 + + """ + + def __init__( + self, + o1=None, + o2=None, + ): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_table_with_cascade_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_table_with_cascade_result) +alter_table_with_cascade_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [InvalidOperationException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class alter_table_req_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = AlterTableRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_table_req_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_table_req_args) +alter_table_req_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [AlterTableRequest, None], + None, + ), # 1 +) + + +class alter_table_req_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = AlterTableResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_table_req_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_table_req_result) +alter_table_req_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [AlterTableResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [InvalidOperationException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class add_partition_args: + """ + Attributes: + - new_part + + """ + + def __init__( + self, + new_part=None, + ): + self.new_part = new_part + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.new_part = Partition() + self.new_part.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_partition_args") + if self.new_part is not None: + oprot.writeFieldBegin("new_part", TType.STRUCT, 1) + self.new_part.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_partition_args) +add_partition_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "new_part", + [Partition, None], + None, + ), # 1 +) + + +class add_partition_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_partition_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_partition_result) +add_partition_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [Partition, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [InvalidObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [AlreadyExistsException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class add_partition_with_environment_context_args: + """ + Attributes: + - new_part + - environment_context + + """ + + def __init__( + self, + new_part=None, + environment_context=None, + ): + self.new_part = new_part + self.environment_context = environment_context + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.new_part = Partition() + self.new_part.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.environment_context = EnvironmentContext() + self.environment_context.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_partition_with_environment_context_args") + if self.new_part is not None: + oprot.writeFieldBegin("new_part", TType.STRUCT, 1) + self.new_part.write(oprot) + oprot.writeFieldEnd() + if self.environment_context is not None: + oprot.writeFieldBegin("environment_context", TType.STRUCT, 2) + self.environment_context.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_partition_with_environment_context_args) +add_partition_with_environment_context_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "new_part", + [Partition, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "environment_context", + [EnvironmentContext, None], + None, + ), # 2 +) + + +class add_partition_with_environment_context_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_partition_with_environment_context_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_partition_with_environment_context_result) +add_partition_with_environment_context_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [Partition, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [InvalidObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [AlreadyExistsException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class add_partitions_args: + """ + Attributes: + - new_parts + + """ + + def __init__( + self, + new_parts=None, + ): + self.new_parts = new_parts + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.new_parts = [] + (_etype1436, _size1433) = iprot.readListBegin() + for _i1437 in range(_size1433): + _elem1438 = Partition() + _elem1438.read(iprot) + self.new_parts.append(_elem1438) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_partitions_args") + if self.new_parts is not None: + oprot.writeFieldBegin("new_parts", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.new_parts)) + for iter1439 in self.new_parts: + iter1439.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_partitions_args) +add_partitions_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "new_parts", + (TType.STRUCT, [Partition, None], False), + None, + ), # 1 +) + + +class add_partitions_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I32: + self.success = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_partitions_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_partitions_result) +add_partitions_result.thrift_spec = ( + ( + 0, + TType.I32, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [InvalidObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [AlreadyExistsException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class add_partitions_pspec_args: + """ + Attributes: + - new_parts + + """ + + def __init__( + self, + new_parts=None, + ): + self.new_parts = new_parts + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.new_parts = [] + (_etype1443, _size1440) = iprot.readListBegin() + for _i1444 in range(_size1440): + _elem1445 = PartitionSpec() + _elem1445.read(iprot) + self.new_parts.append(_elem1445) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_partitions_pspec_args") + if self.new_parts is not None: + oprot.writeFieldBegin("new_parts", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.new_parts)) + for iter1446 in self.new_parts: + iter1446.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_partitions_pspec_args) +add_partitions_pspec_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "new_parts", + (TType.STRUCT, [PartitionSpec, None], False), + None, + ), # 1 +) + + +class add_partitions_pspec_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I32: + self.success = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_partitions_pspec_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_partitions_pspec_result) +add_partitions_pspec_result.thrift_spec = ( + ( + 0, + TType.I32, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [InvalidObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [AlreadyExistsException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class append_partition_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + part_vals=None, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype1450, _size1447) = iprot.readListBegin() + for _i1451 in range(_size1447): + _elem1452 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.part_vals.append(_elem1452) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("append_partition_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals is not None: + oprot.writeFieldBegin("part_vals", TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter1453 in self.part_vals: + oprot.writeString(iter1453.encode("utf-8") if sys.version_info[0] == 2 else iter1453) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(append_partition_args) +append_partition_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "part_vals", + (TType.STRING, "UTF8", False), + None, + ), # 3 +) + + +class append_partition_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("append_partition_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(append_partition_result) +append_partition_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [Partition, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [InvalidObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [AlreadyExistsException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class add_partitions_req_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = AddPartitionsRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_partitions_req_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_partitions_req_args) +add_partitions_req_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [AddPartitionsRequest, None], + None, + ), # 1 +) + + +class add_partitions_req_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = AddPartitionsResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_partitions_req_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_partitions_req_result) +add_partitions_req_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [AddPartitionsResult, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [InvalidObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [AlreadyExistsException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class append_partition_with_environment_context_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + - environment_context + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + part_vals=None, + environment_context=None, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.environment_context = environment_context + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype1457, _size1454) = iprot.readListBegin() + for _i1458 in range(_size1454): + _elem1459 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.part_vals.append(_elem1459) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.environment_context = EnvironmentContext() + self.environment_context.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("append_partition_with_environment_context_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals is not None: + oprot.writeFieldBegin("part_vals", TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter1460 in self.part_vals: + oprot.writeString(iter1460.encode("utf-8") if sys.version_info[0] == 2 else iter1460) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.environment_context is not None: + oprot.writeFieldBegin("environment_context", TType.STRUCT, 4) + self.environment_context.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(append_partition_with_environment_context_args) +append_partition_with_environment_context_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "part_vals", + (TType.STRING, "UTF8", False), + None, + ), # 3 + ( + 4, + TType.STRUCT, + "environment_context", + [EnvironmentContext, None], + None, + ), # 4 +) + + +class append_partition_with_environment_context_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("append_partition_with_environment_context_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(append_partition_with_environment_context_result) +append_partition_with_environment_context_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [Partition, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [InvalidObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [AlreadyExistsException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class append_partition_by_name_args: + """ + Attributes: + - db_name + - tbl_name + - part_name + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + part_name=None, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_name = part_name + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.part_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("append_partition_by_name_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.part_name is not None: + oprot.writeFieldBegin("part_name", TType.STRING, 3) + oprot.writeString(self.part_name.encode("utf-8") if sys.version_info[0] == 2 else self.part_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(append_partition_by_name_args) +append_partition_by_name_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "part_name", + "UTF8", + None, + ), # 3 +) + + +class append_partition_by_name_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("append_partition_by_name_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(append_partition_by_name_result) +append_partition_by_name_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [Partition, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [InvalidObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [AlreadyExistsException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class append_partition_by_name_with_environment_context_args: + """ + Attributes: + - db_name + - tbl_name + - part_name + - environment_context + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + part_name=None, + environment_context=None, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_name = part_name + self.environment_context = environment_context + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.part_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.environment_context = EnvironmentContext() + self.environment_context.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("append_partition_by_name_with_environment_context_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.part_name is not None: + oprot.writeFieldBegin("part_name", TType.STRING, 3) + oprot.writeString(self.part_name.encode("utf-8") if sys.version_info[0] == 2 else self.part_name) + oprot.writeFieldEnd() + if self.environment_context is not None: + oprot.writeFieldBegin("environment_context", TType.STRUCT, 4) + self.environment_context.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(append_partition_by_name_with_environment_context_args) +append_partition_by_name_with_environment_context_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "part_name", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRUCT, + "environment_context", + [EnvironmentContext, None], + None, + ), # 4 +) + + +class append_partition_by_name_with_environment_context_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("append_partition_by_name_with_environment_context_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(append_partition_by_name_with_environment_context_result) +append_partition_by_name_with_environment_context_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [Partition, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [InvalidObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [AlreadyExistsException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class drop_partition_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + - deleteData + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + part_vals=None, + deleteData=None, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.deleteData = deleteData + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype1464, _size1461) = iprot.readListBegin() + for _i1465 in range(_size1461): + _elem1466 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.part_vals.append(_elem1466) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_partition_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals is not None: + oprot.writeFieldBegin("part_vals", TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter1467 in self.part_vals: + oprot.writeString(iter1467.encode("utf-8") if sys.version_info[0] == 2 else iter1467) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.deleteData is not None: + oprot.writeFieldBegin("deleteData", TType.BOOL, 4) + oprot.writeBool(self.deleteData) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_partition_args) +drop_partition_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "part_vals", + (TType.STRING, "UTF8", False), + None, + ), # 3 + ( + 4, + TType.BOOL, + "deleteData", + None, + None, + ), # 4 +) + + +class drop_partition_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_partition_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_partition_result) +drop_partition_result.thrift_spec = ( + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class drop_partition_with_environment_context_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + - deleteData + - environment_context + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + part_vals=None, + deleteData=None, + environment_context=None, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.deleteData = deleteData + self.environment_context = environment_context + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype1471, _size1468) = iprot.readListBegin() + for _i1472 in range(_size1468): + _elem1473 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.part_vals.append(_elem1473) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.environment_context = EnvironmentContext() + self.environment_context.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_partition_with_environment_context_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals is not None: + oprot.writeFieldBegin("part_vals", TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter1474 in self.part_vals: + oprot.writeString(iter1474.encode("utf-8") if sys.version_info[0] == 2 else iter1474) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.deleteData is not None: + oprot.writeFieldBegin("deleteData", TType.BOOL, 4) + oprot.writeBool(self.deleteData) + oprot.writeFieldEnd() + if self.environment_context is not None: + oprot.writeFieldBegin("environment_context", TType.STRUCT, 5) + self.environment_context.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_partition_with_environment_context_args) +drop_partition_with_environment_context_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "part_vals", + (TType.STRING, "UTF8", False), + None, + ), # 3 + ( + 4, + TType.BOOL, + "deleteData", + None, + None, + ), # 4 + ( + 5, + TType.STRUCT, + "environment_context", + [EnvironmentContext, None], + None, + ), # 5 +) + + +class drop_partition_with_environment_context_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_partition_with_environment_context_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_partition_with_environment_context_result) +drop_partition_with_environment_context_result.thrift_spec = ( + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class drop_partition_by_name_args: + """ + Attributes: + - db_name + - tbl_name + - part_name + - deleteData + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + part_name=None, + deleteData=None, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_name = part_name + self.deleteData = deleteData + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.part_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_partition_by_name_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.part_name is not None: + oprot.writeFieldBegin("part_name", TType.STRING, 3) + oprot.writeString(self.part_name.encode("utf-8") if sys.version_info[0] == 2 else self.part_name) + oprot.writeFieldEnd() + if self.deleteData is not None: + oprot.writeFieldBegin("deleteData", TType.BOOL, 4) + oprot.writeBool(self.deleteData) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_partition_by_name_args) +drop_partition_by_name_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "part_name", + "UTF8", + None, + ), # 3 + ( + 4, + TType.BOOL, + "deleteData", + None, + None, + ), # 4 +) + + +class drop_partition_by_name_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_partition_by_name_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_partition_by_name_result) +drop_partition_by_name_result.thrift_spec = ( + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class drop_partition_by_name_with_environment_context_args: + """ + Attributes: + - db_name + - tbl_name + - part_name + - deleteData + - environment_context + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + part_name=None, + deleteData=None, + environment_context=None, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_name = part_name + self.deleteData = deleteData + self.environment_context = environment_context + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.part_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.environment_context = EnvironmentContext() + self.environment_context.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_partition_by_name_with_environment_context_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.part_name is not None: + oprot.writeFieldBegin("part_name", TType.STRING, 3) + oprot.writeString(self.part_name.encode("utf-8") if sys.version_info[0] == 2 else self.part_name) + oprot.writeFieldEnd() + if self.deleteData is not None: + oprot.writeFieldBegin("deleteData", TType.BOOL, 4) + oprot.writeBool(self.deleteData) + oprot.writeFieldEnd() + if self.environment_context is not None: + oprot.writeFieldBegin("environment_context", TType.STRUCT, 5) + self.environment_context.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_partition_by_name_with_environment_context_args) +drop_partition_by_name_with_environment_context_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "part_name", + "UTF8", + None, + ), # 3 + ( + 4, + TType.BOOL, + "deleteData", + None, + None, + ), # 4 + ( + 5, + TType.STRUCT, + "environment_context", + [EnvironmentContext, None], + None, + ), # 5 +) + + +class drop_partition_by_name_with_environment_context_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_partition_by_name_with_environment_context_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_partition_by_name_with_environment_context_result) +drop_partition_by_name_with_environment_context_result.thrift_spec = ( + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class drop_partitions_req_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = DropPartitionsRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_partitions_req_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_partitions_req_args) +drop_partitions_req_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [DropPartitionsRequest, None], + None, + ), # 1 +) + + +class drop_partitions_req_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = DropPartitionsResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_partitions_req_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_partitions_req_result) +drop_partitions_req_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [DropPartitionsResult, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class get_partition_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + part_vals=None, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype1478, _size1475) = iprot.readListBegin() + for _i1479 in range(_size1475): + _elem1480 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.part_vals.append(_elem1480) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partition_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals is not None: + oprot.writeFieldBegin("part_vals", TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter1481 in self.part_vals: + oprot.writeString(iter1481.encode("utf-8") if sys.version_info[0] == 2 else iter1481) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partition_args) +get_partition_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "part_vals", + (TType.STRING, "UTF8", False), + None, + ), # 3 +) + + +class get_partition_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partition_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partition_result) +get_partition_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [Partition, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class get_partition_req_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = GetPartitionRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partition_req_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partition_req_args) +get_partition_req_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [GetPartitionRequest, None], + None, + ), # 1 +) + + +class get_partition_req_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetPartitionResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partition_req_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partition_req_result) +get_partition_req_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [GetPartitionResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class exchange_partition_args: + """ + Attributes: + - partitionSpecs + - source_db + - source_table_name + - dest_db + - dest_table_name + + """ + + def __init__( + self, + partitionSpecs=None, + source_db=None, + source_table_name=None, + dest_db=None, + dest_table_name=None, + ): + self.partitionSpecs = partitionSpecs + self.source_db = source_db + self.source_table_name = source_table_name + self.dest_db = dest_db + self.dest_table_name = dest_table_name + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.MAP: + self.partitionSpecs = {} + (_ktype1483, _vtype1484, _size1482) = iprot.readMapBegin() + for _i1486 in range(_size1482): + _key1487 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val1488 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.partitionSpecs[_key1487] = _val1488 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.source_db = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.source_table_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.dest_db = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.dest_table_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("exchange_partition_args") + if self.partitionSpecs is not None: + oprot.writeFieldBegin("partitionSpecs", TType.MAP, 1) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.partitionSpecs)) + for kiter1489, viter1490 in self.partitionSpecs.items(): + oprot.writeString(kiter1489.encode("utf-8") if sys.version_info[0] == 2 else kiter1489) + oprot.writeString(viter1490.encode("utf-8") if sys.version_info[0] == 2 else viter1490) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.source_db is not None: + oprot.writeFieldBegin("source_db", TType.STRING, 2) + oprot.writeString(self.source_db.encode("utf-8") if sys.version_info[0] == 2 else self.source_db) + oprot.writeFieldEnd() + if self.source_table_name is not None: + oprot.writeFieldBegin("source_table_name", TType.STRING, 3) + oprot.writeString(self.source_table_name.encode("utf-8") if sys.version_info[0] == 2 else self.source_table_name) + oprot.writeFieldEnd() + if self.dest_db is not None: + oprot.writeFieldBegin("dest_db", TType.STRING, 4) + oprot.writeString(self.dest_db.encode("utf-8") if sys.version_info[0] == 2 else self.dest_db) + oprot.writeFieldEnd() + if self.dest_table_name is not None: + oprot.writeFieldBegin("dest_table_name", TType.STRING, 5) + oprot.writeString(self.dest_table_name.encode("utf-8") if sys.version_info[0] == 2 else self.dest_table_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(exchange_partition_args) +exchange_partition_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.MAP, + "partitionSpecs", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 1 + ( + 2, + TType.STRING, + "source_db", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "source_table_name", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "dest_db", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "dest_table_name", + "UTF8", + None, + ), # 5 +) + + +class exchange_partition_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + o4=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = InvalidInputException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("exchange_partition_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin("o4", TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(exchange_partition_result) +exchange_partition_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [Partition, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [InvalidObjectException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "o4", + [InvalidInputException, None], + None, + ), # 4 +) + + +class exchange_partitions_args: + """ + Attributes: + - partitionSpecs + - source_db + - source_table_name + - dest_db + - dest_table_name + + """ + + def __init__( + self, + partitionSpecs=None, + source_db=None, + source_table_name=None, + dest_db=None, + dest_table_name=None, + ): + self.partitionSpecs = partitionSpecs + self.source_db = source_db + self.source_table_name = source_table_name + self.dest_db = dest_db + self.dest_table_name = dest_table_name + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.MAP: + self.partitionSpecs = {} + (_ktype1492, _vtype1493, _size1491) = iprot.readMapBegin() + for _i1495 in range(_size1491): + _key1496 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val1497 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.partitionSpecs[_key1496] = _val1497 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.source_db = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.source_table_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.dest_db = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.dest_table_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("exchange_partitions_args") + if self.partitionSpecs is not None: + oprot.writeFieldBegin("partitionSpecs", TType.MAP, 1) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.partitionSpecs)) + for kiter1498, viter1499 in self.partitionSpecs.items(): + oprot.writeString(kiter1498.encode("utf-8") if sys.version_info[0] == 2 else kiter1498) + oprot.writeString(viter1499.encode("utf-8") if sys.version_info[0] == 2 else viter1499) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.source_db is not None: + oprot.writeFieldBegin("source_db", TType.STRING, 2) + oprot.writeString(self.source_db.encode("utf-8") if sys.version_info[0] == 2 else self.source_db) + oprot.writeFieldEnd() + if self.source_table_name is not None: + oprot.writeFieldBegin("source_table_name", TType.STRING, 3) + oprot.writeString(self.source_table_name.encode("utf-8") if sys.version_info[0] == 2 else self.source_table_name) + oprot.writeFieldEnd() + if self.dest_db is not None: + oprot.writeFieldBegin("dest_db", TType.STRING, 4) + oprot.writeString(self.dest_db.encode("utf-8") if sys.version_info[0] == 2 else self.dest_db) + oprot.writeFieldEnd() + if self.dest_table_name is not None: + oprot.writeFieldBegin("dest_table_name", TType.STRING, 5) + oprot.writeString(self.dest_table_name.encode("utf-8") if sys.version_info[0] == 2 else self.dest_table_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(exchange_partitions_args) +exchange_partitions_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.MAP, + "partitionSpecs", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 1 + ( + 2, + TType.STRING, + "source_db", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "source_table_name", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "dest_db", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "dest_table_name", + "UTF8", + None, + ), # 5 +) + + +class exchange_partitions_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + o4=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1503, _size1500) = iprot.readListBegin() + for _i1504 in range(_size1500): + _elem1505 = Partition() + _elem1505.read(iprot) + self.success.append(_elem1505) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = InvalidInputException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("exchange_partitions_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter1506 in self.success: + iter1506.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin("o4", TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(exchange_partitions_result) +exchange_partitions_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Partition, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [InvalidObjectException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "o4", + [InvalidInputException, None], + None, + ), # 4 +) + + +class get_partition_with_auth_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + - user_name + - group_names + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + part_vals=None, + user_name=None, + group_names=None, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.user_name = user_name + self.group_names = group_names + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype1510, _size1507) = iprot.readListBegin() + for _i1511 in range(_size1507): + _elem1512 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.part_vals.append(_elem1512) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.user_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.group_names = [] + (_etype1516, _size1513) = iprot.readListBegin() + for _i1517 in range(_size1513): + _elem1518 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.group_names.append(_elem1518) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partition_with_auth_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals is not None: + oprot.writeFieldBegin("part_vals", TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter1519 in self.part_vals: + oprot.writeString(iter1519.encode("utf-8") if sys.version_info[0] == 2 else iter1519) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.user_name is not None: + oprot.writeFieldBegin("user_name", TType.STRING, 4) + oprot.writeString(self.user_name.encode("utf-8") if sys.version_info[0] == 2 else self.user_name) + oprot.writeFieldEnd() + if self.group_names is not None: + oprot.writeFieldBegin("group_names", TType.LIST, 5) + oprot.writeListBegin(TType.STRING, len(self.group_names)) + for iter1520 in self.group_names: + oprot.writeString(iter1520.encode("utf-8") if sys.version_info[0] == 2 else iter1520) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partition_with_auth_args) +get_partition_with_auth_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "part_vals", + (TType.STRING, "UTF8", False), + None, + ), # 3 + ( + 4, + TType.STRING, + "user_name", + "UTF8", + None, + ), # 4 + ( + 5, + TType.LIST, + "group_names", + (TType.STRING, "UTF8", False), + None, + ), # 5 +) + + +class get_partition_with_auth_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partition_with_auth_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partition_with_auth_result) +get_partition_with_auth_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [Partition, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class get_partition_by_name_args: + """ + Attributes: + - db_name + - tbl_name + - part_name + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + part_name=None, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_name = part_name + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.part_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partition_by_name_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.part_name is not None: + oprot.writeFieldBegin("part_name", TType.STRING, 3) + oprot.writeString(self.part_name.encode("utf-8") if sys.version_info[0] == 2 else self.part_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partition_by_name_args) +get_partition_by_name_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "part_name", + "UTF8", + None, + ), # 3 +) + + +class get_partition_by_name_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partition_by_name_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partition_by_name_result) +get_partition_by_name_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [Partition, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class get_partitions_args: + """ + Attributes: + - db_name + - tbl_name + - max_parts + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + max_parts=-1, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.max_parts = max_parts + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I16: + self.max_parts = iprot.readI16() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.max_parts is not None: + oprot.writeFieldBegin("max_parts", TType.I16, 3) + oprot.writeI16(self.max_parts) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_args) +get_partitions_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.I16, + "max_parts", + None, + -1, + ), # 3 +) + + +class get_partitions_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1524, _size1521) = iprot.readListBegin() + for _i1525 in range(_size1521): + _elem1526 = Partition() + _elem1526.read(iprot) + self.success.append(_elem1526) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter1527 in self.success: + iter1527.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_result) +get_partitions_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Partition, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class get_partitions_req_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = PartitionsRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_req_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_req_args) +get_partitions_req_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [PartitionsRequest, None], + None, + ), # 1 +) + + +class get_partitions_req_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = PartitionsResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_req_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_req_result) +get_partitions_req_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [PartitionsResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class get_partitions_with_auth_args: + """ + Attributes: + - db_name + - tbl_name + - max_parts + - user_name + - group_names + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + max_parts=-1, + user_name=None, + group_names=None, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.max_parts = max_parts + self.user_name = user_name + self.group_names = group_names + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I16: + self.max_parts = iprot.readI16() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.user_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.group_names = [] + (_etype1531, _size1528) = iprot.readListBegin() + for _i1532 in range(_size1528): + _elem1533 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.group_names.append(_elem1533) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_with_auth_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.max_parts is not None: + oprot.writeFieldBegin("max_parts", TType.I16, 3) + oprot.writeI16(self.max_parts) + oprot.writeFieldEnd() + if self.user_name is not None: + oprot.writeFieldBegin("user_name", TType.STRING, 4) + oprot.writeString(self.user_name.encode("utf-8") if sys.version_info[0] == 2 else self.user_name) + oprot.writeFieldEnd() + if self.group_names is not None: + oprot.writeFieldBegin("group_names", TType.LIST, 5) + oprot.writeListBegin(TType.STRING, len(self.group_names)) + for iter1534 in self.group_names: + oprot.writeString(iter1534.encode("utf-8") if sys.version_info[0] == 2 else iter1534) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_with_auth_args) +get_partitions_with_auth_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.I16, + "max_parts", + None, + -1, + ), # 3 + ( + 4, + TType.STRING, + "user_name", + "UTF8", + None, + ), # 4 + ( + 5, + TType.LIST, + "group_names", + (TType.STRING, "UTF8", False), + None, + ), # 5 +) + + +class get_partitions_with_auth_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1538, _size1535) = iprot.readListBegin() + for _i1539 in range(_size1535): + _elem1540 = Partition() + _elem1540.read(iprot) + self.success.append(_elem1540) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_with_auth_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter1541 in self.success: + iter1541.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_with_auth_result) +get_partitions_with_auth_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Partition, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class get_partitions_pspec_args: + """ + Attributes: + - db_name + - tbl_name + - max_parts + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + max_parts=-1, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.max_parts = max_parts + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.max_parts = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_pspec_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.max_parts is not None: + oprot.writeFieldBegin("max_parts", TType.I32, 3) + oprot.writeI32(self.max_parts) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_pspec_args) +get_partitions_pspec_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.I32, + "max_parts", + None, + -1, + ), # 3 +) + + +class get_partitions_pspec_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1545, _size1542) = iprot.readListBegin() + for _i1546 in range(_size1542): + _elem1547 = PartitionSpec() + _elem1547.read(iprot) + self.success.append(_elem1547) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_pspec_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter1548 in self.success: + iter1548.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_pspec_result) +get_partitions_pspec_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [PartitionSpec, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class get_partition_names_args: + """ + Attributes: + - db_name + - tbl_name + - max_parts + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + max_parts=-1, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.max_parts = max_parts + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I16: + self.max_parts = iprot.readI16() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partition_names_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.max_parts is not None: + oprot.writeFieldBegin("max_parts", TType.I16, 3) + oprot.writeI16(self.max_parts) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partition_names_args) +get_partition_names_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.I16, + "max_parts", + None, + -1, + ), # 3 +) + + +class get_partition_names_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1552, _size1549) = iprot.readListBegin() + for _i1553 in range(_size1549): + _elem1554 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success.append(_elem1554) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partition_names_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter1555 in self.success: + oprot.writeString(iter1555.encode("utf-8") if sys.version_info[0] == 2 else iter1555) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partition_names_result) +get_partition_names_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class get_partition_values_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = PartitionValuesRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partition_values_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partition_values_args) +get_partition_values_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [PartitionValuesRequest, None], + None, + ), # 1 +) + + +class get_partition_values_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = PartitionValuesResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partition_values_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partition_values_result) +get_partition_values_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [PartitionValuesResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class get_partitions_ps_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + - max_parts + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + part_vals=None, + max_parts=-1, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.max_parts = max_parts + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype1559, _size1556) = iprot.readListBegin() + for _i1560 in range(_size1556): + _elem1561 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.part_vals.append(_elem1561) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I16: + self.max_parts = iprot.readI16() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_ps_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals is not None: + oprot.writeFieldBegin("part_vals", TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter1562 in self.part_vals: + oprot.writeString(iter1562.encode("utf-8") if sys.version_info[0] == 2 else iter1562) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.max_parts is not None: + oprot.writeFieldBegin("max_parts", TType.I16, 4) + oprot.writeI16(self.max_parts) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_ps_args) +get_partitions_ps_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "part_vals", + (TType.STRING, "UTF8", False), + None, + ), # 3 + ( + 4, + TType.I16, + "max_parts", + None, + -1, + ), # 4 +) + + +class get_partitions_ps_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1566, _size1563) = iprot.readListBegin() + for _i1567 in range(_size1563): + _elem1568 = Partition() + _elem1568.read(iprot) + self.success.append(_elem1568) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_ps_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter1569 in self.success: + iter1569.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_ps_result) +get_partitions_ps_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Partition, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class get_partitions_ps_with_auth_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + - max_parts + - user_name + - group_names + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + part_vals=None, + max_parts=-1, + user_name=None, + group_names=None, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.max_parts = max_parts + self.user_name = user_name + self.group_names = group_names + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype1573, _size1570) = iprot.readListBegin() + for _i1574 in range(_size1570): + _elem1575 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.part_vals.append(_elem1575) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I16: + self.max_parts = iprot.readI16() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.user_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.LIST: + self.group_names = [] + (_etype1579, _size1576) = iprot.readListBegin() + for _i1580 in range(_size1576): + _elem1581 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.group_names.append(_elem1581) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_ps_with_auth_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals is not None: + oprot.writeFieldBegin("part_vals", TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter1582 in self.part_vals: + oprot.writeString(iter1582.encode("utf-8") if sys.version_info[0] == 2 else iter1582) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.max_parts is not None: + oprot.writeFieldBegin("max_parts", TType.I16, 4) + oprot.writeI16(self.max_parts) + oprot.writeFieldEnd() + if self.user_name is not None: + oprot.writeFieldBegin("user_name", TType.STRING, 5) + oprot.writeString(self.user_name.encode("utf-8") if sys.version_info[0] == 2 else self.user_name) + oprot.writeFieldEnd() + if self.group_names is not None: + oprot.writeFieldBegin("group_names", TType.LIST, 6) + oprot.writeListBegin(TType.STRING, len(self.group_names)) + for iter1583 in self.group_names: + oprot.writeString(iter1583.encode("utf-8") if sys.version_info[0] == 2 else iter1583) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_ps_with_auth_args) +get_partitions_ps_with_auth_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "part_vals", + (TType.STRING, "UTF8", False), + None, + ), # 3 + ( + 4, + TType.I16, + "max_parts", + None, + -1, + ), # 4 + ( + 5, + TType.STRING, + "user_name", + "UTF8", + None, + ), # 5 + ( + 6, + TType.LIST, + "group_names", + (TType.STRING, "UTF8", False), + None, + ), # 6 +) + + +class get_partitions_ps_with_auth_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1587, _size1584) = iprot.readListBegin() + for _i1588 in range(_size1584): + _elem1589 = Partition() + _elem1589.read(iprot) + self.success.append(_elem1589) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_ps_with_auth_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter1590 in self.success: + iter1590.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_ps_with_auth_result) +get_partitions_ps_with_auth_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Partition, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class get_partitions_ps_with_auth_req_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = GetPartitionsPsWithAuthRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_ps_with_auth_req_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_ps_with_auth_req_args) +get_partitions_ps_with_auth_req_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [GetPartitionsPsWithAuthRequest, None], + None, + ), # 1 +) + + +class get_partitions_ps_with_auth_req_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetPartitionsPsWithAuthResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_ps_with_auth_req_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_ps_with_auth_req_result) +get_partitions_ps_with_auth_req_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [GetPartitionsPsWithAuthResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class get_partition_names_ps_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + - max_parts + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + part_vals=None, + max_parts=-1, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.max_parts = max_parts + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype1594, _size1591) = iprot.readListBegin() + for _i1595 in range(_size1591): + _elem1596 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.part_vals.append(_elem1596) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I16: + self.max_parts = iprot.readI16() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partition_names_ps_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals is not None: + oprot.writeFieldBegin("part_vals", TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter1597 in self.part_vals: + oprot.writeString(iter1597.encode("utf-8") if sys.version_info[0] == 2 else iter1597) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.max_parts is not None: + oprot.writeFieldBegin("max_parts", TType.I16, 4) + oprot.writeI16(self.max_parts) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partition_names_ps_args) +get_partition_names_ps_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "part_vals", + (TType.STRING, "UTF8", False), + None, + ), # 3 + ( + 4, + TType.I16, + "max_parts", + None, + -1, + ), # 4 +) + + +class get_partition_names_ps_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1601, _size1598) = iprot.readListBegin() + for _i1602 in range(_size1598): + _elem1603 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success.append(_elem1603) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partition_names_ps_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter1604 in self.success: + oprot.writeString(iter1604.encode("utf-8") if sys.version_info[0] == 2 else iter1604) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partition_names_ps_result) +get_partition_names_ps_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class get_partition_names_ps_req_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = GetPartitionNamesPsRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partition_names_ps_req_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partition_names_ps_req_args) +get_partition_names_ps_req_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [GetPartitionNamesPsRequest, None], + None, + ), # 1 +) + + +class get_partition_names_ps_req_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetPartitionNamesPsResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partition_names_ps_req_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partition_names_ps_req_result) +get_partition_names_ps_req_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [GetPartitionNamesPsResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class get_partition_names_req_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = PartitionsByExprRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partition_names_req_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partition_names_req_args) +get_partition_names_req_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [PartitionsByExprRequest, None], + None, + ), # 1 +) + + +class get_partition_names_req_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1608, _size1605) = iprot.readListBegin() + for _i1609 in range(_size1605): + _elem1610 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success.append(_elem1610) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partition_names_req_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter1611 in self.success: + oprot.writeString(iter1611.encode("utf-8") if sys.version_info[0] == 2 else iter1611) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partition_names_req_result) +get_partition_names_req_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class get_partitions_by_filter_args: + """ + Attributes: + - db_name + - tbl_name + - filter + - max_parts + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + filter=None, + max_parts=-1, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.filter = filter + self.max_parts = max_parts + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.filter = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I16: + self.max_parts = iprot.readI16() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_by_filter_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.filter is not None: + oprot.writeFieldBegin("filter", TType.STRING, 3) + oprot.writeString(self.filter.encode("utf-8") if sys.version_info[0] == 2 else self.filter) + oprot.writeFieldEnd() + if self.max_parts is not None: + oprot.writeFieldBegin("max_parts", TType.I16, 4) + oprot.writeI16(self.max_parts) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_by_filter_args) +get_partitions_by_filter_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "filter", + "UTF8", + None, + ), # 3 + ( + 4, + TType.I16, + "max_parts", + None, + -1, + ), # 4 +) + + +class get_partitions_by_filter_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1615, _size1612) = iprot.readListBegin() + for _i1616 in range(_size1612): + _elem1617 = Partition() + _elem1617.read(iprot) + self.success.append(_elem1617) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_by_filter_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter1618 in self.success: + iter1618.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_by_filter_result) +get_partitions_by_filter_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Partition, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class get_part_specs_by_filter_args: + """ + Attributes: + - db_name + - tbl_name + - filter + - max_parts + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + filter=None, + max_parts=-1, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.filter = filter + self.max_parts = max_parts + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.filter = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.max_parts = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_part_specs_by_filter_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.filter is not None: + oprot.writeFieldBegin("filter", TType.STRING, 3) + oprot.writeString(self.filter.encode("utf-8") if sys.version_info[0] == 2 else self.filter) + oprot.writeFieldEnd() + if self.max_parts is not None: + oprot.writeFieldBegin("max_parts", TType.I32, 4) + oprot.writeI32(self.max_parts) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_part_specs_by_filter_args) +get_part_specs_by_filter_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "filter", + "UTF8", + None, + ), # 3 + ( + 4, + TType.I32, + "max_parts", + None, + -1, + ), # 4 +) + + +class get_part_specs_by_filter_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1622, _size1619) = iprot.readListBegin() + for _i1623 in range(_size1619): + _elem1624 = PartitionSpec() + _elem1624.read(iprot) + self.success.append(_elem1624) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_part_specs_by_filter_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter1625 in self.success: + iter1625.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_part_specs_by_filter_result) +get_part_specs_by_filter_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [PartitionSpec, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class get_partitions_by_expr_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = PartitionsByExprRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_by_expr_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_by_expr_args) +get_partitions_by_expr_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [PartitionsByExprRequest, None], + None, + ), # 1 +) + + +class get_partitions_by_expr_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = PartitionsByExprResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_by_expr_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_by_expr_result) +get_partitions_by_expr_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [PartitionsByExprResult, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class get_partitions_spec_by_expr_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = PartitionsByExprRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_spec_by_expr_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_spec_by_expr_args) +get_partitions_spec_by_expr_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [PartitionsByExprRequest, None], + None, + ), # 1 +) + + +class get_partitions_spec_by_expr_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = PartitionsSpecByExprResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_spec_by_expr_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_spec_by_expr_result) +get_partitions_spec_by_expr_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [PartitionsSpecByExprResult, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class get_num_partitions_by_filter_args: + """ + Attributes: + - db_name + - tbl_name + - filter + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + filter=None, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.filter = filter + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.filter = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_num_partitions_by_filter_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.filter is not None: + oprot.writeFieldBegin("filter", TType.STRING, 3) + oprot.writeString(self.filter.encode("utf-8") if sys.version_info[0] == 2 else self.filter) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_num_partitions_by_filter_args) +get_num_partitions_by_filter_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "filter", + "UTF8", + None, + ), # 3 +) + + +class get_num_partitions_by_filter_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I32: + self.success = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_num_partitions_by_filter_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_num_partitions_by_filter_result) +get_num_partitions_by_filter_result.thrift_spec = ( + ( + 0, + TType.I32, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class get_partitions_by_names_args: + """ + Attributes: + - db_name + - tbl_name + - names + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + names=None, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.names = names + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.names = [] + (_etype1629, _size1626) = iprot.readListBegin() + for _i1630 in range(_size1626): + _elem1631 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.names.append(_elem1631) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_by_names_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.names is not None: + oprot.writeFieldBegin("names", TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.names)) + for iter1632 in self.names: + oprot.writeString(iter1632.encode("utf-8") if sys.version_info[0] == 2 else iter1632) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_by_names_args) +get_partitions_by_names_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "names", + (TType.STRING, "UTF8", False), + None, + ), # 3 +) + + +class get_partitions_by_names_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1636, _size1633) = iprot.readListBegin() + for _i1637 in range(_size1633): + _elem1638 = Partition() + _elem1638.read(iprot) + self.success.append(_elem1638) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_by_names_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter1639 in self.success: + iter1639.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_by_names_result) +get_partitions_by_names_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Partition, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class get_partitions_by_names_req_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = GetPartitionsByNamesRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_by_names_req_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_by_names_req_args) +get_partitions_by_names_req_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [GetPartitionsByNamesRequest, None], + None, + ), # 1 +) + + +class get_partitions_by_names_req_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetPartitionsByNamesResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_by_names_req_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_by_names_req_result) +get_partitions_by_names_req_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [GetPartitionsByNamesResult, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class alter_partition_args: + """ + Attributes: + - db_name + - tbl_name + - new_part + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + new_part=None, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.new_part = new_part + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.new_part = Partition() + self.new_part.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_partition_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.new_part is not None: + oprot.writeFieldBegin("new_part", TType.STRUCT, 3) + self.new_part.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_partition_args) +alter_partition_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRUCT, + "new_part", + [Partition, None], + None, + ), # 3 +) + + +class alter_partition_result: + """ + Attributes: + - o1 + - o2 + + """ + + def __init__( + self, + o1=None, + o2=None, + ): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_partition_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_partition_result) +alter_partition_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [InvalidOperationException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class alter_partitions_args: + """ + Attributes: + - db_name + - tbl_name + - new_parts + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + new_parts=None, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.new_parts = new_parts + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.new_parts = [] + (_etype1643, _size1640) = iprot.readListBegin() + for _i1644 in range(_size1640): + _elem1645 = Partition() + _elem1645.read(iprot) + self.new_parts.append(_elem1645) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_partitions_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.new_parts is not None: + oprot.writeFieldBegin("new_parts", TType.LIST, 3) + oprot.writeListBegin(TType.STRUCT, len(self.new_parts)) + for iter1646 in self.new_parts: + iter1646.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_partitions_args) +alter_partitions_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "new_parts", + (TType.STRUCT, [Partition, None], False), + None, + ), # 3 +) + + +class alter_partitions_result: + """ + Attributes: + - o1 + - o2 + + """ + + def __init__( + self, + o1=None, + o2=None, + ): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_partitions_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_partitions_result) +alter_partitions_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [InvalidOperationException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class alter_partitions_with_environment_context_args: + """ + Attributes: + - db_name + - tbl_name + - new_parts + - environment_context + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + new_parts=None, + environment_context=None, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.new_parts = new_parts + self.environment_context = environment_context + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.new_parts = [] + (_etype1650, _size1647) = iprot.readListBegin() + for _i1651 in range(_size1647): + _elem1652 = Partition() + _elem1652.read(iprot) + self.new_parts.append(_elem1652) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.environment_context = EnvironmentContext() + self.environment_context.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_partitions_with_environment_context_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.new_parts is not None: + oprot.writeFieldBegin("new_parts", TType.LIST, 3) + oprot.writeListBegin(TType.STRUCT, len(self.new_parts)) + for iter1653 in self.new_parts: + iter1653.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.environment_context is not None: + oprot.writeFieldBegin("environment_context", TType.STRUCT, 4) + self.environment_context.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_partitions_with_environment_context_args) +alter_partitions_with_environment_context_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "new_parts", + (TType.STRUCT, [Partition, None], False), + None, + ), # 3 + ( + 4, + TType.STRUCT, + "environment_context", + [EnvironmentContext, None], + None, + ), # 4 +) + + +class alter_partitions_with_environment_context_result: + """ + Attributes: + - o1 + - o2 + + """ + + def __init__( + self, + o1=None, + o2=None, + ): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_partitions_with_environment_context_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_partitions_with_environment_context_result) +alter_partitions_with_environment_context_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [InvalidOperationException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class alter_partitions_req_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = AlterPartitionsRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_partitions_req_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_partitions_req_args) +alter_partitions_req_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [AlterPartitionsRequest, None], + None, + ), # 1 +) + + +class alter_partitions_req_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = AlterPartitionsResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_partitions_req_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_partitions_req_result) +alter_partitions_req_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [AlterPartitionsResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [InvalidOperationException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class alter_partition_with_environment_context_args: + """ + Attributes: + - db_name + - tbl_name + - new_part + - environment_context + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + new_part=None, + environment_context=None, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.new_part = new_part + self.environment_context = environment_context + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.new_part = Partition() + self.new_part.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.environment_context = EnvironmentContext() + self.environment_context.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_partition_with_environment_context_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.new_part is not None: + oprot.writeFieldBegin("new_part", TType.STRUCT, 3) + self.new_part.write(oprot) + oprot.writeFieldEnd() + if self.environment_context is not None: + oprot.writeFieldBegin("environment_context", TType.STRUCT, 4) + self.environment_context.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_partition_with_environment_context_args) +alter_partition_with_environment_context_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRUCT, + "new_part", + [Partition, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "environment_context", + [EnvironmentContext, None], + None, + ), # 4 +) + + +class alter_partition_with_environment_context_result: + """ + Attributes: + - o1 + - o2 + + """ + + def __init__( + self, + o1=None, + o2=None, + ): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_partition_with_environment_context_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_partition_with_environment_context_result) +alter_partition_with_environment_context_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [InvalidOperationException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class rename_partition_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + - new_part + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + part_vals=None, + new_part=None, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.new_part = new_part + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype1657, _size1654) = iprot.readListBegin() + for _i1658 in range(_size1654): + _elem1659 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.part_vals.append(_elem1659) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.new_part = Partition() + self.new_part.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("rename_partition_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals is not None: + oprot.writeFieldBegin("part_vals", TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter1660 in self.part_vals: + oprot.writeString(iter1660.encode("utf-8") if sys.version_info[0] == 2 else iter1660) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.new_part is not None: + oprot.writeFieldBegin("new_part", TType.STRUCT, 4) + self.new_part.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(rename_partition_args) +rename_partition_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "part_vals", + (TType.STRING, "UTF8", False), + None, + ), # 3 + ( + 4, + TType.STRUCT, + "new_part", + [Partition, None], + None, + ), # 4 +) + + +class rename_partition_result: + """ + Attributes: + - o1 + - o2 + + """ + + def __init__( + self, + o1=None, + o2=None, + ): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("rename_partition_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(rename_partition_result) +rename_partition_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [InvalidOperationException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class rename_partition_req_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = RenamePartitionRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("rename_partition_req_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(rename_partition_req_args) +rename_partition_req_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [RenamePartitionRequest, None], + None, + ), # 1 +) + + +class rename_partition_req_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = RenamePartitionResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("rename_partition_req_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(rename_partition_req_result) +rename_partition_req_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [RenamePartitionResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [InvalidOperationException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class partition_name_has_valid_characters_args: + """ + Attributes: + - part_vals + - throw_exception + + """ + + def __init__( + self, + part_vals=None, + throw_exception=None, + ): + self.part_vals = part_vals + self.throw_exception = throw_exception + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.part_vals = [] + (_etype1664, _size1661) = iprot.readListBegin() + for _i1665 in range(_size1661): + _elem1666 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.part_vals.append(_elem1666) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.throw_exception = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("partition_name_has_valid_characters_args") + if self.part_vals is not None: + oprot.writeFieldBegin("part_vals", TType.LIST, 1) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter1667 in self.part_vals: + oprot.writeString(iter1667.encode("utf-8") if sys.version_info[0] == 2 else iter1667) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.throw_exception is not None: + oprot.writeFieldBegin("throw_exception", TType.BOOL, 2) + oprot.writeBool(self.throw_exception) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(partition_name_has_valid_characters_args) +partition_name_has_valid_characters_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "part_vals", + (TType.STRING, "UTF8", False), + None, + ), # 1 + ( + 2, + TType.BOOL, + "throw_exception", + None, + None, + ), # 2 +) + + +class partition_name_has_valid_characters_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("partition_name_has_valid_characters_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(partition_name_has_valid_characters_result) +partition_name_has_valid_characters_result.thrift_spec = ( + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class get_config_value_args: + """ + Attributes: + - name + - defaultValue + + """ + + def __init__( + self, + name=None, + defaultValue=None, + ): + self.name = name + self.defaultValue = defaultValue + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.defaultValue = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_config_value_args") + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRING, 1) + oprot.writeString(self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + if self.defaultValue is not None: + oprot.writeFieldBegin("defaultValue", TType.STRING, 2) + oprot.writeString(self.defaultValue.encode("utf-8") if sys.version_info[0] == 2 else self.defaultValue) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_config_value_args) +get_config_value_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "defaultValue", + "UTF8", + None, + ), # 2 +) + + +class get_config_value_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRING: + self.success = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = ConfigValSecurityException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_config_value_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString(self.success.encode("utf-8") if sys.version_info[0] == 2 else self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_config_value_result) +get_config_value_result.thrift_spec = ( + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [ConfigValSecurityException, None], + None, + ), # 1 +) + + +class partition_name_to_vals_args: + """ + Attributes: + - part_name + + """ + + def __init__( + self, + part_name=None, + ): + self.part_name = part_name + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.part_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("partition_name_to_vals_args") + if self.part_name is not None: + oprot.writeFieldBegin("part_name", TType.STRING, 1) + oprot.writeString(self.part_name.encode("utf-8") if sys.version_info[0] == 2 else self.part_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(partition_name_to_vals_args) +partition_name_to_vals_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "part_name", + "UTF8", + None, + ), # 1 +) + + +class partition_name_to_vals_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1671, _size1668) = iprot.readListBegin() + for _i1672 in range(_size1668): + _elem1673 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success.append(_elem1673) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("partition_name_to_vals_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter1674 in self.success: + oprot.writeString(iter1674.encode("utf-8") if sys.version_info[0] == 2 else iter1674) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(partition_name_to_vals_result) +partition_name_to_vals_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class partition_name_to_spec_args: + """ + Attributes: + - part_name + + """ + + def __init__( + self, + part_name=None, + ): + self.part_name = part_name + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.part_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("partition_name_to_spec_args") + if self.part_name is not None: + oprot.writeFieldBegin("part_name", TType.STRING, 1) + oprot.writeString(self.part_name.encode("utf-8") if sys.version_info[0] == 2 else self.part_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(partition_name_to_spec_args) +partition_name_to_spec_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "part_name", + "UTF8", + None, + ), # 1 +) + + +class partition_name_to_spec_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.MAP: + self.success = {} + (_ktype1676, _vtype1677, _size1675) = iprot.readMapBegin() + for _i1679 in range(_size1675): + _key1680 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val1681 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success[_key1680] = _val1681 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("partition_name_to_spec_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.MAP, 0) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) + for kiter1682, viter1683 in self.success.items(): + oprot.writeString(kiter1682.encode("utf-8") if sys.version_info[0] == 2 else kiter1682) + oprot.writeString(viter1683.encode("utf-8") if sys.version_info[0] == 2 else viter1683) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(partition_name_to_spec_result) +partition_name_to_spec_result.thrift_spec = ( + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class markPartitionForEvent_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + - eventType + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + part_vals=None, + eventType=None, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.eventType = eventType + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.part_vals = {} + (_ktype1685, _vtype1686, _size1684) = iprot.readMapBegin() + for _i1688 in range(_size1684): + _key1689 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val1690 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.part_vals[_key1689] = _val1690 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.eventType = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("markPartitionForEvent_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals is not None: + oprot.writeFieldBegin("part_vals", TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.part_vals)) + for kiter1691, viter1692 in self.part_vals.items(): + oprot.writeString(kiter1691.encode("utf-8") if sys.version_info[0] == 2 else kiter1691) + oprot.writeString(viter1692.encode("utf-8") if sys.version_info[0] == 2 else viter1692) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.eventType is not None: + oprot.writeFieldBegin("eventType", TType.I32, 4) + oprot.writeI32(self.eventType) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(markPartitionForEvent_args) +markPartitionForEvent_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.MAP, + "part_vals", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 3 + ( + 4, + TType.I32, + "eventType", + None, + None, + ), # 4 +) + + +class markPartitionForEvent_result: + """ + Attributes: + - o1 + - o2 + - o3 + - o4 + - o5 + - o6 + + """ + + def __init__( + self, + o1=None, + o2=None, + o3=None, + o4=None, + o5=None, + o6=None, + ): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + self.o5 = o5 + self.o6 = o6 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = UnknownDBException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = UnknownTableException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.o5 = UnknownPartitionException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRUCT: + self.o6 = InvalidPartitionException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("markPartitionForEvent_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin("o4", TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + if self.o5 is not None: + oprot.writeFieldBegin("o5", TType.STRUCT, 5) + self.o5.write(oprot) + oprot.writeFieldEnd() + if self.o6 is not None: + oprot.writeFieldBegin("o6", TType.STRUCT, 6) + self.o6.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(markPartitionForEvent_result) +markPartitionForEvent_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [UnknownDBException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "o4", + [UnknownTableException, None], + None, + ), # 4 + ( + 5, + TType.STRUCT, + "o5", + [UnknownPartitionException, None], + None, + ), # 5 + ( + 6, + TType.STRUCT, + "o6", + [InvalidPartitionException, None], + None, + ), # 6 +) + + +class isPartitionMarkedForEvent_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + - eventType + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + part_vals=None, + eventType=None, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.eventType = eventType + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.part_vals = {} + (_ktype1694, _vtype1695, _size1693) = iprot.readMapBegin() + for _i1697 in range(_size1693): + _key1698 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val1699 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.part_vals[_key1698] = _val1699 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.eventType = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("isPartitionMarkedForEvent_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals is not None: + oprot.writeFieldBegin("part_vals", TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.part_vals)) + for kiter1700, viter1701 in self.part_vals.items(): + oprot.writeString(kiter1700.encode("utf-8") if sys.version_info[0] == 2 else kiter1700) + oprot.writeString(viter1701.encode("utf-8") if sys.version_info[0] == 2 else viter1701) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.eventType is not None: + oprot.writeFieldBegin("eventType", TType.I32, 4) + oprot.writeI32(self.eventType) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(isPartitionMarkedForEvent_args) +isPartitionMarkedForEvent_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.MAP, + "part_vals", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 3 + ( + 4, + TType.I32, + "eventType", + None, + None, + ), # 4 +) + + +class isPartitionMarkedForEvent_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + - o5 + - o6 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + o4=None, + o5=None, + o6=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + self.o5 = o5 + self.o6 = o6 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = UnknownDBException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = UnknownTableException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.o5 = UnknownPartitionException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRUCT: + self.o6 = InvalidPartitionException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("isPartitionMarkedForEvent_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin("o4", TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + if self.o5 is not None: + oprot.writeFieldBegin("o5", TType.STRUCT, 5) + self.o5.write(oprot) + oprot.writeFieldEnd() + if self.o6 is not None: + oprot.writeFieldBegin("o6", TType.STRUCT, 6) + self.o6.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(isPartitionMarkedForEvent_result) +isPartitionMarkedForEvent_result.thrift_spec = ( + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [UnknownDBException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "o4", + [UnknownTableException, None], + None, + ), # 4 + ( + 5, + TType.STRUCT, + "o5", + [UnknownPartitionException, None], + None, + ), # 5 + ( + 6, + TType.STRUCT, + "o6", + [InvalidPartitionException, None], + None, + ), # 6 +) + + +class get_primary_keys_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = PrimaryKeysRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_primary_keys_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_primary_keys_args) +get_primary_keys_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [PrimaryKeysRequest, None], + None, + ), # 1 +) + + +class get_primary_keys_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = PrimaryKeysResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_primary_keys_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_primary_keys_result) +get_primary_keys_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [PrimaryKeysResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class get_foreign_keys_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = ForeignKeysRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_foreign_keys_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_foreign_keys_args) +get_foreign_keys_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [ForeignKeysRequest, None], + None, + ), # 1 +) + + +class get_foreign_keys_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = ForeignKeysResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_foreign_keys_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_foreign_keys_result) +get_foreign_keys_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [ForeignKeysResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class get_unique_constraints_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = UniqueConstraintsRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_unique_constraints_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_unique_constraints_args) +get_unique_constraints_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [UniqueConstraintsRequest, None], + None, + ), # 1 +) + + +class get_unique_constraints_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = UniqueConstraintsResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_unique_constraints_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_unique_constraints_result) +get_unique_constraints_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [UniqueConstraintsResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class get_not_null_constraints_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = NotNullConstraintsRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_not_null_constraints_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_not_null_constraints_args) +get_not_null_constraints_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [NotNullConstraintsRequest, None], + None, + ), # 1 +) + + +class get_not_null_constraints_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = NotNullConstraintsResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_not_null_constraints_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_not_null_constraints_result) +get_not_null_constraints_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [NotNullConstraintsResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class get_default_constraints_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = DefaultConstraintsRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_default_constraints_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_default_constraints_args) +get_default_constraints_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [DefaultConstraintsRequest, None], + None, + ), # 1 +) + + +class get_default_constraints_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = DefaultConstraintsResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_default_constraints_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_default_constraints_result) +get_default_constraints_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [DefaultConstraintsResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class get_check_constraints_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = CheckConstraintsRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_check_constraints_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_check_constraints_args) +get_check_constraints_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [CheckConstraintsRequest, None], + None, + ), # 1 +) + + +class get_check_constraints_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = CheckConstraintsResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_check_constraints_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_check_constraints_result) +get_check_constraints_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [CheckConstraintsResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class get_all_table_constraints_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = AllTableConstraintsRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_all_table_constraints_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_all_table_constraints_args) +get_all_table_constraints_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [AllTableConstraintsRequest, None], + None, + ), # 1 +) + + +class get_all_table_constraints_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = AllTableConstraintsResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_all_table_constraints_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_all_table_constraints_result) +get_all_table_constraints_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [AllTableConstraintsResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class update_table_column_statistics_args: + """ + Attributes: + - stats_obj + + """ + + def __init__( + self, + stats_obj=None, + ): + self.stats_obj = stats_obj + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.stats_obj = ColumnStatistics() + self.stats_obj.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("update_table_column_statistics_args") + if self.stats_obj is not None: + oprot.writeFieldBegin("stats_obj", TType.STRUCT, 1) + self.stats_obj.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(update_table_column_statistics_args) +update_table_column_statistics_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "stats_obj", + [ColumnStatistics, None], + None, + ), # 1 +) + + +class update_table_column_statistics_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + o4=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = InvalidInputException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("update_table_column_statistics_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin("o4", TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(update_table_column_statistics_result) +update_table_column_statistics_result.thrift_spec = ( + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "o4", + [InvalidInputException, None], + None, + ), # 4 +) + + +class update_partition_column_statistics_args: + """ + Attributes: + - stats_obj + + """ + + def __init__( + self, + stats_obj=None, + ): + self.stats_obj = stats_obj + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.stats_obj = ColumnStatistics() + self.stats_obj.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("update_partition_column_statistics_args") + if self.stats_obj is not None: + oprot.writeFieldBegin("stats_obj", TType.STRUCT, 1) + self.stats_obj.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(update_partition_column_statistics_args) +update_partition_column_statistics_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "stats_obj", + [ColumnStatistics, None], + None, + ), # 1 +) + + +class update_partition_column_statistics_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + o4=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = InvalidInputException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("update_partition_column_statistics_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin("o4", TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(update_partition_column_statistics_result) +update_partition_column_statistics_result.thrift_spec = ( + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "o4", + [InvalidInputException, None], + None, + ), # 4 +) + + +class update_table_column_statistics_req_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = SetPartitionsStatsRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("update_table_column_statistics_req_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(update_table_column_statistics_req_args) +update_table_column_statistics_req_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [SetPartitionsStatsRequest, None], + None, + ), # 1 +) + + +class update_table_column_statistics_req_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + o4=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = SetPartitionsStatsResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = InvalidInputException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("update_table_column_statistics_req_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin("o4", TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(update_table_column_statistics_req_result) +update_table_column_statistics_req_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [SetPartitionsStatsResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "o4", + [InvalidInputException, None], + None, + ), # 4 +) + + +class update_partition_column_statistics_req_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = SetPartitionsStatsRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("update_partition_column_statistics_req_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(update_partition_column_statistics_req_args) +update_partition_column_statistics_req_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [SetPartitionsStatsRequest, None], + None, + ), # 1 +) + + +class update_partition_column_statistics_req_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + o4=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = SetPartitionsStatsResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = InvalidInputException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("update_partition_column_statistics_req_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin("o4", TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(update_partition_column_statistics_req_result) +update_partition_column_statistics_req_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [SetPartitionsStatsResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "o4", + [InvalidInputException, None], + None, + ), # 4 +) + + +class update_transaction_statistics_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = UpdateTransactionalStatsRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("update_transaction_statistics_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(update_transaction_statistics_args) +update_transaction_statistics_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [UpdateTransactionalStatsRequest, None], + None, + ), # 1 +) + + +class update_transaction_statistics_result: + """ + Attributes: + - o1 + + """ + + def __init__( + self, + o1=None, + ): + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("update_transaction_statistics_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(update_transaction_statistics_result) +update_transaction_statistics_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class get_table_column_statistics_args: + """ + Attributes: + - db_name + - tbl_name + - col_name + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + col_name=None, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.col_name = col_name + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.col_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_table_column_statistics_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.col_name is not None: + oprot.writeFieldBegin("col_name", TType.STRING, 3) + oprot.writeString(self.col_name.encode("utf-8") if sys.version_info[0] == 2 else self.col_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_table_column_statistics_args) +get_table_column_statistics_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "col_name", + "UTF8", + None, + ), # 3 +) + + +class get_table_column_statistics_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + o4=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = ColumnStatistics() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = InvalidInputException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_table_column_statistics_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin("o4", TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_table_column_statistics_result) +get_table_column_statistics_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [ColumnStatistics, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [InvalidInputException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "o4", + [InvalidObjectException, None], + None, + ), # 4 +) + + +class get_partition_column_statistics_args: + """ + Attributes: + - db_name + - tbl_name + - part_name + - col_name + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + part_name=None, + col_name=None, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_name = part_name + self.col_name = col_name + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.part_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.col_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partition_column_statistics_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.part_name is not None: + oprot.writeFieldBegin("part_name", TType.STRING, 3) + oprot.writeString(self.part_name.encode("utf-8") if sys.version_info[0] == 2 else self.part_name) + oprot.writeFieldEnd() + if self.col_name is not None: + oprot.writeFieldBegin("col_name", TType.STRING, 4) + oprot.writeString(self.col_name.encode("utf-8") if sys.version_info[0] == 2 else self.col_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partition_column_statistics_args) +get_partition_column_statistics_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "part_name", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "col_name", + "UTF8", + None, + ), # 4 +) + + +class get_partition_column_statistics_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + o4=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = ColumnStatistics() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = InvalidInputException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partition_column_statistics_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin("o4", TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partition_column_statistics_result) +get_partition_column_statistics_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [ColumnStatistics, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [InvalidInputException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "o4", + [InvalidObjectException, None], + None, + ), # 4 +) + + +class get_table_statistics_req_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = TableStatsRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_table_statistics_req_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_table_statistics_req_args) +get_table_statistics_req_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [TableStatsRequest, None], + None, + ), # 1 +) + + +class get_table_statistics_req_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = TableStatsResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_table_statistics_req_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_table_statistics_req_result) +get_table_statistics_req_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [TableStatsResult, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class get_partitions_statistics_req_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = PartitionsStatsRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_statistics_req_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_statistics_req_args) +get_partitions_statistics_req_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [PartitionsStatsRequest, None], + None, + ), # 1 +) + + +class get_partitions_statistics_req_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = PartitionsStatsResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_statistics_req_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_statistics_req_result) +get_partitions_statistics_req_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [PartitionsStatsResult, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class get_aggr_stats_for_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = PartitionsStatsRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_aggr_stats_for_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_aggr_stats_for_args) +get_aggr_stats_for_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [PartitionsStatsRequest, None], + None, + ), # 1 +) + + +class get_aggr_stats_for_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = AggrStats() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_aggr_stats_for_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_aggr_stats_for_result) +get_aggr_stats_for_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [AggrStats, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class set_aggr_stats_for_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = SetPartitionsStatsRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("set_aggr_stats_for_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(set_aggr_stats_for_args) +set_aggr_stats_for_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [SetPartitionsStatsRequest, None], + None, + ), # 1 +) + + +class set_aggr_stats_for_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + o4=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = InvalidInputException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("set_aggr_stats_for_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin("o4", TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(set_aggr_stats_for_result) +set_aggr_stats_for_result.thrift_spec = ( + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "o4", + [InvalidInputException, None], + None, + ), # 4 +) + + +class delete_partition_column_statistics_args: + """ + Attributes: + - db_name + - tbl_name + - part_name + - col_name + - engine + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + part_name=None, + col_name=None, + engine=None, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_name = part_name + self.col_name = col_name + self.engine = engine + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.part_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.col_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.engine = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("delete_partition_column_statistics_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.part_name is not None: + oprot.writeFieldBegin("part_name", TType.STRING, 3) + oprot.writeString(self.part_name.encode("utf-8") if sys.version_info[0] == 2 else self.part_name) + oprot.writeFieldEnd() + if self.col_name is not None: + oprot.writeFieldBegin("col_name", TType.STRING, 4) + oprot.writeString(self.col_name.encode("utf-8") if sys.version_info[0] == 2 else self.col_name) + oprot.writeFieldEnd() + if self.engine is not None: + oprot.writeFieldBegin("engine", TType.STRING, 5) + oprot.writeString(self.engine.encode("utf-8") if sys.version_info[0] == 2 else self.engine) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(delete_partition_column_statistics_args) +delete_partition_column_statistics_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "part_name", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "col_name", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "engine", + "UTF8", + None, + ), # 5 +) + + +class delete_partition_column_statistics_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + o4=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = InvalidInputException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("delete_partition_column_statistics_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin("o4", TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(delete_partition_column_statistics_result) +delete_partition_column_statistics_result.thrift_spec = ( + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [InvalidObjectException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "o4", + [InvalidInputException, None], + None, + ), # 4 +) + + +class delete_table_column_statistics_args: + """ + Attributes: + - db_name + - tbl_name + - col_name + - engine + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + col_name=None, + engine=None, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.col_name = col_name + self.engine = engine + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.col_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.engine = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("delete_table_column_statistics_args") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.col_name is not None: + oprot.writeFieldBegin("col_name", TType.STRING, 3) + oprot.writeString(self.col_name.encode("utf-8") if sys.version_info[0] == 2 else self.col_name) + oprot.writeFieldEnd() + if self.engine is not None: + oprot.writeFieldBegin("engine", TType.STRING, 4) + oprot.writeString(self.engine.encode("utf-8") if sys.version_info[0] == 2 else self.engine) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(delete_table_column_statistics_args) +delete_table_column_statistics_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "col_name", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "engine", + "UTF8", + None, + ), # 4 +) + + +class delete_table_column_statistics_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + o4=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = InvalidInputException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("delete_table_column_statistics_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin("o4", TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(delete_table_column_statistics_result) +delete_table_column_statistics_result.thrift_spec = ( + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [InvalidObjectException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "o4", + [InvalidInputException, None], + None, + ), # 4 +) + + +class create_function_args: + """ + Attributes: + - func + + """ + + def __init__( + self, + func=None, + ): + self.func = func + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.func = Function() + self.func.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_function_args") + if self.func is not None: + oprot.writeFieldBegin("func", TType.STRUCT, 1) + self.func.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_function_args) +create_function_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "func", + [Function, None], + None, + ), # 1 +) + + +class create_function_result: + """ + Attributes: + - o1 + - o2 + - o3 + - o4 + + """ + + def __init__( + self, + o1=None, + o2=None, + o3=None, + o4=None, + ): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_function_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin("o4", TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_function_result) +create_function_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [AlreadyExistsException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "o4", + [NoSuchObjectException, None], + None, + ), # 4 +) + + +class drop_function_args: + """ + Attributes: + - dbName + - funcName + + """ + + def __init__( + self, + dbName=None, + funcName=None, + ): + self.dbName = dbName + self.funcName = funcName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.funcName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_function_args") + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 1) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.funcName is not None: + oprot.writeFieldBegin("funcName", TType.STRING, 2) + oprot.writeString(self.funcName.encode("utf-8") if sys.version_info[0] == 2 else self.funcName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_function_args) +drop_function_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "funcName", + "UTF8", + None, + ), # 2 +) + + +class drop_function_result: + """ + Attributes: + - o1 + - o3 + + """ + + def __init__( + self, + o1=None, + o3=None, + ): + self.o1 = o1 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_function_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 2) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_function_result) +drop_function_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 2 +) + + +class alter_function_args: + """ + Attributes: + - dbName + - funcName + - newFunc + + """ + + def __init__( + self, + dbName=None, + funcName=None, + newFunc=None, + ): + self.dbName = dbName + self.funcName = funcName + self.newFunc = newFunc + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.funcName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.newFunc = Function() + self.newFunc.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_function_args") + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 1) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.funcName is not None: + oprot.writeFieldBegin("funcName", TType.STRING, 2) + oprot.writeString(self.funcName.encode("utf-8") if sys.version_info[0] == 2 else self.funcName) + oprot.writeFieldEnd() + if self.newFunc is not None: + oprot.writeFieldBegin("newFunc", TType.STRUCT, 3) + self.newFunc.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_function_args) +alter_function_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "funcName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRUCT, + "newFunc", + [Function, None], + None, + ), # 3 +) + + +class alter_function_result: + """ + Attributes: + - o1 + - o2 + + """ + + def __init__( + self, + o1=None, + o2=None, + ): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_function_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_function_result) +alter_function_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [InvalidOperationException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class get_functions_args: + """ + Attributes: + - dbName + - pattern + + """ + + def __init__( + self, + dbName=None, + pattern=None, + ): + self.dbName = dbName + self.pattern = pattern + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.pattern = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_functions_args") + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 1) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.pattern is not None: + oprot.writeFieldBegin("pattern", TType.STRING, 2) + oprot.writeString(self.pattern.encode("utf-8") if sys.version_info[0] == 2 else self.pattern) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_functions_args) +get_functions_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "pattern", + "UTF8", + None, + ), # 2 +) + + +class get_functions_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1705, _size1702) = iprot.readListBegin() + for _i1706 in range(_size1702): + _elem1707 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success.append(_elem1707) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_functions_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter1708 in self.success: + oprot.writeString(iter1708.encode("utf-8") if sys.version_info[0] == 2 else iter1708) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_functions_result) +get_functions_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class get_function_args: + """ + Attributes: + - dbName + - funcName + + """ + + def __init__( + self, + dbName=None, + funcName=None, + ): + self.dbName = dbName + self.funcName = funcName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.funcName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_function_args") + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 1) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.funcName is not None: + oprot.writeFieldBegin("funcName", TType.STRING, 2) + oprot.writeString(self.funcName.encode("utf-8") if sys.version_info[0] == 2 else self.funcName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_function_args) +get_function_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "funcName", + "UTF8", + None, + ), # 2 +) + + +class get_function_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Function() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_function_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_function_result) +get_function_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [Function, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class get_all_functions_args: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_all_functions_args") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_all_functions_args) +get_all_functions_args.thrift_spec = () + + +class get_all_functions_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetAllFunctionsResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_all_functions_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_all_functions_result) +get_all_functions_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [GetAllFunctionsResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class create_role_args: + """ + Attributes: + - role + + """ + + def __init__( + self, + role=None, + ): + self.role = role + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.role = Role() + self.role.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_role_args") + if self.role is not None: + oprot.writeFieldBegin("role", TType.STRUCT, 1) + self.role.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_role_args) +create_role_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "role", + [Role, None], + None, + ), # 1 +) + + +class create_role_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_role_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_role_result) +create_role_result.thrift_spec = ( + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class drop_role_args: + """ + Attributes: + - role_name + + """ + + def __init__( + self, + role_name=None, + ): + self.role_name = role_name + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.role_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_role_args") + if self.role_name is not None: + oprot.writeFieldBegin("role_name", TType.STRING, 1) + oprot.writeString(self.role_name.encode("utf-8") if sys.version_info[0] == 2 else self.role_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_role_args) +drop_role_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "role_name", + "UTF8", + None, + ), # 1 +) + + +class drop_role_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_role_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_role_result) +drop_role_result.thrift_spec = ( + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class get_role_names_args: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_role_names_args") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_role_names_args) +get_role_names_args.thrift_spec = () + + +class get_role_names_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1712, _size1709) = iprot.readListBegin() + for _i1713 in range(_size1709): + _elem1714 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success.append(_elem1714) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_role_names_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter1715 in self.success: + oprot.writeString(iter1715.encode("utf-8") if sys.version_info[0] == 2 else iter1715) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_role_names_result) +get_role_names_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class grant_role_args: + """ + Attributes: + - role_name + - principal_name + - principal_type + - grantor + - grantorType + - grant_option + + """ + + def __init__( + self, + role_name=None, + principal_name=None, + principal_type=None, + grantor=None, + grantorType=None, + grant_option=None, + ): + self.role_name = role_name + self.principal_name = principal_name + self.principal_type = principal_type + self.grantor = grantor + self.grantorType = grantorType + self.grant_option = grant_option + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.role_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.principal_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.principal_type = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.grantor = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.grantorType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.BOOL: + self.grant_option = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("grant_role_args") + if self.role_name is not None: + oprot.writeFieldBegin("role_name", TType.STRING, 1) + oprot.writeString(self.role_name.encode("utf-8") if sys.version_info[0] == 2 else self.role_name) + oprot.writeFieldEnd() + if self.principal_name is not None: + oprot.writeFieldBegin("principal_name", TType.STRING, 2) + oprot.writeString(self.principal_name.encode("utf-8") if sys.version_info[0] == 2 else self.principal_name) + oprot.writeFieldEnd() + if self.principal_type is not None: + oprot.writeFieldBegin("principal_type", TType.I32, 3) + oprot.writeI32(self.principal_type) + oprot.writeFieldEnd() + if self.grantor is not None: + oprot.writeFieldBegin("grantor", TType.STRING, 4) + oprot.writeString(self.grantor.encode("utf-8") if sys.version_info[0] == 2 else self.grantor) + oprot.writeFieldEnd() + if self.grantorType is not None: + oprot.writeFieldBegin("grantorType", TType.I32, 5) + oprot.writeI32(self.grantorType) + oprot.writeFieldEnd() + if self.grant_option is not None: + oprot.writeFieldBegin("grant_option", TType.BOOL, 6) + oprot.writeBool(self.grant_option) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(grant_role_args) +grant_role_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "role_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "principal_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.I32, + "principal_type", + None, + None, + ), # 3 + ( + 4, + TType.STRING, + "grantor", + "UTF8", + None, + ), # 4 + ( + 5, + TType.I32, + "grantorType", + None, + None, + ), # 5 + ( + 6, + TType.BOOL, + "grant_option", + None, + None, + ), # 6 +) + + +class grant_role_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("grant_role_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(grant_role_result) +grant_role_result.thrift_spec = ( + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class revoke_role_args: + """ + Attributes: + - role_name + - principal_name + - principal_type + + """ + + def __init__( + self, + role_name=None, + principal_name=None, + principal_type=None, + ): + self.role_name = role_name + self.principal_name = principal_name + self.principal_type = principal_type + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.role_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.principal_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.principal_type = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("revoke_role_args") + if self.role_name is not None: + oprot.writeFieldBegin("role_name", TType.STRING, 1) + oprot.writeString(self.role_name.encode("utf-8") if sys.version_info[0] == 2 else self.role_name) + oprot.writeFieldEnd() + if self.principal_name is not None: + oprot.writeFieldBegin("principal_name", TType.STRING, 2) + oprot.writeString(self.principal_name.encode("utf-8") if sys.version_info[0] == 2 else self.principal_name) + oprot.writeFieldEnd() + if self.principal_type is not None: + oprot.writeFieldBegin("principal_type", TType.I32, 3) + oprot.writeI32(self.principal_type) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(revoke_role_args) +revoke_role_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "role_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "principal_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.I32, + "principal_type", + None, + None, + ), # 3 +) + + +class revoke_role_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("revoke_role_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(revoke_role_result) +revoke_role_result.thrift_spec = ( + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class list_roles_args: + """ + Attributes: + - principal_name + - principal_type + + """ + + def __init__( + self, + principal_name=None, + principal_type=None, + ): + self.principal_name = principal_name + self.principal_type = principal_type + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.principal_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.principal_type = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("list_roles_args") + if self.principal_name is not None: + oprot.writeFieldBegin("principal_name", TType.STRING, 1) + oprot.writeString(self.principal_name.encode("utf-8") if sys.version_info[0] == 2 else self.principal_name) + oprot.writeFieldEnd() + if self.principal_type is not None: + oprot.writeFieldBegin("principal_type", TType.I32, 2) + oprot.writeI32(self.principal_type) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(list_roles_args) +list_roles_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "principal_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.I32, + "principal_type", + None, + None, + ), # 2 +) + + +class list_roles_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1719, _size1716) = iprot.readListBegin() + for _i1720 in range(_size1716): + _elem1721 = Role() + _elem1721.read(iprot) + self.success.append(_elem1721) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("list_roles_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter1722 in self.success: + iter1722.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(list_roles_result) +list_roles_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Role, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class grant_revoke_role_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = GrantRevokeRoleRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("grant_revoke_role_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(grant_revoke_role_args) +grant_revoke_role_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [GrantRevokeRoleRequest, None], + None, + ), # 1 +) + + +class grant_revoke_role_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GrantRevokeRoleResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("grant_revoke_role_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(grant_revoke_role_result) +grant_revoke_role_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [GrantRevokeRoleResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class get_principals_in_role_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = GetPrincipalsInRoleRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_principals_in_role_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_principals_in_role_args) +get_principals_in_role_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [GetPrincipalsInRoleRequest, None], + None, + ), # 1 +) + + +class get_principals_in_role_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetPrincipalsInRoleResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_principals_in_role_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_principals_in_role_result) +get_principals_in_role_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [GetPrincipalsInRoleResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class get_role_grants_for_principal_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = GetRoleGrantsForPrincipalRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_role_grants_for_principal_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_role_grants_for_principal_args) +get_role_grants_for_principal_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [GetRoleGrantsForPrincipalRequest, None], + None, + ), # 1 +) + + +class get_role_grants_for_principal_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetRoleGrantsForPrincipalResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_role_grants_for_principal_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_role_grants_for_principal_result) +get_role_grants_for_principal_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [GetRoleGrantsForPrincipalResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class get_privilege_set_args: + """ + Attributes: + - hiveObject + - user_name + - group_names + + """ + + def __init__( + self, + hiveObject=None, + user_name=None, + group_names=None, + ): + self.hiveObject = hiveObject + self.user_name = user_name + self.group_names = group_names + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.hiveObject = HiveObjectRef() + self.hiveObject.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.user_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.group_names = [] + (_etype1726, _size1723) = iprot.readListBegin() + for _i1727 in range(_size1723): + _elem1728 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.group_names.append(_elem1728) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_privilege_set_args") + if self.hiveObject is not None: + oprot.writeFieldBegin("hiveObject", TType.STRUCT, 1) + self.hiveObject.write(oprot) + oprot.writeFieldEnd() + if self.user_name is not None: + oprot.writeFieldBegin("user_name", TType.STRING, 2) + oprot.writeString(self.user_name.encode("utf-8") if sys.version_info[0] == 2 else self.user_name) + oprot.writeFieldEnd() + if self.group_names is not None: + oprot.writeFieldBegin("group_names", TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.group_names)) + for iter1729 in self.group_names: + oprot.writeString(iter1729.encode("utf-8") if sys.version_info[0] == 2 else iter1729) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_privilege_set_args) +get_privilege_set_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "hiveObject", + [HiveObjectRef, None], + None, + ), # 1 + ( + 2, + TType.STRING, + "user_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "group_names", + (TType.STRING, "UTF8", False), + None, + ), # 3 +) + + +class get_privilege_set_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = PrincipalPrivilegeSet() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_privilege_set_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_privilege_set_result) +get_privilege_set_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [PrincipalPrivilegeSet, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class list_privileges_args: + """ + Attributes: + - principal_name + - principal_type + - hiveObject + + """ + + def __init__( + self, + principal_name=None, + principal_type=None, + hiveObject=None, + ): + self.principal_name = principal_name + self.principal_type = principal_type + self.hiveObject = hiveObject + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.principal_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.principal_type = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.hiveObject = HiveObjectRef() + self.hiveObject.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("list_privileges_args") + if self.principal_name is not None: + oprot.writeFieldBegin("principal_name", TType.STRING, 1) + oprot.writeString(self.principal_name.encode("utf-8") if sys.version_info[0] == 2 else self.principal_name) + oprot.writeFieldEnd() + if self.principal_type is not None: + oprot.writeFieldBegin("principal_type", TType.I32, 2) + oprot.writeI32(self.principal_type) + oprot.writeFieldEnd() + if self.hiveObject is not None: + oprot.writeFieldBegin("hiveObject", TType.STRUCT, 3) + self.hiveObject.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(list_privileges_args) +list_privileges_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "principal_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.I32, + "principal_type", + None, + None, + ), # 2 + ( + 3, + TType.STRUCT, + "hiveObject", + [HiveObjectRef, None], + None, + ), # 3 +) + + +class list_privileges_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1733, _size1730) = iprot.readListBegin() + for _i1734 in range(_size1730): + _elem1735 = HiveObjectPrivilege() + _elem1735.read(iprot) + self.success.append(_elem1735) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("list_privileges_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter1736 in self.success: + iter1736.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(list_privileges_result) +list_privileges_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [HiveObjectPrivilege, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class grant_privileges_args: + """ + Attributes: + - privileges + + """ + + def __init__( + self, + privileges=None, + ): + self.privileges = privileges + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.privileges = PrivilegeBag() + self.privileges.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("grant_privileges_args") + if self.privileges is not None: + oprot.writeFieldBegin("privileges", TType.STRUCT, 1) + self.privileges.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(grant_privileges_args) +grant_privileges_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "privileges", + [PrivilegeBag, None], + None, + ), # 1 +) + + +class grant_privileges_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("grant_privileges_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(grant_privileges_result) +grant_privileges_result.thrift_spec = ( + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class revoke_privileges_args: + """ + Attributes: + - privileges + + """ + + def __init__( + self, + privileges=None, + ): + self.privileges = privileges + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.privileges = PrivilegeBag() + self.privileges.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("revoke_privileges_args") + if self.privileges is not None: + oprot.writeFieldBegin("privileges", TType.STRUCT, 1) + self.privileges.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(revoke_privileges_args) +revoke_privileges_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "privileges", + [PrivilegeBag, None], + None, + ), # 1 +) + + +class revoke_privileges_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("revoke_privileges_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(revoke_privileges_result) +revoke_privileges_result.thrift_spec = ( + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class grant_revoke_privileges_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = GrantRevokePrivilegeRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("grant_revoke_privileges_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(grant_revoke_privileges_args) +grant_revoke_privileges_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [GrantRevokePrivilegeRequest, None], + None, + ), # 1 +) + + +class grant_revoke_privileges_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GrantRevokePrivilegeResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("grant_revoke_privileges_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(grant_revoke_privileges_result) +grant_revoke_privileges_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [GrantRevokePrivilegeResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class refresh_privileges_args: + """ + Attributes: + - objToRefresh + - authorizer + - grantRequest + + """ + + def __init__( + self, + objToRefresh=None, + authorizer=None, + grantRequest=None, + ): + self.objToRefresh = objToRefresh + self.authorizer = authorizer + self.grantRequest = grantRequest + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.objToRefresh = HiveObjectRef() + self.objToRefresh.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.authorizer = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.grantRequest = GrantRevokePrivilegeRequest() + self.grantRequest.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("refresh_privileges_args") + if self.objToRefresh is not None: + oprot.writeFieldBegin("objToRefresh", TType.STRUCT, 1) + self.objToRefresh.write(oprot) + oprot.writeFieldEnd() + if self.authorizer is not None: + oprot.writeFieldBegin("authorizer", TType.STRING, 2) + oprot.writeString(self.authorizer.encode("utf-8") if sys.version_info[0] == 2 else self.authorizer) + oprot.writeFieldEnd() + if self.grantRequest is not None: + oprot.writeFieldBegin("grantRequest", TType.STRUCT, 3) + self.grantRequest.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(refresh_privileges_args) +refresh_privileges_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "objToRefresh", + [HiveObjectRef, None], + None, + ), # 1 + ( + 2, + TType.STRING, + "authorizer", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRUCT, + "grantRequest", + [GrantRevokePrivilegeRequest, None], + None, + ), # 3 +) + + +class refresh_privileges_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GrantRevokePrivilegeResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("refresh_privileges_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(refresh_privileges_result) +refresh_privileges_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [GrantRevokePrivilegeResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class set_ugi_args: + """ + Attributes: + - user_name + - group_names + + """ + + def __init__( + self, + user_name=None, + group_names=None, + ): + self.user_name = user_name + self.group_names = group_names + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.user_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.group_names = [] + (_etype1740, _size1737) = iprot.readListBegin() + for _i1741 in range(_size1737): + _elem1742 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.group_names.append(_elem1742) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("set_ugi_args") + if self.user_name is not None: + oprot.writeFieldBegin("user_name", TType.STRING, 1) + oprot.writeString(self.user_name.encode("utf-8") if sys.version_info[0] == 2 else self.user_name) + oprot.writeFieldEnd() + if self.group_names is not None: + oprot.writeFieldBegin("group_names", TType.LIST, 2) + oprot.writeListBegin(TType.STRING, len(self.group_names)) + for iter1743 in self.group_names: + oprot.writeString(iter1743.encode("utf-8") if sys.version_info[0] == 2 else iter1743) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(set_ugi_args) +set_ugi_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "user_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.LIST, + "group_names", + (TType.STRING, "UTF8", False), + None, + ), # 2 +) + + +class set_ugi_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1747, _size1744) = iprot.readListBegin() + for _i1748 in range(_size1744): + _elem1749 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success.append(_elem1749) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("set_ugi_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter1750 in self.success: + oprot.writeString(iter1750.encode("utf-8") if sys.version_info[0] == 2 else iter1750) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(set_ugi_result) +set_ugi_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class get_delegation_token_args: + """ + Attributes: + - token_owner + - renewer_kerberos_principal_name + + """ + + def __init__( + self, + token_owner=None, + renewer_kerberos_principal_name=None, + ): + self.token_owner = token_owner + self.renewer_kerberos_principal_name = renewer_kerberos_principal_name + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.token_owner = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.renewer_kerberos_principal_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_delegation_token_args") + if self.token_owner is not None: + oprot.writeFieldBegin("token_owner", TType.STRING, 1) + oprot.writeString(self.token_owner.encode("utf-8") if sys.version_info[0] == 2 else self.token_owner) + oprot.writeFieldEnd() + if self.renewer_kerberos_principal_name is not None: + oprot.writeFieldBegin("renewer_kerberos_principal_name", TType.STRING, 2) + oprot.writeString( + self.renewer_kerberos_principal_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.renewer_kerberos_principal_name + ) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_delegation_token_args) +get_delegation_token_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "token_owner", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "renewer_kerberos_principal_name", + "UTF8", + None, + ), # 2 +) + + +class get_delegation_token_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRING: + self.success = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_delegation_token_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString(self.success.encode("utf-8") if sys.version_info[0] == 2 else self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_delegation_token_result) +get_delegation_token_result.thrift_spec = ( + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class renew_delegation_token_args: + """ + Attributes: + - token_str_form + + """ + + def __init__( + self, + token_str_form=None, + ): + self.token_str_form = token_str_form + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.token_str_form = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("renew_delegation_token_args") + if self.token_str_form is not None: + oprot.writeFieldBegin("token_str_form", TType.STRING, 1) + oprot.writeString(self.token_str_form.encode("utf-8") if sys.version_info[0] == 2 else self.token_str_form) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(renew_delegation_token_args) +renew_delegation_token_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "token_str_form", + "UTF8", + None, + ), # 1 +) + + +class renew_delegation_token_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I64: + self.success = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("renew_delegation_token_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.I64, 0) + oprot.writeI64(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(renew_delegation_token_result) +renew_delegation_token_result.thrift_spec = ( + ( + 0, + TType.I64, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class cancel_delegation_token_args: + """ + Attributes: + - token_str_form + + """ + + def __init__( + self, + token_str_form=None, + ): + self.token_str_form = token_str_form + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.token_str_form = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("cancel_delegation_token_args") + if self.token_str_form is not None: + oprot.writeFieldBegin("token_str_form", TType.STRING, 1) + oprot.writeString(self.token_str_form.encode("utf-8") if sys.version_info[0] == 2 else self.token_str_form) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(cancel_delegation_token_args) +cancel_delegation_token_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "token_str_form", + "UTF8", + None, + ), # 1 +) + + +class cancel_delegation_token_result: + """ + Attributes: + - o1 + + """ + + def __init__( + self, + o1=None, + ): + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("cancel_delegation_token_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(cancel_delegation_token_result) +cancel_delegation_token_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class add_token_args: + """ + Attributes: + - token_identifier + - delegation_token + + """ + + def __init__( + self, + token_identifier=None, + delegation_token=None, + ): + self.token_identifier = token_identifier + self.delegation_token = delegation_token + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.token_identifier = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.delegation_token = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_token_args") + if self.token_identifier is not None: + oprot.writeFieldBegin("token_identifier", TType.STRING, 1) + oprot.writeString(self.token_identifier.encode("utf-8") if sys.version_info[0] == 2 else self.token_identifier) + oprot.writeFieldEnd() + if self.delegation_token is not None: + oprot.writeFieldBegin("delegation_token", TType.STRING, 2) + oprot.writeString(self.delegation_token.encode("utf-8") if sys.version_info[0] == 2 else self.delegation_token) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_token_args) +add_token_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "token_identifier", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "delegation_token", + "UTF8", + None, + ), # 2 +) + + +class add_token_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_token_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_token_result) +add_token_result.thrift_spec = ( + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 +) + + +class remove_token_args: + """ + Attributes: + - token_identifier + + """ + + def __init__( + self, + token_identifier=None, + ): + self.token_identifier = token_identifier + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.token_identifier = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("remove_token_args") + if self.token_identifier is not None: + oprot.writeFieldBegin("token_identifier", TType.STRING, 1) + oprot.writeString(self.token_identifier.encode("utf-8") if sys.version_info[0] == 2 else self.token_identifier) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(remove_token_args) +remove_token_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "token_identifier", + "UTF8", + None, + ), # 1 +) + + +class remove_token_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("remove_token_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(remove_token_result) +remove_token_result.thrift_spec = ( + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 +) + + +class get_token_args: + """ + Attributes: + - token_identifier + + """ + + def __init__( + self, + token_identifier=None, + ): + self.token_identifier = token_identifier + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.token_identifier = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_token_args") + if self.token_identifier is not None: + oprot.writeFieldBegin("token_identifier", TType.STRING, 1) + oprot.writeString(self.token_identifier.encode("utf-8") if sys.version_info[0] == 2 else self.token_identifier) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_token_args) +get_token_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "token_identifier", + "UTF8", + None, + ), # 1 +) + + +class get_token_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRING: + self.success = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_token_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString(self.success.encode("utf-8") if sys.version_info[0] == 2 else self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_token_result) +get_token_result.thrift_spec = ( + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 +) + + +class get_all_token_identifiers_args: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_all_token_identifiers_args") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_all_token_identifiers_args) +get_all_token_identifiers_args.thrift_spec = () + + +class get_all_token_identifiers_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1754, _size1751) = iprot.readListBegin() + for _i1755 in range(_size1751): + _elem1756 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success.append(_elem1756) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_all_token_identifiers_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter1757 in self.success: + oprot.writeString(iter1757.encode("utf-8") if sys.version_info[0] == 2 else iter1757) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_all_token_identifiers_result) +get_all_token_identifiers_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRING, "UTF8", False), + None, + ), # 0 +) + + +class add_master_key_args: + """ + Attributes: + - key + + """ + + def __init__( + self, + key=None, + ): + self.key = key + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.key = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_master_key_args") + if self.key is not None: + oprot.writeFieldBegin("key", TType.STRING, 1) + oprot.writeString(self.key.encode("utf-8") if sys.version_info[0] == 2 else self.key) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_master_key_args) +add_master_key_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "key", + "UTF8", + None, + ), # 1 +) + + +class add_master_key_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I32: + self.success = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_master_key_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_master_key_result) +add_master_key_result.thrift_spec = ( + ( + 0, + TType.I32, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class update_master_key_args: + """ + Attributes: + - seq_number + - key + + """ + + def __init__( + self, + seq_number=None, + key=None, + ): + self.seq_number = seq_number + self.key = key + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.seq_number = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.key = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("update_master_key_args") + if self.seq_number is not None: + oprot.writeFieldBegin("seq_number", TType.I32, 1) + oprot.writeI32(self.seq_number) + oprot.writeFieldEnd() + if self.key is not None: + oprot.writeFieldBegin("key", TType.STRING, 2) + oprot.writeString(self.key.encode("utf-8") if sys.version_info[0] == 2 else self.key) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(update_master_key_args) +update_master_key_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.I32, + "seq_number", + None, + None, + ), # 1 + ( + 2, + TType.STRING, + "key", + "UTF8", + None, + ), # 2 +) + + +class update_master_key_result: + """ + Attributes: + - o1 + - o2 + + """ + + def __init__( + self, + o1=None, + o2=None, + ): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("update_master_key_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(update_master_key_result) +update_master_key_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class remove_master_key_args: + """ + Attributes: + - key_seq + + """ + + def __init__( + self, + key_seq=None, + ): + self.key_seq = key_seq + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.key_seq = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("remove_master_key_args") + if self.key_seq is not None: + oprot.writeFieldBegin("key_seq", TType.I32, 1) + oprot.writeI32(self.key_seq) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(remove_master_key_args) +remove_master_key_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.I32, + "key_seq", + None, + None, + ), # 1 +) + + +class remove_master_key_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("remove_master_key_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(remove_master_key_result) +remove_master_key_result.thrift_spec = ( + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 +) + + +class get_master_keys_args: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_master_keys_args") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_master_keys_args) +get_master_keys_args.thrift_spec = () + + +class get_master_keys_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1761, _size1758) = iprot.readListBegin() + for _i1762 in range(_size1758): + _elem1763 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success.append(_elem1763) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_master_keys_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter1764 in self.success: + oprot.writeString(iter1764.encode("utf-8") if sys.version_info[0] == 2 else iter1764) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_master_keys_result) +get_master_keys_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRING, "UTF8", False), + None, + ), # 0 +) + + +class get_open_txns_args: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_open_txns_args") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_open_txns_args) +get_open_txns_args.thrift_spec = () + + +class get_open_txns_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetOpenTxnsResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_open_txns_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_open_txns_result) +get_open_txns_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [GetOpenTxnsResponse, None], + None, + ), # 0 +) + + +class get_open_txns_info_args: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_open_txns_info_args") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_open_txns_info_args) +get_open_txns_info_args.thrift_spec = () + + +class get_open_txns_info_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetOpenTxnsInfoResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_open_txns_info_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_open_txns_info_result) +get_open_txns_info_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [GetOpenTxnsInfoResponse, None], + None, + ), # 0 +) + + +class open_txns_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = OpenTxnRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("open_txns_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(open_txns_args) +open_txns_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [OpenTxnRequest, None], + None, + ), # 1 +) + + +class open_txns_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = OpenTxnsResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("open_txns_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(open_txns_result) +open_txns_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [OpenTxnsResponse, None], + None, + ), # 0 +) + + +class abort_txn_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = AbortTxnRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("abort_txn_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(abort_txn_args) +abort_txn_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [AbortTxnRequest, None], + None, + ), # 1 +) + + +class abort_txn_result: + """ + Attributes: + - o1 + + """ + + def __init__( + self, + o1=None, + ): + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchTxnException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("abort_txn_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(abort_txn_result) +abort_txn_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchTxnException, None], + None, + ), # 1 +) + + +class abort_txns_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = AbortTxnsRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("abort_txns_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(abort_txns_args) +abort_txns_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [AbortTxnsRequest, None], + None, + ), # 1 +) + + +class abort_txns_result: + """ + Attributes: + - o1 + + """ + + def __init__( + self, + o1=None, + ): + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchTxnException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("abort_txns_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(abort_txns_result) +abort_txns_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchTxnException, None], + None, + ), # 1 +) + + +class commit_txn_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = CommitTxnRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("commit_txn_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(commit_txn_args) +commit_txn_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [CommitTxnRequest, None], + None, + ), # 1 +) + + +class commit_txn_result: + """ + Attributes: + - o1 + - o2 + + """ + + def __init__( + self, + o1=None, + o2=None, + ): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchTxnException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = TxnAbortedException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("commit_txn_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(commit_txn_result) +commit_txn_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchTxnException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [TxnAbortedException, None], + None, + ), # 2 +) + + +class get_latest_txnid_in_conflict_args: + """ + Attributes: + - txnId + + """ + + def __init__( + self, + txnId=None, + ): + self.txnId = txnId + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.txnId = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_latest_txnid_in_conflict_args") + if self.txnId is not None: + oprot.writeFieldBegin("txnId", TType.I64, 1) + oprot.writeI64(self.txnId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_latest_txnid_in_conflict_args) +get_latest_txnid_in_conflict_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "txnId", + None, + None, + ), # 1 +) + + +class get_latest_txnid_in_conflict_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I64: + self.success = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_latest_txnid_in_conflict_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.I64, 0) + oprot.writeI64(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_latest_txnid_in_conflict_result) +get_latest_txnid_in_conflict_result.thrift_spec = ( + ( + 0, + TType.I64, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class repl_tbl_writeid_state_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = ReplTblWriteIdStateRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("repl_tbl_writeid_state_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(repl_tbl_writeid_state_args) +repl_tbl_writeid_state_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [ReplTblWriteIdStateRequest, None], + None, + ), # 1 +) + + +class repl_tbl_writeid_state_result: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("repl_tbl_writeid_state_result") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(repl_tbl_writeid_state_result) +repl_tbl_writeid_state_result.thrift_spec = () + + +class get_valid_write_ids_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = GetValidWriteIdsRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_valid_write_ids_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_valid_write_ids_args) +get_valid_write_ids_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [GetValidWriteIdsRequest, None], + None, + ), # 1 +) + + +class get_valid_write_ids_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetValidWriteIdsResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchTxnException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_valid_write_ids_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_valid_write_ids_result) +get_valid_write_ids_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [GetValidWriteIdsResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchTxnException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class allocate_table_write_ids_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = AllocateTableWriteIdsRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("allocate_table_write_ids_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(allocate_table_write_ids_args) +allocate_table_write_ids_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [AllocateTableWriteIdsRequest, None], + None, + ), # 1 +) + + +class allocate_table_write_ids_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = AllocateTableWriteIdsResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchTxnException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = TxnAbortedException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("allocate_table_write_ids_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(allocate_table_write_ids_result) +allocate_table_write_ids_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [AllocateTableWriteIdsResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchTxnException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [TxnAbortedException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class get_max_allocated_table_write_id_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = MaxAllocatedTableWriteIdRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_max_allocated_table_write_id_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_max_allocated_table_write_id_args) +get_max_allocated_table_write_id_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [MaxAllocatedTableWriteIdRequest, None], + None, + ), # 1 +) + + +class get_max_allocated_table_write_id_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = MaxAllocatedTableWriteIdResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_max_allocated_table_write_id_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_max_allocated_table_write_id_result) +get_max_allocated_table_write_id_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [MaxAllocatedTableWriteIdResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class seed_write_id_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = SeedTableWriteIdsRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("seed_write_id_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(seed_write_id_args) +seed_write_id_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [SeedTableWriteIdsRequest, None], + None, + ), # 1 +) + + +class seed_write_id_result: + """ + Attributes: + - o1 + + """ + + def __init__( + self, + o1=None, + ): + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("seed_write_id_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(seed_write_id_result) +seed_write_id_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class seed_txn_id_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = SeedTxnIdRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("seed_txn_id_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(seed_txn_id_args) +seed_txn_id_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [SeedTxnIdRequest, None], + None, + ), # 1 +) + + +class seed_txn_id_result: + """ + Attributes: + - o1 + + """ + + def __init__( + self, + o1=None, + ): + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("seed_txn_id_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(seed_txn_id_result) +seed_txn_id_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class lock_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = LockRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("lock_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(lock_args) +lock_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [LockRequest, None], + None, + ), # 1 +) + + +class lock_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = LockResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchTxnException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = TxnAbortedException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("lock_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(lock_result) +lock_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [LockResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchTxnException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [TxnAbortedException, None], + None, + ), # 2 +) + + +class check_lock_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = CheckLockRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("check_lock_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(check_lock_args) +check_lock_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [CheckLockRequest, None], + None, + ), # 1 +) + + +class check_lock_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = LockResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchTxnException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = TxnAbortedException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = NoSuchLockException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("check_lock_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(check_lock_result) +check_lock_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [LockResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchTxnException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [TxnAbortedException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [NoSuchLockException, None], + None, + ), # 3 +) + + +class unlock_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = UnlockRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("unlock_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(unlock_args) +unlock_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [UnlockRequest, None], + None, + ), # 1 +) + + +class unlock_result: + """ + Attributes: + - o1 + - o2 + + """ + + def __init__( + self, + o1=None, + o2=None, + ): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchLockException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = TxnOpenException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("unlock_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(unlock_result) +unlock_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchLockException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [TxnOpenException, None], + None, + ), # 2 +) + + +class show_locks_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = ShowLocksRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("show_locks_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(show_locks_args) +show_locks_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [ShowLocksRequest, None], + None, + ), # 1 +) + + +class show_locks_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = ShowLocksResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("show_locks_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(show_locks_result) +show_locks_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [ShowLocksResponse, None], + None, + ), # 0 +) + + +class heartbeat_args: + """ + Attributes: + - ids + + """ + + def __init__( + self, + ids=None, + ): + self.ids = ids + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.ids = HeartbeatRequest() + self.ids.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("heartbeat_args") + if self.ids is not None: + oprot.writeFieldBegin("ids", TType.STRUCT, 1) + self.ids.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(heartbeat_args) +heartbeat_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "ids", + [HeartbeatRequest, None], + None, + ), # 1 +) + + +class heartbeat_result: + """ + Attributes: + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + o1=None, + o2=None, + o3=None, + ): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchLockException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchTxnException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = TxnAbortedException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("heartbeat_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(heartbeat_result) +heartbeat_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchLockException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchTxnException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [TxnAbortedException, None], + None, + ), # 3 +) + + +class heartbeat_txn_range_args: + """ + Attributes: + - txns + + """ + + def __init__( + self, + txns=None, + ): + self.txns = txns + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.txns = HeartbeatTxnRangeRequest() + self.txns.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("heartbeat_txn_range_args") + if self.txns is not None: + oprot.writeFieldBegin("txns", TType.STRUCT, 1) + self.txns.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(heartbeat_txn_range_args) +heartbeat_txn_range_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "txns", + [HeartbeatTxnRangeRequest, None], + None, + ), # 1 +) + + +class heartbeat_txn_range_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = HeartbeatTxnRangeResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("heartbeat_txn_range_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(heartbeat_txn_range_result) +heartbeat_txn_range_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [HeartbeatTxnRangeResponse, None], + None, + ), # 0 +) + + +class compact_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = CompactionRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("compact_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(compact_args) +compact_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [CompactionRequest, None], + None, + ), # 1 +) + + +class compact_result: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("compact_result") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(compact_result) +compact_result.thrift_spec = () + + +class compact2_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = CompactionRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("compact2_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(compact2_args) +compact2_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [CompactionRequest, None], + None, + ), # 1 +) + + +class compact2_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = CompactionResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("compact2_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(compact2_result) +compact2_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [CompactionResponse, None], + None, + ), # 0 +) + + +class show_compact_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = ShowCompactRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("show_compact_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(show_compact_args) +show_compact_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [ShowCompactRequest, None], + None, + ), # 1 +) + + +class show_compact_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = ShowCompactResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("show_compact_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(show_compact_result) +show_compact_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [ShowCompactResponse, None], + None, + ), # 0 +) + + +class add_dynamic_partitions_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = AddDynamicPartitions() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_dynamic_partitions_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_dynamic_partitions_args) +add_dynamic_partitions_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [AddDynamicPartitions, None], + None, + ), # 1 +) + + +class add_dynamic_partitions_result: + """ + Attributes: + - o1 + - o2 + + """ + + def __init__( + self, + o1=None, + o2=None, + ): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchTxnException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = TxnAbortedException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_dynamic_partitions_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_dynamic_partitions_result) +add_dynamic_partitions_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchTxnException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [TxnAbortedException, None], + None, + ), # 2 +) + + +class find_next_compact_args: + """ + Attributes: + - workerId + + """ + + def __init__( + self, + workerId=None, + ): + self.workerId = workerId + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.workerId = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("find_next_compact_args") + if self.workerId is not None: + oprot.writeFieldBegin("workerId", TType.STRING, 1) + oprot.writeString(self.workerId.encode("utf-8") if sys.version_info[0] == 2 else self.workerId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(find_next_compact_args) +find_next_compact_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "workerId", + "UTF8", + None, + ), # 1 +) + + +class find_next_compact_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = OptionalCompactionInfoStruct() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("find_next_compact_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(find_next_compact_result) +find_next_compact_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [OptionalCompactionInfoStruct, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class find_next_compact2_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = FindNextCompactRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("find_next_compact2_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(find_next_compact2_args) +find_next_compact2_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [FindNextCompactRequest, None], + None, + ), # 1 +) + + +class find_next_compact2_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = OptionalCompactionInfoStruct() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("find_next_compact2_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(find_next_compact2_result) +find_next_compact2_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [OptionalCompactionInfoStruct, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class update_compactor_state_args: + """ + Attributes: + - cr + - txn_id + + """ + + def __init__( + self, + cr=None, + txn_id=None, + ): + self.cr = cr + self.txn_id = txn_id + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.cr = CompactionInfoStruct() + self.cr.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.txn_id = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("update_compactor_state_args") + if self.cr is not None: + oprot.writeFieldBegin("cr", TType.STRUCT, 1) + self.cr.write(oprot) + oprot.writeFieldEnd() + if self.txn_id is not None: + oprot.writeFieldBegin("txn_id", TType.I64, 2) + oprot.writeI64(self.txn_id) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(update_compactor_state_args) +update_compactor_state_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "cr", + [CompactionInfoStruct, None], + None, + ), # 1 + ( + 2, + TType.I64, + "txn_id", + None, + None, + ), # 2 +) + + +class update_compactor_state_result: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("update_compactor_state_result") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(update_compactor_state_result) +update_compactor_state_result.thrift_spec = () + + +class find_columns_with_stats_args: + """ + Attributes: + - cr + + """ + + def __init__( + self, + cr=None, + ): + self.cr = cr + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.cr = CompactionInfoStruct() + self.cr.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("find_columns_with_stats_args") + if self.cr is not None: + oprot.writeFieldBegin("cr", TType.STRUCT, 1) + self.cr.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(find_columns_with_stats_args) +find_columns_with_stats_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "cr", + [CompactionInfoStruct, None], + None, + ), # 1 +) + + +class find_columns_with_stats_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1768, _size1765) = iprot.readListBegin() + for _i1769 in range(_size1765): + _elem1770 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success.append(_elem1770) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("find_columns_with_stats_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter1771 in self.success: + oprot.writeString(iter1771.encode("utf-8") if sys.version_info[0] == 2 else iter1771) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(find_columns_with_stats_result) +find_columns_with_stats_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRING, "UTF8", False), + None, + ), # 0 +) + + +class mark_cleaned_args: + """ + Attributes: + - cr + + """ + + def __init__( + self, + cr=None, + ): + self.cr = cr + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.cr = CompactionInfoStruct() + self.cr.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("mark_cleaned_args") + if self.cr is not None: + oprot.writeFieldBegin("cr", TType.STRUCT, 1) + self.cr.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(mark_cleaned_args) +mark_cleaned_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "cr", + [CompactionInfoStruct, None], + None, + ), # 1 +) + + +class mark_cleaned_result: + """ + Attributes: + - o1 + + """ + + def __init__( + self, + o1=None, + ): + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("mark_cleaned_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(mark_cleaned_result) +mark_cleaned_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class mark_compacted_args: + """ + Attributes: + - cr + + """ + + def __init__( + self, + cr=None, + ): + self.cr = cr + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.cr = CompactionInfoStruct() + self.cr.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("mark_compacted_args") + if self.cr is not None: + oprot.writeFieldBegin("cr", TType.STRUCT, 1) + self.cr.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(mark_compacted_args) +mark_compacted_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "cr", + [CompactionInfoStruct, None], + None, + ), # 1 +) + + +class mark_compacted_result: + """ + Attributes: + - o1 + + """ + + def __init__( + self, + o1=None, + ): + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("mark_compacted_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(mark_compacted_result) +mark_compacted_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class mark_failed_args: + """ + Attributes: + - cr + + """ + + def __init__( + self, + cr=None, + ): + self.cr = cr + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.cr = CompactionInfoStruct() + self.cr.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("mark_failed_args") + if self.cr is not None: + oprot.writeFieldBegin("cr", TType.STRUCT, 1) + self.cr.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(mark_failed_args) +mark_failed_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "cr", + [CompactionInfoStruct, None], + None, + ), # 1 +) + + +class mark_failed_result: + """ + Attributes: + - o1 + + """ + + def __init__( + self, + o1=None, + ): + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("mark_failed_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(mark_failed_result) +mark_failed_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class mark_refused_args: + """ + Attributes: + - cr + + """ + + def __init__( + self, + cr=None, + ): + self.cr = cr + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.cr = CompactionInfoStruct() + self.cr.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("mark_refused_args") + if self.cr is not None: + oprot.writeFieldBegin("cr", TType.STRUCT, 1) + self.cr.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(mark_refused_args) +mark_refused_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "cr", + [CompactionInfoStruct, None], + None, + ), # 1 +) + + +class mark_refused_result: + """ + Attributes: + - o1 + + """ + + def __init__( + self, + o1=None, + ): + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("mark_refused_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(mark_refused_result) +mark_refused_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class update_compaction_metrics_data_args: + """ + Attributes: + - data + + """ + + def __init__( + self, + data=None, + ): + self.data = data + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.data = CompactionMetricsDataStruct() + self.data.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("update_compaction_metrics_data_args") + if self.data is not None: + oprot.writeFieldBegin("data", TType.STRUCT, 1) + self.data.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(update_compaction_metrics_data_args) +update_compaction_metrics_data_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "data", + [CompactionMetricsDataStruct, None], + None, + ), # 1 +) + + +class update_compaction_metrics_data_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("update_compaction_metrics_data_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(update_compaction_metrics_data_result) +update_compaction_metrics_data_result.thrift_spec = ( + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class remove_compaction_metrics_data_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = CompactionMetricsDataRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("remove_compaction_metrics_data_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(remove_compaction_metrics_data_args) +remove_compaction_metrics_data_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [CompactionMetricsDataRequest, None], + None, + ), # 1 +) + + +class remove_compaction_metrics_data_result: + """ + Attributes: + - o1 + + """ + + def __init__( + self, + o1=None, + ): + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("remove_compaction_metrics_data_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(remove_compaction_metrics_data_result) +remove_compaction_metrics_data_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class set_hadoop_jobid_args: + """ + Attributes: + - jobId + - cq_id + + """ + + def __init__( + self, + jobId=None, + cq_id=None, + ): + self.jobId = jobId + self.cq_id = cq_id + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.jobId = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.cq_id = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("set_hadoop_jobid_args") + if self.jobId is not None: + oprot.writeFieldBegin("jobId", TType.STRING, 1) + oprot.writeString(self.jobId.encode("utf-8") if sys.version_info[0] == 2 else self.jobId) + oprot.writeFieldEnd() + if self.cq_id is not None: + oprot.writeFieldBegin("cq_id", TType.I64, 2) + oprot.writeI64(self.cq_id) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(set_hadoop_jobid_args) +set_hadoop_jobid_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "jobId", + "UTF8", + None, + ), # 1 + ( + 2, + TType.I64, + "cq_id", + None, + None, + ), # 2 +) + + +class set_hadoop_jobid_result: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("set_hadoop_jobid_result") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(set_hadoop_jobid_result) +set_hadoop_jobid_result.thrift_spec = () + + +class get_latest_committed_compaction_info_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = GetLatestCommittedCompactionInfoRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_latest_committed_compaction_info_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_latest_committed_compaction_info_args) +get_latest_committed_compaction_info_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [GetLatestCommittedCompactionInfoRequest, None], + None, + ), # 1 +) + + +class get_latest_committed_compaction_info_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetLatestCommittedCompactionInfoResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_latest_committed_compaction_info_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_latest_committed_compaction_info_result) +get_latest_committed_compaction_info_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [GetLatestCommittedCompactionInfoResponse, None], + None, + ), # 0 +) + + +class get_next_notification_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = NotificationEventRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_next_notification_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_next_notification_args) +get_next_notification_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [NotificationEventRequest, None], + None, + ), # 1 +) + + +class get_next_notification_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = NotificationEventResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_next_notification_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_next_notification_result) +get_next_notification_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [NotificationEventResponse, None], + None, + ), # 0 +) + + +class get_current_notificationEventId_args: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_current_notificationEventId_args") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_current_notificationEventId_args) +get_current_notificationEventId_args.thrift_spec = () + + +class get_current_notificationEventId_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = CurrentNotificationEventId() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_current_notificationEventId_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_current_notificationEventId_result) +get_current_notificationEventId_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [CurrentNotificationEventId, None], + None, + ), # 0 +) + + +class get_notification_events_count_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = NotificationEventsCountRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_notification_events_count_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_notification_events_count_args) +get_notification_events_count_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [NotificationEventsCountRequest, None], + None, + ), # 1 +) + + +class get_notification_events_count_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = NotificationEventsCountResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_notification_events_count_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_notification_events_count_result) +get_notification_events_count_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [NotificationEventsCountResponse, None], + None, + ), # 0 +) + + +class fire_listener_event_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = FireEventRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("fire_listener_event_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(fire_listener_event_args) +fire_listener_event_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [FireEventRequest, None], + None, + ), # 1 +) + + +class fire_listener_event_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = FireEventResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("fire_listener_event_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(fire_listener_event_result) +fire_listener_event_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [FireEventResponse, None], + None, + ), # 0 +) + + +class flushCache_args: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("flushCache_args") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(flushCache_args) +flushCache_args.thrift_spec = () + + +class flushCache_result: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("flushCache_result") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(flushCache_result) +flushCache_result.thrift_spec = () + + +class add_write_notification_log_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = WriteNotificationLogRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_write_notification_log_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_write_notification_log_args) +add_write_notification_log_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [WriteNotificationLogRequest, None], + None, + ), # 1 +) + + +class add_write_notification_log_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = WriteNotificationLogResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_write_notification_log_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_write_notification_log_result) +add_write_notification_log_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [WriteNotificationLogResponse, None], + None, + ), # 0 +) + + +class add_write_notification_log_in_batch_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = WriteNotificationLogBatchRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_write_notification_log_in_batch_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_write_notification_log_in_batch_args) +add_write_notification_log_in_batch_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [WriteNotificationLogBatchRequest, None], + None, + ), # 1 +) + + +class add_write_notification_log_in_batch_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = WriteNotificationLogBatchResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_write_notification_log_in_batch_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_write_notification_log_in_batch_result) +add_write_notification_log_in_batch_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [WriteNotificationLogBatchResponse, None], + None, + ), # 0 +) + + +class cm_recycle_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = CmRecycleRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("cm_recycle_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(cm_recycle_args) +cm_recycle_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [CmRecycleRequest, None], + None, + ), # 1 +) + + +class cm_recycle_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = CmRecycleResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("cm_recycle_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(cm_recycle_result) +cm_recycle_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [CmRecycleResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class get_file_metadata_by_expr_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = GetFileMetadataByExprRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_file_metadata_by_expr_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_file_metadata_by_expr_args) +get_file_metadata_by_expr_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [GetFileMetadataByExprRequest, None], + None, + ), # 1 +) + + +class get_file_metadata_by_expr_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetFileMetadataByExprResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_file_metadata_by_expr_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_file_metadata_by_expr_result) +get_file_metadata_by_expr_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [GetFileMetadataByExprResult, None], + None, + ), # 0 +) + + +class get_file_metadata_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = GetFileMetadataRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_file_metadata_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_file_metadata_args) +get_file_metadata_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [GetFileMetadataRequest, None], + None, + ), # 1 +) + + +class get_file_metadata_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetFileMetadataResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_file_metadata_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_file_metadata_result) +get_file_metadata_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [GetFileMetadataResult, None], + None, + ), # 0 +) + + +class put_file_metadata_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = PutFileMetadataRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("put_file_metadata_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(put_file_metadata_args) +put_file_metadata_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [PutFileMetadataRequest, None], + None, + ), # 1 +) + + +class put_file_metadata_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = PutFileMetadataResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("put_file_metadata_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(put_file_metadata_result) +put_file_metadata_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [PutFileMetadataResult, None], + None, + ), # 0 +) + + +class clear_file_metadata_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = ClearFileMetadataRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("clear_file_metadata_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(clear_file_metadata_args) +clear_file_metadata_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [ClearFileMetadataRequest, None], + None, + ), # 1 +) + + +class clear_file_metadata_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = ClearFileMetadataResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("clear_file_metadata_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(clear_file_metadata_result) +clear_file_metadata_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [ClearFileMetadataResult, None], + None, + ), # 0 +) + + +class cache_file_metadata_args: + """ + Attributes: + - req + + """ + + def __init__( + self, + req=None, + ): + self.req = req + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = CacheFileMetadataRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("cache_file_metadata_args") + if self.req is not None: + oprot.writeFieldBegin("req", TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(cache_file_metadata_args) +cache_file_metadata_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "req", + [CacheFileMetadataRequest, None], + None, + ), # 1 +) + + +class cache_file_metadata_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = CacheFileMetadataResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("cache_file_metadata_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(cache_file_metadata_result) +cache_file_metadata_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [CacheFileMetadataResult, None], + None, + ), # 0 +) + + +class get_metastore_db_uuid_args: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_metastore_db_uuid_args") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_metastore_db_uuid_args) +get_metastore_db_uuid_args.thrift_spec = () + + +class get_metastore_db_uuid_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRING: + self.success = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_metastore_db_uuid_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString(self.success.encode("utf-8") if sys.version_info[0] == 2 else self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_metastore_db_uuid_result) +get_metastore_db_uuid_result.thrift_spec = ( + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class create_resource_plan_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = WMCreateResourcePlanRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_resource_plan_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_resource_plan_args) +create_resource_plan_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [WMCreateResourcePlanRequest, None], + None, + ), # 1 +) + + +class create_resource_plan_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = WMCreateResourcePlanResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_resource_plan_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_resource_plan_result) +create_resource_plan_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [WMCreateResourcePlanResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [AlreadyExistsException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class get_resource_plan_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = WMGetResourcePlanRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_resource_plan_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_resource_plan_args) +get_resource_plan_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [WMGetResourcePlanRequest, None], + None, + ), # 1 +) + + +class get_resource_plan_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = WMGetResourcePlanResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_resource_plan_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_resource_plan_result) +get_resource_plan_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [WMGetResourcePlanResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class get_active_resource_plan_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = WMGetActiveResourcePlanRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_active_resource_plan_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_active_resource_plan_args) +get_active_resource_plan_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [WMGetActiveResourcePlanRequest, None], + None, + ), # 1 +) + + +class get_active_resource_plan_result: + """ + Attributes: + - success + - o2 + + """ + + def __init__( + self, + success=None, + o2=None, + ): + self.success = success + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = WMGetActiveResourcePlanResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_active_resource_plan_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 1) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_active_resource_plan_result) +get_active_resource_plan_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [WMGetActiveResourcePlanResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 1 +) + + +class get_all_resource_plans_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = WMGetAllResourcePlanRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_all_resource_plans_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_all_resource_plans_args) +get_all_resource_plans_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [WMGetAllResourcePlanRequest, None], + None, + ), # 1 +) + + +class get_all_resource_plans_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = WMGetAllResourcePlanResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_all_resource_plans_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_all_resource_plans_result) +get_all_resource_plans_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [WMGetAllResourcePlanResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class alter_resource_plan_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = WMAlterResourcePlanRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_resource_plan_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_resource_plan_args) +alter_resource_plan_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [WMAlterResourcePlanRequest, None], + None, + ), # 1 +) + + +class alter_resource_plan_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = WMAlterResourcePlanResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_resource_plan_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_resource_plan_result) +alter_resource_plan_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [WMAlterResourcePlanResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidOperationException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class validate_resource_plan_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = WMValidateResourcePlanRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("validate_resource_plan_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(validate_resource_plan_args) +validate_resource_plan_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [WMValidateResourcePlanRequest, None], + None, + ), # 1 +) + + +class validate_resource_plan_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = WMValidateResourcePlanResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("validate_resource_plan_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(validate_resource_plan_result) +validate_resource_plan_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [WMValidateResourcePlanResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class drop_resource_plan_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = WMDropResourcePlanRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_resource_plan_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_resource_plan_args) +drop_resource_plan_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [WMDropResourcePlanRequest, None], + None, + ), # 1 +) + + +class drop_resource_plan_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = WMDropResourcePlanResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_resource_plan_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_resource_plan_result) +drop_resource_plan_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [WMDropResourcePlanResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidOperationException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class create_wm_trigger_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = WMCreateTriggerRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_wm_trigger_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_wm_trigger_args) +create_wm_trigger_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [WMCreateTriggerRequest, None], + None, + ), # 1 +) + + +class create_wm_trigger_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + o4=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = WMCreateTriggerResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_wm_trigger_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin("o4", TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_wm_trigger_result) +create_wm_trigger_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [WMCreateTriggerResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [AlreadyExistsException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [InvalidObjectException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "o4", + [MetaException, None], + None, + ), # 4 +) + + +class alter_wm_trigger_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = WMAlterTriggerRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_wm_trigger_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_wm_trigger_args) +alter_wm_trigger_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [WMAlterTriggerRequest, None], + None, + ), # 1 +) + + +class alter_wm_trigger_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = WMAlterTriggerResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_wm_trigger_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_wm_trigger_result) +alter_wm_trigger_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [WMAlterTriggerResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class drop_wm_trigger_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = WMDropTriggerRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_wm_trigger_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_wm_trigger_args) +drop_wm_trigger_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [WMDropTriggerRequest, None], + None, + ), # 1 +) + + +class drop_wm_trigger_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = WMDropTriggerResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_wm_trigger_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_wm_trigger_result) +drop_wm_trigger_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [WMDropTriggerResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidOperationException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class get_triggers_for_resourceplan_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = WMGetTriggersForResourePlanRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_triggers_for_resourceplan_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_triggers_for_resourceplan_args) +get_triggers_for_resourceplan_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [WMGetTriggersForResourePlanRequest, None], + None, + ), # 1 +) + + +class get_triggers_for_resourceplan_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = WMGetTriggersForResourePlanResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_triggers_for_resourceplan_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_triggers_for_resourceplan_result) +get_triggers_for_resourceplan_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [WMGetTriggersForResourePlanResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class create_wm_pool_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = WMCreatePoolRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_wm_pool_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_wm_pool_args) +create_wm_pool_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [WMCreatePoolRequest, None], + None, + ), # 1 +) + + +class create_wm_pool_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + o4=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = WMCreatePoolResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_wm_pool_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin("o4", TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_wm_pool_result) +create_wm_pool_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [WMCreatePoolResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [AlreadyExistsException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [InvalidObjectException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "o4", + [MetaException, None], + None, + ), # 4 +) + + +class alter_wm_pool_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = WMAlterPoolRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_wm_pool_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_wm_pool_args) +alter_wm_pool_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [WMAlterPoolRequest, None], + None, + ), # 1 +) + + +class alter_wm_pool_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + o4=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = WMAlterPoolResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_wm_pool_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin("o4", TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_wm_pool_result) +alter_wm_pool_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [WMAlterPoolResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [AlreadyExistsException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [InvalidObjectException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "o4", + [MetaException, None], + None, + ), # 4 +) + + +class drop_wm_pool_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = WMDropPoolRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_wm_pool_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_wm_pool_args) +drop_wm_pool_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [WMDropPoolRequest, None], + None, + ), # 1 +) + + +class drop_wm_pool_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = WMDropPoolResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_wm_pool_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_wm_pool_result) +drop_wm_pool_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [WMDropPoolResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidOperationException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class create_or_update_wm_mapping_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = WMCreateOrUpdateMappingRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_or_update_wm_mapping_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_or_update_wm_mapping_args) +create_or_update_wm_mapping_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [WMCreateOrUpdateMappingRequest, None], + None, + ), # 1 +) + + +class create_or_update_wm_mapping_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + o4=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = WMCreateOrUpdateMappingResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_or_update_wm_mapping_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin("o4", TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_or_update_wm_mapping_result) +create_or_update_wm_mapping_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [WMCreateOrUpdateMappingResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [AlreadyExistsException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [InvalidObjectException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "o4", + [MetaException, None], + None, + ), # 4 +) + + +class drop_wm_mapping_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = WMDropMappingRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_wm_mapping_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_wm_mapping_args) +drop_wm_mapping_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [WMDropMappingRequest, None], + None, + ), # 1 +) + + +class drop_wm_mapping_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = WMDropMappingResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_wm_mapping_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_wm_mapping_result) +drop_wm_mapping_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [WMDropMappingResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidOperationException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class create_or_drop_wm_trigger_to_pool_mapping_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = WMCreateOrDropTriggerToPoolMappingRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_or_drop_wm_trigger_to_pool_mapping_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_or_drop_wm_trigger_to_pool_mapping_args) +create_or_drop_wm_trigger_to_pool_mapping_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [WMCreateOrDropTriggerToPoolMappingRequest, None], + None, + ), # 1 +) + + +class create_or_drop_wm_trigger_to_pool_mapping_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + o3=None, + o4=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = WMCreateOrDropTriggerToPoolMappingResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = InvalidObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_or_drop_wm_trigger_to_pool_mapping_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin("o4", TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_or_drop_wm_trigger_to_pool_mapping_result) +create_or_drop_wm_trigger_to_pool_mapping_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [WMCreateOrDropTriggerToPoolMappingResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [AlreadyExistsException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [InvalidObjectException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "o4", + [MetaException, None], + None, + ), # 4 +) + + +class create_ischema_args: + """ + Attributes: + - schema + + """ + + def __init__( + self, + schema=None, + ): + self.schema = schema + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.schema = ISchema() + self.schema.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_ischema_args") + if self.schema is not None: + oprot.writeFieldBegin("schema", TType.STRUCT, 1) + self.schema.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_ischema_args) +create_ischema_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "schema", + [ISchema, None], + None, + ), # 1 +) + + +class create_ischema_result: + """ + Attributes: + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + o1=None, + o2=None, + o3=None, + ): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_ischema_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_ischema_result) +create_ischema_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [AlreadyExistsException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class alter_ischema_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = AlterISchemaRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_ischema_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_ischema_args) +alter_ischema_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [AlterISchemaRequest, None], + None, + ), # 1 +) + + +class alter_ischema_result: + """ + Attributes: + - o1 + - o2 + + """ + + def __init__( + self, + o1=None, + o2=None, + ): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("alter_ischema_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(alter_ischema_result) +alter_ischema_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class get_ischema_args: + """ + Attributes: + - name + + """ + + def __init__( + self, + name=None, + ): + self.name = name + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.name = ISchemaName() + self.name.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_ischema_args") + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRUCT, 1) + self.name.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_ischema_args) +get_ischema_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "name", + [ISchemaName, None], + None, + ), # 1 +) + + +class get_ischema_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = ISchema() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_ischema_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_ischema_result) +get_ischema_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [ISchema, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class drop_ischema_args: + """ + Attributes: + - name + + """ + + def __init__( + self, + name=None, + ): + self.name = name + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.name = ISchemaName() + self.name.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_ischema_args") + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRUCT, 1) + self.name.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_ischema_args) +drop_ischema_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "name", + [ISchemaName, None], + None, + ), # 1 +) + + +class drop_ischema_result: + """ + Attributes: + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + o1=None, + o2=None, + o3=None, + ): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_ischema_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_ischema_result) +drop_ischema_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidOperationException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class add_schema_version_args: + """ + Attributes: + - schemaVersion + + """ + + def __init__( + self, + schemaVersion=None, + ): + self.schemaVersion = schemaVersion + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.schemaVersion = SchemaVersion() + self.schemaVersion.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_schema_version_args") + if self.schemaVersion is not None: + oprot.writeFieldBegin("schemaVersion", TType.STRUCT, 1) + self.schemaVersion.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_schema_version_args) +add_schema_version_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "schemaVersion", + [SchemaVersion, None], + None, + ), # 1 +) + + +class add_schema_version_result: + """ + Attributes: + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + o1=None, + o2=None, + o3=None, + ): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_schema_version_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_schema_version_result) +add_schema_version_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [AlreadyExistsException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class get_schema_version_args: + """ + Attributes: + - schemaVersion + + """ + + def __init__( + self, + schemaVersion=None, + ): + self.schemaVersion = schemaVersion + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.schemaVersion = SchemaVersionDescriptor() + self.schemaVersion.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_schema_version_args") + if self.schemaVersion is not None: + oprot.writeFieldBegin("schemaVersion", TType.STRUCT, 1) + self.schemaVersion.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_schema_version_args) +get_schema_version_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "schemaVersion", + [SchemaVersionDescriptor, None], + None, + ), # 1 +) + + +class get_schema_version_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = SchemaVersion() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_schema_version_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_schema_version_result) +get_schema_version_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [SchemaVersion, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class get_schema_latest_version_args: + """ + Attributes: + - schemaName + + """ + + def __init__( + self, + schemaName=None, + ): + self.schemaName = schemaName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.schemaName = ISchemaName() + self.schemaName.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_schema_latest_version_args") + if self.schemaName is not None: + oprot.writeFieldBegin("schemaName", TType.STRUCT, 1) + self.schemaName.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_schema_latest_version_args) +get_schema_latest_version_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "schemaName", + [ISchemaName, None], + None, + ), # 1 +) + + +class get_schema_latest_version_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = SchemaVersion() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_schema_latest_version_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_schema_latest_version_result) +get_schema_latest_version_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [SchemaVersion, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class get_schema_all_versions_args: + """ + Attributes: + - schemaName + + """ + + def __init__( + self, + schemaName=None, + ): + self.schemaName = schemaName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.schemaName = ISchemaName() + self.schemaName.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_schema_all_versions_args") + if self.schemaName is not None: + oprot.writeFieldBegin("schemaName", TType.STRUCT, 1) + self.schemaName.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_schema_all_versions_args) +get_schema_all_versions_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "schemaName", + [ISchemaName, None], + None, + ), # 1 +) + + +class get_schema_all_versions_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1775, _size1772) = iprot.readListBegin() + for _i1776 in range(_size1772): + _elem1777 = SchemaVersion() + _elem1777.read(iprot) + self.success.append(_elem1777) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_schema_all_versions_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter1778 in self.success: + iter1778.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_schema_all_versions_result) +get_schema_all_versions_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [SchemaVersion, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class drop_schema_version_args: + """ + Attributes: + - schemaVersion + + """ + + def __init__( + self, + schemaVersion=None, + ): + self.schemaVersion = schemaVersion + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.schemaVersion = SchemaVersionDescriptor() + self.schemaVersion.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_schema_version_args") + if self.schemaVersion is not None: + oprot.writeFieldBegin("schemaVersion", TType.STRUCT, 1) + self.schemaVersion.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_schema_version_args) +drop_schema_version_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "schemaVersion", + [SchemaVersionDescriptor, None], + None, + ), # 1 +) + + +class drop_schema_version_result: + """ + Attributes: + - o1 + - o2 + + """ + + def __init__( + self, + o1=None, + o2=None, + ): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_schema_version_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_schema_version_result) +drop_schema_version_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class get_schemas_by_cols_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = FindSchemasByColsRqst() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_schemas_by_cols_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_schemas_by_cols_args) +get_schemas_by_cols_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [FindSchemasByColsRqst, None], + None, + ), # 1 +) + + +class get_schemas_by_cols_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = FindSchemasByColsResp() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_schemas_by_cols_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_schemas_by_cols_result) +get_schemas_by_cols_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [FindSchemasByColsResp, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class map_schema_version_to_serde_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = MapSchemaVersionToSerdeRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("map_schema_version_to_serde_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(map_schema_version_to_serde_args) +map_schema_version_to_serde_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [MapSchemaVersionToSerdeRequest, None], + None, + ), # 1 +) + + +class map_schema_version_to_serde_result: + """ + Attributes: + - o1 + - o2 + + """ + + def __init__( + self, + o1=None, + o2=None, + ): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("map_schema_version_to_serde_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(map_schema_version_to_serde_result) +map_schema_version_to_serde_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class set_schema_version_state_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = SetSchemaVersionStateRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("set_schema_version_state_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(set_schema_version_state_args) +set_schema_version_state_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [SetSchemaVersionStateRequest, None], + None, + ), # 1 +) + + +class set_schema_version_state_result: + """ + Attributes: + - o1 + - o2 + - o3 + + """ + + def __init__( + self, + o1=None, + o2=None, + o3=None, + ): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("set_schema_version_state_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(set_schema_version_state_result) +set_schema_version_state_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidOperationException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [MetaException, None], + None, + ), # 3 +) + + +class add_serde_args: + """ + Attributes: + - serde + + """ + + def __init__( + self, + serde=None, + ): + self.serde = serde + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.serde = SerDeInfo() + self.serde.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_serde_args") + if self.serde is not None: + oprot.writeFieldBegin("serde", TType.STRUCT, 1) + self.serde.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_serde_args) +add_serde_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "serde", + [SerDeInfo, None], + None, + ), # 1 +) + + +class add_serde_result: + """ + Attributes: + - o1 + - o2 + + """ + + def __init__( + self, + o1=None, + o2=None, + ): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_serde_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_serde_result) +add_serde_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [AlreadyExistsException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class get_serde_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = GetSerdeRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_serde_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_serde_args) +get_serde_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [GetSerdeRequest, None], + None, + ), # 1 +) + + +class get_serde_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = SerDeInfo() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_serde_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_serde_result) +get_serde_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [SerDeInfo, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class get_lock_materialization_rebuild_args: + """ + Attributes: + - dbName + - tableName + - txnId + + """ + + def __init__( + self, + dbName=None, + tableName=None, + txnId=None, + ): + self.dbName = dbName + self.tableName = tableName + self.txnId = txnId + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tableName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.txnId = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_lock_materialization_rebuild_args") + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 1) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tableName is not None: + oprot.writeFieldBegin("tableName", TType.STRING, 2) + oprot.writeString(self.tableName.encode("utf-8") if sys.version_info[0] == 2 else self.tableName) + oprot.writeFieldEnd() + if self.txnId is not None: + oprot.writeFieldBegin("txnId", TType.I64, 3) + oprot.writeI64(self.txnId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_lock_materialization_rebuild_args) +get_lock_materialization_rebuild_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tableName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.I64, + "txnId", + None, + None, + ), # 3 +) + + +class get_lock_materialization_rebuild_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = LockResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_lock_materialization_rebuild_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_lock_materialization_rebuild_result) +get_lock_materialization_rebuild_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [LockResponse, None], + None, + ), # 0 +) + + +class heartbeat_lock_materialization_rebuild_args: + """ + Attributes: + - dbName + - tableName + - txnId + + """ + + def __init__( + self, + dbName=None, + tableName=None, + txnId=None, + ): + self.dbName = dbName + self.tableName = tableName + self.txnId = txnId + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tableName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.txnId = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("heartbeat_lock_materialization_rebuild_args") + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 1) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tableName is not None: + oprot.writeFieldBegin("tableName", TType.STRING, 2) + oprot.writeString(self.tableName.encode("utf-8") if sys.version_info[0] == 2 else self.tableName) + oprot.writeFieldEnd() + if self.txnId is not None: + oprot.writeFieldBegin("txnId", TType.I64, 3) + oprot.writeI64(self.txnId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(heartbeat_lock_materialization_rebuild_args) +heartbeat_lock_materialization_rebuild_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tableName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.I64, + "txnId", + None, + None, + ), # 3 +) + + +class heartbeat_lock_materialization_rebuild_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("heartbeat_lock_materialization_rebuild_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(heartbeat_lock_materialization_rebuild_result) +heartbeat_lock_materialization_rebuild_result.thrift_spec = ( + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 +) + + +class add_runtime_stats_args: + """ + Attributes: + - stat + + """ + + def __init__( + self, + stat=None, + ): + self.stat = stat + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.stat = RuntimeStat() + self.stat.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_runtime_stats_args") + if self.stat is not None: + oprot.writeFieldBegin("stat", TType.STRUCT, 1) + self.stat.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_runtime_stats_args) +add_runtime_stats_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "stat", + [RuntimeStat, None], + None, + ), # 1 +) + + +class add_runtime_stats_result: + """ + Attributes: + - o1 + + """ + + def __init__( + self, + o1=None, + ): + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_runtime_stats_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_runtime_stats_result) +add_runtime_stats_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class get_runtime_stats_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = GetRuntimeStatsRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_runtime_stats_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_runtime_stats_args) +get_runtime_stats_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [GetRuntimeStatsRequest, None], + None, + ), # 1 +) + + +class get_runtime_stats_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1782, _size1779) = iprot.readListBegin() + for _i1783 in range(_size1779): + _elem1784 = RuntimeStat() + _elem1784.read(iprot) + self.success.append(_elem1784) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_runtime_stats_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter1785 in self.success: + iter1785.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_runtime_stats_result) +get_runtime_stats_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [RuntimeStat, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class get_partitions_with_specs_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = GetPartitionsRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_with_specs_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_with_specs_args) +get_partitions_with_specs_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [GetPartitionsRequest, None], + None, + ), # 1 +) + + +class get_partitions_with_specs_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetPartitionsResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_partitions_with_specs_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_partitions_with_specs_result) +get_partitions_with_specs_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [GetPartitionsResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class scheduled_query_poll_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = ScheduledQueryPollRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("scheduled_query_poll_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(scheduled_query_poll_args) +scheduled_query_poll_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [ScheduledQueryPollRequest, None], + None, + ), # 1 +) + + +class scheduled_query_poll_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = ScheduledQueryPollResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("scheduled_query_poll_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(scheduled_query_poll_result) +scheduled_query_poll_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [ScheduledQueryPollResponse, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class scheduled_query_maintenance_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = ScheduledQueryMaintenanceRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("scheduled_query_maintenance_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(scheduled_query_maintenance_args) +scheduled_query_maintenance_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [ScheduledQueryMaintenanceRequest, None], + None, + ), # 1 +) + + +class scheduled_query_maintenance_result: + """ + Attributes: + - o1 + - o2 + - o3 + - o4 + + """ + + def __init__( + self, + o1=None, + o2=None, + o3=None, + o4=None, + ): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = AlreadyExistsException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = InvalidInputException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("scheduled_query_maintenance_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin("o3", TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin("o4", TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(scheduled_query_maintenance_result) +scheduled_query_maintenance_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o3", + [AlreadyExistsException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "o4", + [InvalidInputException, None], + None, + ), # 4 +) + + +class scheduled_query_progress_args: + """ + Attributes: + - info + + """ + + def __init__( + self, + info=None, + ): + self.info = info + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.info = ScheduledQueryProgressInfo() + self.info.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("scheduled_query_progress_args") + if self.info is not None: + oprot.writeFieldBegin("info", TType.STRUCT, 1) + self.info.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(scheduled_query_progress_args) +scheduled_query_progress_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "info", + [ScheduledQueryProgressInfo, None], + None, + ), # 1 +) + + +class scheduled_query_progress_result: + """ + Attributes: + - o1 + - o2 + + """ + + def __init__( + self, + o1=None, + o2=None, + ): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidOperationException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("scheduled_query_progress_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(scheduled_query_progress_result) +scheduled_query_progress_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [InvalidOperationException, None], + None, + ), # 2 +) + + +class get_scheduled_query_args: + """ + Attributes: + - scheduleKey + + """ + + def __init__( + self, + scheduleKey=None, + ): + self.scheduleKey = scheduleKey + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.scheduleKey = ScheduledQueryKey() + self.scheduleKey.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_scheduled_query_args") + if self.scheduleKey is not None: + oprot.writeFieldBegin("scheduleKey", TType.STRUCT, 1) + self.scheduleKey.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_scheduled_query_args) +get_scheduled_query_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "scheduleKey", + [ScheduledQueryKey, None], + None, + ), # 1 +) + + +class get_scheduled_query_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = ScheduledQuery() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_scheduled_query_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_scheduled_query_result) +get_scheduled_query_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [ScheduledQuery, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class add_replication_metrics_args: + """ + Attributes: + - replicationMetricList + + """ + + def __init__( + self, + replicationMetricList=None, + ): + self.replicationMetricList = replicationMetricList + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.replicationMetricList = ReplicationMetricList() + self.replicationMetricList.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_replication_metrics_args") + if self.replicationMetricList is not None: + oprot.writeFieldBegin("replicationMetricList", TType.STRUCT, 1) + self.replicationMetricList.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_replication_metrics_args) +add_replication_metrics_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "replicationMetricList", + [ReplicationMetricList, None], + None, + ), # 1 +) + + +class add_replication_metrics_result: + """ + Attributes: + - o1 + + """ + + def __init__( + self, + o1=None, + ): + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_replication_metrics_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_replication_metrics_result) +add_replication_metrics_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class get_replication_metrics_args: + """ + Attributes: + - rqst + + """ + + def __init__( + self, + rqst=None, + ): + self.rqst = rqst + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = GetReplicationMetricsRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_replication_metrics_args") + if self.rqst is not None: + oprot.writeFieldBegin("rqst", TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_replication_metrics_args) +get_replication_metrics_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "rqst", + [GetReplicationMetricsRequest, None], + None, + ), # 1 +) + + +class get_replication_metrics_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = ReplicationMetricList() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_replication_metrics_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_replication_metrics_result) +get_replication_metrics_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [ReplicationMetricList, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class get_open_txns_req_args: + """ + Attributes: + - getOpenTxnsRequest + + """ + + def __init__( + self, + getOpenTxnsRequest=None, + ): + self.getOpenTxnsRequest = getOpenTxnsRequest + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.getOpenTxnsRequest = GetOpenTxnsRequest() + self.getOpenTxnsRequest.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_open_txns_req_args") + if self.getOpenTxnsRequest is not None: + oprot.writeFieldBegin("getOpenTxnsRequest", TType.STRUCT, 1) + self.getOpenTxnsRequest.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_open_txns_req_args) +get_open_txns_req_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "getOpenTxnsRequest", + [GetOpenTxnsRequest, None], + None, + ), # 1 +) + + +class get_open_txns_req_result: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetOpenTxnsResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_open_txns_req_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_open_txns_req_result) +get_open_txns_req_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [GetOpenTxnsResponse, None], + None, + ), # 0 +) + + +class create_stored_procedure_args: + """ + Attributes: + - proc + + """ + + def __init__( + self, + proc=None, + ): + self.proc = proc + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.proc = StoredProcedure() + self.proc.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_stored_procedure_args") + if self.proc is not None: + oprot.writeFieldBegin("proc", TType.STRUCT, 1) + self.proc.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_stored_procedure_args) +create_stored_procedure_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "proc", + [StoredProcedure, None], + None, + ), # 1 +) + + +class create_stored_procedure_result: + """ + Attributes: + - o1 + - o2 + + """ + + def __init__( + self, + o1=None, + o2=None, + ): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("create_stored_procedure_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(create_stored_procedure_result) +create_stored_procedure_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [NoSuchObjectException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [MetaException, None], + None, + ), # 2 +) + + +class get_stored_procedure_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = StoredProcedureRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_stored_procedure_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_stored_procedure_args) +get_stored_procedure_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [StoredProcedureRequest, None], + None, + ), # 1 +) + + +class get_stored_procedure_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = StoredProcedure() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_stored_procedure_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_stored_procedure_result) +get_stored_procedure_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [StoredProcedure, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class drop_stored_procedure_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = StoredProcedureRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_stored_procedure_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_stored_procedure_args) +drop_stored_procedure_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [StoredProcedureRequest, None], + None, + ), # 1 +) + + +class drop_stored_procedure_result: + """ + Attributes: + - o1 + + """ + + def __init__( + self, + o1=None, + ): + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_stored_procedure_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_stored_procedure_result) +drop_stored_procedure_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class get_all_stored_procedures_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = ListStoredProcedureRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_all_stored_procedures_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_all_stored_procedures_args) +get_all_stored_procedures_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [ListStoredProcedureRequest, None], + None, + ), # 1 +) + + +class get_all_stored_procedures_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1789, _size1786) = iprot.readListBegin() + for _i1790 in range(_size1786): + _elem1791 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success.append(_elem1791) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_all_stored_procedures_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter1792 in self.success: + oprot.writeString(iter1792.encode("utf-8") if sys.version_info[0] == 2 else iter1792) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_all_stored_procedures_result) +get_all_stored_procedures_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class find_package_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = GetPackageRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("find_package_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(find_package_args) +find_package_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [GetPackageRequest, None], + None, + ), # 1 +) + + +class find_package_result: + """ + Attributes: + - success + - o1 + - o2 + + """ + + def __init__( + self, + success=None, + o1=None, + o2=None, + ): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Package() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("find_package_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin("o2", TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(find_package_result) +find_package_result.thrift_spec = ( + ( + 0, + TType.STRUCT, + "success", + [Package, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "o2", + [NoSuchObjectException, None], + None, + ), # 2 +) + + +class add_package_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = AddPackageRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_package_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_package_args) +add_package_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [AddPackageRequest, None], + None, + ), # 1 +) + + +class add_package_result: + """ + Attributes: + - o1 + + """ + + def __init__( + self, + o1=None, + ): + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("add_package_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(add_package_result) +add_package_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class get_all_packages_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = ListPackageRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_all_packages_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_all_packages_args) +get_all_packages_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [ListPackageRequest, None], + None, + ), # 1 +) + + +class get_all_packages_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1796, _size1793) = iprot.readListBegin() + for _i1797 in range(_size1793): + _elem1798 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success.append(_elem1798) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_all_packages_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter1799 in self.success: + oprot.writeString(iter1799.encode("utf-8") if sys.version_info[0] == 2 else iter1799) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_all_packages_result) +get_all_packages_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class drop_package_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = DropPackageRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_package_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_package_args) +drop_package_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [DropPackageRequest, None], + None, + ), # 1 +) + + +class drop_package_result: + """ + Attributes: + - o1 + + """ + + def __init__( + self, + o1=None, + ): + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("drop_package_result") + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(drop_package_result) +drop_package_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) + + +class get_all_write_event_info_args: + """ + Attributes: + - request + + """ + + def __init__( + self, + request=None, + ): + self.request = request + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = GetAllWriteEventInfoRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_all_write_event_info_args") + if self.request is not None: + oprot.writeFieldBegin("request", TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_all_write_event_info_args) +get_all_write_event_info_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "request", + [GetAllWriteEventInfoRequest, None], + None, + ), # 1 +) + + +class get_all_write_event_info_result: + """ + Attributes: + - success + - o1 + + """ + + def __init__( + self, + success=None, + o1=None, + ): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1803, _size1800) = iprot.readListBegin() + for _i1804 in range(_size1800): + _elem1805 = WriteEventInfo() + _elem1805.read(iprot) + self.success.append(_elem1805) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("get_all_write_event_info_result") + if self.success is not None: + oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter1806 in self.success: + iter1806.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin("o1", TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(get_all_write_event_info_result) +get_all_write_event_info_result.thrift_spec = ( + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [WriteEventInfo, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "o1", + [MetaException, None], + None, + ), # 1 +) +fix_spec(all_structs) +del all_structs diff --git a/vendor/hive_metastore/__init__.py b/vendor/hive_metastore/__init__.py new file mode 100644 index 0000000000..178d664d81 --- /dev/null +++ b/vendor/hive_metastore/__init__.py @@ -0,0 +1,17 @@ +# 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. +__all__ = ["ttypes", "constants", "ThriftHiveMetastore"] diff --git a/vendor/hive_metastore/constants.py b/vendor/hive_metastore/constants.py new file mode 100644 index 0000000000..218e527553 --- /dev/null +++ b/vendor/hive_metastore/constants.py @@ -0,0 +1,66 @@ +# 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. +# +# Autogenerated by Thrift Compiler (0.16.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py +# + + + + +DDL_TIME = "transient_lastDdlTime" +ACCESSTYPE_NONE = 1 +ACCESSTYPE_READONLY = 2 +ACCESSTYPE_WRITEONLY = 4 +ACCESSTYPE_READWRITE = 8 +HIVE_FILTER_FIELD_OWNER = "hive_filter_field_owner__" +HIVE_FILTER_FIELD_PARAMS = "hive_filter_field_params__" +HIVE_FILTER_FIELD_LAST_ACCESS = "hive_filter_field_last_access__" +IS_ARCHIVED = "is_archived" +ORIGINAL_LOCATION = "original_location" +IS_IMMUTABLE = "immutable" +META_TABLE_COLUMNS = "columns" +META_TABLE_COLUMN_TYPES = "columns.types" +BUCKET_FIELD_NAME = "bucket_field_name" +BUCKET_COUNT = "bucket_count" +FIELD_TO_DIMENSION = "field_to_dimension" +META_TABLE_NAME = "name" +META_TABLE_DB = "db" +META_TABLE_LOCATION = "location" +META_TABLE_SERDE = "serde" +META_TABLE_PARTITION_COLUMNS = "partition_columns" +META_TABLE_PARTITION_COLUMN_TYPES = "partition_columns.types" +FILE_INPUT_FORMAT = "file.inputformat" +FILE_OUTPUT_FORMAT = "file.outputformat" +META_TABLE_STORAGE = "storage_handler" +TABLE_IS_TRANSACTIONAL = "transactional" +TABLE_NO_AUTO_COMPACT = "no_auto_compaction" +TABLE_TRANSACTIONAL_PROPERTIES = "transactional_properties" +TABLE_BUCKETING_VERSION = "bucketing_version" +DRUID_CONFIG_PREFIX = "druid." +JDBC_CONFIG_PREFIX = "hive.sql." +TABLE_IS_CTAS = "created_with_ctas" +TABLE_IS_CTLT = "created_with_ctlt" +PARTITION_TRANSFORM_SPEC = "partition_transform_spec" +NO_CLEANUP = "no_cleanup" +CTAS_LEGACY_CONFIG = "create_table_as_external" +DEFAULT_TABLE_TYPE = "defaultTableType" +TXN_ID = "txnId" +WRITE_ID = "writeId" diff --git a/vendor/hive_metastore/ttypes.py b/vendor/hive_metastore/ttypes.py new file mode 100644 index 0000000000..dca7aaadc7 --- /dev/null +++ b/vendor/hive_metastore/ttypes.py @@ -0,0 +1,42515 @@ +# 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. +# +# Autogenerated by Thrift Compiler (0.16.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py +# + +import sys + +from thrift.protocol.TProtocol import TProtocolException +from thrift.Thrift import ( + TException, + TType, +) +from thrift.transport import TTransport +from thrift.TRecursive import fix_spec + +all_structs = [] + + +class HiveObjectType: + GLOBAL = 1 + DATABASE = 2 + TABLE = 3 + PARTITION = 4 + COLUMN = 5 + DATACONNECTOR = 6 + + _VALUES_TO_NAMES = { + 1: "GLOBAL", + 2: "DATABASE", + 3: "TABLE", + 4: "PARTITION", + 5: "COLUMN", + 6: "DATACONNECTOR", + } + + _NAMES_TO_VALUES = { + "GLOBAL": 1, + "DATABASE": 2, + "TABLE": 3, + "PARTITION": 4, + "COLUMN": 5, + "DATACONNECTOR": 6, + } + + +class PrincipalType: + USER = 1 + ROLE = 2 + GROUP = 3 + + _VALUES_TO_NAMES = { + 1: "USER", + 2: "ROLE", + 3: "GROUP", + } + + _NAMES_TO_VALUES = { + "USER": 1, + "ROLE": 2, + "GROUP": 3, + } + + +class PartitionEventType: + LOAD_DONE = 1 + + _VALUES_TO_NAMES = { + 1: "LOAD_DONE", + } + + _NAMES_TO_VALUES = { + "LOAD_DONE": 1, + } + + +class TxnState: + COMMITTED = 1 + ABORTED = 2 + OPEN = 3 + + _VALUES_TO_NAMES = { + 1: "COMMITTED", + 2: "ABORTED", + 3: "OPEN", + } + + _NAMES_TO_VALUES = { + "COMMITTED": 1, + "ABORTED": 2, + "OPEN": 3, + } + + +class LockLevel: + DB = 1 + TABLE = 2 + PARTITION = 3 + + _VALUES_TO_NAMES = { + 1: "DB", + 2: "TABLE", + 3: "PARTITION", + } + + _NAMES_TO_VALUES = { + "DB": 1, + "TABLE": 2, + "PARTITION": 3, + } + + +class LockState: + ACQUIRED = 1 + WAITING = 2 + ABORT = 3 + NOT_ACQUIRED = 4 + + _VALUES_TO_NAMES = { + 1: "ACQUIRED", + 2: "WAITING", + 3: "ABORT", + 4: "NOT_ACQUIRED", + } + + _NAMES_TO_VALUES = { + "ACQUIRED": 1, + "WAITING": 2, + "ABORT": 3, + "NOT_ACQUIRED": 4, + } + + +class LockType: + SHARED_READ = 1 + SHARED_WRITE = 2 + EXCLUSIVE = 3 + EXCL_WRITE = 4 + + _VALUES_TO_NAMES = { + 1: "SHARED_READ", + 2: "SHARED_WRITE", + 3: "EXCLUSIVE", + 4: "EXCL_WRITE", + } + + _NAMES_TO_VALUES = { + "SHARED_READ": 1, + "SHARED_WRITE": 2, + "EXCLUSIVE": 3, + "EXCL_WRITE": 4, + } + + +class CompactionType: + MINOR = 1 + MAJOR = 2 + + _VALUES_TO_NAMES = { + 1: "MINOR", + 2: "MAJOR", + } + + _NAMES_TO_VALUES = { + "MINOR": 1, + "MAJOR": 2, + } + + +class GrantRevokeType: + GRANT = 1 + REVOKE = 2 + + _VALUES_TO_NAMES = { + 1: "GRANT", + 2: "REVOKE", + } + + _NAMES_TO_VALUES = { + "GRANT": 1, + "REVOKE": 2, + } + + +class DataOperationType: + SELECT = 1 + INSERT = 2 + UPDATE = 3 + DELETE = 4 + UNSET = 5 + NO_TXN = 6 + + _VALUES_TO_NAMES = { + 1: "SELECT", + 2: "INSERT", + 3: "UPDATE", + 4: "DELETE", + 5: "UNSET", + 6: "NO_TXN", + } + + _NAMES_TO_VALUES = { + "SELECT": 1, + "INSERT": 2, + "UPDATE": 3, + "DELETE": 4, + "UNSET": 5, + "NO_TXN": 6, + } + + +class EventRequestType: + INSERT = 1 + UPDATE = 2 + DELETE = 3 + + _VALUES_TO_NAMES = { + 1: "INSERT", + 2: "UPDATE", + 3: "DELETE", + } + + _NAMES_TO_VALUES = { + "INSERT": 1, + "UPDATE": 2, + "DELETE": 3, + } + + +class SerdeType: + HIVE = 1 + SCHEMA_REGISTRY = 2 + + _VALUES_TO_NAMES = { + 1: "HIVE", + 2: "SCHEMA_REGISTRY", + } + + _NAMES_TO_VALUES = { + "HIVE": 1, + "SCHEMA_REGISTRY": 2, + } + + +class SchemaType: + HIVE = 1 + AVRO = 2 + + _VALUES_TO_NAMES = { + 1: "HIVE", + 2: "AVRO", + } + + _NAMES_TO_VALUES = { + "HIVE": 1, + "AVRO": 2, + } + + +class SchemaCompatibility: + NONE = 1 + BACKWARD = 2 + FORWARD = 3 + BOTH = 4 + + _VALUES_TO_NAMES = { + 1: "NONE", + 2: "BACKWARD", + 3: "FORWARD", + 4: "BOTH", + } + + _NAMES_TO_VALUES = { + "NONE": 1, + "BACKWARD": 2, + "FORWARD": 3, + "BOTH": 4, + } + + +class SchemaValidation: + LATEST = 1 + ALL = 2 + + _VALUES_TO_NAMES = { + 1: "LATEST", + 2: "ALL", + } + + _NAMES_TO_VALUES = { + "LATEST": 1, + "ALL": 2, + } + + +class SchemaVersionState: + INITIATED = 1 + START_REVIEW = 2 + CHANGES_REQUIRED = 3 + REVIEWED = 4 + ENABLED = 5 + DISABLED = 6 + ARCHIVED = 7 + DELETED = 8 + + _VALUES_TO_NAMES = { + 1: "INITIATED", + 2: "START_REVIEW", + 3: "CHANGES_REQUIRED", + 4: "REVIEWED", + 5: "ENABLED", + 6: "DISABLED", + 7: "ARCHIVED", + 8: "DELETED", + } + + _NAMES_TO_VALUES = { + "INITIATED": 1, + "START_REVIEW": 2, + "CHANGES_REQUIRED": 3, + "REVIEWED": 4, + "ENABLED": 5, + "DISABLED": 6, + "ARCHIVED": 7, + "DELETED": 8, + } + + +class DatabaseType: + NATIVE = 1 + REMOTE = 2 + + _VALUES_TO_NAMES = { + 1: "NATIVE", + 2: "REMOTE", + } + + _NAMES_TO_VALUES = { + "NATIVE": 1, + "REMOTE": 2, + } + + +class FunctionType: + JAVA = 1 + + _VALUES_TO_NAMES = { + 1: "JAVA", + } + + _NAMES_TO_VALUES = { + "JAVA": 1, + } + + +class ResourceType: + JAR = 1 + FILE = 2 + ARCHIVE = 3 + + _VALUES_TO_NAMES = { + 1: "JAR", + 2: "FILE", + 3: "ARCHIVE", + } + + _NAMES_TO_VALUES = { + "JAR": 1, + "FILE": 2, + "ARCHIVE": 3, + } + + +class TxnType: + DEFAULT = 0 + REPL_CREATED = 1 + READ_ONLY = 2 + COMPACTION = 3 + MATER_VIEW_REBUILD = 4 + SOFT_DELETE = 5 + + _VALUES_TO_NAMES = { + 0: "DEFAULT", + 1: "REPL_CREATED", + 2: "READ_ONLY", + 3: "COMPACTION", + 4: "MATER_VIEW_REBUILD", + 5: "SOFT_DELETE", + } + + _NAMES_TO_VALUES = { + "DEFAULT": 0, + "REPL_CREATED": 1, + "READ_ONLY": 2, + "COMPACTION": 3, + "MATER_VIEW_REBUILD": 4, + "SOFT_DELETE": 5, + } + + +class GetTablesExtRequestFields: + ACCESS_TYPE = 1 + PROCESSOR_CAPABILITIES = 2 + ALL = 2147483647 + + _VALUES_TO_NAMES = { + 1: "ACCESS_TYPE", + 2: "PROCESSOR_CAPABILITIES", + 2147483647: "ALL", + } + + _NAMES_TO_VALUES = { + "ACCESS_TYPE": 1, + "PROCESSOR_CAPABILITIES": 2, + "ALL": 2147483647, + } + + +class CompactionMetricsMetricType: + NUM_OBSOLETE_DELTAS = 0 + NUM_DELTAS = 1 + NUM_SMALL_DELTAS = 2 + + _VALUES_TO_NAMES = { + 0: "NUM_OBSOLETE_DELTAS", + 1: "NUM_DELTAS", + 2: "NUM_SMALL_DELTAS", + } + + _NAMES_TO_VALUES = { + "NUM_OBSOLETE_DELTAS": 0, + "NUM_DELTAS": 1, + "NUM_SMALL_DELTAS": 2, + } + + +class FileMetadataExprType: + ORC_SARG = 1 + + _VALUES_TO_NAMES = { + 1: "ORC_SARG", + } + + _NAMES_TO_VALUES = { + "ORC_SARG": 1, + } + + +class ClientCapability: + TEST_CAPABILITY = 1 + INSERT_ONLY_TABLES = 2 + + _VALUES_TO_NAMES = { + 1: "TEST_CAPABILITY", + 2: "INSERT_ONLY_TABLES", + } + + _NAMES_TO_VALUES = { + "TEST_CAPABILITY": 1, + "INSERT_ONLY_TABLES": 2, + } + + +class WMResourcePlanStatus: + ACTIVE = 1 + ENABLED = 2 + DISABLED = 3 + + _VALUES_TO_NAMES = { + 1: "ACTIVE", + 2: "ENABLED", + 3: "DISABLED", + } + + _NAMES_TO_VALUES = { + "ACTIVE": 1, + "ENABLED": 2, + "DISABLED": 3, + } + + +class WMPoolSchedulingPolicy: + FAIR = 1 + FIFO = 2 + + _VALUES_TO_NAMES = { + 1: "FAIR", + 2: "FIFO", + } + + _NAMES_TO_VALUES = { + "FAIR": 1, + "FIFO": 2, + } + + +class ScheduledQueryMaintenanceRequestType: + CREATE = 1 + ALTER = 2 + DROP = 3 + + _VALUES_TO_NAMES = { + 1: "CREATE", + 2: "ALTER", + 3: "DROP", + } + + _NAMES_TO_VALUES = { + "CREATE": 1, + "ALTER": 2, + "DROP": 3, + } + + +class QueryState: + INITED = 0 + EXECUTING = 1 + FAILED = 2 + FINISHED = 3 + TIMED_OUT = 4 + AUTO_DISABLED = 5 + + _VALUES_TO_NAMES = { + 0: "INITED", + 1: "EXECUTING", + 2: "FAILED", + 3: "FINISHED", + 4: "TIMED_OUT", + 5: "AUTO_DISABLED", + } + + _NAMES_TO_VALUES = { + "INITED": 0, + "EXECUTING": 1, + "FAILED": 2, + "FINISHED": 3, + "TIMED_OUT": 4, + "AUTO_DISABLED": 5, + } + + +class PartitionFilterMode: + BY_NAMES = 0 + BY_VALUES = 1 + BY_EXPR = 2 + + _VALUES_TO_NAMES = { + 0: "BY_NAMES", + 1: "BY_VALUES", + 2: "BY_EXPR", + } + + _NAMES_TO_VALUES = { + "BY_NAMES": 0, + "BY_VALUES": 1, + "BY_EXPR": 2, + } + + +class Version: + """ + Attributes: + - version + - comments + + """ + + def __init__( + self, + version=None, + comments=None, + ): + self.version = version + self.comments = comments + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.version = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.comments = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("Version") + if self.version is not None: + oprot.writeFieldBegin("version", TType.STRING, 1) + oprot.writeString(self.version.encode("utf-8") if sys.version_info[0] == 2 else self.version) + oprot.writeFieldEnd() + if self.comments is not None: + oprot.writeFieldBegin("comments", TType.STRING, 2) + oprot.writeString(self.comments.encode("utf-8") if sys.version_info[0] == 2 else self.comments) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class FieldSchema: + """ + Attributes: + - name + - type + - comment + + """ + + def __init__( + self, + name=None, + type=None, + comment=None, + ): + self.name = name + self.type = type + self.comment = comment + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.type = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.comment = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("FieldSchema") + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRING, 1) + oprot.writeString(self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + if self.type is not None: + oprot.writeFieldBegin("type", TType.STRING, 2) + oprot.writeString(self.type.encode("utf-8") if sys.version_info[0] == 2 else self.type) + oprot.writeFieldEnd() + if self.comment is not None: + oprot.writeFieldBegin("comment", TType.STRING, 3) + oprot.writeString(self.comment.encode("utf-8") if sys.version_info[0] == 2 else self.comment) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class EnvironmentContext: + """ + Attributes: + - properties + + """ + + def __init__( + self, + properties=None, + ): + self.properties = properties + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.MAP: + self.properties = {} + (_ktype1, _vtype2, _size0) = iprot.readMapBegin() + for _i4 in range(_size0): + _key5 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val6 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.properties[_key5] = _val6 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("EnvironmentContext") + if self.properties is not None: + oprot.writeFieldBegin("properties", TType.MAP, 1) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.properties)) + for kiter7, viter8 in self.properties.items(): + oprot.writeString(kiter7.encode("utf-8") if sys.version_info[0] == 2 else kiter7) + oprot.writeString(viter8.encode("utf-8") if sys.version_info[0] == 2 else viter8) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class SQLPrimaryKey: + """ + Attributes: + - table_db + - table_name + - column_name + - key_seq + - pk_name + - enable_cstr + - validate_cstr + - rely_cstr + - catName + + """ + + def __init__( + self, + table_db=None, + table_name=None, + column_name=None, + key_seq=None, + pk_name=None, + enable_cstr=None, + validate_cstr=None, + rely_cstr=None, + catName=None, + ): + self.table_db = table_db + self.table_name = table_name + self.column_name = column_name + self.key_seq = key_seq + self.pk_name = pk_name + self.enable_cstr = enable_cstr + self.validate_cstr = validate_cstr + self.rely_cstr = rely_cstr + self.catName = catName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.table_db = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.table_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.column_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.key_seq = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.pk_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.BOOL: + self.enable_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + self.validate_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.BOOL: + self.rely_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("SQLPrimaryKey") + if self.table_db is not None: + oprot.writeFieldBegin("table_db", TType.STRING, 1) + oprot.writeString(self.table_db.encode("utf-8") if sys.version_info[0] == 2 else self.table_db) + oprot.writeFieldEnd() + if self.table_name is not None: + oprot.writeFieldBegin("table_name", TType.STRING, 2) + oprot.writeString(self.table_name.encode("utf-8") if sys.version_info[0] == 2 else self.table_name) + oprot.writeFieldEnd() + if self.column_name is not None: + oprot.writeFieldBegin("column_name", TType.STRING, 3) + oprot.writeString(self.column_name.encode("utf-8") if sys.version_info[0] == 2 else self.column_name) + oprot.writeFieldEnd() + if self.key_seq is not None: + oprot.writeFieldBegin("key_seq", TType.I32, 4) + oprot.writeI32(self.key_seq) + oprot.writeFieldEnd() + if self.pk_name is not None: + oprot.writeFieldBegin("pk_name", TType.STRING, 5) + oprot.writeString(self.pk_name.encode("utf-8") if sys.version_info[0] == 2 else self.pk_name) + oprot.writeFieldEnd() + if self.enable_cstr is not None: + oprot.writeFieldBegin("enable_cstr", TType.BOOL, 6) + oprot.writeBool(self.enable_cstr) + oprot.writeFieldEnd() + if self.validate_cstr is not None: + oprot.writeFieldBegin("validate_cstr", TType.BOOL, 7) + oprot.writeBool(self.validate_cstr) + oprot.writeFieldEnd() + if self.rely_cstr is not None: + oprot.writeFieldBegin("rely_cstr", TType.BOOL, 8) + oprot.writeBool(self.rely_cstr) + oprot.writeFieldEnd() + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 9) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class SQLForeignKey: + """ + Attributes: + - pktable_db + - pktable_name + - pkcolumn_name + - fktable_db + - fktable_name + - fkcolumn_name + - key_seq + - update_rule + - delete_rule + - fk_name + - pk_name + - enable_cstr + - validate_cstr + - rely_cstr + - catName + + """ + + def __init__( + self, + pktable_db=None, + pktable_name=None, + pkcolumn_name=None, + fktable_db=None, + fktable_name=None, + fkcolumn_name=None, + key_seq=None, + update_rule=None, + delete_rule=None, + fk_name=None, + pk_name=None, + enable_cstr=None, + validate_cstr=None, + rely_cstr=None, + catName=None, + ): + self.pktable_db = pktable_db + self.pktable_name = pktable_name + self.pkcolumn_name = pkcolumn_name + self.fktable_db = fktable_db + self.fktable_name = fktable_name + self.fkcolumn_name = fkcolumn_name + self.key_seq = key_seq + self.update_rule = update_rule + self.delete_rule = delete_rule + self.fk_name = fk_name + self.pk_name = pk_name + self.enable_cstr = enable_cstr + self.validate_cstr = validate_cstr + self.rely_cstr = rely_cstr + self.catName = catName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.pktable_db = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.pktable_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.pkcolumn_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.fktable_db = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.fktable_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.fkcolumn_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I32: + self.key_seq = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.I32: + self.update_rule = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.I32: + self.delete_rule = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRING: + self.fk_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.STRING: + self.pk_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.BOOL: + self.enable_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 13: + if ftype == TType.BOOL: + self.validate_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 14: + if ftype == TType.BOOL: + self.rely_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 15: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("SQLForeignKey") + if self.pktable_db is not None: + oprot.writeFieldBegin("pktable_db", TType.STRING, 1) + oprot.writeString(self.pktable_db.encode("utf-8") if sys.version_info[0] == 2 else self.pktable_db) + oprot.writeFieldEnd() + if self.pktable_name is not None: + oprot.writeFieldBegin("pktable_name", TType.STRING, 2) + oprot.writeString(self.pktable_name.encode("utf-8") if sys.version_info[0] == 2 else self.pktable_name) + oprot.writeFieldEnd() + if self.pkcolumn_name is not None: + oprot.writeFieldBegin("pkcolumn_name", TType.STRING, 3) + oprot.writeString(self.pkcolumn_name.encode("utf-8") if sys.version_info[0] == 2 else self.pkcolumn_name) + oprot.writeFieldEnd() + if self.fktable_db is not None: + oprot.writeFieldBegin("fktable_db", TType.STRING, 4) + oprot.writeString(self.fktable_db.encode("utf-8") if sys.version_info[0] == 2 else self.fktable_db) + oprot.writeFieldEnd() + if self.fktable_name is not None: + oprot.writeFieldBegin("fktable_name", TType.STRING, 5) + oprot.writeString(self.fktable_name.encode("utf-8") if sys.version_info[0] == 2 else self.fktable_name) + oprot.writeFieldEnd() + if self.fkcolumn_name is not None: + oprot.writeFieldBegin("fkcolumn_name", TType.STRING, 6) + oprot.writeString(self.fkcolumn_name.encode("utf-8") if sys.version_info[0] == 2 else self.fkcolumn_name) + oprot.writeFieldEnd() + if self.key_seq is not None: + oprot.writeFieldBegin("key_seq", TType.I32, 7) + oprot.writeI32(self.key_seq) + oprot.writeFieldEnd() + if self.update_rule is not None: + oprot.writeFieldBegin("update_rule", TType.I32, 8) + oprot.writeI32(self.update_rule) + oprot.writeFieldEnd() + if self.delete_rule is not None: + oprot.writeFieldBegin("delete_rule", TType.I32, 9) + oprot.writeI32(self.delete_rule) + oprot.writeFieldEnd() + if self.fk_name is not None: + oprot.writeFieldBegin("fk_name", TType.STRING, 10) + oprot.writeString(self.fk_name.encode("utf-8") if sys.version_info[0] == 2 else self.fk_name) + oprot.writeFieldEnd() + if self.pk_name is not None: + oprot.writeFieldBegin("pk_name", TType.STRING, 11) + oprot.writeString(self.pk_name.encode("utf-8") if sys.version_info[0] == 2 else self.pk_name) + oprot.writeFieldEnd() + if self.enable_cstr is not None: + oprot.writeFieldBegin("enable_cstr", TType.BOOL, 12) + oprot.writeBool(self.enable_cstr) + oprot.writeFieldEnd() + if self.validate_cstr is not None: + oprot.writeFieldBegin("validate_cstr", TType.BOOL, 13) + oprot.writeBool(self.validate_cstr) + oprot.writeFieldEnd() + if self.rely_cstr is not None: + oprot.writeFieldBegin("rely_cstr", TType.BOOL, 14) + oprot.writeBool(self.rely_cstr) + oprot.writeFieldEnd() + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 15) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class SQLUniqueConstraint: + """ + Attributes: + - catName + - table_db + - table_name + - column_name + - key_seq + - uk_name + - enable_cstr + - validate_cstr + - rely_cstr + + """ + + def __init__( + self, + catName=None, + table_db=None, + table_name=None, + column_name=None, + key_seq=None, + uk_name=None, + enable_cstr=None, + validate_cstr=None, + rely_cstr=None, + ): + self.catName = catName + self.table_db = table_db + self.table_name = table_name + self.column_name = column_name + self.key_seq = key_seq + self.uk_name = uk_name + self.enable_cstr = enable_cstr + self.validate_cstr = validate_cstr + self.rely_cstr = rely_cstr + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.table_db = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.table_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.column_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.key_seq = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.uk_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + self.enable_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.BOOL: + self.validate_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.BOOL: + self.rely_cstr = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("SQLUniqueConstraint") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.table_db is not None: + oprot.writeFieldBegin("table_db", TType.STRING, 2) + oprot.writeString(self.table_db.encode("utf-8") if sys.version_info[0] == 2 else self.table_db) + oprot.writeFieldEnd() + if self.table_name is not None: + oprot.writeFieldBegin("table_name", TType.STRING, 3) + oprot.writeString(self.table_name.encode("utf-8") if sys.version_info[0] == 2 else self.table_name) + oprot.writeFieldEnd() + if self.column_name is not None: + oprot.writeFieldBegin("column_name", TType.STRING, 4) + oprot.writeString(self.column_name.encode("utf-8") if sys.version_info[0] == 2 else self.column_name) + oprot.writeFieldEnd() + if self.key_seq is not None: + oprot.writeFieldBegin("key_seq", TType.I32, 5) + oprot.writeI32(self.key_seq) + oprot.writeFieldEnd() + if self.uk_name is not None: + oprot.writeFieldBegin("uk_name", TType.STRING, 6) + oprot.writeString(self.uk_name.encode("utf-8") if sys.version_info[0] == 2 else self.uk_name) + oprot.writeFieldEnd() + if self.enable_cstr is not None: + oprot.writeFieldBegin("enable_cstr", TType.BOOL, 7) + oprot.writeBool(self.enable_cstr) + oprot.writeFieldEnd() + if self.validate_cstr is not None: + oprot.writeFieldBegin("validate_cstr", TType.BOOL, 8) + oprot.writeBool(self.validate_cstr) + oprot.writeFieldEnd() + if self.rely_cstr is not None: + oprot.writeFieldBegin("rely_cstr", TType.BOOL, 9) + oprot.writeBool(self.rely_cstr) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class SQLNotNullConstraint: + """ + Attributes: + - catName + - table_db + - table_name + - column_name + - nn_name + - enable_cstr + - validate_cstr + - rely_cstr + + """ + + def __init__( + self, + catName=None, + table_db=None, + table_name=None, + column_name=None, + nn_name=None, + enable_cstr=None, + validate_cstr=None, + rely_cstr=None, + ): + self.catName = catName + self.table_db = table_db + self.table_name = table_name + self.column_name = column_name + self.nn_name = nn_name + self.enable_cstr = enable_cstr + self.validate_cstr = validate_cstr + self.rely_cstr = rely_cstr + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.table_db = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.table_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.column_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.nn_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.BOOL: + self.enable_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + self.validate_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.BOOL: + self.rely_cstr = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("SQLNotNullConstraint") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.table_db is not None: + oprot.writeFieldBegin("table_db", TType.STRING, 2) + oprot.writeString(self.table_db.encode("utf-8") if sys.version_info[0] == 2 else self.table_db) + oprot.writeFieldEnd() + if self.table_name is not None: + oprot.writeFieldBegin("table_name", TType.STRING, 3) + oprot.writeString(self.table_name.encode("utf-8") if sys.version_info[0] == 2 else self.table_name) + oprot.writeFieldEnd() + if self.column_name is not None: + oprot.writeFieldBegin("column_name", TType.STRING, 4) + oprot.writeString(self.column_name.encode("utf-8") if sys.version_info[0] == 2 else self.column_name) + oprot.writeFieldEnd() + if self.nn_name is not None: + oprot.writeFieldBegin("nn_name", TType.STRING, 5) + oprot.writeString(self.nn_name.encode("utf-8") if sys.version_info[0] == 2 else self.nn_name) + oprot.writeFieldEnd() + if self.enable_cstr is not None: + oprot.writeFieldBegin("enable_cstr", TType.BOOL, 6) + oprot.writeBool(self.enable_cstr) + oprot.writeFieldEnd() + if self.validate_cstr is not None: + oprot.writeFieldBegin("validate_cstr", TType.BOOL, 7) + oprot.writeBool(self.validate_cstr) + oprot.writeFieldEnd() + if self.rely_cstr is not None: + oprot.writeFieldBegin("rely_cstr", TType.BOOL, 8) + oprot.writeBool(self.rely_cstr) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class SQLDefaultConstraint: + """ + Attributes: + - catName + - table_db + - table_name + - column_name + - default_value + - dc_name + - enable_cstr + - validate_cstr + - rely_cstr + + """ + + def __init__( + self, + catName=None, + table_db=None, + table_name=None, + column_name=None, + default_value=None, + dc_name=None, + enable_cstr=None, + validate_cstr=None, + rely_cstr=None, + ): + self.catName = catName + self.table_db = table_db + self.table_name = table_name + self.column_name = column_name + self.default_value = default_value + self.dc_name = dc_name + self.enable_cstr = enable_cstr + self.validate_cstr = validate_cstr + self.rely_cstr = rely_cstr + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.table_db = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.table_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.column_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.default_value = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.dc_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + self.enable_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.BOOL: + self.validate_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.BOOL: + self.rely_cstr = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("SQLDefaultConstraint") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.table_db is not None: + oprot.writeFieldBegin("table_db", TType.STRING, 2) + oprot.writeString(self.table_db.encode("utf-8") if sys.version_info[0] == 2 else self.table_db) + oprot.writeFieldEnd() + if self.table_name is not None: + oprot.writeFieldBegin("table_name", TType.STRING, 3) + oprot.writeString(self.table_name.encode("utf-8") if sys.version_info[0] == 2 else self.table_name) + oprot.writeFieldEnd() + if self.column_name is not None: + oprot.writeFieldBegin("column_name", TType.STRING, 4) + oprot.writeString(self.column_name.encode("utf-8") if sys.version_info[0] == 2 else self.column_name) + oprot.writeFieldEnd() + if self.default_value is not None: + oprot.writeFieldBegin("default_value", TType.STRING, 5) + oprot.writeString(self.default_value.encode("utf-8") if sys.version_info[0] == 2 else self.default_value) + oprot.writeFieldEnd() + if self.dc_name is not None: + oprot.writeFieldBegin("dc_name", TType.STRING, 6) + oprot.writeString(self.dc_name.encode("utf-8") if sys.version_info[0] == 2 else self.dc_name) + oprot.writeFieldEnd() + if self.enable_cstr is not None: + oprot.writeFieldBegin("enable_cstr", TType.BOOL, 7) + oprot.writeBool(self.enable_cstr) + oprot.writeFieldEnd() + if self.validate_cstr is not None: + oprot.writeFieldBegin("validate_cstr", TType.BOOL, 8) + oprot.writeBool(self.validate_cstr) + oprot.writeFieldEnd() + if self.rely_cstr is not None: + oprot.writeFieldBegin("rely_cstr", TType.BOOL, 9) + oprot.writeBool(self.rely_cstr) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class SQLCheckConstraint: + """ + Attributes: + - catName + - table_db + - table_name + - column_name + - check_expression + - dc_name + - enable_cstr + - validate_cstr + - rely_cstr + + """ + + def __init__( + self, + catName=None, + table_db=None, + table_name=None, + column_name=None, + check_expression=None, + dc_name=None, + enable_cstr=None, + validate_cstr=None, + rely_cstr=None, + ): + self.catName = catName + self.table_db = table_db + self.table_name = table_name + self.column_name = column_name + self.check_expression = check_expression + self.dc_name = dc_name + self.enable_cstr = enable_cstr + self.validate_cstr = validate_cstr + self.rely_cstr = rely_cstr + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.table_db = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.table_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.column_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.check_expression = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.dc_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + self.enable_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.BOOL: + self.validate_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.BOOL: + self.rely_cstr = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("SQLCheckConstraint") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.table_db is not None: + oprot.writeFieldBegin("table_db", TType.STRING, 2) + oprot.writeString(self.table_db.encode("utf-8") if sys.version_info[0] == 2 else self.table_db) + oprot.writeFieldEnd() + if self.table_name is not None: + oprot.writeFieldBegin("table_name", TType.STRING, 3) + oprot.writeString(self.table_name.encode("utf-8") if sys.version_info[0] == 2 else self.table_name) + oprot.writeFieldEnd() + if self.column_name is not None: + oprot.writeFieldBegin("column_name", TType.STRING, 4) + oprot.writeString(self.column_name.encode("utf-8") if sys.version_info[0] == 2 else self.column_name) + oprot.writeFieldEnd() + if self.check_expression is not None: + oprot.writeFieldBegin("check_expression", TType.STRING, 5) + oprot.writeString(self.check_expression.encode("utf-8") if sys.version_info[0] == 2 else self.check_expression) + oprot.writeFieldEnd() + if self.dc_name is not None: + oprot.writeFieldBegin("dc_name", TType.STRING, 6) + oprot.writeString(self.dc_name.encode("utf-8") if sys.version_info[0] == 2 else self.dc_name) + oprot.writeFieldEnd() + if self.enable_cstr is not None: + oprot.writeFieldBegin("enable_cstr", TType.BOOL, 7) + oprot.writeBool(self.enable_cstr) + oprot.writeFieldEnd() + if self.validate_cstr is not None: + oprot.writeFieldBegin("validate_cstr", TType.BOOL, 8) + oprot.writeBool(self.validate_cstr) + oprot.writeFieldEnd() + if self.rely_cstr is not None: + oprot.writeFieldBegin("rely_cstr", TType.BOOL, 9) + oprot.writeBool(self.rely_cstr) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class SQLAllTableConstraints: + """ + Attributes: + - primaryKeys + - foreignKeys + - uniqueConstraints + - notNullConstraints + - defaultConstraints + - checkConstraints + + """ + + def __init__( + self, + primaryKeys=None, + foreignKeys=None, + uniqueConstraints=None, + notNullConstraints=None, + defaultConstraints=None, + checkConstraints=None, + ): + self.primaryKeys = primaryKeys + self.foreignKeys = foreignKeys + self.uniqueConstraints = uniqueConstraints + self.notNullConstraints = notNullConstraints + self.defaultConstraints = defaultConstraints + self.checkConstraints = checkConstraints + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.primaryKeys = [] + (_etype12, _size9) = iprot.readListBegin() + for _i13 in range(_size9): + _elem14 = SQLPrimaryKey() + _elem14.read(iprot) + self.primaryKeys.append(_elem14) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.foreignKeys = [] + (_etype18, _size15) = iprot.readListBegin() + for _i19 in range(_size15): + _elem20 = SQLForeignKey() + _elem20.read(iprot) + self.foreignKeys.append(_elem20) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.uniqueConstraints = [] + (_etype24, _size21) = iprot.readListBegin() + for _i25 in range(_size21): + _elem26 = SQLUniqueConstraint() + _elem26.read(iprot) + self.uniqueConstraints.append(_elem26) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.notNullConstraints = [] + (_etype30, _size27) = iprot.readListBegin() + for _i31 in range(_size27): + _elem32 = SQLNotNullConstraint() + _elem32.read(iprot) + self.notNullConstraints.append(_elem32) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.defaultConstraints = [] + (_etype36, _size33) = iprot.readListBegin() + for _i37 in range(_size33): + _elem38 = SQLDefaultConstraint() + _elem38.read(iprot) + self.defaultConstraints.append(_elem38) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.LIST: + self.checkConstraints = [] + (_etype42, _size39) = iprot.readListBegin() + for _i43 in range(_size39): + _elem44 = SQLCheckConstraint() + _elem44.read(iprot) + self.checkConstraints.append(_elem44) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("SQLAllTableConstraints") + if self.primaryKeys is not None: + oprot.writeFieldBegin("primaryKeys", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.primaryKeys)) + for iter45 in self.primaryKeys: + iter45.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.foreignKeys is not None: + oprot.writeFieldBegin("foreignKeys", TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.foreignKeys)) + for iter46 in self.foreignKeys: + iter46.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.uniqueConstraints is not None: + oprot.writeFieldBegin("uniqueConstraints", TType.LIST, 3) + oprot.writeListBegin(TType.STRUCT, len(self.uniqueConstraints)) + for iter47 in self.uniqueConstraints: + iter47.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.notNullConstraints is not None: + oprot.writeFieldBegin("notNullConstraints", TType.LIST, 4) + oprot.writeListBegin(TType.STRUCT, len(self.notNullConstraints)) + for iter48 in self.notNullConstraints: + iter48.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.defaultConstraints is not None: + oprot.writeFieldBegin("defaultConstraints", TType.LIST, 5) + oprot.writeListBegin(TType.STRUCT, len(self.defaultConstraints)) + for iter49 in self.defaultConstraints: + iter49.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.checkConstraints is not None: + oprot.writeFieldBegin("checkConstraints", TType.LIST, 6) + oprot.writeListBegin(TType.STRUCT, len(self.checkConstraints)) + for iter50 in self.checkConstraints: + iter50.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class Type: + """ + Attributes: + - name + - type1 + - type2 + - fields + + """ + + def __init__( + self, + name=None, + type1=None, + type2=None, + fields=None, + ): + self.name = name + self.type1 = type1 + self.type2 = type2 + self.fields = fields + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.type1 = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.type2 = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.fields = [] + (_etype54, _size51) = iprot.readListBegin() + for _i55 in range(_size51): + _elem56 = FieldSchema() + _elem56.read(iprot) + self.fields.append(_elem56) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("Type") + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRING, 1) + oprot.writeString(self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + if self.type1 is not None: + oprot.writeFieldBegin("type1", TType.STRING, 2) + oprot.writeString(self.type1.encode("utf-8") if sys.version_info[0] == 2 else self.type1) + oprot.writeFieldEnd() + if self.type2 is not None: + oprot.writeFieldBegin("type2", TType.STRING, 3) + oprot.writeString(self.type2.encode("utf-8") if sys.version_info[0] == 2 else self.type2) + oprot.writeFieldEnd() + if self.fields is not None: + oprot.writeFieldBegin("fields", TType.LIST, 4) + oprot.writeListBegin(TType.STRUCT, len(self.fields)) + for iter57 in self.fields: + iter57.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class HiveObjectRef: + """ + Attributes: + - objectType + - dbName + - objectName + - partValues + - columnName + - catName + + """ + + def __init__( + self, + objectType=None, + dbName=None, + objectName=None, + partValues=None, + columnName=None, + catName=None, + ): + self.objectType = objectType + self.dbName = dbName + self.objectName = objectName + self.partValues = partValues + self.columnName = columnName + self.catName = catName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.objectType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.objectName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.partValues = [] + (_etype61, _size58) = iprot.readListBegin() + for _i62 in range(_size58): + _elem63 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.partValues.append(_elem63) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.columnName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("HiveObjectRef") + if self.objectType is not None: + oprot.writeFieldBegin("objectType", TType.I32, 1) + oprot.writeI32(self.objectType) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 2) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.objectName is not None: + oprot.writeFieldBegin("objectName", TType.STRING, 3) + oprot.writeString(self.objectName.encode("utf-8") if sys.version_info[0] == 2 else self.objectName) + oprot.writeFieldEnd() + if self.partValues is not None: + oprot.writeFieldBegin("partValues", TType.LIST, 4) + oprot.writeListBegin(TType.STRING, len(self.partValues)) + for iter64 in self.partValues: + oprot.writeString(iter64.encode("utf-8") if sys.version_info[0] == 2 else iter64) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.columnName is not None: + oprot.writeFieldBegin("columnName", TType.STRING, 5) + oprot.writeString(self.columnName.encode("utf-8") if sys.version_info[0] == 2 else self.columnName) + oprot.writeFieldEnd() + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 6) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class PrivilegeGrantInfo: + """ + Attributes: + - privilege + - createTime + - grantor + - grantorType + - grantOption + + """ + + def __init__( + self, + privilege=None, + createTime=None, + grantor=None, + grantorType=None, + grantOption=None, + ): + self.privilege = privilege + self.createTime = createTime + self.grantor = grantor + self.grantorType = grantorType + self.grantOption = grantOption + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.privilege = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.createTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.grantor = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.grantorType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.BOOL: + self.grantOption = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("PrivilegeGrantInfo") + if self.privilege is not None: + oprot.writeFieldBegin("privilege", TType.STRING, 1) + oprot.writeString(self.privilege.encode("utf-8") if sys.version_info[0] == 2 else self.privilege) + oprot.writeFieldEnd() + if self.createTime is not None: + oprot.writeFieldBegin("createTime", TType.I32, 2) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.grantor is not None: + oprot.writeFieldBegin("grantor", TType.STRING, 3) + oprot.writeString(self.grantor.encode("utf-8") if sys.version_info[0] == 2 else self.grantor) + oprot.writeFieldEnd() + if self.grantorType is not None: + oprot.writeFieldBegin("grantorType", TType.I32, 4) + oprot.writeI32(self.grantorType) + oprot.writeFieldEnd() + if self.grantOption is not None: + oprot.writeFieldBegin("grantOption", TType.BOOL, 5) + oprot.writeBool(self.grantOption) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class HiveObjectPrivilege: + """ + Attributes: + - hiveObject + - principalName + - principalType + - grantInfo + - authorizer + + """ + + def __init__( + self, + hiveObject=None, + principalName=None, + principalType=None, + grantInfo=None, + authorizer=None, + ): + self.hiveObject = hiveObject + self.principalName = principalName + self.principalType = principalType + self.grantInfo = grantInfo + self.authorizer = authorizer + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.hiveObject = HiveObjectRef() + self.hiveObject.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.principalName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.principalType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.grantInfo = PrivilegeGrantInfo() + self.grantInfo.read(iprot) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.authorizer = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("HiveObjectPrivilege") + if self.hiveObject is not None: + oprot.writeFieldBegin("hiveObject", TType.STRUCT, 1) + self.hiveObject.write(oprot) + oprot.writeFieldEnd() + if self.principalName is not None: + oprot.writeFieldBegin("principalName", TType.STRING, 2) + oprot.writeString(self.principalName.encode("utf-8") if sys.version_info[0] == 2 else self.principalName) + oprot.writeFieldEnd() + if self.principalType is not None: + oprot.writeFieldBegin("principalType", TType.I32, 3) + oprot.writeI32(self.principalType) + oprot.writeFieldEnd() + if self.grantInfo is not None: + oprot.writeFieldBegin("grantInfo", TType.STRUCT, 4) + self.grantInfo.write(oprot) + oprot.writeFieldEnd() + if self.authorizer is not None: + oprot.writeFieldBegin("authorizer", TType.STRING, 5) + oprot.writeString(self.authorizer.encode("utf-8") if sys.version_info[0] == 2 else self.authorizer) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class PrivilegeBag: + """ + Attributes: + - privileges + + """ + + def __init__( + self, + privileges=None, + ): + self.privileges = privileges + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.privileges = [] + (_etype68, _size65) = iprot.readListBegin() + for _i69 in range(_size65): + _elem70 = HiveObjectPrivilege() + _elem70.read(iprot) + self.privileges.append(_elem70) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("PrivilegeBag") + if self.privileges is not None: + oprot.writeFieldBegin("privileges", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.privileges)) + for iter71 in self.privileges: + iter71.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class PrincipalPrivilegeSet: + """ + Attributes: + - userPrivileges + - groupPrivileges + - rolePrivileges + + """ + + def __init__( + self, + userPrivileges=None, + groupPrivileges=None, + rolePrivileges=None, + ): + self.userPrivileges = userPrivileges + self.groupPrivileges = groupPrivileges + self.rolePrivileges = rolePrivileges + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.MAP: + self.userPrivileges = {} + (_ktype73, _vtype74, _size72) = iprot.readMapBegin() + for _i76 in range(_size72): + _key77 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val78 = [] + (_etype82, _size79) = iprot.readListBegin() + for _i83 in range(_size79): + _elem84 = PrivilegeGrantInfo() + _elem84.read(iprot) + _val78.append(_elem84) + iprot.readListEnd() + self.userPrivileges[_key77] = _val78 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.MAP: + self.groupPrivileges = {} + (_ktype86, _vtype87, _size85) = iprot.readMapBegin() + for _i89 in range(_size85): + _key90 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val91 = [] + (_etype95, _size92) = iprot.readListBegin() + for _i96 in range(_size92): + _elem97 = PrivilegeGrantInfo() + _elem97.read(iprot) + _val91.append(_elem97) + iprot.readListEnd() + self.groupPrivileges[_key90] = _val91 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.rolePrivileges = {} + (_ktype99, _vtype100, _size98) = iprot.readMapBegin() + for _i102 in range(_size98): + _key103 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val104 = [] + (_etype108, _size105) = iprot.readListBegin() + for _i109 in range(_size105): + _elem110 = PrivilegeGrantInfo() + _elem110.read(iprot) + _val104.append(_elem110) + iprot.readListEnd() + self.rolePrivileges[_key103] = _val104 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("PrincipalPrivilegeSet") + if self.userPrivileges is not None: + oprot.writeFieldBegin("userPrivileges", TType.MAP, 1) + oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.userPrivileges)) + for kiter111, viter112 in self.userPrivileges.items(): + oprot.writeString(kiter111.encode("utf-8") if sys.version_info[0] == 2 else kiter111) + oprot.writeListBegin(TType.STRUCT, len(viter112)) + for iter113 in viter112: + iter113.write(oprot) + oprot.writeListEnd() + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.groupPrivileges is not None: + oprot.writeFieldBegin("groupPrivileges", TType.MAP, 2) + oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.groupPrivileges)) + for kiter114, viter115 in self.groupPrivileges.items(): + oprot.writeString(kiter114.encode("utf-8") if sys.version_info[0] == 2 else kiter114) + oprot.writeListBegin(TType.STRUCT, len(viter115)) + for iter116 in viter115: + iter116.write(oprot) + oprot.writeListEnd() + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.rolePrivileges is not None: + oprot.writeFieldBegin("rolePrivileges", TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.rolePrivileges)) + for kiter117, viter118 in self.rolePrivileges.items(): + oprot.writeString(kiter117.encode("utf-8") if sys.version_info[0] == 2 else kiter117) + oprot.writeListBegin(TType.STRUCT, len(viter118)) + for iter119 in viter118: + iter119.write(oprot) + oprot.writeListEnd() + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GrantRevokePrivilegeRequest: + """ + Attributes: + - requestType + - privileges + - revokeGrantOption + + """ + + def __init__( + self, + requestType=None, + privileges=None, + revokeGrantOption=None, + ): + self.requestType = requestType + self.privileges = privileges + self.revokeGrantOption = revokeGrantOption + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.requestType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.privileges = PrivilegeBag() + self.privileges.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.revokeGrantOption = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GrantRevokePrivilegeRequest") + if self.requestType is not None: + oprot.writeFieldBegin("requestType", TType.I32, 1) + oprot.writeI32(self.requestType) + oprot.writeFieldEnd() + if self.privileges is not None: + oprot.writeFieldBegin("privileges", TType.STRUCT, 2) + self.privileges.write(oprot) + oprot.writeFieldEnd() + if self.revokeGrantOption is not None: + oprot.writeFieldBegin("revokeGrantOption", TType.BOOL, 3) + oprot.writeBool(self.revokeGrantOption) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GrantRevokePrivilegeResponse: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GrantRevokePrivilegeResponse") + if self.success is not None: + oprot.writeFieldBegin("success", TType.BOOL, 1) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TruncateTableRequest: + """ + Attributes: + - dbName + - tableName + - partNames + - writeId + - validWriteIdList + - environmentContext + + """ + + def __init__( + self, + dbName=None, + tableName=None, + partNames=None, + writeId=-1, + validWriteIdList=None, + environmentContext=None, + ): + self.dbName = dbName + self.tableName = tableName + self.partNames = partNames + self.writeId = writeId + self.validWriteIdList = validWriteIdList + self.environmentContext = environmentContext + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tableName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.partNames = [] + (_etype123, _size120) = iprot.readListBegin() + for _i124 in range(_size120): + _elem125 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.partNames.append(_elem125) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.writeId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.validWriteIdList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRUCT: + self.environmentContext = EnvironmentContext() + self.environmentContext.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("TruncateTableRequest") + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 1) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tableName is not None: + oprot.writeFieldBegin("tableName", TType.STRING, 2) + oprot.writeString(self.tableName.encode("utf-8") if sys.version_info[0] == 2 else self.tableName) + oprot.writeFieldEnd() + if self.partNames is not None: + oprot.writeFieldBegin("partNames", TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.partNames)) + for iter126 in self.partNames: + oprot.writeString(iter126.encode("utf-8") if sys.version_info[0] == 2 else iter126) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.writeId is not None: + oprot.writeFieldBegin("writeId", TType.I64, 4) + oprot.writeI64(self.writeId) + oprot.writeFieldEnd() + if self.validWriteIdList is not None: + oprot.writeFieldBegin("validWriteIdList", TType.STRING, 5) + oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList) + oprot.writeFieldEnd() + if self.environmentContext is not None: + oprot.writeFieldBegin("environmentContext", TType.STRUCT, 6) + self.environmentContext.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.tableName is None: + raise TProtocolException(message="Required field tableName is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TruncateTableResponse: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("TruncateTableResponse") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class Role: + """ + Attributes: + - roleName + - createTime + - ownerName + + """ + + def __init__( + self, + roleName=None, + createTime=None, + ownerName=None, + ): + self.roleName = roleName + self.createTime = createTime + self.ownerName = ownerName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.roleName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.createTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.ownerName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("Role") + if self.roleName is not None: + oprot.writeFieldBegin("roleName", TType.STRING, 1) + oprot.writeString(self.roleName.encode("utf-8") if sys.version_info[0] == 2 else self.roleName) + oprot.writeFieldEnd() + if self.createTime is not None: + oprot.writeFieldBegin("createTime", TType.I32, 2) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.ownerName is not None: + oprot.writeFieldBegin("ownerName", TType.STRING, 3) + oprot.writeString(self.ownerName.encode("utf-8") if sys.version_info[0] == 2 else self.ownerName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class RolePrincipalGrant: + """ + Attributes: + - roleName + - principalName + - principalType + - grantOption + - grantTime + - grantorName + - grantorPrincipalType + + """ + + def __init__( + self, + roleName=None, + principalName=None, + principalType=None, + grantOption=None, + grantTime=None, + grantorName=None, + grantorPrincipalType=None, + ): + self.roleName = roleName + self.principalName = principalName + self.principalType = principalType + self.grantOption = grantOption + self.grantTime = grantTime + self.grantorName = grantorName + self.grantorPrincipalType = grantorPrincipalType + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.roleName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.principalName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.principalType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.grantOption = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.grantTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.grantorName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I32: + self.grantorPrincipalType = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("RolePrincipalGrant") + if self.roleName is not None: + oprot.writeFieldBegin("roleName", TType.STRING, 1) + oprot.writeString(self.roleName.encode("utf-8") if sys.version_info[0] == 2 else self.roleName) + oprot.writeFieldEnd() + if self.principalName is not None: + oprot.writeFieldBegin("principalName", TType.STRING, 2) + oprot.writeString(self.principalName.encode("utf-8") if sys.version_info[0] == 2 else self.principalName) + oprot.writeFieldEnd() + if self.principalType is not None: + oprot.writeFieldBegin("principalType", TType.I32, 3) + oprot.writeI32(self.principalType) + oprot.writeFieldEnd() + if self.grantOption is not None: + oprot.writeFieldBegin("grantOption", TType.BOOL, 4) + oprot.writeBool(self.grantOption) + oprot.writeFieldEnd() + if self.grantTime is not None: + oprot.writeFieldBegin("grantTime", TType.I32, 5) + oprot.writeI32(self.grantTime) + oprot.writeFieldEnd() + if self.grantorName is not None: + oprot.writeFieldBegin("grantorName", TType.STRING, 6) + oprot.writeString(self.grantorName.encode("utf-8") if sys.version_info[0] == 2 else self.grantorName) + oprot.writeFieldEnd() + if self.grantorPrincipalType is not None: + oprot.writeFieldBegin("grantorPrincipalType", TType.I32, 7) + oprot.writeI32(self.grantorPrincipalType) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetRoleGrantsForPrincipalRequest: + """ + Attributes: + - principal_name + - principal_type + + """ + + def __init__( + self, + principal_name=None, + principal_type=None, + ): + self.principal_name = principal_name + self.principal_type = principal_type + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.principal_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.principal_type = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetRoleGrantsForPrincipalRequest") + if self.principal_name is not None: + oprot.writeFieldBegin("principal_name", TType.STRING, 1) + oprot.writeString(self.principal_name.encode("utf-8") if sys.version_info[0] == 2 else self.principal_name) + oprot.writeFieldEnd() + if self.principal_type is not None: + oprot.writeFieldBegin("principal_type", TType.I32, 2) + oprot.writeI32(self.principal_type) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.principal_name is None: + raise TProtocolException(message="Required field principal_name is unset!") + if self.principal_type is None: + raise TProtocolException(message="Required field principal_type is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetRoleGrantsForPrincipalResponse: + """ + Attributes: + - principalGrants + + """ + + def __init__( + self, + principalGrants=None, + ): + self.principalGrants = principalGrants + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.principalGrants = [] + (_etype130, _size127) = iprot.readListBegin() + for _i131 in range(_size127): + _elem132 = RolePrincipalGrant() + _elem132.read(iprot) + self.principalGrants.append(_elem132) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetRoleGrantsForPrincipalResponse") + if self.principalGrants is not None: + oprot.writeFieldBegin("principalGrants", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.principalGrants)) + for iter133 in self.principalGrants: + iter133.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.principalGrants is None: + raise TProtocolException(message="Required field principalGrants is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetPrincipalsInRoleRequest: + """ + Attributes: + - roleName + + """ + + def __init__( + self, + roleName=None, + ): + self.roleName = roleName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.roleName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetPrincipalsInRoleRequest") + if self.roleName is not None: + oprot.writeFieldBegin("roleName", TType.STRING, 1) + oprot.writeString(self.roleName.encode("utf-8") if sys.version_info[0] == 2 else self.roleName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.roleName is None: + raise TProtocolException(message="Required field roleName is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetPrincipalsInRoleResponse: + """ + Attributes: + - principalGrants + + """ + + def __init__( + self, + principalGrants=None, + ): + self.principalGrants = principalGrants + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.principalGrants = [] + (_etype137, _size134) = iprot.readListBegin() + for _i138 in range(_size134): + _elem139 = RolePrincipalGrant() + _elem139.read(iprot) + self.principalGrants.append(_elem139) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetPrincipalsInRoleResponse") + if self.principalGrants is not None: + oprot.writeFieldBegin("principalGrants", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.principalGrants)) + for iter140 in self.principalGrants: + iter140.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.principalGrants is None: + raise TProtocolException(message="Required field principalGrants is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GrantRevokeRoleRequest: + """ + Attributes: + - requestType + - roleName + - principalName + - principalType + - grantor + - grantorType + - grantOption + + """ + + def __init__( + self, + requestType=None, + roleName=None, + principalName=None, + principalType=None, + grantor=None, + grantorType=None, + grantOption=None, + ): + self.requestType = requestType + self.roleName = roleName + self.principalName = principalName + self.principalType = principalType + self.grantor = grantor + self.grantorType = grantorType + self.grantOption = grantOption + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.requestType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.roleName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.principalName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.principalType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.grantor = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.grantorType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + self.grantOption = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GrantRevokeRoleRequest") + if self.requestType is not None: + oprot.writeFieldBegin("requestType", TType.I32, 1) + oprot.writeI32(self.requestType) + oprot.writeFieldEnd() + if self.roleName is not None: + oprot.writeFieldBegin("roleName", TType.STRING, 2) + oprot.writeString(self.roleName.encode("utf-8") if sys.version_info[0] == 2 else self.roleName) + oprot.writeFieldEnd() + if self.principalName is not None: + oprot.writeFieldBegin("principalName", TType.STRING, 3) + oprot.writeString(self.principalName.encode("utf-8") if sys.version_info[0] == 2 else self.principalName) + oprot.writeFieldEnd() + if self.principalType is not None: + oprot.writeFieldBegin("principalType", TType.I32, 4) + oprot.writeI32(self.principalType) + oprot.writeFieldEnd() + if self.grantor is not None: + oprot.writeFieldBegin("grantor", TType.STRING, 5) + oprot.writeString(self.grantor.encode("utf-8") if sys.version_info[0] == 2 else self.grantor) + oprot.writeFieldEnd() + if self.grantorType is not None: + oprot.writeFieldBegin("grantorType", TType.I32, 6) + oprot.writeI32(self.grantorType) + oprot.writeFieldEnd() + if self.grantOption is not None: + oprot.writeFieldBegin("grantOption", TType.BOOL, 7) + oprot.writeBool(self.grantOption) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GrantRevokeRoleResponse: + """ + Attributes: + - success + + """ + + def __init__( + self, + success=None, + ): + self.success = success + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GrantRevokeRoleResponse") + if self.success is not None: + oprot.writeFieldBegin("success", TType.BOOL, 1) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class Catalog: + """ + Attributes: + - name + - description + - locationUri + - createTime + + """ + + def __init__( + self, + name=None, + description=None, + locationUri=None, + createTime=None, + ): + self.name = name + self.description = description + self.locationUri = locationUri + self.createTime = createTime + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.description = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.locationUri = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.createTime = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("Catalog") + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRING, 1) + oprot.writeString(self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + if self.description is not None: + oprot.writeFieldBegin("description", TType.STRING, 2) + oprot.writeString(self.description.encode("utf-8") if sys.version_info[0] == 2 else self.description) + oprot.writeFieldEnd() + if self.locationUri is not None: + oprot.writeFieldBegin("locationUri", TType.STRING, 3) + oprot.writeString(self.locationUri.encode("utf-8") if sys.version_info[0] == 2 else self.locationUri) + oprot.writeFieldEnd() + if self.createTime is not None: + oprot.writeFieldBegin("createTime", TType.I32, 4) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class CreateCatalogRequest: + """ + Attributes: + - catalog + + """ + + def __init__( + self, + catalog=None, + ): + self.catalog = catalog + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.catalog = Catalog() + self.catalog.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("CreateCatalogRequest") + if self.catalog is not None: + oprot.writeFieldBegin("catalog", TType.STRUCT, 1) + self.catalog.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class AlterCatalogRequest: + """ + Attributes: + - name + - newCat + + """ + + def __init__( + self, + name=None, + newCat=None, + ): + self.name = name + self.newCat = newCat + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.newCat = Catalog() + self.newCat.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("AlterCatalogRequest") + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRING, 1) + oprot.writeString(self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + if self.newCat is not None: + oprot.writeFieldBegin("newCat", TType.STRUCT, 2) + self.newCat.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetCatalogRequest: + """ + Attributes: + - name + + """ + + def __init__( + self, + name=None, + ): + self.name = name + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetCatalogRequest") + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRING, 1) + oprot.writeString(self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetCatalogResponse: + """ + Attributes: + - catalog + + """ + + def __init__( + self, + catalog=None, + ): + self.catalog = catalog + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.catalog = Catalog() + self.catalog.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetCatalogResponse") + if self.catalog is not None: + oprot.writeFieldBegin("catalog", TType.STRUCT, 1) + self.catalog.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetCatalogsResponse: + """ + Attributes: + - names + + """ + + def __init__( + self, + names=None, + ): + self.names = names + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.names = [] + (_etype144, _size141) = iprot.readListBegin() + for _i145 in range(_size141): + _elem146 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.names.append(_elem146) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetCatalogsResponse") + if self.names is not None: + oprot.writeFieldBegin("names", TType.LIST, 1) + oprot.writeListBegin(TType.STRING, len(self.names)) + for iter147 in self.names: + oprot.writeString(iter147.encode("utf-8") if sys.version_info[0] == 2 else iter147) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class DropCatalogRequest: + """ + Attributes: + - name + + """ + + def __init__( + self, + name=None, + ): + self.name = name + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("DropCatalogRequest") + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRING, 1) + oprot.writeString(self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class Database: + """ + Attributes: + - name + - description + - locationUri + - parameters + - privileges + - ownerName + - ownerType + - catalogName + - createTime + - managedLocationUri + - type + - connector_name + - remote_dbname + + """ + + def __init__( + self, + name=None, + description=None, + locationUri=None, + parameters=None, + privileges=None, + ownerName=None, + ownerType=None, + catalogName=None, + createTime=None, + managedLocationUri=None, + type=None, + connector_name=None, + remote_dbname=None, + ): + self.name = name + self.description = description + self.locationUri = locationUri + self.parameters = parameters + self.privileges = privileges + self.ownerName = ownerName + self.ownerType = ownerType + self.catalogName = catalogName + self.createTime = createTime + self.managedLocationUri = managedLocationUri + self.type = type + self.connector_name = connector_name + self.remote_dbname = remote_dbname + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.description = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.locationUri = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.parameters = {} + (_ktype149, _vtype150, _size148) = iprot.readMapBegin() + for _i152 in range(_size148): + _key153 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val154 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.parameters[_key153] = _val154 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.privileges = PrincipalPrivilegeSet() + self.privileges.read(iprot) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.ownerName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I32: + self.ownerType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRING: + self.catalogName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.I32: + self.createTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRING: + self.managedLocationUri = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.I32: + self.type = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.STRING: + self.connector_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 13: + if ftype == TType.STRING: + self.remote_dbname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("Database") + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRING, 1) + oprot.writeString(self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + if self.description is not None: + oprot.writeFieldBegin("description", TType.STRING, 2) + oprot.writeString(self.description.encode("utf-8") if sys.version_info[0] == 2 else self.description) + oprot.writeFieldEnd() + if self.locationUri is not None: + oprot.writeFieldBegin("locationUri", TType.STRING, 3) + oprot.writeString(self.locationUri.encode("utf-8") if sys.version_info[0] == 2 else self.locationUri) + oprot.writeFieldEnd() + if self.parameters is not None: + oprot.writeFieldBegin("parameters", TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) + for kiter155, viter156 in self.parameters.items(): + oprot.writeString(kiter155.encode("utf-8") if sys.version_info[0] == 2 else kiter155) + oprot.writeString(viter156.encode("utf-8") if sys.version_info[0] == 2 else viter156) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.privileges is not None: + oprot.writeFieldBegin("privileges", TType.STRUCT, 5) + self.privileges.write(oprot) + oprot.writeFieldEnd() + if self.ownerName is not None: + oprot.writeFieldBegin("ownerName", TType.STRING, 6) + oprot.writeString(self.ownerName.encode("utf-8") if sys.version_info[0] == 2 else self.ownerName) + oprot.writeFieldEnd() + if self.ownerType is not None: + oprot.writeFieldBegin("ownerType", TType.I32, 7) + oprot.writeI32(self.ownerType) + oprot.writeFieldEnd() + if self.catalogName is not None: + oprot.writeFieldBegin("catalogName", TType.STRING, 8) + oprot.writeString(self.catalogName.encode("utf-8") if sys.version_info[0] == 2 else self.catalogName) + oprot.writeFieldEnd() + if self.createTime is not None: + oprot.writeFieldBegin("createTime", TType.I32, 9) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.managedLocationUri is not None: + oprot.writeFieldBegin("managedLocationUri", TType.STRING, 10) + oprot.writeString(self.managedLocationUri.encode("utf-8") if sys.version_info[0] == 2 else self.managedLocationUri) + oprot.writeFieldEnd() + if self.type is not None: + oprot.writeFieldBegin("type", TType.I32, 11) + oprot.writeI32(self.type) + oprot.writeFieldEnd() + if self.connector_name is not None: + oprot.writeFieldBegin("connector_name", TType.STRING, 12) + oprot.writeString(self.connector_name.encode("utf-8") if sys.version_info[0] == 2 else self.connector_name) + oprot.writeFieldEnd() + if self.remote_dbname is not None: + oprot.writeFieldBegin("remote_dbname", TType.STRING, 13) + oprot.writeString(self.remote_dbname.encode("utf-8") if sys.version_info[0] == 2 else self.remote_dbname) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class SerDeInfo: + """ + Attributes: + - name + - serializationLib + - parameters + - description + - serializerClass + - deserializerClass + - serdeType + + """ + + def __init__( + self, + name=None, + serializationLib=None, + parameters=None, + description=None, + serializerClass=None, + deserializerClass=None, + serdeType=None, + ): + self.name = name + self.serializationLib = serializationLib + self.parameters = parameters + self.description = description + self.serializerClass = serializerClass + self.deserializerClass = deserializerClass + self.serdeType = serdeType + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.serializationLib = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.parameters = {} + (_ktype158, _vtype159, _size157) = iprot.readMapBegin() + for _i161 in range(_size157): + _key162 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val163 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.parameters[_key162] = _val163 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.description = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.serializerClass = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.deserializerClass = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I32: + self.serdeType = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("SerDeInfo") + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRING, 1) + oprot.writeString(self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + if self.serializationLib is not None: + oprot.writeFieldBegin("serializationLib", TType.STRING, 2) + oprot.writeString(self.serializationLib.encode("utf-8") if sys.version_info[0] == 2 else self.serializationLib) + oprot.writeFieldEnd() + if self.parameters is not None: + oprot.writeFieldBegin("parameters", TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) + for kiter164, viter165 in self.parameters.items(): + oprot.writeString(kiter164.encode("utf-8") if sys.version_info[0] == 2 else kiter164) + oprot.writeString(viter165.encode("utf-8") if sys.version_info[0] == 2 else viter165) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.description is not None: + oprot.writeFieldBegin("description", TType.STRING, 4) + oprot.writeString(self.description.encode("utf-8") if sys.version_info[0] == 2 else self.description) + oprot.writeFieldEnd() + if self.serializerClass is not None: + oprot.writeFieldBegin("serializerClass", TType.STRING, 5) + oprot.writeString(self.serializerClass.encode("utf-8") if sys.version_info[0] == 2 else self.serializerClass) + oprot.writeFieldEnd() + if self.deserializerClass is not None: + oprot.writeFieldBegin("deserializerClass", TType.STRING, 6) + oprot.writeString(self.deserializerClass.encode("utf-8") if sys.version_info[0] == 2 else self.deserializerClass) + oprot.writeFieldEnd() + if self.serdeType is not None: + oprot.writeFieldBegin("serdeType", TType.I32, 7) + oprot.writeI32(self.serdeType) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class Order: + """ + Attributes: + - col + - order + + """ + + def __init__( + self, + col=None, + order=None, + ): + self.col = col + self.order = order + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.col = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.order = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("Order") + if self.col is not None: + oprot.writeFieldBegin("col", TType.STRING, 1) + oprot.writeString(self.col.encode("utf-8") if sys.version_info[0] == 2 else self.col) + oprot.writeFieldEnd() + if self.order is not None: + oprot.writeFieldBegin("order", TType.I32, 2) + oprot.writeI32(self.order) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class SkewedInfo: + """ + Attributes: + - skewedColNames + - skewedColValues + - skewedColValueLocationMaps + + """ + + def __init__( + self, + skewedColNames=None, + skewedColValues=None, + skewedColValueLocationMaps=None, + ): + self.skewedColNames = skewedColNames + self.skewedColValues = skewedColValues + self.skewedColValueLocationMaps = skewedColValueLocationMaps + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.skewedColNames = [] + (_etype169, _size166) = iprot.readListBegin() + for _i170 in range(_size166): + _elem171 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.skewedColNames.append(_elem171) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.skewedColValues = [] + (_etype175, _size172) = iprot.readListBegin() + for _i176 in range(_size172): + _elem177 = [] + (_etype181, _size178) = iprot.readListBegin() + for _i182 in range(_size178): + _elem183 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _elem177.append(_elem183) + iprot.readListEnd() + self.skewedColValues.append(_elem177) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.skewedColValueLocationMaps = {} + (_ktype185, _vtype186, _size184) = iprot.readMapBegin() + for _i188 in range(_size184): + _key189 = [] + (_etype194, _size191) = iprot.readListBegin() + for _i195 in range(_size191): + _elem196 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _key189.append(_elem196) + iprot.readListEnd() + _val190 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.skewedColValueLocationMaps[_key189] = _val190 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("SkewedInfo") + if self.skewedColNames is not None: + oprot.writeFieldBegin("skewedColNames", TType.LIST, 1) + oprot.writeListBegin(TType.STRING, len(self.skewedColNames)) + for iter197 in self.skewedColNames: + oprot.writeString(iter197.encode("utf-8") if sys.version_info[0] == 2 else iter197) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.skewedColValues is not None: + oprot.writeFieldBegin("skewedColValues", TType.LIST, 2) + oprot.writeListBegin(TType.LIST, len(self.skewedColValues)) + for iter198 in self.skewedColValues: + oprot.writeListBegin(TType.STRING, len(iter198)) + for iter199 in iter198: + oprot.writeString(iter199.encode("utf-8") if sys.version_info[0] == 2 else iter199) + oprot.writeListEnd() + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.skewedColValueLocationMaps is not None: + oprot.writeFieldBegin("skewedColValueLocationMaps", TType.MAP, 3) + oprot.writeMapBegin(TType.LIST, TType.STRING, len(self.skewedColValueLocationMaps)) + for kiter200, viter201 in self.skewedColValueLocationMaps.items(): + oprot.writeListBegin(TType.STRING, len(kiter200)) + for iter202 in kiter200: + oprot.writeString(iter202.encode("utf-8") if sys.version_info[0] == 2 else iter202) + oprot.writeListEnd() + oprot.writeString(viter201.encode("utf-8") if sys.version_info[0] == 2 else viter201) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class StorageDescriptor: + """ + Attributes: + - cols + - location + - inputFormat + - outputFormat + - compressed + - numBuckets + - serdeInfo + - bucketCols + - sortCols + - parameters + - skewedInfo + - storedAsSubDirectories + + """ + + def __init__( + self, + cols=None, + location=None, + inputFormat=None, + outputFormat=None, + compressed=None, + numBuckets=None, + serdeInfo=None, + bucketCols=None, + sortCols=None, + parameters=None, + skewedInfo=None, + storedAsSubDirectories=None, + ): + self.cols = cols + self.location = location + self.inputFormat = inputFormat + self.outputFormat = outputFormat + self.compressed = compressed + self.numBuckets = numBuckets + self.serdeInfo = serdeInfo + self.bucketCols = bucketCols + self.sortCols = sortCols + self.parameters = parameters + self.skewedInfo = skewedInfo + self.storedAsSubDirectories = storedAsSubDirectories + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.cols = [] + (_etype206, _size203) = iprot.readListBegin() + for _i207 in range(_size203): + _elem208 = FieldSchema() + _elem208.read(iprot) + self.cols.append(_elem208) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.location = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.inputFormat = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.outputFormat = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.BOOL: + self.compressed = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.numBuckets = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRUCT: + self.serdeInfo = SerDeInfo() + self.serdeInfo.read(iprot) + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.LIST: + self.bucketCols = [] + (_etype212, _size209) = iprot.readListBegin() + for _i213 in range(_size209): + _elem214 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.bucketCols.append(_elem214) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.LIST: + self.sortCols = [] + (_etype218, _size215) = iprot.readListBegin() + for _i219 in range(_size215): + _elem220 = Order() + _elem220.read(iprot) + self.sortCols.append(_elem220) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.MAP: + self.parameters = {} + (_ktype222, _vtype223, _size221) = iprot.readMapBegin() + for _i225 in range(_size221): + _key226 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val227 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.parameters[_key226] = _val227 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.STRUCT: + self.skewedInfo = SkewedInfo() + self.skewedInfo.read(iprot) + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.BOOL: + self.storedAsSubDirectories = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("StorageDescriptor") + if self.cols is not None: + oprot.writeFieldBegin("cols", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.cols)) + for iter228 in self.cols: + iter228.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.location is not None: + oprot.writeFieldBegin("location", TType.STRING, 2) + oprot.writeString(self.location.encode("utf-8") if sys.version_info[0] == 2 else self.location) + oprot.writeFieldEnd() + if self.inputFormat is not None: + oprot.writeFieldBegin("inputFormat", TType.STRING, 3) + oprot.writeString(self.inputFormat.encode("utf-8") if sys.version_info[0] == 2 else self.inputFormat) + oprot.writeFieldEnd() + if self.outputFormat is not None: + oprot.writeFieldBegin("outputFormat", TType.STRING, 4) + oprot.writeString(self.outputFormat.encode("utf-8") if sys.version_info[0] == 2 else self.outputFormat) + oprot.writeFieldEnd() + if self.compressed is not None: + oprot.writeFieldBegin("compressed", TType.BOOL, 5) + oprot.writeBool(self.compressed) + oprot.writeFieldEnd() + if self.numBuckets is not None: + oprot.writeFieldBegin("numBuckets", TType.I32, 6) + oprot.writeI32(self.numBuckets) + oprot.writeFieldEnd() + if self.serdeInfo is not None: + oprot.writeFieldBegin("serdeInfo", TType.STRUCT, 7) + self.serdeInfo.write(oprot) + oprot.writeFieldEnd() + if self.bucketCols is not None: + oprot.writeFieldBegin("bucketCols", TType.LIST, 8) + oprot.writeListBegin(TType.STRING, len(self.bucketCols)) + for iter229 in self.bucketCols: + oprot.writeString(iter229.encode("utf-8") if sys.version_info[0] == 2 else iter229) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.sortCols is not None: + oprot.writeFieldBegin("sortCols", TType.LIST, 9) + oprot.writeListBegin(TType.STRUCT, len(self.sortCols)) + for iter230 in self.sortCols: + iter230.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.parameters is not None: + oprot.writeFieldBegin("parameters", TType.MAP, 10) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) + for kiter231, viter232 in self.parameters.items(): + oprot.writeString(kiter231.encode("utf-8") if sys.version_info[0] == 2 else kiter231) + oprot.writeString(viter232.encode("utf-8") if sys.version_info[0] == 2 else viter232) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.skewedInfo is not None: + oprot.writeFieldBegin("skewedInfo", TType.STRUCT, 11) + self.skewedInfo.write(oprot) + oprot.writeFieldEnd() + if self.storedAsSubDirectories is not None: + oprot.writeFieldBegin("storedAsSubDirectories", TType.BOOL, 12) + oprot.writeBool(self.storedAsSubDirectories) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class CreationMetadata: + """ + Attributes: + - catName + - dbName + - tblName + - tablesUsed + - validTxnList + - materializationTime + - sourceTables + + """ + + def __init__( + self, + catName=None, + dbName=None, + tblName=None, + tablesUsed=None, + validTxnList=None, + materializationTime=None, + sourceTables=None, + ): + self.catName = catName + self.dbName = dbName + self.tblName = tblName + self.tablesUsed = tablesUsed + self.validTxnList = validTxnList + self.materializationTime = materializationTime + self.sourceTables = sourceTables + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tblName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.SET: + self.tablesUsed = set() + (_etype236, _size233) = iprot.readSetBegin() + for _i237 in range(_size233): + _elem238 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.tablesUsed.add(_elem238) + iprot.readSetEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.validTxnList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I64: + self.materializationTime = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.LIST: + self.sourceTables = [] + (_etype242, _size239) = iprot.readListBegin() + for _i243 in range(_size239): + _elem244 = SourceTable() + _elem244.read(iprot) + self.sourceTables.append(_elem244) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("CreationMetadata") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 2) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tblName is not None: + oprot.writeFieldBegin("tblName", TType.STRING, 3) + oprot.writeString(self.tblName.encode("utf-8") if sys.version_info[0] == 2 else self.tblName) + oprot.writeFieldEnd() + if self.tablesUsed is not None: + oprot.writeFieldBegin("tablesUsed", TType.SET, 4) + oprot.writeSetBegin(TType.STRING, len(self.tablesUsed)) + for iter245 in self.tablesUsed: + oprot.writeString(iter245.encode("utf-8") if sys.version_info[0] == 2 else iter245) + oprot.writeSetEnd() + oprot.writeFieldEnd() + if self.validTxnList is not None: + oprot.writeFieldBegin("validTxnList", TType.STRING, 5) + oprot.writeString(self.validTxnList.encode("utf-8") if sys.version_info[0] == 2 else self.validTxnList) + oprot.writeFieldEnd() + if self.materializationTime is not None: + oprot.writeFieldBegin("materializationTime", TType.I64, 6) + oprot.writeI64(self.materializationTime) + oprot.writeFieldEnd() + if self.sourceTables is not None: + oprot.writeFieldBegin("sourceTables", TType.LIST, 7) + oprot.writeListBegin(TType.STRUCT, len(self.sourceTables)) + for iter246 in self.sourceTables: + iter246.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.catName is None: + raise TProtocolException(message="Required field catName is unset!") + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.tblName is None: + raise TProtocolException(message="Required field tblName is unset!") + if self.tablesUsed is None: + raise TProtocolException(message="Required field tablesUsed is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class BooleanColumnStatsData: + """ + Attributes: + - numTrues + - numFalses + - numNulls + - bitVectors + + """ + + def __init__( + self, + numTrues=None, + numFalses=None, + numNulls=None, + bitVectors=None, + ): + self.numTrues = numTrues + self.numFalses = numFalses + self.numNulls = numNulls + self.bitVectors = bitVectors + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.numTrues = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.numFalses = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.numNulls = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.bitVectors = iprot.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("BooleanColumnStatsData") + if self.numTrues is not None: + oprot.writeFieldBegin("numTrues", TType.I64, 1) + oprot.writeI64(self.numTrues) + oprot.writeFieldEnd() + if self.numFalses is not None: + oprot.writeFieldBegin("numFalses", TType.I64, 2) + oprot.writeI64(self.numFalses) + oprot.writeFieldEnd() + if self.numNulls is not None: + oprot.writeFieldBegin("numNulls", TType.I64, 3) + oprot.writeI64(self.numNulls) + oprot.writeFieldEnd() + if self.bitVectors is not None: + oprot.writeFieldBegin("bitVectors", TType.STRING, 4) + oprot.writeBinary(self.bitVectors) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.numTrues is None: + raise TProtocolException(message="Required field numTrues is unset!") + if self.numFalses is None: + raise TProtocolException(message="Required field numFalses is unset!") + if self.numNulls is None: + raise TProtocolException(message="Required field numNulls is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class DoubleColumnStatsData: + """ + Attributes: + - lowValue + - highValue + - numNulls + - numDVs + - bitVectors + + """ + + def __init__( + self, + lowValue=None, + highValue=None, + numNulls=None, + numDVs=None, + bitVectors=None, + ): + self.lowValue = lowValue + self.highValue = highValue + self.numNulls = numNulls + self.numDVs = numDVs + self.bitVectors = bitVectors + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.DOUBLE: + self.lowValue = iprot.readDouble() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.DOUBLE: + self.highValue = iprot.readDouble() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.numNulls = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.numDVs = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.bitVectors = iprot.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("DoubleColumnStatsData") + if self.lowValue is not None: + oprot.writeFieldBegin("lowValue", TType.DOUBLE, 1) + oprot.writeDouble(self.lowValue) + oprot.writeFieldEnd() + if self.highValue is not None: + oprot.writeFieldBegin("highValue", TType.DOUBLE, 2) + oprot.writeDouble(self.highValue) + oprot.writeFieldEnd() + if self.numNulls is not None: + oprot.writeFieldBegin("numNulls", TType.I64, 3) + oprot.writeI64(self.numNulls) + oprot.writeFieldEnd() + if self.numDVs is not None: + oprot.writeFieldBegin("numDVs", TType.I64, 4) + oprot.writeI64(self.numDVs) + oprot.writeFieldEnd() + if self.bitVectors is not None: + oprot.writeFieldBegin("bitVectors", TType.STRING, 5) + oprot.writeBinary(self.bitVectors) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.numNulls is None: + raise TProtocolException(message="Required field numNulls is unset!") + if self.numDVs is None: + raise TProtocolException(message="Required field numDVs is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class LongColumnStatsData: + """ + Attributes: + - lowValue + - highValue + - numNulls + - numDVs + - bitVectors + + """ + + def __init__( + self, + lowValue=None, + highValue=None, + numNulls=None, + numDVs=None, + bitVectors=None, + ): + self.lowValue = lowValue + self.highValue = highValue + self.numNulls = numNulls + self.numDVs = numDVs + self.bitVectors = bitVectors + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.lowValue = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.highValue = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.numNulls = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.numDVs = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.bitVectors = iprot.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("LongColumnStatsData") + if self.lowValue is not None: + oprot.writeFieldBegin("lowValue", TType.I64, 1) + oprot.writeI64(self.lowValue) + oprot.writeFieldEnd() + if self.highValue is not None: + oprot.writeFieldBegin("highValue", TType.I64, 2) + oprot.writeI64(self.highValue) + oprot.writeFieldEnd() + if self.numNulls is not None: + oprot.writeFieldBegin("numNulls", TType.I64, 3) + oprot.writeI64(self.numNulls) + oprot.writeFieldEnd() + if self.numDVs is not None: + oprot.writeFieldBegin("numDVs", TType.I64, 4) + oprot.writeI64(self.numDVs) + oprot.writeFieldEnd() + if self.bitVectors is not None: + oprot.writeFieldBegin("bitVectors", TType.STRING, 5) + oprot.writeBinary(self.bitVectors) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.numNulls is None: + raise TProtocolException(message="Required field numNulls is unset!") + if self.numDVs is None: + raise TProtocolException(message="Required field numDVs is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class StringColumnStatsData: + """ + Attributes: + - maxColLen + - avgColLen + - numNulls + - numDVs + - bitVectors + + """ + + def __init__( + self, + maxColLen=None, + avgColLen=None, + numNulls=None, + numDVs=None, + bitVectors=None, + ): + self.maxColLen = maxColLen + self.avgColLen = avgColLen + self.numNulls = numNulls + self.numDVs = numDVs + self.bitVectors = bitVectors + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.maxColLen = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.DOUBLE: + self.avgColLen = iprot.readDouble() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.numNulls = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.numDVs = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.bitVectors = iprot.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("StringColumnStatsData") + if self.maxColLen is not None: + oprot.writeFieldBegin("maxColLen", TType.I64, 1) + oprot.writeI64(self.maxColLen) + oprot.writeFieldEnd() + if self.avgColLen is not None: + oprot.writeFieldBegin("avgColLen", TType.DOUBLE, 2) + oprot.writeDouble(self.avgColLen) + oprot.writeFieldEnd() + if self.numNulls is not None: + oprot.writeFieldBegin("numNulls", TType.I64, 3) + oprot.writeI64(self.numNulls) + oprot.writeFieldEnd() + if self.numDVs is not None: + oprot.writeFieldBegin("numDVs", TType.I64, 4) + oprot.writeI64(self.numDVs) + oprot.writeFieldEnd() + if self.bitVectors is not None: + oprot.writeFieldBegin("bitVectors", TType.STRING, 5) + oprot.writeBinary(self.bitVectors) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.maxColLen is None: + raise TProtocolException(message="Required field maxColLen is unset!") + if self.avgColLen is None: + raise TProtocolException(message="Required field avgColLen is unset!") + if self.numNulls is None: + raise TProtocolException(message="Required field numNulls is unset!") + if self.numDVs is None: + raise TProtocolException(message="Required field numDVs is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class BinaryColumnStatsData: + """ + Attributes: + - maxColLen + - avgColLen + - numNulls + - bitVectors + + """ + + def __init__( + self, + maxColLen=None, + avgColLen=None, + numNulls=None, + bitVectors=None, + ): + self.maxColLen = maxColLen + self.avgColLen = avgColLen + self.numNulls = numNulls + self.bitVectors = bitVectors + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.maxColLen = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.DOUBLE: + self.avgColLen = iprot.readDouble() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.numNulls = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.bitVectors = iprot.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("BinaryColumnStatsData") + if self.maxColLen is not None: + oprot.writeFieldBegin("maxColLen", TType.I64, 1) + oprot.writeI64(self.maxColLen) + oprot.writeFieldEnd() + if self.avgColLen is not None: + oprot.writeFieldBegin("avgColLen", TType.DOUBLE, 2) + oprot.writeDouble(self.avgColLen) + oprot.writeFieldEnd() + if self.numNulls is not None: + oprot.writeFieldBegin("numNulls", TType.I64, 3) + oprot.writeI64(self.numNulls) + oprot.writeFieldEnd() + if self.bitVectors is not None: + oprot.writeFieldBegin("bitVectors", TType.STRING, 4) + oprot.writeBinary(self.bitVectors) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.maxColLen is None: + raise TProtocolException(message="Required field maxColLen is unset!") + if self.avgColLen is None: + raise TProtocolException(message="Required field avgColLen is unset!") + if self.numNulls is None: + raise TProtocolException(message="Required field numNulls is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class Decimal: + """ + Attributes: + - scale + - unscaled + + """ + + def __init__( + self, + scale=None, + unscaled=None, + ): + self.scale = scale + self.unscaled = unscaled + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 3: + if ftype == TType.I16: + self.scale = iprot.readI16() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRING: + self.unscaled = iprot.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("Decimal") + if self.unscaled is not None: + oprot.writeFieldBegin("unscaled", TType.STRING, 1) + oprot.writeBinary(self.unscaled) + oprot.writeFieldEnd() + if self.scale is not None: + oprot.writeFieldBegin("scale", TType.I16, 3) + oprot.writeI16(self.scale) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.scale is None: + raise TProtocolException(message="Required field scale is unset!") + if self.unscaled is None: + raise TProtocolException(message="Required field unscaled is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class DecimalColumnStatsData: + """ + Attributes: + - lowValue + - highValue + - numNulls + - numDVs + - bitVectors + + """ + + def __init__( + self, + lowValue=None, + highValue=None, + numNulls=None, + numDVs=None, + bitVectors=None, + ): + self.lowValue = lowValue + self.highValue = highValue + self.numNulls = numNulls + self.numDVs = numDVs + self.bitVectors = bitVectors + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.lowValue = Decimal() + self.lowValue.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.highValue = Decimal() + self.highValue.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.numNulls = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.numDVs = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.bitVectors = iprot.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("DecimalColumnStatsData") + if self.lowValue is not None: + oprot.writeFieldBegin("lowValue", TType.STRUCT, 1) + self.lowValue.write(oprot) + oprot.writeFieldEnd() + if self.highValue is not None: + oprot.writeFieldBegin("highValue", TType.STRUCT, 2) + self.highValue.write(oprot) + oprot.writeFieldEnd() + if self.numNulls is not None: + oprot.writeFieldBegin("numNulls", TType.I64, 3) + oprot.writeI64(self.numNulls) + oprot.writeFieldEnd() + if self.numDVs is not None: + oprot.writeFieldBegin("numDVs", TType.I64, 4) + oprot.writeI64(self.numDVs) + oprot.writeFieldEnd() + if self.bitVectors is not None: + oprot.writeFieldBegin("bitVectors", TType.STRING, 5) + oprot.writeBinary(self.bitVectors) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.numNulls is None: + raise TProtocolException(message="Required field numNulls is unset!") + if self.numDVs is None: + raise TProtocolException(message="Required field numDVs is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class Date: + """ + Attributes: + - daysSinceEpoch + + """ + + def __init__( + self, + daysSinceEpoch=None, + ): + self.daysSinceEpoch = daysSinceEpoch + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.daysSinceEpoch = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("Date") + if self.daysSinceEpoch is not None: + oprot.writeFieldBegin("daysSinceEpoch", TType.I64, 1) + oprot.writeI64(self.daysSinceEpoch) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.daysSinceEpoch is None: + raise TProtocolException(message="Required field daysSinceEpoch is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class DateColumnStatsData: + """ + Attributes: + - lowValue + - highValue + - numNulls + - numDVs + - bitVectors + + """ + + def __init__( + self, + lowValue=None, + highValue=None, + numNulls=None, + numDVs=None, + bitVectors=None, + ): + self.lowValue = lowValue + self.highValue = highValue + self.numNulls = numNulls + self.numDVs = numDVs + self.bitVectors = bitVectors + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.lowValue = Date() + self.lowValue.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.highValue = Date() + self.highValue.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.numNulls = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.numDVs = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.bitVectors = iprot.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("DateColumnStatsData") + if self.lowValue is not None: + oprot.writeFieldBegin("lowValue", TType.STRUCT, 1) + self.lowValue.write(oprot) + oprot.writeFieldEnd() + if self.highValue is not None: + oprot.writeFieldBegin("highValue", TType.STRUCT, 2) + self.highValue.write(oprot) + oprot.writeFieldEnd() + if self.numNulls is not None: + oprot.writeFieldBegin("numNulls", TType.I64, 3) + oprot.writeI64(self.numNulls) + oprot.writeFieldEnd() + if self.numDVs is not None: + oprot.writeFieldBegin("numDVs", TType.I64, 4) + oprot.writeI64(self.numDVs) + oprot.writeFieldEnd() + if self.bitVectors is not None: + oprot.writeFieldBegin("bitVectors", TType.STRING, 5) + oprot.writeBinary(self.bitVectors) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.numNulls is None: + raise TProtocolException(message="Required field numNulls is unset!") + if self.numDVs is None: + raise TProtocolException(message="Required field numDVs is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class Timestamp: + """ + Attributes: + - secondsSinceEpoch + + """ + + def __init__( + self, + secondsSinceEpoch=None, + ): + self.secondsSinceEpoch = secondsSinceEpoch + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.secondsSinceEpoch = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("Timestamp") + if self.secondsSinceEpoch is not None: + oprot.writeFieldBegin("secondsSinceEpoch", TType.I64, 1) + oprot.writeI64(self.secondsSinceEpoch) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.secondsSinceEpoch is None: + raise TProtocolException(message="Required field secondsSinceEpoch is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TimestampColumnStatsData: + """ + Attributes: + - lowValue + - highValue + - numNulls + - numDVs + - bitVectors + + """ + + def __init__( + self, + lowValue=None, + highValue=None, + numNulls=None, + numDVs=None, + bitVectors=None, + ): + self.lowValue = lowValue + self.highValue = highValue + self.numNulls = numNulls + self.numDVs = numDVs + self.bitVectors = bitVectors + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.lowValue = Timestamp() + self.lowValue.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.highValue = Timestamp() + self.highValue.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.numNulls = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.numDVs = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.bitVectors = iprot.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("TimestampColumnStatsData") + if self.lowValue is not None: + oprot.writeFieldBegin("lowValue", TType.STRUCT, 1) + self.lowValue.write(oprot) + oprot.writeFieldEnd() + if self.highValue is not None: + oprot.writeFieldBegin("highValue", TType.STRUCT, 2) + self.highValue.write(oprot) + oprot.writeFieldEnd() + if self.numNulls is not None: + oprot.writeFieldBegin("numNulls", TType.I64, 3) + oprot.writeI64(self.numNulls) + oprot.writeFieldEnd() + if self.numDVs is not None: + oprot.writeFieldBegin("numDVs", TType.I64, 4) + oprot.writeI64(self.numDVs) + oprot.writeFieldEnd() + if self.bitVectors is not None: + oprot.writeFieldBegin("bitVectors", TType.STRING, 5) + oprot.writeBinary(self.bitVectors) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.numNulls is None: + raise TProtocolException(message="Required field numNulls is unset!") + if self.numDVs is None: + raise TProtocolException(message="Required field numDVs is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ColumnStatisticsData: + """ + Attributes: + - booleanStats + - longStats + - doubleStats + - stringStats + - binaryStats + - decimalStats + - dateStats + - timestampStats + + """ + + def __init__( + self, + booleanStats=None, + longStats=None, + doubleStats=None, + stringStats=None, + binaryStats=None, + decimalStats=None, + dateStats=None, + timestampStats=None, + ): + self.booleanStats = booleanStats + self.longStats = longStats + self.doubleStats = doubleStats + self.stringStats = stringStats + self.binaryStats = binaryStats + self.decimalStats = decimalStats + self.dateStats = dateStats + self.timestampStats = timestampStats + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.booleanStats = BooleanColumnStatsData() + self.booleanStats.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.longStats = LongColumnStatsData() + self.longStats.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.doubleStats = DoubleColumnStatsData() + self.doubleStats.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.stringStats = StringColumnStatsData() + self.stringStats.read(iprot) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.binaryStats = BinaryColumnStatsData() + self.binaryStats.read(iprot) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRUCT: + self.decimalStats = DecimalColumnStatsData() + self.decimalStats.read(iprot) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRUCT: + self.dateStats = DateColumnStatsData() + self.dateStats.read(iprot) + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRUCT: + self.timestampStats = TimestampColumnStatsData() + self.timestampStats.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ColumnStatisticsData") + if self.booleanStats is not None: + oprot.writeFieldBegin("booleanStats", TType.STRUCT, 1) + self.booleanStats.write(oprot) + oprot.writeFieldEnd() + if self.longStats is not None: + oprot.writeFieldBegin("longStats", TType.STRUCT, 2) + self.longStats.write(oprot) + oprot.writeFieldEnd() + if self.doubleStats is not None: + oprot.writeFieldBegin("doubleStats", TType.STRUCT, 3) + self.doubleStats.write(oprot) + oprot.writeFieldEnd() + if self.stringStats is not None: + oprot.writeFieldBegin("stringStats", TType.STRUCT, 4) + self.stringStats.write(oprot) + oprot.writeFieldEnd() + if self.binaryStats is not None: + oprot.writeFieldBegin("binaryStats", TType.STRUCT, 5) + self.binaryStats.write(oprot) + oprot.writeFieldEnd() + if self.decimalStats is not None: + oprot.writeFieldBegin("decimalStats", TType.STRUCT, 6) + self.decimalStats.write(oprot) + oprot.writeFieldEnd() + if self.dateStats is not None: + oprot.writeFieldBegin("dateStats", TType.STRUCT, 7) + self.dateStats.write(oprot) + oprot.writeFieldEnd() + if self.timestampStats is not None: + oprot.writeFieldBegin("timestampStats", TType.STRUCT, 8) + self.timestampStats.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ColumnStatisticsObj: + """ + Attributes: + - colName + - colType + - statsData + + """ + + def __init__( + self, + colName=None, + colType=None, + statsData=None, + ): + self.colName = colName + self.colType = colType + self.statsData = statsData + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.colName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.colType = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.statsData = ColumnStatisticsData() + self.statsData.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ColumnStatisticsObj") + if self.colName is not None: + oprot.writeFieldBegin("colName", TType.STRING, 1) + oprot.writeString(self.colName.encode("utf-8") if sys.version_info[0] == 2 else self.colName) + oprot.writeFieldEnd() + if self.colType is not None: + oprot.writeFieldBegin("colType", TType.STRING, 2) + oprot.writeString(self.colType.encode("utf-8") if sys.version_info[0] == 2 else self.colType) + oprot.writeFieldEnd() + if self.statsData is not None: + oprot.writeFieldBegin("statsData", TType.STRUCT, 3) + self.statsData.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.colName is None: + raise TProtocolException(message="Required field colName is unset!") + if self.colType is None: + raise TProtocolException(message="Required field colType is unset!") + if self.statsData is None: + raise TProtocolException(message="Required field statsData is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ColumnStatisticsDesc: + """ + Attributes: + - isTblLevel + - dbName + - tableName + - partName + - lastAnalyzed + - catName + + """ + + def __init__( + self, + isTblLevel=None, + dbName=None, + tableName=None, + partName=None, + lastAnalyzed=None, + catName=None, + ): + self.isTblLevel = isTblLevel + self.dbName = dbName + self.tableName = tableName + self.partName = partName + self.lastAnalyzed = lastAnalyzed + self.catName = catName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.BOOL: + self.isTblLevel = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tableName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.partName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I64: + self.lastAnalyzed = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ColumnStatisticsDesc") + if self.isTblLevel is not None: + oprot.writeFieldBegin("isTblLevel", TType.BOOL, 1) + oprot.writeBool(self.isTblLevel) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 2) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tableName is not None: + oprot.writeFieldBegin("tableName", TType.STRING, 3) + oprot.writeString(self.tableName.encode("utf-8") if sys.version_info[0] == 2 else self.tableName) + oprot.writeFieldEnd() + if self.partName is not None: + oprot.writeFieldBegin("partName", TType.STRING, 4) + oprot.writeString(self.partName.encode("utf-8") if sys.version_info[0] == 2 else self.partName) + oprot.writeFieldEnd() + if self.lastAnalyzed is not None: + oprot.writeFieldBegin("lastAnalyzed", TType.I64, 5) + oprot.writeI64(self.lastAnalyzed) + oprot.writeFieldEnd() + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 6) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.isTblLevel is None: + raise TProtocolException(message="Required field isTblLevel is unset!") + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.tableName is None: + raise TProtocolException(message="Required field tableName is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ColumnStatistics: + """ + Attributes: + - statsDesc + - statsObj + - isStatsCompliant + - engine + + """ + + def __init__( + self, + statsDesc=None, + statsObj=None, + isStatsCompliant=None, + engine=None, + ): + self.statsDesc = statsDesc + self.statsObj = statsObj + self.isStatsCompliant = isStatsCompliant + self.engine = engine + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.statsDesc = ColumnStatisticsDesc() + self.statsDesc.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.statsObj = [] + (_etype250, _size247) = iprot.readListBegin() + for _i251 in range(_size247): + _elem252 = ColumnStatisticsObj() + _elem252.read(iprot) + self.statsObj.append(_elem252) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.isStatsCompliant = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.engine = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ColumnStatistics") + if self.statsDesc is not None: + oprot.writeFieldBegin("statsDesc", TType.STRUCT, 1) + self.statsDesc.write(oprot) + oprot.writeFieldEnd() + if self.statsObj is not None: + oprot.writeFieldBegin("statsObj", TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.statsObj)) + for iter253 in self.statsObj: + iter253.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.isStatsCompliant is not None: + oprot.writeFieldBegin("isStatsCompliant", TType.BOOL, 3) + oprot.writeBool(self.isStatsCompliant) + oprot.writeFieldEnd() + if self.engine is not None: + oprot.writeFieldBegin("engine", TType.STRING, 4) + oprot.writeString(self.engine.encode("utf-8") if sys.version_info[0] == 2 else self.engine) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.statsDesc is None: + raise TProtocolException(message="Required field statsDesc is unset!") + if self.statsObj is None: + raise TProtocolException(message="Required field statsObj is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class FileMetadata: + """ + Attributes: + - type + - version + - data + + """ + + def __init__( + self, + type=1, + version=1, + data=None, + ): + self.type = type + self.version = version + self.data = data + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.BYTE: + self.type = iprot.readByte() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BYTE: + self.version = iprot.readByte() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.data = [] + (_etype257, _size254) = iprot.readListBegin() + for _i258 in range(_size254): + _elem259 = iprot.readBinary() + self.data.append(_elem259) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("FileMetadata") + if self.type is not None: + oprot.writeFieldBegin("type", TType.BYTE, 1) + oprot.writeByte(self.type) + oprot.writeFieldEnd() + if self.version is not None: + oprot.writeFieldBegin("version", TType.BYTE, 2) + oprot.writeByte(self.version) + oprot.writeFieldEnd() + if self.data is not None: + oprot.writeFieldBegin("data", TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.data)) + for iter260 in self.data: + oprot.writeBinary(iter260) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ObjectDictionary: + """ + Attributes: + - values + + """ + + def __init__( + self, + values=None, + ): + self.values = values + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.MAP: + self.values = {} + (_ktype262, _vtype263, _size261) = iprot.readMapBegin() + for _i265 in range(_size261): + _key266 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val267 = [] + (_etype271, _size268) = iprot.readListBegin() + for _i272 in range(_size268): + _elem273 = iprot.readBinary() + _val267.append(_elem273) + iprot.readListEnd() + self.values[_key266] = _val267 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ObjectDictionary") + if self.values is not None: + oprot.writeFieldBegin("values", TType.MAP, 1) + oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.values)) + for kiter274, viter275 in self.values.items(): + oprot.writeString(kiter274.encode("utf-8") if sys.version_info[0] == 2 else kiter274) + oprot.writeListBegin(TType.STRING, len(viter275)) + for iter276 in viter275: + oprot.writeBinary(iter276) + oprot.writeListEnd() + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.values is None: + raise TProtocolException(message="Required field values is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class Table: + """ + Attributes: + - tableName + - dbName + - owner + - createTime + - lastAccessTime + - retention + - sd + - partitionKeys + - parameters + - viewOriginalText + - viewExpandedText + - tableType + - privileges + - temporary + - rewriteEnabled + - creationMetadata + - catName + - ownerType + - writeId + - isStatsCompliant + - colStats + - accessType + - requiredReadCapabilities + - requiredWriteCapabilities + - id + - fileMetadata + - dictionary + - txnId + + """ + + def __init__( + self, + tableName=None, + dbName=None, + owner=None, + createTime=None, + lastAccessTime=None, + retention=None, + sd=None, + partitionKeys=None, + parameters=None, + viewOriginalText=None, + viewExpandedText=None, + tableType=None, + privileges=None, + temporary=False, + rewriteEnabled=None, + creationMetadata=None, + catName=None, + ownerType=1, + writeId=-1, + isStatsCompliant=None, + colStats=None, + accessType=None, + requiredReadCapabilities=None, + requiredWriteCapabilities=None, + id=None, + fileMetadata=None, + dictionary=None, + txnId=None, + ): + self.tableName = tableName + self.dbName = dbName + self.owner = owner + self.createTime = createTime + self.lastAccessTime = lastAccessTime + self.retention = retention + self.sd = sd + self.partitionKeys = partitionKeys + self.parameters = parameters + self.viewOriginalText = viewOriginalText + self.viewExpandedText = viewExpandedText + self.tableType = tableType + self.privileges = privileges + self.temporary = temporary + self.rewriteEnabled = rewriteEnabled + self.creationMetadata = creationMetadata + self.catName = catName + self.ownerType = ownerType + self.writeId = writeId + self.isStatsCompliant = isStatsCompliant + self.colStats = colStats + self.accessType = accessType + self.requiredReadCapabilities = requiredReadCapabilities + self.requiredWriteCapabilities = requiredWriteCapabilities + self.id = id + self.fileMetadata = fileMetadata + self.dictionary = dictionary + self.txnId = txnId + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.owner = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.createTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.lastAccessTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.retention = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRUCT: + self.sd = StorageDescriptor() + self.sd.read(iprot) + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.LIST: + self.partitionKeys = [] + (_etype280, _size277) = iprot.readListBegin() + for _i281 in range(_size277): + _elem282 = FieldSchema() + _elem282.read(iprot) + self.partitionKeys.append(_elem282) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.MAP: + self.parameters = {} + (_ktype284, _vtype285, _size283) = iprot.readMapBegin() + for _i287 in range(_size283): + _key288 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val289 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.parameters[_key288] = _val289 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRING: + self.viewOriginalText = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.STRING: + self.viewExpandedText = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.STRING: + self.tableType = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 13: + if ftype == TType.STRUCT: + self.privileges = PrincipalPrivilegeSet() + self.privileges.read(iprot) + else: + iprot.skip(ftype) + elif fid == 14: + if ftype == TType.BOOL: + self.temporary = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 15: + if ftype == TType.BOOL: + self.rewriteEnabled = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 16: + if ftype == TType.STRUCT: + self.creationMetadata = CreationMetadata() + self.creationMetadata.read(iprot) + else: + iprot.skip(ftype) + elif fid == 17: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 18: + if ftype == TType.I32: + self.ownerType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 19: + if ftype == TType.I64: + self.writeId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 20: + if ftype == TType.BOOL: + self.isStatsCompliant = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 21: + if ftype == TType.STRUCT: + self.colStats = ColumnStatistics() + self.colStats.read(iprot) + else: + iprot.skip(ftype) + elif fid == 22: + if ftype == TType.BYTE: + self.accessType = iprot.readByte() + else: + iprot.skip(ftype) + elif fid == 23: + if ftype == TType.LIST: + self.requiredReadCapabilities = [] + (_etype293, _size290) = iprot.readListBegin() + for _i294 in range(_size290): + _elem295 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.requiredReadCapabilities.append(_elem295) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 24: + if ftype == TType.LIST: + self.requiredWriteCapabilities = [] + (_etype299, _size296) = iprot.readListBegin() + for _i300 in range(_size296): + _elem301 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.requiredWriteCapabilities.append(_elem301) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 25: + if ftype == TType.I64: + self.id = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 26: + if ftype == TType.STRUCT: + self.fileMetadata = FileMetadata() + self.fileMetadata.read(iprot) + else: + iprot.skip(ftype) + elif fid == 27: + if ftype == TType.STRUCT: + self.dictionary = ObjectDictionary() + self.dictionary.read(iprot) + else: + iprot.skip(ftype) + elif fid == 28: + if ftype == TType.I64: + self.txnId = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("Table") + if self.tableName is not None: + oprot.writeFieldBegin("tableName", TType.STRING, 1) + oprot.writeString(self.tableName.encode("utf-8") if sys.version_info[0] == 2 else self.tableName) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 2) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.owner is not None: + oprot.writeFieldBegin("owner", TType.STRING, 3) + oprot.writeString(self.owner.encode("utf-8") if sys.version_info[0] == 2 else self.owner) + oprot.writeFieldEnd() + if self.createTime is not None: + oprot.writeFieldBegin("createTime", TType.I32, 4) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.lastAccessTime is not None: + oprot.writeFieldBegin("lastAccessTime", TType.I32, 5) + oprot.writeI32(self.lastAccessTime) + oprot.writeFieldEnd() + if self.retention is not None: + oprot.writeFieldBegin("retention", TType.I32, 6) + oprot.writeI32(self.retention) + oprot.writeFieldEnd() + if self.sd is not None: + oprot.writeFieldBegin("sd", TType.STRUCT, 7) + self.sd.write(oprot) + oprot.writeFieldEnd() + if self.partitionKeys is not None: + oprot.writeFieldBegin("partitionKeys", TType.LIST, 8) + oprot.writeListBegin(TType.STRUCT, len(self.partitionKeys)) + for iter302 in self.partitionKeys: + iter302.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.parameters is not None: + oprot.writeFieldBegin("parameters", TType.MAP, 9) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) + for kiter303, viter304 in self.parameters.items(): + oprot.writeString(kiter303.encode("utf-8") if sys.version_info[0] == 2 else kiter303) + oprot.writeString(viter304.encode("utf-8") if sys.version_info[0] == 2 else viter304) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.viewOriginalText is not None: + oprot.writeFieldBegin("viewOriginalText", TType.STRING, 10) + oprot.writeString(self.viewOriginalText.encode("utf-8") if sys.version_info[0] == 2 else self.viewOriginalText) + oprot.writeFieldEnd() + if self.viewExpandedText is not None: + oprot.writeFieldBegin("viewExpandedText", TType.STRING, 11) + oprot.writeString(self.viewExpandedText.encode("utf-8") if sys.version_info[0] == 2 else self.viewExpandedText) + oprot.writeFieldEnd() + if self.tableType is not None: + oprot.writeFieldBegin("tableType", TType.STRING, 12) + oprot.writeString(self.tableType.encode("utf-8") if sys.version_info[0] == 2 else self.tableType) + oprot.writeFieldEnd() + if self.privileges is not None: + oprot.writeFieldBegin("privileges", TType.STRUCT, 13) + self.privileges.write(oprot) + oprot.writeFieldEnd() + if self.temporary is not None: + oprot.writeFieldBegin("temporary", TType.BOOL, 14) + oprot.writeBool(self.temporary) + oprot.writeFieldEnd() + if self.rewriteEnabled is not None: + oprot.writeFieldBegin("rewriteEnabled", TType.BOOL, 15) + oprot.writeBool(self.rewriteEnabled) + oprot.writeFieldEnd() + if self.creationMetadata is not None: + oprot.writeFieldBegin("creationMetadata", TType.STRUCT, 16) + self.creationMetadata.write(oprot) + oprot.writeFieldEnd() + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 17) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.ownerType is not None: + oprot.writeFieldBegin("ownerType", TType.I32, 18) + oprot.writeI32(self.ownerType) + oprot.writeFieldEnd() + if self.writeId is not None: + oprot.writeFieldBegin("writeId", TType.I64, 19) + oprot.writeI64(self.writeId) + oprot.writeFieldEnd() + if self.isStatsCompliant is not None: + oprot.writeFieldBegin("isStatsCompliant", TType.BOOL, 20) + oprot.writeBool(self.isStatsCompliant) + oprot.writeFieldEnd() + if self.colStats is not None: + oprot.writeFieldBegin("colStats", TType.STRUCT, 21) + self.colStats.write(oprot) + oprot.writeFieldEnd() + if self.accessType is not None: + oprot.writeFieldBegin("accessType", TType.BYTE, 22) + oprot.writeByte(self.accessType) + oprot.writeFieldEnd() + if self.requiredReadCapabilities is not None: + oprot.writeFieldBegin("requiredReadCapabilities", TType.LIST, 23) + oprot.writeListBegin(TType.STRING, len(self.requiredReadCapabilities)) + for iter305 in self.requiredReadCapabilities: + oprot.writeString(iter305.encode("utf-8") if sys.version_info[0] == 2 else iter305) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.requiredWriteCapabilities is not None: + oprot.writeFieldBegin("requiredWriteCapabilities", TType.LIST, 24) + oprot.writeListBegin(TType.STRING, len(self.requiredWriteCapabilities)) + for iter306 in self.requiredWriteCapabilities: + oprot.writeString(iter306.encode("utf-8") if sys.version_info[0] == 2 else iter306) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.id is not None: + oprot.writeFieldBegin("id", TType.I64, 25) + oprot.writeI64(self.id) + oprot.writeFieldEnd() + if self.fileMetadata is not None: + oprot.writeFieldBegin("fileMetadata", TType.STRUCT, 26) + self.fileMetadata.write(oprot) + oprot.writeFieldEnd() + if self.dictionary is not None: + oprot.writeFieldBegin("dictionary", TType.STRUCT, 27) + self.dictionary.write(oprot) + oprot.writeFieldEnd() + if self.txnId is not None: + oprot.writeFieldBegin("txnId", TType.I64, 28) + oprot.writeI64(self.txnId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class SourceTable: + """ + Attributes: + - table + - insertedCount + - updatedCount + - deletedCount + + """ + + def __init__( + self, + table=None, + insertedCount=None, + updatedCount=None, + deletedCount=None, + ): + self.table = table + self.insertedCount = insertedCount + self.updatedCount = updatedCount + self.deletedCount = deletedCount + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.table = Table() + self.table.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.insertedCount = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.updatedCount = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.deletedCount = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("SourceTable") + if self.table is not None: + oprot.writeFieldBegin("table", TType.STRUCT, 1) + self.table.write(oprot) + oprot.writeFieldEnd() + if self.insertedCount is not None: + oprot.writeFieldBegin("insertedCount", TType.I64, 2) + oprot.writeI64(self.insertedCount) + oprot.writeFieldEnd() + if self.updatedCount is not None: + oprot.writeFieldBegin("updatedCount", TType.I64, 3) + oprot.writeI64(self.updatedCount) + oprot.writeFieldEnd() + if self.deletedCount is not None: + oprot.writeFieldBegin("deletedCount", TType.I64, 4) + oprot.writeI64(self.deletedCount) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.table is None: + raise TProtocolException(message="Required field table is unset!") + if self.insertedCount is None: + raise TProtocolException(message="Required field insertedCount is unset!") + if self.updatedCount is None: + raise TProtocolException(message="Required field updatedCount is unset!") + if self.deletedCount is None: + raise TProtocolException(message="Required field deletedCount is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class Partition: + """ + Attributes: + - values + - dbName + - tableName + - createTime + - lastAccessTime + - sd + - parameters + - privileges + - catName + - writeId + - isStatsCompliant + - colStats + - fileMetadata + + """ + + def __init__( + self, + values=None, + dbName=None, + tableName=None, + createTime=None, + lastAccessTime=None, + sd=None, + parameters=None, + privileges=None, + catName=None, + writeId=-1, + isStatsCompliant=None, + colStats=None, + fileMetadata=None, + ): + self.values = values + self.dbName = dbName + self.tableName = tableName + self.createTime = createTime + self.lastAccessTime = lastAccessTime + self.sd = sd + self.parameters = parameters + self.privileges = privileges + self.catName = catName + self.writeId = writeId + self.isStatsCompliant = isStatsCompliant + self.colStats = colStats + self.fileMetadata = fileMetadata + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.values = [] + (_etype310, _size307) = iprot.readListBegin() + for _i311 in range(_size307): + _elem312 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.values.append(_elem312) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tableName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.createTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.lastAccessTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRUCT: + self.sd = StorageDescriptor() + self.sd.read(iprot) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.MAP: + self.parameters = {} + (_ktype314, _vtype315, _size313) = iprot.readMapBegin() + for _i317 in range(_size313): + _key318 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val319 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.parameters[_key318] = _val319 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRUCT: + self.privileges = PrincipalPrivilegeSet() + self.privileges.read(iprot) + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.I64: + self.writeId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.BOOL: + self.isStatsCompliant = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.STRUCT: + self.colStats = ColumnStatistics() + self.colStats.read(iprot) + else: + iprot.skip(ftype) + elif fid == 13: + if ftype == TType.STRUCT: + self.fileMetadata = FileMetadata() + self.fileMetadata.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("Partition") + if self.values is not None: + oprot.writeFieldBegin("values", TType.LIST, 1) + oprot.writeListBegin(TType.STRING, len(self.values)) + for iter320 in self.values: + oprot.writeString(iter320.encode("utf-8") if sys.version_info[0] == 2 else iter320) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 2) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tableName is not None: + oprot.writeFieldBegin("tableName", TType.STRING, 3) + oprot.writeString(self.tableName.encode("utf-8") if sys.version_info[0] == 2 else self.tableName) + oprot.writeFieldEnd() + if self.createTime is not None: + oprot.writeFieldBegin("createTime", TType.I32, 4) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.lastAccessTime is not None: + oprot.writeFieldBegin("lastAccessTime", TType.I32, 5) + oprot.writeI32(self.lastAccessTime) + oprot.writeFieldEnd() + if self.sd is not None: + oprot.writeFieldBegin("sd", TType.STRUCT, 6) + self.sd.write(oprot) + oprot.writeFieldEnd() + if self.parameters is not None: + oprot.writeFieldBegin("parameters", TType.MAP, 7) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) + for kiter321, viter322 in self.parameters.items(): + oprot.writeString(kiter321.encode("utf-8") if sys.version_info[0] == 2 else kiter321) + oprot.writeString(viter322.encode("utf-8") if sys.version_info[0] == 2 else viter322) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.privileges is not None: + oprot.writeFieldBegin("privileges", TType.STRUCT, 8) + self.privileges.write(oprot) + oprot.writeFieldEnd() + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 9) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.writeId is not None: + oprot.writeFieldBegin("writeId", TType.I64, 10) + oprot.writeI64(self.writeId) + oprot.writeFieldEnd() + if self.isStatsCompliant is not None: + oprot.writeFieldBegin("isStatsCompliant", TType.BOOL, 11) + oprot.writeBool(self.isStatsCompliant) + oprot.writeFieldEnd() + if self.colStats is not None: + oprot.writeFieldBegin("colStats", TType.STRUCT, 12) + self.colStats.write(oprot) + oprot.writeFieldEnd() + if self.fileMetadata is not None: + oprot.writeFieldBegin("fileMetadata", TType.STRUCT, 13) + self.fileMetadata.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class PartitionWithoutSD: + """ + Attributes: + - values + - createTime + - lastAccessTime + - relativePath + - parameters + - privileges + + """ + + def __init__( + self, + values=None, + createTime=None, + lastAccessTime=None, + relativePath=None, + parameters=None, + privileges=None, + ): + self.values = values + self.createTime = createTime + self.lastAccessTime = lastAccessTime + self.relativePath = relativePath + self.parameters = parameters + self.privileges = privileges + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.values = [] + (_etype326, _size323) = iprot.readListBegin() + for _i327 in range(_size323): + _elem328 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.values.append(_elem328) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.createTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.lastAccessTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.relativePath = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.MAP: + self.parameters = {} + (_ktype330, _vtype331, _size329) = iprot.readMapBegin() + for _i333 in range(_size329): + _key334 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val335 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.parameters[_key334] = _val335 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRUCT: + self.privileges = PrincipalPrivilegeSet() + self.privileges.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("PartitionWithoutSD") + if self.values is not None: + oprot.writeFieldBegin("values", TType.LIST, 1) + oprot.writeListBegin(TType.STRING, len(self.values)) + for iter336 in self.values: + oprot.writeString(iter336.encode("utf-8") if sys.version_info[0] == 2 else iter336) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.createTime is not None: + oprot.writeFieldBegin("createTime", TType.I32, 2) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.lastAccessTime is not None: + oprot.writeFieldBegin("lastAccessTime", TType.I32, 3) + oprot.writeI32(self.lastAccessTime) + oprot.writeFieldEnd() + if self.relativePath is not None: + oprot.writeFieldBegin("relativePath", TType.STRING, 4) + oprot.writeString(self.relativePath.encode("utf-8") if sys.version_info[0] == 2 else self.relativePath) + oprot.writeFieldEnd() + if self.parameters is not None: + oprot.writeFieldBegin("parameters", TType.MAP, 5) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) + for kiter337, viter338 in self.parameters.items(): + oprot.writeString(kiter337.encode("utf-8") if sys.version_info[0] == 2 else kiter337) + oprot.writeString(viter338.encode("utf-8") if sys.version_info[0] == 2 else viter338) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.privileges is not None: + oprot.writeFieldBegin("privileges", TType.STRUCT, 6) + self.privileges.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class PartitionSpecWithSharedSD: + """ + Attributes: + - partitions + - sd + + """ + + def __init__( + self, + partitions=None, + sd=None, + ): + self.partitions = partitions + self.sd = sd + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.partitions = [] + (_etype342, _size339) = iprot.readListBegin() + for _i343 in range(_size339): + _elem344 = PartitionWithoutSD() + _elem344.read(iprot) + self.partitions.append(_elem344) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.sd = StorageDescriptor() + self.sd.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("PartitionSpecWithSharedSD") + if self.partitions is not None: + oprot.writeFieldBegin("partitions", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.partitions)) + for iter345 in self.partitions: + iter345.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.sd is not None: + oprot.writeFieldBegin("sd", TType.STRUCT, 2) + self.sd.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class PartitionListComposingSpec: + """ + Attributes: + - partitions + + """ + + def __init__( + self, + partitions=None, + ): + self.partitions = partitions + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.partitions = [] + (_etype349, _size346) = iprot.readListBegin() + for _i350 in range(_size346): + _elem351 = Partition() + _elem351.read(iprot) + self.partitions.append(_elem351) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("PartitionListComposingSpec") + if self.partitions is not None: + oprot.writeFieldBegin("partitions", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.partitions)) + for iter352 in self.partitions: + iter352.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class PartitionSpec: + """ + Attributes: + - dbName + - tableName + - rootPath + - sharedSDPartitionSpec + - partitionList + - catName + - writeId + - isStatsCompliant + + """ + + def __init__( + self, + dbName=None, + tableName=None, + rootPath=None, + sharedSDPartitionSpec=None, + partitionList=None, + catName=None, + writeId=-1, + isStatsCompliant=None, + ): + self.dbName = dbName + self.tableName = tableName + self.rootPath = rootPath + self.sharedSDPartitionSpec = sharedSDPartitionSpec + self.partitionList = partitionList + self.catName = catName + self.writeId = writeId + self.isStatsCompliant = isStatsCompliant + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tableName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.rootPath = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.sharedSDPartitionSpec = PartitionSpecWithSharedSD() + self.sharedSDPartitionSpec.read(iprot) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.partitionList = PartitionListComposingSpec() + self.partitionList.read(iprot) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I64: + self.writeId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.BOOL: + self.isStatsCompliant = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("PartitionSpec") + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 1) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tableName is not None: + oprot.writeFieldBegin("tableName", TType.STRING, 2) + oprot.writeString(self.tableName.encode("utf-8") if sys.version_info[0] == 2 else self.tableName) + oprot.writeFieldEnd() + if self.rootPath is not None: + oprot.writeFieldBegin("rootPath", TType.STRING, 3) + oprot.writeString(self.rootPath.encode("utf-8") if sys.version_info[0] == 2 else self.rootPath) + oprot.writeFieldEnd() + if self.sharedSDPartitionSpec is not None: + oprot.writeFieldBegin("sharedSDPartitionSpec", TType.STRUCT, 4) + self.sharedSDPartitionSpec.write(oprot) + oprot.writeFieldEnd() + if self.partitionList is not None: + oprot.writeFieldBegin("partitionList", TType.STRUCT, 5) + self.partitionList.write(oprot) + oprot.writeFieldEnd() + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 6) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.writeId is not None: + oprot.writeFieldBegin("writeId", TType.I64, 7) + oprot.writeI64(self.writeId) + oprot.writeFieldEnd() + if self.isStatsCompliant is not None: + oprot.writeFieldBegin("isStatsCompliant", TType.BOOL, 8) + oprot.writeBool(self.isStatsCompliant) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class AggrStats: + """ + Attributes: + - colStats + - partsFound + - isStatsCompliant + + """ + + def __init__( + self, + colStats=None, + partsFound=None, + isStatsCompliant=None, + ): + self.colStats = colStats + self.partsFound = partsFound + self.isStatsCompliant = isStatsCompliant + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.colStats = [] + (_etype356, _size353) = iprot.readListBegin() + for _i357 in range(_size353): + _elem358 = ColumnStatisticsObj() + _elem358.read(iprot) + self.colStats.append(_elem358) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.partsFound = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.isStatsCompliant = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("AggrStats") + if self.colStats is not None: + oprot.writeFieldBegin("colStats", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.colStats)) + for iter359 in self.colStats: + iter359.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.partsFound is not None: + oprot.writeFieldBegin("partsFound", TType.I64, 2) + oprot.writeI64(self.partsFound) + oprot.writeFieldEnd() + if self.isStatsCompliant is not None: + oprot.writeFieldBegin("isStatsCompliant", TType.BOOL, 3) + oprot.writeBool(self.isStatsCompliant) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.colStats is None: + raise TProtocolException(message="Required field colStats is unset!") + if self.partsFound is None: + raise TProtocolException(message="Required field partsFound is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class SetPartitionsStatsRequest: + """ + Attributes: + - colStats + - needMerge + - writeId + - validWriteIdList + - engine + + """ + + def __init__( + self, + colStats=None, + needMerge=None, + writeId=-1, + validWriteIdList=None, + engine=None, + ): + self.colStats = colStats + self.needMerge = needMerge + self.writeId = writeId + self.validWriteIdList = validWriteIdList + self.engine = engine + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.colStats = [] + (_etype363, _size360) = iprot.readListBegin() + for _i364 in range(_size360): + _elem365 = ColumnStatistics() + _elem365.read(iprot) + self.colStats.append(_elem365) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.needMerge = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.writeId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.validWriteIdList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.engine = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("SetPartitionsStatsRequest") + if self.colStats is not None: + oprot.writeFieldBegin("colStats", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.colStats)) + for iter366 in self.colStats: + iter366.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.needMerge is not None: + oprot.writeFieldBegin("needMerge", TType.BOOL, 2) + oprot.writeBool(self.needMerge) + oprot.writeFieldEnd() + if self.writeId is not None: + oprot.writeFieldBegin("writeId", TType.I64, 3) + oprot.writeI64(self.writeId) + oprot.writeFieldEnd() + if self.validWriteIdList is not None: + oprot.writeFieldBegin("validWriteIdList", TType.STRING, 4) + oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList) + oprot.writeFieldEnd() + if self.engine is not None: + oprot.writeFieldBegin("engine", TType.STRING, 5) + oprot.writeString(self.engine.encode("utf-8") if sys.version_info[0] == 2 else self.engine) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.colStats is None: + raise TProtocolException(message="Required field colStats is unset!") + if self.engine is None: + raise TProtocolException(message="Required field engine is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class SetPartitionsStatsResponse: + """ + Attributes: + - result + + """ + + def __init__( + self, + result=None, + ): + self.result = result + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.BOOL: + self.result = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("SetPartitionsStatsResponse") + if self.result is not None: + oprot.writeFieldBegin("result", TType.BOOL, 1) + oprot.writeBool(self.result) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.result is None: + raise TProtocolException(message="Required field result is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class Schema: + """ + Attributes: + - fieldSchemas + - properties + + """ + + def __init__( + self, + fieldSchemas=None, + properties=None, + ): + self.fieldSchemas = fieldSchemas + self.properties = properties + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.fieldSchemas = [] + (_etype370, _size367) = iprot.readListBegin() + for _i371 in range(_size367): + _elem372 = FieldSchema() + _elem372.read(iprot) + self.fieldSchemas.append(_elem372) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.MAP: + self.properties = {} + (_ktype374, _vtype375, _size373) = iprot.readMapBegin() + for _i377 in range(_size373): + _key378 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val379 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.properties[_key378] = _val379 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("Schema") + if self.fieldSchemas is not None: + oprot.writeFieldBegin("fieldSchemas", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.fieldSchemas)) + for iter380 in self.fieldSchemas: + iter380.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.properties is not None: + oprot.writeFieldBegin("properties", TType.MAP, 2) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.properties)) + for kiter381, viter382 in self.properties.items(): + oprot.writeString(kiter381.encode("utf-8") if sys.version_info[0] == 2 else kiter381) + oprot.writeString(viter382.encode("utf-8") if sys.version_info[0] == 2 else viter382) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class PrimaryKeysRequest: + """ + Attributes: + - db_name + - tbl_name + - catName + - validWriteIdList + - tableId + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + catName=None, + validWriteIdList=None, + tableId=-1, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.catName = catName + self.validWriteIdList = validWriteIdList + self.tableId = tableId + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.validWriteIdList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I64: + self.tableId = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("PrimaryKeysRequest") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 3) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.validWriteIdList is not None: + oprot.writeFieldBegin("validWriteIdList", TType.STRING, 4) + oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList) + oprot.writeFieldEnd() + if self.tableId is not None: + oprot.writeFieldBegin("tableId", TType.I64, 5) + oprot.writeI64(self.tableId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.db_name is None: + raise TProtocolException(message="Required field db_name is unset!") + if self.tbl_name is None: + raise TProtocolException(message="Required field tbl_name is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class PrimaryKeysResponse: + """ + Attributes: + - primaryKeys + + """ + + def __init__( + self, + primaryKeys=None, + ): + self.primaryKeys = primaryKeys + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.primaryKeys = [] + (_etype386, _size383) = iprot.readListBegin() + for _i387 in range(_size383): + _elem388 = SQLPrimaryKey() + _elem388.read(iprot) + self.primaryKeys.append(_elem388) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("PrimaryKeysResponse") + if self.primaryKeys is not None: + oprot.writeFieldBegin("primaryKeys", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.primaryKeys)) + for iter389 in self.primaryKeys: + iter389.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.primaryKeys is None: + raise TProtocolException(message="Required field primaryKeys is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ForeignKeysRequest: + """ + Attributes: + - parent_db_name + - parent_tbl_name + - foreign_db_name + - foreign_tbl_name + - catName + - validWriteIdList + - tableId + + """ + + def __init__( + self, + parent_db_name=None, + parent_tbl_name=None, + foreign_db_name=None, + foreign_tbl_name=None, + catName=None, + validWriteIdList=None, + tableId=-1, + ): + self.parent_db_name = parent_db_name + self.parent_tbl_name = parent_tbl_name + self.foreign_db_name = foreign_db_name + self.foreign_tbl_name = foreign_tbl_name + self.catName = catName + self.validWriteIdList = validWriteIdList + self.tableId = tableId + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.parent_db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.parent_tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.foreign_db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.foreign_tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.validWriteIdList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I64: + self.tableId = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ForeignKeysRequest") + if self.parent_db_name is not None: + oprot.writeFieldBegin("parent_db_name", TType.STRING, 1) + oprot.writeString(self.parent_db_name.encode("utf-8") if sys.version_info[0] == 2 else self.parent_db_name) + oprot.writeFieldEnd() + if self.parent_tbl_name is not None: + oprot.writeFieldBegin("parent_tbl_name", TType.STRING, 2) + oprot.writeString(self.parent_tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.parent_tbl_name) + oprot.writeFieldEnd() + if self.foreign_db_name is not None: + oprot.writeFieldBegin("foreign_db_name", TType.STRING, 3) + oprot.writeString(self.foreign_db_name.encode("utf-8") if sys.version_info[0] == 2 else self.foreign_db_name) + oprot.writeFieldEnd() + if self.foreign_tbl_name is not None: + oprot.writeFieldBegin("foreign_tbl_name", TType.STRING, 4) + oprot.writeString(self.foreign_tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.foreign_tbl_name) + oprot.writeFieldEnd() + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 5) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.validWriteIdList is not None: + oprot.writeFieldBegin("validWriteIdList", TType.STRING, 6) + oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList) + oprot.writeFieldEnd() + if self.tableId is not None: + oprot.writeFieldBegin("tableId", TType.I64, 7) + oprot.writeI64(self.tableId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ForeignKeysResponse: + """ + Attributes: + - foreignKeys + + """ + + def __init__( + self, + foreignKeys=None, + ): + self.foreignKeys = foreignKeys + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.foreignKeys = [] + (_etype393, _size390) = iprot.readListBegin() + for _i394 in range(_size390): + _elem395 = SQLForeignKey() + _elem395.read(iprot) + self.foreignKeys.append(_elem395) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ForeignKeysResponse") + if self.foreignKeys is not None: + oprot.writeFieldBegin("foreignKeys", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.foreignKeys)) + for iter396 in self.foreignKeys: + iter396.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.foreignKeys is None: + raise TProtocolException(message="Required field foreignKeys is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class UniqueConstraintsRequest: + """ + Attributes: + - catName + - db_name + - tbl_name + - validWriteIdList + - tableId + + """ + + def __init__( + self, + catName=None, + db_name=None, + tbl_name=None, + validWriteIdList=None, + tableId=-1, + ): + self.catName = catName + self.db_name = db_name + self.tbl_name = tbl_name + self.validWriteIdList = validWriteIdList + self.tableId = tableId + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.validWriteIdList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I64: + self.tableId = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("UniqueConstraintsRequest") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 2) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 3) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.validWriteIdList is not None: + oprot.writeFieldBegin("validWriteIdList", TType.STRING, 4) + oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList) + oprot.writeFieldEnd() + if self.tableId is not None: + oprot.writeFieldBegin("tableId", TType.I64, 5) + oprot.writeI64(self.tableId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.catName is None: + raise TProtocolException(message="Required field catName is unset!") + if self.db_name is None: + raise TProtocolException(message="Required field db_name is unset!") + if self.tbl_name is None: + raise TProtocolException(message="Required field tbl_name is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class UniqueConstraintsResponse: + """ + Attributes: + - uniqueConstraints + + """ + + def __init__( + self, + uniqueConstraints=None, + ): + self.uniqueConstraints = uniqueConstraints + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.uniqueConstraints = [] + (_etype400, _size397) = iprot.readListBegin() + for _i401 in range(_size397): + _elem402 = SQLUniqueConstraint() + _elem402.read(iprot) + self.uniqueConstraints.append(_elem402) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("UniqueConstraintsResponse") + if self.uniqueConstraints is not None: + oprot.writeFieldBegin("uniqueConstraints", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.uniqueConstraints)) + for iter403 in self.uniqueConstraints: + iter403.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.uniqueConstraints is None: + raise TProtocolException(message="Required field uniqueConstraints is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class NotNullConstraintsRequest: + """ + Attributes: + - catName + - db_name + - tbl_name + - validWriteIdList + - tableId + + """ + + def __init__( + self, + catName=None, + db_name=None, + tbl_name=None, + validWriteIdList=None, + tableId=-1, + ): + self.catName = catName + self.db_name = db_name + self.tbl_name = tbl_name + self.validWriteIdList = validWriteIdList + self.tableId = tableId + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.validWriteIdList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I64: + self.tableId = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("NotNullConstraintsRequest") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 2) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 3) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.validWriteIdList is not None: + oprot.writeFieldBegin("validWriteIdList", TType.STRING, 4) + oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList) + oprot.writeFieldEnd() + if self.tableId is not None: + oprot.writeFieldBegin("tableId", TType.I64, 5) + oprot.writeI64(self.tableId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.catName is None: + raise TProtocolException(message="Required field catName is unset!") + if self.db_name is None: + raise TProtocolException(message="Required field db_name is unset!") + if self.tbl_name is None: + raise TProtocolException(message="Required field tbl_name is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class NotNullConstraintsResponse: + """ + Attributes: + - notNullConstraints + + """ + + def __init__( + self, + notNullConstraints=None, + ): + self.notNullConstraints = notNullConstraints + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.notNullConstraints = [] + (_etype407, _size404) = iprot.readListBegin() + for _i408 in range(_size404): + _elem409 = SQLNotNullConstraint() + _elem409.read(iprot) + self.notNullConstraints.append(_elem409) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("NotNullConstraintsResponse") + if self.notNullConstraints is not None: + oprot.writeFieldBegin("notNullConstraints", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.notNullConstraints)) + for iter410 in self.notNullConstraints: + iter410.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.notNullConstraints is None: + raise TProtocolException(message="Required field notNullConstraints is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class DefaultConstraintsRequest: + """ + Attributes: + - catName + - db_name + - tbl_name + - validWriteIdList + - tableId + + """ + + def __init__( + self, + catName=None, + db_name=None, + tbl_name=None, + validWriteIdList=None, + tableId=-1, + ): + self.catName = catName + self.db_name = db_name + self.tbl_name = tbl_name + self.validWriteIdList = validWriteIdList + self.tableId = tableId + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.validWriteIdList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I64: + self.tableId = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("DefaultConstraintsRequest") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 2) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 3) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.validWriteIdList is not None: + oprot.writeFieldBegin("validWriteIdList", TType.STRING, 4) + oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList) + oprot.writeFieldEnd() + if self.tableId is not None: + oprot.writeFieldBegin("tableId", TType.I64, 5) + oprot.writeI64(self.tableId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.catName is None: + raise TProtocolException(message="Required field catName is unset!") + if self.db_name is None: + raise TProtocolException(message="Required field db_name is unset!") + if self.tbl_name is None: + raise TProtocolException(message="Required field tbl_name is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class DefaultConstraintsResponse: + """ + Attributes: + - defaultConstraints + + """ + + def __init__( + self, + defaultConstraints=None, + ): + self.defaultConstraints = defaultConstraints + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.defaultConstraints = [] + (_etype414, _size411) = iprot.readListBegin() + for _i415 in range(_size411): + _elem416 = SQLDefaultConstraint() + _elem416.read(iprot) + self.defaultConstraints.append(_elem416) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("DefaultConstraintsResponse") + if self.defaultConstraints is not None: + oprot.writeFieldBegin("defaultConstraints", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.defaultConstraints)) + for iter417 in self.defaultConstraints: + iter417.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.defaultConstraints is None: + raise TProtocolException(message="Required field defaultConstraints is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class CheckConstraintsRequest: + """ + Attributes: + - catName + - db_name + - tbl_name + - validWriteIdList + - tableId + + """ + + def __init__( + self, + catName=None, + db_name=None, + tbl_name=None, + validWriteIdList=None, + tableId=-1, + ): + self.catName = catName + self.db_name = db_name + self.tbl_name = tbl_name + self.validWriteIdList = validWriteIdList + self.tableId = tableId + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.validWriteIdList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I64: + self.tableId = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("CheckConstraintsRequest") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 2) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 3) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.validWriteIdList is not None: + oprot.writeFieldBegin("validWriteIdList", TType.STRING, 4) + oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList) + oprot.writeFieldEnd() + if self.tableId is not None: + oprot.writeFieldBegin("tableId", TType.I64, 5) + oprot.writeI64(self.tableId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.catName is None: + raise TProtocolException(message="Required field catName is unset!") + if self.db_name is None: + raise TProtocolException(message="Required field db_name is unset!") + if self.tbl_name is None: + raise TProtocolException(message="Required field tbl_name is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class CheckConstraintsResponse: + """ + Attributes: + - checkConstraints + + """ + + def __init__( + self, + checkConstraints=None, + ): + self.checkConstraints = checkConstraints + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.checkConstraints = [] + (_etype421, _size418) = iprot.readListBegin() + for _i422 in range(_size418): + _elem423 = SQLCheckConstraint() + _elem423.read(iprot) + self.checkConstraints.append(_elem423) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("CheckConstraintsResponse") + if self.checkConstraints is not None: + oprot.writeFieldBegin("checkConstraints", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.checkConstraints)) + for iter424 in self.checkConstraints: + iter424.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.checkConstraints is None: + raise TProtocolException(message="Required field checkConstraints is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class AllTableConstraintsRequest: + """ + Attributes: + - dbName + - tblName + - catName + - validWriteIdList + - tableId + + """ + + def __init__( + self, + dbName=None, + tblName=None, + catName=None, + validWriteIdList=None, + tableId=-1, + ): + self.dbName = dbName + self.tblName = tblName + self.catName = catName + self.validWriteIdList = validWriteIdList + self.tableId = tableId + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tblName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.validWriteIdList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I64: + self.tableId = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("AllTableConstraintsRequest") + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 1) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tblName is not None: + oprot.writeFieldBegin("tblName", TType.STRING, 2) + oprot.writeString(self.tblName.encode("utf-8") if sys.version_info[0] == 2 else self.tblName) + oprot.writeFieldEnd() + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 3) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.validWriteIdList is not None: + oprot.writeFieldBegin("validWriteIdList", TType.STRING, 4) + oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList) + oprot.writeFieldEnd() + if self.tableId is not None: + oprot.writeFieldBegin("tableId", TType.I64, 5) + oprot.writeI64(self.tableId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.tblName is None: + raise TProtocolException(message="Required field tblName is unset!") + if self.catName is None: + raise TProtocolException(message="Required field catName is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class AllTableConstraintsResponse: + """ + Attributes: + - allTableConstraints + + """ + + def __init__( + self, + allTableConstraints=None, + ): + self.allTableConstraints = allTableConstraints + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.allTableConstraints = SQLAllTableConstraints() + self.allTableConstraints.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("AllTableConstraintsResponse") + if self.allTableConstraints is not None: + oprot.writeFieldBegin("allTableConstraints", TType.STRUCT, 1) + self.allTableConstraints.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.allTableConstraints is None: + raise TProtocolException(message="Required field allTableConstraints is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class DropConstraintRequest: + """ + Attributes: + - dbname + - tablename + - constraintname + - catName + + """ + + def __init__( + self, + dbname=None, + tablename=None, + constraintname=None, + catName=None, + ): + self.dbname = dbname + self.tablename = tablename + self.constraintname = constraintname + self.catName = catName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tablename = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.constraintname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("DropConstraintRequest") + if self.dbname is not None: + oprot.writeFieldBegin("dbname", TType.STRING, 1) + oprot.writeString(self.dbname.encode("utf-8") if sys.version_info[0] == 2 else self.dbname) + oprot.writeFieldEnd() + if self.tablename is not None: + oprot.writeFieldBegin("tablename", TType.STRING, 2) + oprot.writeString(self.tablename.encode("utf-8") if sys.version_info[0] == 2 else self.tablename) + oprot.writeFieldEnd() + if self.constraintname is not None: + oprot.writeFieldBegin("constraintname", TType.STRING, 3) + oprot.writeString(self.constraintname.encode("utf-8") if sys.version_info[0] == 2 else self.constraintname) + oprot.writeFieldEnd() + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 4) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbname is None: + raise TProtocolException(message="Required field dbname is unset!") + if self.tablename is None: + raise TProtocolException(message="Required field tablename is unset!") + if self.constraintname is None: + raise TProtocolException(message="Required field constraintname is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class AddPrimaryKeyRequest: + """ + Attributes: + - primaryKeyCols + + """ + + def __init__( + self, + primaryKeyCols=None, + ): + self.primaryKeyCols = primaryKeyCols + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.primaryKeyCols = [] + (_etype428, _size425) = iprot.readListBegin() + for _i429 in range(_size425): + _elem430 = SQLPrimaryKey() + _elem430.read(iprot) + self.primaryKeyCols.append(_elem430) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("AddPrimaryKeyRequest") + if self.primaryKeyCols is not None: + oprot.writeFieldBegin("primaryKeyCols", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.primaryKeyCols)) + for iter431 in self.primaryKeyCols: + iter431.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.primaryKeyCols is None: + raise TProtocolException(message="Required field primaryKeyCols is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class AddForeignKeyRequest: + """ + Attributes: + - foreignKeyCols + + """ + + def __init__( + self, + foreignKeyCols=None, + ): + self.foreignKeyCols = foreignKeyCols + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.foreignKeyCols = [] + (_etype435, _size432) = iprot.readListBegin() + for _i436 in range(_size432): + _elem437 = SQLForeignKey() + _elem437.read(iprot) + self.foreignKeyCols.append(_elem437) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("AddForeignKeyRequest") + if self.foreignKeyCols is not None: + oprot.writeFieldBegin("foreignKeyCols", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.foreignKeyCols)) + for iter438 in self.foreignKeyCols: + iter438.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.foreignKeyCols is None: + raise TProtocolException(message="Required field foreignKeyCols is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class AddUniqueConstraintRequest: + """ + Attributes: + - uniqueConstraintCols + + """ + + def __init__( + self, + uniqueConstraintCols=None, + ): + self.uniqueConstraintCols = uniqueConstraintCols + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.uniqueConstraintCols = [] + (_etype442, _size439) = iprot.readListBegin() + for _i443 in range(_size439): + _elem444 = SQLUniqueConstraint() + _elem444.read(iprot) + self.uniqueConstraintCols.append(_elem444) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("AddUniqueConstraintRequest") + if self.uniqueConstraintCols is not None: + oprot.writeFieldBegin("uniqueConstraintCols", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.uniqueConstraintCols)) + for iter445 in self.uniqueConstraintCols: + iter445.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.uniqueConstraintCols is None: + raise TProtocolException(message="Required field uniqueConstraintCols is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class AddNotNullConstraintRequest: + """ + Attributes: + - notNullConstraintCols + + """ + + def __init__( + self, + notNullConstraintCols=None, + ): + self.notNullConstraintCols = notNullConstraintCols + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.notNullConstraintCols = [] + (_etype449, _size446) = iprot.readListBegin() + for _i450 in range(_size446): + _elem451 = SQLNotNullConstraint() + _elem451.read(iprot) + self.notNullConstraintCols.append(_elem451) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("AddNotNullConstraintRequest") + if self.notNullConstraintCols is not None: + oprot.writeFieldBegin("notNullConstraintCols", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.notNullConstraintCols)) + for iter452 in self.notNullConstraintCols: + iter452.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.notNullConstraintCols is None: + raise TProtocolException(message="Required field notNullConstraintCols is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class AddDefaultConstraintRequest: + """ + Attributes: + - defaultConstraintCols + + """ + + def __init__( + self, + defaultConstraintCols=None, + ): + self.defaultConstraintCols = defaultConstraintCols + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.defaultConstraintCols = [] + (_etype456, _size453) = iprot.readListBegin() + for _i457 in range(_size453): + _elem458 = SQLDefaultConstraint() + _elem458.read(iprot) + self.defaultConstraintCols.append(_elem458) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("AddDefaultConstraintRequest") + if self.defaultConstraintCols is not None: + oprot.writeFieldBegin("defaultConstraintCols", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.defaultConstraintCols)) + for iter459 in self.defaultConstraintCols: + iter459.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.defaultConstraintCols is None: + raise TProtocolException(message="Required field defaultConstraintCols is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class AddCheckConstraintRequest: + """ + Attributes: + - checkConstraintCols + + """ + + def __init__( + self, + checkConstraintCols=None, + ): + self.checkConstraintCols = checkConstraintCols + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.checkConstraintCols = [] + (_etype463, _size460) = iprot.readListBegin() + for _i464 in range(_size460): + _elem465 = SQLCheckConstraint() + _elem465.read(iprot) + self.checkConstraintCols.append(_elem465) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("AddCheckConstraintRequest") + if self.checkConstraintCols is not None: + oprot.writeFieldBegin("checkConstraintCols", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.checkConstraintCols)) + for iter466 in self.checkConstraintCols: + iter466.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.checkConstraintCols is None: + raise TProtocolException(message="Required field checkConstraintCols is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class PartitionsByExprResult: + """ + Attributes: + - partitions + - hasUnknownPartitions + + """ + + def __init__( + self, + partitions=None, + hasUnknownPartitions=None, + ): + self.partitions = partitions + self.hasUnknownPartitions = hasUnknownPartitions + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.partitions = [] + (_etype470, _size467) = iprot.readListBegin() + for _i471 in range(_size467): + _elem472 = Partition() + _elem472.read(iprot) + self.partitions.append(_elem472) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.hasUnknownPartitions = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("PartitionsByExprResult") + if self.partitions is not None: + oprot.writeFieldBegin("partitions", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.partitions)) + for iter473 in self.partitions: + iter473.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.hasUnknownPartitions is not None: + oprot.writeFieldBegin("hasUnknownPartitions", TType.BOOL, 2) + oprot.writeBool(self.hasUnknownPartitions) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.partitions is None: + raise TProtocolException(message="Required field partitions is unset!") + if self.hasUnknownPartitions is None: + raise TProtocolException(message="Required field hasUnknownPartitions is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class PartitionsSpecByExprResult: + """ + Attributes: + - partitionsSpec + - hasUnknownPartitions + + """ + + def __init__( + self, + partitionsSpec=None, + hasUnknownPartitions=None, + ): + self.partitionsSpec = partitionsSpec + self.hasUnknownPartitions = hasUnknownPartitions + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.partitionsSpec = [] + (_etype477, _size474) = iprot.readListBegin() + for _i478 in range(_size474): + _elem479 = PartitionSpec() + _elem479.read(iprot) + self.partitionsSpec.append(_elem479) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.hasUnknownPartitions = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("PartitionsSpecByExprResult") + if self.partitionsSpec is not None: + oprot.writeFieldBegin("partitionsSpec", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.partitionsSpec)) + for iter480 in self.partitionsSpec: + iter480.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.hasUnknownPartitions is not None: + oprot.writeFieldBegin("hasUnknownPartitions", TType.BOOL, 2) + oprot.writeBool(self.hasUnknownPartitions) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.partitionsSpec is None: + raise TProtocolException(message="Required field partitionsSpec is unset!") + if self.hasUnknownPartitions is None: + raise TProtocolException(message="Required field hasUnknownPartitions is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class PartitionsByExprRequest: + """ + Attributes: + - dbName + - tblName + - expr + - defaultPartitionName + - maxParts + - catName + - order + - validWriteIdList + - id + + """ + + def __init__( + self, + dbName=None, + tblName=None, + expr=None, + defaultPartitionName=None, + maxParts=-1, + catName=None, + order=None, + validWriteIdList=None, + id=-1, + ): + self.dbName = dbName + self.tblName = tblName + self.expr = expr + self.defaultPartitionName = defaultPartitionName + self.maxParts = maxParts + self.catName = catName + self.order = order + self.validWriteIdList = validWriteIdList + self.id = id + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tblName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.expr = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.defaultPartitionName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I16: + self.maxParts = iprot.readI16() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.order = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRING: + self.validWriteIdList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.I64: + self.id = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("PartitionsByExprRequest") + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 1) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tblName is not None: + oprot.writeFieldBegin("tblName", TType.STRING, 2) + oprot.writeString(self.tblName.encode("utf-8") if sys.version_info[0] == 2 else self.tblName) + oprot.writeFieldEnd() + if self.expr is not None: + oprot.writeFieldBegin("expr", TType.STRING, 3) + oprot.writeBinary(self.expr) + oprot.writeFieldEnd() + if self.defaultPartitionName is not None: + oprot.writeFieldBegin("defaultPartitionName", TType.STRING, 4) + oprot.writeString( + self.defaultPartitionName.encode("utf-8") if sys.version_info[0] == 2 else self.defaultPartitionName + ) + oprot.writeFieldEnd() + if self.maxParts is not None: + oprot.writeFieldBegin("maxParts", TType.I16, 5) + oprot.writeI16(self.maxParts) + oprot.writeFieldEnd() + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 6) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.order is not None: + oprot.writeFieldBegin("order", TType.STRING, 7) + oprot.writeString(self.order.encode("utf-8") if sys.version_info[0] == 2 else self.order) + oprot.writeFieldEnd() + if self.validWriteIdList is not None: + oprot.writeFieldBegin("validWriteIdList", TType.STRING, 8) + oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList) + oprot.writeFieldEnd() + if self.id is not None: + oprot.writeFieldBegin("id", TType.I64, 9) + oprot.writeI64(self.id) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.tblName is None: + raise TProtocolException(message="Required field tblName is unset!") + if self.expr is None: + raise TProtocolException(message="Required field expr is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TableStatsResult: + """ + Attributes: + - tableStats + - isStatsCompliant + + """ + + def __init__( + self, + tableStats=None, + isStatsCompliant=None, + ): + self.tableStats = tableStats + self.isStatsCompliant = isStatsCompliant + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.tableStats = [] + (_etype484, _size481) = iprot.readListBegin() + for _i485 in range(_size481): + _elem486 = ColumnStatisticsObj() + _elem486.read(iprot) + self.tableStats.append(_elem486) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.isStatsCompliant = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("TableStatsResult") + if self.tableStats is not None: + oprot.writeFieldBegin("tableStats", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.tableStats)) + for iter487 in self.tableStats: + iter487.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.isStatsCompliant is not None: + oprot.writeFieldBegin("isStatsCompliant", TType.BOOL, 2) + oprot.writeBool(self.isStatsCompliant) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.tableStats is None: + raise TProtocolException(message="Required field tableStats is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class PartitionsStatsResult: + """ + Attributes: + - partStats + - isStatsCompliant + + """ + + def __init__( + self, + partStats=None, + isStatsCompliant=None, + ): + self.partStats = partStats + self.isStatsCompliant = isStatsCompliant + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.MAP: + self.partStats = {} + (_ktype489, _vtype490, _size488) = iprot.readMapBegin() + for _i492 in range(_size488): + _key493 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val494 = [] + (_etype498, _size495) = iprot.readListBegin() + for _i499 in range(_size495): + _elem500 = ColumnStatisticsObj() + _elem500.read(iprot) + _val494.append(_elem500) + iprot.readListEnd() + self.partStats[_key493] = _val494 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.isStatsCompliant = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("PartitionsStatsResult") + if self.partStats is not None: + oprot.writeFieldBegin("partStats", TType.MAP, 1) + oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.partStats)) + for kiter501, viter502 in self.partStats.items(): + oprot.writeString(kiter501.encode("utf-8") if sys.version_info[0] == 2 else kiter501) + oprot.writeListBegin(TType.STRUCT, len(viter502)) + for iter503 in viter502: + iter503.write(oprot) + oprot.writeListEnd() + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.isStatsCompliant is not None: + oprot.writeFieldBegin("isStatsCompliant", TType.BOOL, 2) + oprot.writeBool(self.isStatsCompliant) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.partStats is None: + raise TProtocolException(message="Required field partStats is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TableStatsRequest: + """ + Attributes: + - dbName + - tblName + - colNames + - catName + - validWriteIdList + - engine + - id + + """ + + def __init__( + self, + dbName=None, + tblName=None, + colNames=None, + catName=None, + validWriteIdList=None, + engine=None, + id=-1, + ): + self.dbName = dbName + self.tblName = tblName + self.colNames = colNames + self.catName = catName + self.validWriteIdList = validWriteIdList + self.engine = engine + self.id = id + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tblName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.colNames = [] + (_etype507, _size504) = iprot.readListBegin() + for _i508 in range(_size504): + _elem509 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.colNames.append(_elem509) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.validWriteIdList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.engine = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I64: + self.id = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("TableStatsRequest") + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 1) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tblName is not None: + oprot.writeFieldBegin("tblName", TType.STRING, 2) + oprot.writeString(self.tblName.encode("utf-8") if sys.version_info[0] == 2 else self.tblName) + oprot.writeFieldEnd() + if self.colNames is not None: + oprot.writeFieldBegin("colNames", TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.colNames)) + for iter510 in self.colNames: + oprot.writeString(iter510.encode("utf-8") if sys.version_info[0] == 2 else iter510) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 4) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.validWriteIdList is not None: + oprot.writeFieldBegin("validWriteIdList", TType.STRING, 5) + oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList) + oprot.writeFieldEnd() + if self.engine is not None: + oprot.writeFieldBegin("engine", TType.STRING, 6) + oprot.writeString(self.engine.encode("utf-8") if sys.version_info[0] == 2 else self.engine) + oprot.writeFieldEnd() + if self.id is not None: + oprot.writeFieldBegin("id", TType.I64, 7) + oprot.writeI64(self.id) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.tblName is None: + raise TProtocolException(message="Required field tblName is unset!") + if self.colNames is None: + raise TProtocolException(message="Required field colNames is unset!") + if self.engine is None: + raise TProtocolException(message="Required field engine is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class PartitionsStatsRequest: + """ + Attributes: + - dbName + - tblName + - colNames + - partNames + - catName + - validWriteIdList + - engine + + """ + + def __init__( + self, + dbName=None, + tblName=None, + colNames=None, + partNames=None, + catName=None, + validWriteIdList=None, + engine=None, + ): + self.dbName = dbName + self.tblName = tblName + self.colNames = colNames + self.partNames = partNames + self.catName = catName + self.validWriteIdList = validWriteIdList + self.engine = engine + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tblName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.colNames = [] + (_etype514, _size511) = iprot.readListBegin() + for _i515 in range(_size511): + _elem516 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.colNames.append(_elem516) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.partNames = [] + (_etype520, _size517) = iprot.readListBegin() + for _i521 in range(_size517): + _elem522 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.partNames.append(_elem522) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.validWriteIdList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.engine = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("PartitionsStatsRequest") + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 1) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tblName is not None: + oprot.writeFieldBegin("tblName", TType.STRING, 2) + oprot.writeString(self.tblName.encode("utf-8") if sys.version_info[0] == 2 else self.tblName) + oprot.writeFieldEnd() + if self.colNames is not None: + oprot.writeFieldBegin("colNames", TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.colNames)) + for iter523 in self.colNames: + oprot.writeString(iter523.encode("utf-8") if sys.version_info[0] == 2 else iter523) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.partNames is not None: + oprot.writeFieldBegin("partNames", TType.LIST, 4) + oprot.writeListBegin(TType.STRING, len(self.partNames)) + for iter524 in self.partNames: + oprot.writeString(iter524.encode("utf-8") if sys.version_info[0] == 2 else iter524) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 5) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.validWriteIdList is not None: + oprot.writeFieldBegin("validWriteIdList", TType.STRING, 6) + oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList) + oprot.writeFieldEnd() + if self.engine is not None: + oprot.writeFieldBegin("engine", TType.STRING, 7) + oprot.writeString(self.engine.encode("utf-8") if sys.version_info[0] == 2 else self.engine) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.tblName is None: + raise TProtocolException(message="Required field tblName is unset!") + if self.colNames is None: + raise TProtocolException(message="Required field colNames is unset!") + if self.partNames is None: + raise TProtocolException(message="Required field partNames is unset!") + if self.engine is None: + raise TProtocolException(message="Required field engine is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class AddPartitionsResult: + """ + Attributes: + - partitions + - isStatsCompliant + + """ + + def __init__( + self, + partitions=None, + isStatsCompliant=None, + ): + self.partitions = partitions + self.isStatsCompliant = isStatsCompliant + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.partitions = [] + (_etype528, _size525) = iprot.readListBegin() + for _i529 in range(_size525): + _elem530 = Partition() + _elem530.read(iprot) + self.partitions.append(_elem530) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.isStatsCompliant = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("AddPartitionsResult") + if self.partitions is not None: + oprot.writeFieldBegin("partitions", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.partitions)) + for iter531 in self.partitions: + iter531.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.isStatsCompliant is not None: + oprot.writeFieldBegin("isStatsCompliant", TType.BOOL, 2) + oprot.writeBool(self.isStatsCompliant) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class AddPartitionsRequest: + """ + Attributes: + - dbName + - tblName + - parts + - ifNotExists + - needResult + - catName + - validWriteIdList + + """ + + def __init__( + self, + dbName=None, + tblName=None, + parts=None, + ifNotExists=None, + needResult=True, + catName=None, + validWriteIdList=None, + ): + self.dbName = dbName + self.tblName = tblName + self.parts = parts + self.ifNotExists = ifNotExists + self.needResult = needResult + self.catName = catName + self.validWriteIdList = validWriteIdList + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tblName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.parts = [] + (_etype535, _size532) = iprot.readListBegin() + for _i536 in range(_size532): + _elem537 = Partition() + _elem537.read(iprot) + self.parts.append(_elem537) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.ifNotExists = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.BOOL: + self.needResult = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.validWriteIdList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("AddPartitionsRequest") + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 1) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tblName is not None: + oprot.writeFieldBegin("tblName", TType.STRING, 2) + oprot.writeString(self.tblName.encode("utf-8") if sys.version_info[0] == 2 else self.tblName) + oprot.writeFieldEnd() + if self.parts is not None: + oprot.writeFieldBegin("parts", TType.LIST, 3) + oprot.writeListBegin(TType.STRUCT, len(self.parts)) + for iter538 in self.parts: + iter538.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.ifNotExists is not None: + oprot.writeFieldBegin("ifNotExists", TType.BOOL, 4) + oprot.writeBool(self.ifNotExists) + oprot.writeFieldEnd() + if self.needResult is not None: + oprot.writeFieldBegin("needResult", TType.BOOL, 5) + oprot.writeBool(self.needResult) + oprot.writeFieldEnd() + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 6) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.validWriteIdList is not None: + oprot.writeFieldBegin("validWriteIdList", TType.STRING, 7) + oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.tblName is None: + raise TProtocolException(message="Required field tblName is unset!") + if self.parts is None: + raise TProtocolException(message="Required field parts is unset!") + if self.ifNotExists is None: + raise TProtocolException(message="Required field ifNotExists is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class DropPartitionsResult: + """ + Attributes: + - partitions + + """ + + def __init__( + self, + partitions=None, + ): + self.partitions = partitions + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.partitions = [] + (_etype542, _size539) = iprot.readListBegin() + for _i543 in range(_size539): + _elem544 = Partition() + _elem544.read(iprot) + self.partitions.append(_elem544) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("DropPartitionsResult") + if self.partitions is not None: + oprot.writeFieldBegin("partitions", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.partitions)) + for iter545 in self.partitions: + iter545.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class DropPartitionsExpr: + """ + Attributes: + - expr + - partArchiveLevel + + """ + + def __init__( + self, + expr=None, + partArchiveLevel=None, + ): + self.expr = expr + self.partArchiveLevel = partArchiveLevel + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.expr = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.partArchiveLevel = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("DropPartitionsExpr") + if self.expr is not None: + oprot.writeFieldBegin("expr", TType.STRING, 1) + oprot.writeBinary(self.expr) + oprot.writeFieldEnd() + if self.partArchiveLevel is not None: + oprot.writeFieldBegin("partArchiveLevel", TType.I32, 2) + oprot.writeI32(self.partArchiveLevel) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.expr is None: + raise TProtocolException(message="Required field expr is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class RequestPartsSpec: + """ + Attributes: + - names + - exprs + + """ + + def __init__( + self, + names=None, + exprs=None, + ): + self.names = names + self.exprs = exprs + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.names = [] + (_etype549, _size546) = iprot.readListBegin() + for _i550 in range(_size546): + _elem551 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.names.append(_elem551) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.exprs = [] + (_etype555, _size552) = iprot.readListBegin() + for _i556 in range(_size552): + _elem557 = DropPartitionsExpr() + _elem557.read(iprot) + self.exprs.append(_elem557) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("RequestPartsSpec") + if self.names is not None: + oprot.writeFieldBegin("names", TType.LIST, 1) + oprot.writeListBegin(TType.STRING, len(self.names)) + for iter558 in self.names: + oprot.writeString(iter558.encode("utf-8") if sys.version_info[0] == 2 else iter558) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.exprs is not None: + oprot.writeFieldBegin("exprs", TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.exprs)) + for iter559 in self.exprs: + iter559.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class DropPartitionsRequest: + """ + Attributes: + - dbName + - tblName + - parts + - deleteData + - ifExists + - ignoreProtection + - environmentContext + - needResult + - catName + + """ + + def __init__( + self, + dbName=None, + tblName=None, + parts=None, + deleteData=None, + ifExists=True, + ignoreProtection=None, + environmentContext=None, + needResult=True, + catName=None, + ): + self.dbName = dbName + self.tblName = tblName + self.parts = parts + self.deleteData = deleteData + self.ifExists = ifExists + self.ignoreProtection = ignoreProtection + self.environmentContext = environmentContext + self.needResult = needResult + self.catName = catName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tblName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.parts = RequestPartsSpec() + self.parts.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.BOOL: + self.ifExists = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.BOOL: + self.ignoreProtection = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRUCT: + self.environmentContext = EnvironmentContext() + self.environmentContext.read(iprot) + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.BOOL: + self.needResult = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("DropPartitionsRequest") + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 1) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tblName is not None: + oprot.writeFieldBegin("tblName", TType.STRING, 2) + oprot.writeString(self.tblName.encode("utf-8") if sys.version_info[0] == 2 else self.tblName) + oprot.writeFieldEnd() + if self.parts is not None: + oprot.writeFieldBegin("parts", TType.STRUCT, 3) + self.parts.write(oprot) + oprot.writeFieldEnd() + if self.deleteData is not None: + oprot.writeFieldBegin("deleteData", TType.BOOL, 4) + oprot.writeBool(self.deleteData) + oprot.writeFieldEnd() + if self.ifExists is not None: + oprot.writeFieldBegin("ifExists", TType.BOOL, 5) + oprot.writeBool(self.ifExists) + oprot.writeFieldEnd() + if self.ignoreProtection is not None: + oprot.writeFieldBegin("ignoreProtection", TType.BOOL, 6) + oprot.writeBool(self.ignoreProtection) + oprot.writeFieldEnd() + if self.environmentContext is not None: + oprot.writeFieldBegin("environmentContext", TType.STRUCT, 7) + self.environmentContext.write(oprot) + oprot.writeFieldEnd() + if self.needResult is not None: + oprot.writeFieldBegin("needResult", TType.BOOL, 8) + oprot.writeBool(self.needResult) + oprot.writeFieldEnd() + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 9) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.tblName is None: + raise TProtocolException(message="Required field tblName is unset!") + if self.parts is None: + raise TProtocolException(message="Required field parts is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class PartitionValuesRequest: + """ + Attributes: + - dbName + - tblName + - partitionKeys + - applyDistinct + - filter + - partitionOrder + - ascending + - maxParts + - catName + - validWriteIdList + + """ + + def __init__( + self, + dbName=None, + tblName=None, + partitionKeys=None, + applyDistinct=True, + filter=None, + partitionOrder=None, + ascending=True, + maxParts=-1, + catName=None, + validWriteIdList=None, + ): + self.dbName = dbName + self.tblName = tblName + self.partitionKeys = partitionKeys + self.applyDistinct = applyDistinct + self.filter = filter + self.partitionOrder = partitionOrder + self.ascending = ascending + self.maxParts = maxParts + self.catName = catName + self.validWriteIdList = validWriteIdList + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tblName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.partitionKeys = [] + (_etype563, _size560) = iprot.readListBegin() + for _i564 in range(_size560): + _elem565 = FieldSchema() + _elem565.read(iprot) + self.partitionKeys.append(_elem565) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.applyDistinct = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.filter = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.LIST: + self.partitionOrder = [] + (_etype569, _size566) = iprot.readListBegin() + for _i570 in range(_size566): + _elem571 = FieldSchema() + _elem571.read(iprot) + self.partitionOrder.append(_elem571) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + self.ascending = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.I64: + self.maxParts = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRING: + self.validWriteIdList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("PartitionValuesRequest") + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 1) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tblName is not None: + oprot.writeFieldBegin("tblName", TType.STRING, 2) + oprot.writeString(self.tblName.encode("utf-8") if sys.version_info[0] == 2 else self.tblName) + oprot.writeFieldEnd() + if self.partitionKeys is not None: + oprot.writeFieldBegin("partitionKeys", TType.LIST, 3) + oprot.writeListBegin(TType.STRUCT, len(self.partitionKeys)) + for iter572 in self.partitionKeys: + iter572.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.applyDistinct is not None: + oprot.writeFieldBegin("applyDistinct", TType.BOOL, 4) + oprot.writeBool(self.applyDistinct) + oprot.writeFieldEnd() + if self.filter is not None: + oprot.writeFieldBegin("filter", TType.STRING, 5) + oprot.writeString(self.filter.encode("utf-8") if sys.version_info[0] == 2 else self.filter) + oprot.writeFieldEnd() + if self.partitionOrder is not None: + oprot.writeFieldBegin("partitionOrder", TType.LIST, 6) + oprot.writeListBegin(TType.STRUCT, len(self.partitionOrder)) + for iter573 in self.partitionOrder: + iter573.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.ascending is not None: + oprot.writeFieldBegin("ascending", TType.BOOL, 7) + oprot.writeBool(self.ascending) + oprot.writeFieldEnd() + if self.maxParts is not None: + oprot.writeFieldBegin("maxParts", TType.I64, 8) + oprot.writeI64(self.maxParts) + oprot.writeFieldEnd() + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 9) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.validWriteIdList is not None: + oprot.writeFieldBegin("validWriteIdList", TType.STRING, 10) + oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.tblName is None: + raise TProtocolException(message="Required field tblName is unset!") + if self.partitionKeys is None: + raise TProtocolException(message="Required field partitionKeys is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class PartitionValuesRow: + """ + Attributes: + - row + + """ + + def __init__( + self, + row=None, + ): + self.row = row + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.row = [] + (_etype577, _size574) = iprot.readListBegin() + for _i578 in range(_size574): + _elem579 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.row.append(_elem579) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("PartitionValuesRow") + if self.row is not None: + oprot.writeFieldBegin("row", TType.LIST, 1) + oprot.writeListBegin(TType.STRING, len(self.row)) + for iter580 in self.row: + oprot.writeString(iter580.encode("utf-8") if sys.version_info[0] == 2 else iter580) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.row is None: + raise TProtocolException(message="Required field row is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class PartitionValuesResponse: + """ + Attributes: + - partitionValues + + """ + + def __init__( + self, + partitionValues=None, + ): + self.partitionValues = partitionValues + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.partitionValues = [] + (_etype584, _size581) = iprot.readListBegin() + for _i585 in range(_size581): + _elem586 = PartitionValuesRow() + _elem586.read(iprot) + self.partitionValues.append(_elem586) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("PartitionValuesResponse") + if self.partitionValues is not None: + oprot.writeFieldBegin("partitionValues", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.partitionValues)) + for iter587 in self.partitionValues: + iter587.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.partitionValues is None: + raise TProtocolException(message="Required field partitionValues is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetPartitionsByNamesRequest: + """ + Attributes: + - db_name + - tbl_name + - names + - get_col_stats + - processorCapabilities + - processorIdentifier + - engine + - validWriteIdList + - getFileMetadata + - id + + """ + + def __init__( + self, + db_name=None, + tbl_name=None, + names=None, + get_col_stats=None, + processorCapabilities=None, + processorIdentifier=None, + engine=None, + validWriteIdList=None, + getFileMetadata=None, + id=-1, + ): + self.db_name = db_name + self.tbl_name = tbl_name + self.names = names + self.get_col_stats = get_col_stats + self.processorCapabilities = processorCapabilities + self.processorIdentifier = processorIdentifier + self.engine = engine + self.validWriteIdList = validWriteIdList + self.getFileMetadata = getFileMetadata + self.id = id + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.names = [] + (_etype591, _size588) = iprot.readListBegin() + for _i592 in range(_size588): + _elem593 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.names.append(_elem593) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.get_col_stats = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.processorCapabilities = [] + (_etype597, _size594) = iprot.readListBegin() + for _i598 in range(_size594): + _elem599 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.processorCapabilities.append(_elem599) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.processorIdentifier = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.engine = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRING: + self.validWriteIdList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.BOOL: + self.getFileMetadata = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.I64: + self.id = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetPartitionsByNamesRequest") + if self.db_name is not None: + oprot.writeFieldBegin("db_name", TType.STRING, 1) + oprot.writeString(self.db_name.encode("utf-8") if sys.version_info[0] == 2 else self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin("tbl_name", TType.STRING, 2) + oprot.writeString(self.tbl_name.encode("utf-8") if sys.version_info[0] == 2 else self.tbl_name) + oprot.writeFieldEnd() + if self.names is not None: + oprot.writeFieldBegin("names", TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.names)) + for iter600 in self.names: + oprot.writeString(iter600.encode("utf-8") if sys.version_info[0] == 2 else iter600) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.get_col_stats is not None: + oprot.writeFieldBegin("get_col_stats", TType.BOOL, 4) + oprot.writeBool(self.get_col_stats) + oprot.writeFieldEnd() + if self.processorCapabilities is not None: + oprot.writeFieldBegin("processorCapabilities", TType.LIST, 5) + oprot.writeListBegin(TType.STRING, len(self.processorCapabilities)) + for iter601 in self.processorCapabilities: + oprot.writeString(iter601.encode("utf-8") if sys.version_info[0] == 2 else iter601) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.processorIdentifier is not None: + oprot.writeFieldBegin("processorIdentifier", TType.STRING, 6) + oprot.writeString(self.processorIdentifier.encode("utf-8") if sys.version_info[0] == 2 else self.processorIdentifier) + oprot.writeFieldEnd() + if self.engine is not None: + oprot.writeFieldBegin("engine", TType.STRING, 7) + oprot.writeString(self.engine.encode("utf-8") if sys.version_info[0] == 2 else self.engine) + oprot.writeFieldEnd() + if self.validWriteIdList is not None: + oprot.writeFieldBegin("validWriteIdList", TType.STRING, 8) + oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList) + oprot.writeFieldEnd() + if self.getFileMetadata is not None: + oprot.writeFieldBegin("getFileMetadata", TType.BOOL, 9) + oprot.writeBool(self.getFileMetadata) + oprot.writeFieldEnd() + if self.id is not None: + oprot.writeFieldBegin("id", TType.I64, 10) + oprot.writeI64(self.id) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.db_name is None: + raise TProtocolException(message="Required field db_name is unset!") + if self.tbl_name is None: + raise TProtocolException(message="Required field tbl_name is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetPartitionsByNamesResult: + """ + Attributes: + - partitions + - dictionary + + """ + + def __init__( + self, + partitions=None, + dictionary=None, + ): + self.partitions = partitions + self.dictionary = dictionary + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.partitions = [] + (_etype605, _size602) = iprot.readListBegin() + for _i606 in range(_size602): + _elem607 = Partition() + _elem607.read(iprot) + self.partitions.append(_elem607) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.dictionary = ObjectDictionary() + self.dictionary.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetPartitionsByNamesResult") + if self.partitions is not None: + oprot.writeFieldBegin("partitions", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.partitions)) + for iter608 in self.partitions: + iter608.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.dictionary is not None: + oprot.writeFieldBegin("dictionary", TType.STRUCT, 2) + self.dictionary.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.partitions is None: + raise TProtocolException(message="Required field partitions is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class DataConnector: + """ + Attributes: + - name + - type + - url + - description + - parameters + - ownerName + - ownerType + - createTime + + """ + + def __init__( + self, + name=None, + type=None, + url=None, + description=None, + parameters=None, + ownerName=None, + ownerType=None, + createTime=None, + ): + self.name = name + self.type = type + self.url = url + self.description = description + self.parameters = parameters + self.ownerName = ownerName + self.ownerType = ownerType + self.createTime = createTime + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.type = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.url = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.description = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.MAP: + self.parameters = {} + (_ktype610, _vtype611, _size609) = iprot.readMapBegin() + for _i613 in range(_size609): + _key614 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val615 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.parameters[_key614] = _val615 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.ownerName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I32: + self.ownerType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.I32: + self.createTime = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("DataConnector") + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRING, 1) + oprot.writeString(self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + if self.type is not None: + oprot.writeFieldBegin("type", TType.STRING, 2) + oprot.writeString(self.type.encode("utf-8") if sys.version_info[0] == 2 else self.type) + oprot.writeFieldEnd() + if self.url is not None: + oprot.writeFieldBegin("url", TType.STRING, 3) + oprot.writeString(self.url.encode("utf-8") if sys.version_info[0] == 2 else self.url) + oprot.writeFieldEnd() + if self.description is not None: + oprot.writeFieldBegin("description", TType.STRING, 4) + oprot.writeString(self.description.encode("utf-8") if sys.version_info[0] == 2 else self.description) + oprot.writeFieldEnd() + if self.parameters is not None: + oprot.writeFieldBegin("parameters", TType.MAP, 5) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) + for kiter616, viter617 in self.parameters.items(): + oprot.writeString(kiter616.encode("utf-8") if sys.version_info[0] == 2 else kiter616) + oprot.writeString(viter617.encode("utf-8") if sys.version_info[0] == 2 else viter617) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.ownerName is not None: + oprot.writeFieldBegin("ownerName", TType.STRING, 6) + oprot.writeString(self.ownerName.encode("utf-8") if sys.version_info[0] == 2 else self.ownerName) + oprot.writeFieldEnd() + if self.ownerType is not None: + oprot.writeFieldBegin("ownerType", TType.I32, 7) + oprot.writeI32(self.ownerType) + oprot.writeFieldEnd() + if self.createTime is not None: + oprot.writeFieldBegin("createTime", TType.I32, 8) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ResourceUri: + """ + Attributes: + - resourceType + - uri + + """ + + def __init__( + self, + resourceType=None, + uri=None, + ): + self.resourceType = resourceType + self.uri = uri + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.resourceType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.uri = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ResourceUri") + if self.resourceType is not None: + oprot.writeFieldBegin("resourceType", TType.I32, 1) + oprot.writeI32(self.resourceType) + oprot.writeFieldEnd() + if self.uri is not None: + oprot.writeFieldBegin("uri", TType.STRING, 2) + oprot.writeString(self.uri.encode("utf-8") if sys.version_info[0] == 2 else self.uri) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class Function: + """ + Attributes: + - functionName + - dbName + - className + - ownerName + - ownerType + - createTime + - functionType + - resourceUris + - catName + + """ + + def __init__( + self, + functionName=None, + dbName=None, + className=None, + ownerName=None, + ownerType=None, + createTime=None, + functionType=None, + resourceUris=None, + catName=None, + ): + self.functionName = functionName + self.dbName = dbName + self.className = className + self.ownerName = ownerName + self.ownerType = ownerType + self.createTime = createTime + self.functionType = functionType + self.resourceUris = resourceUris + self.catName = catName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.functionName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.className = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.ownerName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.ownerType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.createTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I32: + self.functionType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.LIST: + self.resourceUris = [] + (_etype621, _size618) = iprot.readListBegin() + for _i622 in range(_size618): + _elem623 = ResourceUri() + _elem623.read(iprot) + self.resourceUris.append(_elem623) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("Function") + if self.functionName is not None: + oprot.writeFieldBegin("functionName", TType.STRING, 1) + oprot.writeString(self.functionName.encode("utf-8") if sys.version_info[0] == 2 else self.functionName) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 2) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.className is not None: + oprot.writeFieldBegin("className", TType.STRING, 3) + oprot.writeString(self.className.encode("utf-8") if sys.version_info[0] == 2 else self.className) + oprot.writeFieldEnd() + if self.ownerName is not None: + oprot.writeFieldBegin("ownerName", TType.STRING, 4) + oprot.writeString(self.ownerName.encode("utf-8") if sys.version_info[0] == 2 else self.ownerName) + oprot.writeFieldEnd() + if self.ownerType is not None: + oprot.writeFieldBegin("ownerType", TType.I32, 5) + oprot.writeI32(self.ownerType) + oprot.writeFieldEnd() + if self.createTime is not None: + oprot.writeFieldBegin("createTime", TType.I32, 6) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.functionType is not None: + oprot.writeFieldBegin("functionType", TType.I32, 7) + oprot.writeI32(self.functionType) + oprot.writeFieldEnd() + if self.resourceUris is not None: + oprot.writeFieldBegin("resourceUris", TType.LIST, 8) + oprot.writeListBegin(TType.STRUCT, len(self.resourceUris)) + for iter624 in self.resourceUris: + iter624.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 9) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TxnInfo: + """ + Attributes: + - id + - state + - user + - hostname + - agentInfo + - heartbeatCount + - metaInfo + - startedTime + - lastHeartbeatTime + + """ + + def __init__( + self, + id=None, + state=None, + user=None, + hostname=None, + agentInfo="Unknown", + heartbeatCount=0, + metaInfo=None, + startedTime=None, + lastHeartbeatTime=None, + ): + self.id = id + self.state = state + self.user = user + self.hostname = hostname + self.agentInfo = agentInfo + self.heartbeatCount = heartbeatCount + self.metaInfo = metaInfo + self.startedTime = startedTime + self.lastHeartbeatTime = lastHeartbeatTime + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.id = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.state = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.user = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.hostname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.agentInfo = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.heartbeatCount = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.metaInfo = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.I64: + self.startedTime = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.I64: + self.lastHeartbeatTime = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("TxnInfo") + if self.id is not None: + oprot.writeFieldBegin("id", TType.I64, 1) + oprot.writeI64(self.id) + oprot.writeFieldEnd() + if self.state is not None: + oprot.writeFieldBegin("state", TType.I32, 2) + oprot.writeI32(self.state) + oprot.writeFieldEnd() + if self.user is not None: + oprot.writeFieldBegin("user", TType.STRING, 3) + oprot.writeString(self.user.encode("utf-8") if sys.version_info[0] == 2 else self.user) + oprot.writeFieldEnd() + if self.hostname is not None: + oprot.writeFieldBegin("hostname", TType.STRING, 4) + oprot.writeString(self.hostname.encode("utf-8") if sys.version_info[0] == 2 else self.hostname) + oprot.writeFieldEnd() + if self.agentInfo is not None: + oprot.writeFieldBegin("agentInfo", TType.STRING, 5) + oprot.writeString(self.agentInfo.encode("utf-8") if sys.version_info[0] == 2 else self.agentInfo) + oprot.writeFieldEnd() + if self.heartbeatCount is not None: + oprot.writeFieldBegin("heartbeatCount", TType.I32, 6) + oprot.writeI32(self.heartbeatCount) + oprot.writeFieldEnd() + if self.metaInfo is not None: + oprot.writeFieldBegin("metaInfo", TType.STRING, 7) + oprot.writeString(self.metaInfo.encode("utf-8") if sys.version_info[0] == 2 else self.metaInfo) + oprot.writeFieldEnd() + if self.startedTime is not None: + oprot.writeFieldBegin("startedTime", TType.I64, 8) + oprot.writeI64(self.startedTime) + oprot.writeFieldEnd() + if self.lastHeartbeatTime is not None: + oprot.writeFieldBegin("lastHeartbeatTime", TType.I64, 9) + oprot.writeI64(self.lastHeartbeatTime) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.id is None: + raise TProtocolException(message="Required field id is unset!") + if self.state is None: + raise TProtocolException(message="Required field state is unset!") + if self.user is None: + raise TProtocolException(message="Required field user is unset!") + if self.hostname is None: + raise TProtocolException(message="Required field hostname is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetOpenTxnsInfoResponse: + """ + Attributes: + - txn_high_water_mark + - open_txns + + """ + + def __init__( + self, + txn_high_water_mark=None, + open_txns=None, + ): + self.txn_high_water_mark = txn_high_water_mark + self.open_txns = open_txns + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.txn_high_water_mark = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.open_txns = [] + (_etype628, _size625) = iprot.readListBegin() + for _i629 in range(_size625): + _elem630 = TxnInfo() + _elem630.read(iprot) + self.open_txns.append(_elem630) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetOpenTxnsInfoResponse") + if self.txn_high_water_mark is not None: + oprot.writeFieldBegin("txn_high_water_mark", TType.I64, 1) + oprot.writeI64(self.txn_high_water_mark) + oprot.writeFieldEnd() + if self.open_txns is not None: + oprot.writeFieldBegin("open_txns", TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.open_txns)) + for iter631 in self.open_txns: + iter631.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.txn_high_water_mark is None: + raise TProtocolException(message="Required field txn_high_water_mark is unset!") + if self.open_txns is None: + raise TProtocolException(message="Required field open_txns is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetOpenTxnsResponse: + """ + Attributes: + - txn_high_water_mark + - open_txns + - min_open_txn + - abortedBits + + """ + + def __init__( + self, + txn_high_water_mark=None, + open_txns=None, + min_open_txn=None, + abortedBits=None, + ): + self.txn_high_water_mark = txn_high_water_mark + self.open_txns = open_txns + self.min_open_txn = min_open_txn + self.abortedBits = abortedBits + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.txn_high_water_mark = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.open_txns = [] + (_etype635, _size632) = iprot.readListBegin() + for _i636 in range(_size632): + _elem637 = iprot.readI64() + self.open_txns.append(_elem637) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.min_open_txn = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.abortedBits = iprot.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetOpenTxnsResponse") + if self.txn_high_water_mark is not None: + oprot.writeFieldBegin("txn_high_water_mark", TType.I64, 1) + oprot.writeI64(self.txn_high_water_mark) + oprot.writeFieldEnd() + if self.open_txns is not None: + oprot.writeFieldBegin("open_txns", TType.LIST, 2) + oprot.writeListBegin(TType.I64, len(self.open_txns)) + for iter638 in self.open_txns: + oprot.writeI64(iter638) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.min_open_txn is not None: + oprot.writeFieldBegin("min_open_txn", TType.I64, 3) + oprot.writeI64(self.min_open_txn) + oprot.writeFieldEnd() + if self.abortedBits is not None: + oprot.writeFieldBegin("abortedBits", TType.STRING, 4) + oprot.writeBinary(self.abortedBits) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.txn_high_water_mark is None: + raise TProtocolException(message="Required field txn_high_water_mark is unset!") + if self.open_txns is None: + raise TProtocolException(message="Required field open_txns is unset!") + if self.abortedBits is None: + raise TProtocolException(message="Required field abortedBits is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class OpenTxnRequest: + """ + Attributes: + - num_txns + - user + - hostname + - agentInfo + - replPolicy + - replSrcTxnIds + - txn_type + + """ + + def __init__( + self, + num_txns=None, + user=None, + hostname=None, + agentInfo="Unknown", + replPolicy=None, + replSrcTxnIds=None, + txn_type=0, + ): + self.num_txns = num_txns + self.user = user + self.hostname = hostname + self.agentInfo = agentInfo + self.replPolicy = replPolicy + self.replSrcTxnIds = replSrcTxnIds + self.txn_type = txn_type + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.num_txns = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.user = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.hostname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.agentInfo = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.replPolicy = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.LIST: + self.replSrcTxnIds = [] + (_etype642, _size639) = iprot.readListBegin() + for _i643 in range(_size639): + _elem644 = iprot.readI64() + self.replSrcTxnIds.append(_elem644) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I32: + self.txn_type = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("OpenTxnRequest") + if self.num_txns is not None: + oprot.writeFieldBegin("num_txns", TType.I32, 1) + oprot.writeI32(self.num_txns) + oprot.writeFieldEnd() + if self.user is not None: + oprot.writeFieldBegin("user", TType.STRING, 2) + oprot.writeString(self.user.encode("utf-8") if sys.version_info[0] == 2 else self.user) + oprot.writeFieldEnd() + if self.hostname is not None: + oprot.writeFieldBegin("hostname", TType.STRING, 3) + oprot.writeString(self.hostname.encode("utf-8") if sys.version_info[0] == 2 else self.hostname) + oprot.writeFieldEnd() + if self.agentInfo is not None: + oprot.writeFieldBegin("agentInfo", TType.STRING, 4) + oprot.writeString(self.agentInfo.encode("utf-8") if sys.version_info[0] == 2 else self.agentInfo) + oprot.writeFieldEnd() + if self.replPolicy is not None: + oprot.writeFieldBegin("replPolicy", TType.STRING, 5) + oprot.writeString(self.replPolicy.encode("utf-8") if sys.version_info[0] == 2 else self.replPolicy) + oprot.writeFieldEnd() + if self.replSrcTxnIds is not None: + oprot.writeFieldBegin("replSrcTxnIds", TType.LIST, 6) + oprot.writeListBegin(TType.I64, len(self.replSrcTxnIds)) + for iter645 in self.replSrcTxnIds: + oprot.writeI64(iter645) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.txn_type is not None: + oprot.writeFieldBegin("txn_type", TType.I32, 7) + oprot.writeI32(self.txn_type) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.num_txns is None: + raise TProtocolException(message="Required field num_txns is unset!") + if self.user is None: + raise TProtocolException(message="Required field user is unset!") + if self.hostname is None: + raise TProtocolException(message="Required field hostname is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class OpenTxnsResponse: + """ + Attributes: + - txn_ids + + """ + + def __init__( + self, + txn_ids=None, + ): + self.txn_ids = txn_ids + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.txn_ids = [] + (_etype649, _size646) = iprot.readListBegin() + for _i650 in range(_size646): + _elem651 = iprot.readI64() + self.txn_ids.append(_elem651) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("OpenTxnsResponse") + if self.txn_ids is not None: + oprot.writeFieldBegin("txn_ids", TType.LIST, 1) + oprot.writeListBegin(TType.I64, len(self.txn_ids)) + for iter652 in self.txn_ids: + oprot.writeI64(iter652) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.txn_ids is None: + raise TProtocolException(message="Required field txn_ids is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class AbortTxnRequest: + """ + Attributes: + - txnid + - replPolicy + - txn_type + + """ + + def __init__( + self, + txnid=None, + replPolicy=None, + txn_type=None, + ): + self.txnid = txnid + self.replPolicy = replPolicy + self.txn_type = txn_type + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.txnid = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.replPolicy = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.txn_type = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("AbortTxnRequest") + if self.txnid is not None: + oprot.writeFieldBegin("txnid", TType.I64, 1) + oprot.writeI64(self.txnid) + oprot.writeFieldEnd() + if self.replPolicy is not None: + oprot.writeFieldBegin("replPolicy", TType.STRING, 2) + oprot.writeString(self.replPolicy.encode("utf-8") if sys.version_info[0] == 2 else self.replPolicy) + oprot.writeFieldEnd() + if self.txn_type is not None: + oprot.writeFieldBegin("txn_type", TType.I32, 3) + oprot.writeI32(self.txn_type) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.txnid is None: + raise TProtocolException(message="Required field txnid is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class AbortTxnsRequest: + """ + Attributes: + - txn_ids + + """ + + def __init__( + self, + txn_ids=None, + ): + self.txn_ids = txn_ids + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.txn_ids = [] + (_etype656, _size653) = iprot.readListBegin() + for _i657 in range(_size653): + _elem658 = iprot.readI64() + self.txn_ids.append(_elem658) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("AbortTxnsRequest") + if self.txn_ids is not None: + oprot.writeFieldBegin("txn_ids", TType.LIST, 1) + oprot.writeListBegin(TType.I64, len(self.txn_ids)) + for iter659 in self.txn_ids: + oprot.writeI64(iter659) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.txn_ids is None: + raise TProtocolException(message="Required field txn_ids is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class CommitTxnKeyValue: + """ + Attributes: + - tableId + - key + - value + + """ + + def __init__( + self, + tableId=None, + key=None, + value=None, + ): + self.tableId = tableId + self.key = key + self.value = value + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.tableId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.key = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.value = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("CommitTxnKeyValue") + if self.tableId is not None: + oprot.writeFieldBegin("tableId", TType.I64, 1) + oprot.writeI64(self.tableId) + oprot.writeFieldEnd() + if self.key is not None: + oprot.writeFieldBegin("key", TType.STRING, 2) + oprot.writeString(self.key.encode("utf-8") if sys.version_info[0] == 2 else self.key) + oprot.writeFieldEnd() + if self.value is not None: + oprot.writeFieldBegin("value", TType.STRING, 3) + oprot.writeString(self.value.encode("utf-8") if sys.version_info[0] == 2 else self.value) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.tableId is None: + raise TProtocolException(message="Required field tableId is unset!") + if self.key is None: + raise TProtocolException(message="Required field key is unset!") + if self.value is None: + raise TProtocolException(message="Required field value is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WriteEventInfo: + """ + Attributes: + - writeId + - database + - table + - files + - partition + - tableObj + - partitionObj + + """ + + def __init__( + self, + writeId=None, + database=None, + table=None, + files=None, + partition=None, + tableObj=None, + partitionObj=None, + ): + self.writeId = writeId + self.database = database + self.table = table + self.files = files + self.partition = partition + self.tableObj = tableObj + self.partitionObj = partitionObj + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.writeId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.database = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.table = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.files = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.partition = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.tableObj = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.partitionObj = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WriteEventInfo") + if self.writeId is not None: + oprot.writeFieldBegin("writeId", TType.I64, 1) + oprot.writeI64(self.writeId) + oprot.writeFieldEnd() + if self.database is not None: + oprot.writeFieldBegin("database", TType.STRING, 2) + oprot.writeString(self.database.encode("utf-8") if sys.version_info[0] == 2 else self.database) + oprot.writeFieldEnd() + if self.table is not None: + oprot.writeFieldBegin("table", TType.STRING, 3) + oprot.writeString(self.table.encode("utf-8") if sys.version_info[0] == 2 else self.table) + oprot.writeFieldEnd() + if self.files is not None: + oprot.writeFieldBegin("files", TType.STRING, 4) + oprot.writeString(self.files.encode("utf-8") if sys.version_info[0] == 2 else self.files) + oprot.writeFieldEnd() + if self.partition is not None: + oprot.writeFieldBegin("partition", TType.STRING, 5) + oprot.writeString(self.partition.encode("utf-8") if sys.version_info[0] == 2 else self.partition) + oprot.writeFieldEnd() + if self.tableObj is not None: + oprot.writeFieldBegin("tableObj", TType.STRING, 6) + oprot.writeString(self.tableObj.encode("utf-8") if sys.version_info[0] == 2 else self.tableObj) + oprot.writeFieldEnd() + if self.partitionObj is not None: + oprot.writeFieldBegin("partitionObj", TType.STRING, 7) + oprot.writeString(self.partitionObj.encode("utf-8") if sys.version_info[0] == 2 else self.partitionObj) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.writeId is None: + raise TProtocolException(message="Required field writeId is unset!") + if self.database is None: + raise TProtocolException(message="Required field database is unset!") + if self.table is None: + raise TProtocolException(message="Required field table is unset!") + if self.files is None: + raise TProtocolException(message="Required field files is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ReplLastIdInfo: + """ + Attributes: + - database + - lastReplId + - table + - catalog + - partitionList + + """ + + def __init__( + self, + database=None, + lastReplId=None, + table=None, + catalog=None, + partitionList=None, + ): + self.database = database + self.lastReplId = lastReplId + self.table = table + self.catalog = catalog + self.partitionList = partitionList + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.database = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.lastReplId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.table = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.catalog = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.partitionList = [] + (_etype663, _size660) = iprot.readListBegin() + for _i664 in range(_size660): + _elem665 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.partitionList.append(_elem665) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ReplLastIdInfo") + if self.database is not None: + oprot.writeFieldBegin("database", TType.STRING, 1) + oprot.writeString(self.database.encode("utf-8") if sys.version_info[0] == 2 else self.database) + oprot.writeFieldEnd() + if self.lastReplId is not None: + oprot.writeFieldBegin("lastReplId", TType.I64, 2) + oprot.writeI64(self.lastReplId) + oprot.writeFieldEnd() + if self.table is not None: + oprot.writeFieldBegin("table", TType.STRING, 3) + oprot.writeString(self.table.encode("utf-8") if sys.version_info[0] == 2 else self.table) + oprot.writeFieldEnd() + if self.catalog is not None: + oprot.writeFieldBegin("catalog", TType.STRING, 4) + oprot.writeString(self.catalog.encode("utf-8") if sys.version_info[0] == 2 else self.catalog) + oprot.writeFieldEnd() + if self.partitionList is not None: + oprot.writeFieldBegin("partitionList", TType.LIST, 5) + oprot.writeListBegin(TType.STRING, len(self.partitionList)) + for iter666 in self.partitionList: + oprot.writeString(iter666.encode("utf-8") if sys.version_info[0] == 2 else iter666) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.database is None: + raise TProtocolException(message="Required field database is unset!") + if self.lastReplId is None: + raise TProtocolException(message="Required field lastReplId is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class UpdateTransactionalStatsRequest: + """ + Attributes: + - tableId + - insertCount + - updatedCount + - deletedCount + + """ + + def __init__( + self, + tableId=None, + insertCount=None, + updatedCount=None, + deletedCount=None, + ): + self.tableId = tableId + self.insertCount = insertCount + self.updatedCount = updatedCount + self.deletedCount = deletedCount + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.tableId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.insertCount = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.updatedCount = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.deletedCount = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("UpdateTransactionalStatsRequest") + if self.tableId is not None: + oprot.writeFieldBegin("tableId", TType.I64, 1) + oprot.writeI64(self.tableId) + oprot.writeFieldEnd() + if self.insertCount is not None: + oprot.writeFieldBegin("insertCount", TType.I64, 2) + oprot.writeI64(self.insertCount) + oprot.writeFieldEnd() + if self.updatedCount is not None: + oprot.writeFieldBegin("updatedCount", TType.I64, 3) + oprot.writeI64(self.updatedCount) + oprot.writeFieldEnd() + if self.deletedCount is not None: + oprot.writeFieldBegin("deletedCount", TType.I64, 4) + oprot.writeI64(self.deletedCount) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.tableId is None: + raise TProtocolException(message="Required field tableId is unset!") + if self.insertCount is None: + raise TProtocolException(message="Required field insertCount is unset!") + if self.updatedCount is None: + raise TProtocolException(message="Required field updatedCount is unset!") + if self.deletedCount is None: + raise TProtocolException(message="Required field deletedCount is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class CommitTxnRequest: + """ + Attributes: + - txnid + - replPolicy + - writeEventInfos + - replLastIdInfo + - keyValue + - exclWriteEnabled + - txn_type + + """ + + def __init__( + self, + txnid=None, + replPolicy=None, + writeEventInfos=None, + replLastIdInfo=None, + keyValue=None, + exclWriteEnabled=True, + txn_type=None, + ): + self.txnid = txnid + self.replPolicy = replPolicy + self.writeEventInfos = writeEventInfos + self.replLastIdInfo = replLastIdInfo + self.keyValue = keyValue + self.exclWriteEnabled = exclWriteEnabled + self.txn_type = txn_type + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.txnid = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.replPolicy = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.writeEventInfos = [] + (_etype670, _size667) = iprot.readListBegin() + for _i671 in range(_size667): + _elem672 = WriteEventInfo() + _elem672.read(iprot) + self.writeEventInfos.append(_elem672) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.replLastIdInfo = ReplLastIdInfo() + self.replLastIdInfo.read(iprot) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.keyValue = CommitTxnKeyValue() + self.keyValue.read(iprot) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.BOOL: + self.exclWriteEnabled = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I32: + self.txn_type = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("CommitTxnRequest") + if self.txnid is not None: + oprot.writeFieldBegin("txnid", TType.I64, 1) + oprot.writeI64(self.txnid) + oprot.writeFieldEnd() + if self.replPolicy is not None: + oprot.writeFieldBegin("replPolicy", TType.STRING, 2) + oprot.writeString(self.replPolicy.encode("utf-8") if sys.version_info[0] == 2 else self.replPolicy) + oprot.writeFieldEnd() + if self.writeEventInfos is not None: + oprot.writeFieldBegin("writeEventInfos", TType.LIST, 3) + oprot.writeListBegin(TType.STRUCT, len(self.writeEventInfos)) + for iter673 in self.writeEventInfos: + iter673.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.replLastIdInfo is not None: + oprot.writeFieldBegin("replLastIdInfo", TType.STRUCT, 4) + self.replLastIdInfo.write(oprot) + oprot.writeFieldEnd() + if self.keyValue is not None: + oprot.writeFieldBegin("keyValue", TType.STRUCT, 5) + self.keyValue.write(oprot) + oprot.writeFieldEnd() + if self.exclWriteEnabled is not None: + oprot.writeFieldBegin("exclWriteEnabled", TType.BOOL, 6) + oprot.writeBool(self.exclWriteEnabled) + oprot.writeFieldEnd() + if self.txn_type is not None: + oprot.writeFieldBegin("txn_type", TType.I32, 7) + oprot.writeI32(self.txn_type) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.txnid is None: + raise TProtocolException(message="Required field txnid is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ReplTblWriteIdStateRequest: + """ + Attributes: + - validWriteIdlist + - user + - hostName + - dbName + - tableName + - partNames + + """ + + def __init__( + self, + validWriteIdlist=None, + user=None, + hostName=None, + dbName=None, + tableName=None, + partNames=None, + ): + self.validWriteIdlist = validWriteIdlist + self.user = user + self.hostName = hostName + self.dbName = dbName + self.tableName = tableName + self.partNames = partNames + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.validWriteIdlist = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.user = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.hostName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.tableName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.LIST: + self.partNames = [] + (_etype677, _size674) = iprot.readListBegin() + for _i678 in range(_size674): + _elem679 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.partNames.append(_elem679) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ReplTblWriteIdStateRequest") + if self.validWriteIdlist is not None: + oprot.writeFieldBegin("validWriteIdlist", TType.STRING, 1) + oprot.writeString(self.validWriteIdlist.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdlist) + oprot.writeFieldEnd() + if self.user is not None: + oprot.writeFieldBegin("user", TType.STRING, 2) + oprot.writeString(self.user.encode("utf-8") if sys.version_info[0] == 2 else self.user) + oprot.writeFieldEnd() + if self.hostName is not None: + oprot.writeFieldBegin("hostName", TType.STRING, 3) + oprot.writeString(self.hostName.encode("utf-8") if sys.version_info[0] == 2 else self.hostName) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 4) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tableName is not None: + oprot.writeFieldBegin("tableName", TType.STRING, 5) + oprot.writeString(self.tableName.encode("utf-8") if sys.version_info[0] == 2 else self.tableName) + oprot.writeFieldEnd() + if self.partNames is not None: + oprot.writeFieldBegin("partNames", TType.LIST, 6) + oprot.writeListBegin(TType.STRING, len(self.partNames)) + for iter680 in self.partNames: + oprot.writeString(iter680.encode("utf-8") if sys.version_info[0] == 2 else iter680) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.validWriteIdlist is None: + raise TProtocolException(message="Required field validWriteIdlist is unset!") + if self.user is None: + raise TProtocolException(message="Required field user is unset!") + if self.hostName is None: + raise TProtocolException(message="Required field hostName is unset!") + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.tableName is None: + raise TProtocolException(message="Required field tableName is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetValidWriteIdsRequest: + """ + Attributes: + - fullTableNames + - validTxnList + - writeId + + """ + + def __init__( + self, + fullTableNames=None, + validTxnList=None, + writeId=None, + ): + self.fullTableNames = fullTableNames + self.validTxnList = validTxnList + self.writeId = writeId + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.fullTableNames = [] + (_etype684, _size681) = iprot.readListBegin() + for _i685 in range(_size681): + _elem686 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.fullTableNames.append(_elem686) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.validTxnList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.writeId = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetValidWriteIdsRequest") + if self.fullTableNames is not None: + oprot.writeFieldBegin("fullTableNames", TType.LIST, 1) + oprot.writeListBegin(TType.STRING, len(self.fullTableNames)) + for iter687 in self.fullTableNames: + oprot.writeString(iter687.encode("utf-8") if sys.version_info[0] == 2 else iter687) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.validTxnList is not None: + oprot.writeFieldBegin("validTxnList", TType.STRING, 2) + oprot.writeString(self.validTxnList.encode("utf-8") if sys.version_info[0] == 2 else self.validTxnList) + oprot.writeFieldEnd() + if self.writeId is not None: + oprot.writeFieldBegin("writeId", TType.I64, 3) + oprot.writeI64(self.writeId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.fullTableNames is None: + raise TProtocolException(message="Required field fullTableNames is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TableValidWriteIds: + """ + Attributes: + - fullTableName + - writeIdHighWaterMark + - invalidWriteIds + - minOpenWriteId + - abortedBits + + """ + + def __init__( + self, + fullTableName=None, + writeIdHighWaterMark=None, + invalidWriteIds=None, + minOpenWriteId=None, + abortedBits=None, + ): + self.fullTableName = fullTableName + self.writeIdHighWaterMark = writeIdHighWaterMark + self.invalidWriteIds = invalidWriteIds + self.minOpenWriteId = minOpenWriteId + self.abortedBits = abortedBits + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.fullTableName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.writeIdHighWaterMark = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.invalidWriteIds = [] + (_etype691, _size688) = iprot.readListBegin() + for _i692 in range(_size688): + _elem693 = iprot.readI64() + self.invalidWriteIds.append(_elem693) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.minOpenWriteId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.abortedBits = iprot.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("TableValidWriteIds") + if self.fullTableName is not None: + oprot.writeFieldBegin("fullTableName", TType.STRING, 1) + oprot.writeString(self.fullTableName.encode("utf-8") if sys.version_info[0] == 2 else self.fullTableName) + oprot.writeFieldEnd() + if self.writeIdHighWaterMark is not None: + oprot.writeFieldBegin("writeIdHighWaterMark", TType.I64, 2) + oprot.writeI64(self.writeIdHighWaterMark) + oprot.writeFieldEnd() + if self.invalidWriteIds is not None: + oprot.writeFieldBegin("invalidWriteIds", TType.LIST, 3) + oprot.writeListBegin(TType.I64, len(self.invalidWriteIds)) + for iter694 in self.invalidWriteIds: + oprot.writeI64(iter694) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.minOpenWriteId is not None: + oprot.writeFieldBegin("minOpenWriteId", TType.I64, 4) + oprot.writeI64(self.minOpenWriteId) + oprot.writeFieldEnd() + if self.abortedBits is not None: + oprot.writeFieldBegin("abortedBits", TType.STRING, 5) + oprot.writeBinary(self.abortedBits) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.fullTableName is None: + raise TProtocolException(message="Required field fullTableName is unset!") + if self.writeIdHighWaterMark is None: + raise TProtocolException(message="Required field writeIdHighWaterMark is unset!") + if self.invalidWriteIds is None: + raise TProtocolException(message="Required field invalidWriteIds is unset!") + if self.abortedBits is None: + raise TProtocolException(message="Required field abortedBits is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetValidWriteIdsResponse: + """ + Attributes: + - tblValidWriteIds + + """ + + def __init__( + self, + tblValidWriteIds=None, + ): + self.tblValidWriteIds = tblValidWriteIds + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.tblValidWriteIds = [] + (_etype698, _size695) = iprot.readListBegin() + for _i699 in range(_size695): + _elem700 = TableValidWriteIds() + _elem700.read(iprot) + self.tblValidWriteIds.append(_elem700) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetValidWriteIdsResponse") + if self.tblValidWriteIds is not None: + oprot.writeFieldBegin("tblValidWriteIds", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.tblValidWriteIds)) + for iter701 in self.tblValidWriteIds: + iter701.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.tblValidWriteIds is None: + raise TProtocolException(message="Required field tblValidWriteIds is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TxnToWriteId: + """ + Attributes: + - txnId + - writeId + + """ + + def __init__( + self, + txnId=None, + writeId=None, + ): + self.txnId = txnId + self.writeId = writeId + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.txnId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.writeId = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("TxnToWriteId") + if self.txnId is not None: + oprot.writeFieldBegin("txnId", TType.I64, 1) + oprot.writeI64(self.txnId) + oprot.writeFieldEnd() + if self.writeId is not None: + oprot.writeFieldBegin("writeId", TType.I64, 2) + oprot.writeI64(self.writeId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.txnId is None: + raise TProtocolException(message="Required field txnId is unset!") + if self.writeId is None: + raise TProtocolException(message="Required field writeId is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class AllocateTableWriteIdsRequest: + """ + Attributes: + - dbName + - tableName + - txnIds + - replPolicy + - srcTxnToWriteIdList + + """ + + def __init__( + self, + dbName=None, + tableName=None, + txnIds=None, + replPolicy=None, + srcTxnToWriteIdList=None, + ): + self.dbName = dbName + self.tableName = tableName + self.txnIds = txnIds + self.replPolicy = replPolicy + self.srcTxnToWriteIdList = srcTxnToWriteIdList + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tableName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.txnIds = [] + (_etype705, _size702) = iprot.readListBegin() + for _i706 in range(_size702): + _elem707 = iprot.readI64() + self.txnIds.append(_elem707) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.replPolicy = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.srcTxnToWriteIdList = [] + (_etype711, _size708) = iprot.readListBegin() + for _i712 in range(_size708): + _elem713 = TxnToWriteId() + _elem713.read(iprot) + self.srcTxnToWriteIdList.append(_elem713) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("AllocateTableWriteIdsRequest") + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 1) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tableName is not None: + oprot.writeFieldBegin("tableName", TType.STRING, 2) + oprot.writeString(self.tableName.encode("utf-8") if sys.version_info[0] == 2 else self.tableName) + oprot.writeFieldEnd() + if self.txnIds is not None: + oprot.writeFieldBegin("txnIds", TType.LIST, 3) + oprot.writeListBegin(TType.I64, len(self.txnIds)) + for iter714 in self.txnIds: + oprot.writeI64(iter714) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.replPolicy is not None: + oprot.writeFieldBegin("replPolicy", TType.STRING, 4) + oprot.writeString(self.replPolicy.encode("utf-8") if sys.version_info[0] == 2 else self.replPolicy) + oprot.writeFieldEnd() + if self.srcTxnToWriteIdList is not None: + oprot.writeFieldBegin("srcTxnToWriteIdList", TType.LIST, 5) + oprot.writeListBegin(TType.STRUCT, len(self.srcTxnToWriteIdList)) + for iter715 in self.srcTxnToWriteIdList: + iter715.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.tableName is None: + raise TProtocolException(message="Required field tableName is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class AllocateTableWriteIdsResponse: + """ + Attributes: + - txnToWriteIds + + """ + + def __init__( + self, + txnToWriteIds=None, + ): + self.txnToWriteIds = txnToWriteIds + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.txnToWriteIds = [] + (_etype719, _size716) = iprot.readListBegin() + for _i720 in range(_size716): + _elem721 = TxnToWriteId() + _elem721.read(iprot) + self.txnToWriteIds.append(_elem721) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("AllocateTableWriteIdsResponse") + if self.txnToWriteIds is not None: + oprot.writeFieldBegin("txnToWriteIds", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.txnToWriteIds)) + for iter722 in self.txnToWriteIds: + iter722.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.txnToWriteIds is None: + raise TProtocolException(message="Required field txnToWriteIds is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class MaxAllocatedTableWriteIdRequest: + """ + Attributes: + - dbName + - tableName + + """ + + def __init__( + self, + dbName=None, + tableName=None, + ): + self.dbName = dbName + self.tableName = tableName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tableName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("MaxAllocatedTableWriteIdRequest") + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 1) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tableName is not None: + oprot.writeFieldBegin("tableName", TType.STRING, 2) + oprot.writeString(self.tableName.encode("utf-8") if sys.version_info[0] == 2 else self.tableName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.tableName is None: + raise TProtocolException(message="Required field tableName is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class MaxAllocatedTableWriteIdResponse: + """ + Attributes: + - maxWriteId + + """ + + def __init__( + self, + maxWriteId=None, + ): + self.maxWriteId = maxWriteId + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.maxWriteId = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("MaxAllocatedTableWriteIdResponse") + if self.maxWriteId is not None: + oprot.writeFieldBegin("maxWriteId", TType.I64, 1) + oprot.writeI64(self.maxWriteId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.maxWriteId is None: + raise TProtocolException(message="Required field maxWriteId is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class SeedTableWriteIdsRequest: + """ + Attributes: + - dbName + - tableName + - seedWriteId + + """ + + def __init__( + self, + dbName=None, + tableName=None, + seedWriteId=None, + ): + self.dbName = dbName + self.tableName = tableName + self.seedWriteId = seedWriteId + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tableName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.seedWriteId = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("SeedTableWriteIdsRequest") + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 1) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tableName is not None: + oprot.writeFieldBegin("tableName", TType.STRING, 2) + oprot.writeString(self.tableName.encode("utf-8") if sys.version_info[0] == 2 else self.tableName) + oprot.writeFieldEnd() + if self.seedWriteId is not None: + oprot.writeFieldBegin("seedWriteId", TType.I64, 3) + oprot.writeI64(self.seedWriteId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.tableName is None: + raise TProtocolException(message="Required field tableName is unset!") + if self.seedWriteId is None: + raise TProtocolException(message="Required field seedWriteId is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class SeedTxnIdRequest: + """ + Attributes: + - seedTxnId + + """ + + def __init__( + self, + seedTxnId=None, + ): + self.seedTxnId = seedTxnId + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.seedTxnId = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("SeedTxnIdRequest") + if self.seedTxnId is not None: + oprot.writeFieldBegin("seedTxnId", TType.I64, 1) + oprot.writeI64(self.seedTxnId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.seedTxnId is None: + raise TProtocolException(message="Required field seedTxnId is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class LockComponent: + """ + Attributes: + - type + - level + - dbname + - tablename + - partitionname + - operationType + - isTransactional + - isDynamicPartitionWrite + + """ + + def __init__( + self, + type=None, + level=None, + dbname=None, + tablename=None, + partitionname=None, + operationType=5, + isTransactional=False, + isDynamicPartitionWrite=False, + ): + self.type = type + self.level = level + self.dbname = dbname + self.tablename = tablename + self.partitionname = partitionname + self.operationType = operationType + self.isTransactional = isTransactional + self.isDynamicPartitionWrite = isDynamicPartitionWrite + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.type = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.level = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.dbname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.tablename = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.partitionname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.operationType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + self.isTransactional = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.BOOL: + self.isDynamicPartitionWrite = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("LockComponent") + if self.type is not None: + oprot.writeFieldBegin("type", TType.I32, 1) + oprot.writeI32(self.type) + oprot.writeFieldEnd() + if self.level is not None: + oprot.writeFieldBegin("level", TType.I32, 2) + oprot.writeI32(self.level) + oprot.writeFieldEnd() + if self.dbname is not None: + oprot.writeFieldBegin("dbname", TType.STRING, 3) + oprot.writeString(self.dbname.encode("utf-8") if sys.version_info[0] == 2 else self.dbname) + oprot.writeFieldEnd() + if self.tablename is not None: + oprot.writeFieldBegin("tablename", TType.STRING, 4) + oprot.writeString(self.tablename.encode("utf-8") if sys.version_info[0] == 2 else self.tablename) + oprot.writeFieldEnd() + if self.partitionname is not None: + oprot.writeFieldBegin("partitionname", TType.STRING, 5) + oprot.writeString(self.partitionname.encode("utf-8") if sys.version_info[0] == 2 else self.partitionname) + oprot.writeFieldEnd() + if self.operationType is not None: + oprot.writeFieldBegin("operationType", TType.I32, 6) + oprot.writeI32(self.operationType) + oprot.writeFieldEnd() + if self.isTransactional is not None: + oprot.writeFieldBegin("isTransactional", TType.BOOL, 7) + oprot.writeBool(self.isTransactional) + oprot.writeFieldEnd() + if self.isDynamicPartitionWrite is not None: + oprot.writeFieldBegin("isDynamicPartitionWrite", TType.BOOL, 8) + oprot.writeBool(self.isDynamicPartitionWrite) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.type is None: + raise TProtocolException(message="Required field type is unset!") + if self.level is None: + raise TProtocolException(message="Required field level is unset!") + if self.dbname is None: + raise TProtocolException(message="Required field dbname is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class LockRequest: + """ + Attributes: + - component + - txnid + - user + - hostname + - agentInfo + - zeroWaitReadEnabled + - exclusiveCTAS + + """ + + def __init__( + self, + component=None, + txnid=None, + user=None, + hostname=None, + agentInfo="Unknown", + zeroWaitReadEnabled=False, + exclusiveCTAS=False, + ): + self.component = component + self.txnid = txnid + self.user = user + self.hostname = hostname + self.agentInfo = agentInfo + self.zeroWaitReadEnabled = zeroWaitReadEnabled + self.exclusiveCTAS = exclusiveCTAS + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.component = [] + (_etype726, _size723) = iprot.readListBegin() + for _i727 in range(_size723): + _elem728 = LockComponent() + _elem728.read(iprot) + self.component.append(_elem728) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.txnid = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.user = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.hostname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.agentInfo = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.BOOL: + self.zeroWaitReadEnabled = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + self.exclusiveCTAS = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("LockRequest") + if self.component is not None: + oprot.writeFieldBegin("component", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.component)) + for iter729 in self.component: + iter729.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.txnid is not None: + oprot.writeFieldBegin("txnid", TType.I64, 2) + oprot.writeI64(self.txnid) + oprot.writeFieldEnd() + if self.user is not None: + oprot.writeFieldBegin("user", TType.STRING, 3) + oprot.writeString(self.user.encode("utf-8") if sys.version_info[0] == 2 else self.user) + oprot.writeFieldEnd() + if self.hostname is not None: + oprot.writeFieldBegin("hostname", TType.STRING, 4) + oprot.writeString(self.hostname.encode("utf-8") if sys.version_info[0] == 2 else self.hostname) + oprot.writeFieldEnd() + if self.agentInfo is not None: + oprot.writeFieldBegin("agentInfo", TType.STRING, 5) + oprot.writeString(self.agentInfo.encode("utf-8") if sys.version_info[0] == 2 else self.agentInfo) + oprot.writeFieldEnd() + if self.zeroWaitReadEnabled is not None: + oprot.writeFieldBegin("zeroWaitReadEnabled", TType.BOOL, 6) + oprot.writeBool(self.zeroWaitReadEnabled) + oprot.writeFieldEnd() + if self.exclusiveCTAS is not None: + oprot.writeFieldBegin("exclusiveCTAS", TType.BOOL, 7) + oprot.writeBool(self.exclusiveCTAS) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.component is None: + raise TProtocolException(message="Required field component is unset!") + if self.user is None: + raise TProtocolException(message="Required field user is unset!") + if self.hostname is None: + raise TProtocolException(message="Required field hostname is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class LockResponse: + """ + Attributes: + - lockid + - state + - errorMessage + + """ + + def __init__( + self, + lockid=None, + state=None, + errorMessage=None, + ): + self.lockid = lockid + self.state = state + self.errorMessage = errorMessage + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.lockid = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.state = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.errorMessage = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("LockResponse") + if self.lockid is not None: + oprot.writeFieldBegin("lockid", TType.I64, 1) + oprot.writeI64(self.lockid) + oprot.writeFieldEnd() + if self.state is not None: + oprot.writeFieldBegin("state", TType.I32, 2) + oprot.writeI32(self.state) + oprot.writeFieldEnd() + if self.errorMessage is not None: + oprot.writeFieldBegin("errorMessage", TType.STRING, 3) + oprot.writeString(self.errorMessage.encode("utf-8") if sys.version_info[0] == 2 else self.errorMessage) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.lockid is None: + raise TProtocolException(message="Required field lockid is unset!") + if self.state is None: + raise TProtocolException(message="Required field state is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class CheckLockRequest: + """ + Attributes: + - lockid + - txnid + - elapsed_ms + + """ + + def __init__( + self, + lockid=None, + txnid=None, + elapsed_ms=None, + ): + self.lockid = lockid + self.txnid = txnid + self.elapsed_ms = elapsed_ms + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.lockid = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.txnid = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.elapsed_ms = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("CheckLockRequest") + if self.lockid is not None: + oprot.writeFieldBegin("lockid", TType.I64, 1) + oprot.writeI64(self.lockid) + oprot.writeFieldEnd() + if self.txnid is not None: + oprot.writeFieldBegin("txnid", TType.I64, 2) + oprot.writeI64(self.txnid) + oprot.writeFieldEnd() + if self.elapsed_ms is not None: + oprot.writeFieldBegin("elapsed_ms", TType.I64, 3) + oprot.writeI64(self.elapsed_ms) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.lockid is None: + raise TProtocolException(message="Required field lockid is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class UnlockRequest: + """ + Attributes: + - lockid + + """ + + def __init__( + self, + lockid=None, + ): + self.lockid = lockid + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.lockid = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("UnlockRequest") + if self.lockid is not None: + oprot.writeFieldBegin("lockid", TType.I64, 1) + oprot.writeI64(self.lockid) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.lockid is None: + raise TProtocolException(message="Required field lockid is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ShowLocksRequest: + """ + Attributes: + - dbname + - tablename + - partname + - isExtended + - txnid + + """ + + def __init__( + self, + dbname=None, + tablename=None, + partname=None, + isExtended=False, + txnid=None, + ): + self.dbname = dbname + self.tablename = tablename + self.partname = partname + self.isExtended = isExtended + self.txnid = txnid + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tablename = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.partname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.isExtended = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I64: + self.txnid = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ShowLocksRequest") + if self.dbname is not None: + oprot.writeFieldBegin("dbname", TType.STRING, 1) + oprot.writeString(self.dbname.encode("utf-8") if sys.version_info[0] == 2 else self.dbname) + oprot.writeFieldEnd() + if self.tablename is not None: + oprot.writeFieldBegin("tablename", TType.STRING, 2) + oprot.writeString(self.tablename.encode("utf-8") if sys.version_info[0] == 2 else self.tablename) + oprot.writeFieldEnd() + if self.partname is not None: + oprot.writeFieldBegin("partname", TType.STRING, 3) + oprot.writeString(self.partname.encode("utf-8") if sys.version_info[0] == 2 else self.partname) + oprot.writeFieldEnd() + if self.isExtended is not None: + oprot.writeFieldBegin("isExtended", TType.BOOL, 4) + oprot.writeBool(self.isExtended) + oprot.writeFieldEnd() + if self.txnid is not None: + oprot.writeFieldBegin("txnid", TType.I64, 5) + oprot.writeI64(self.txnid) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ShowLocksResponseElement: + """ + Attributes: + - lockid + - dbname + - tablename + - partname + - state + - type + - txnid + - lastheartbeat + - acquiredat + - user + - hostname + - heartbeatCount + - agentInfo + - blockedByExtId + - blockedByIntId + - lockIdInternal + + """ + + def __init__( + self, + lockid=None, + dbname=None, + tablename=None, + partname=None, + state=None, + type=None, + txnid=None, + lastheartbeat=None, + acquiredat=None, + user=None, + hostname=None, + heartbeatCount=0, + agentInfo=None, + blockedByExtId=None, + blockedByIntId=None, + lockIdInternal=None, + ): + self.lockid = lockid + self.dbname = dbname + self.tablename = tablename + self.partname = partname + self.state = state + self.type = type + self.txnid = txnid + self.lastheartbeat = lastheartbeat + self.acquiredat = acquiredat + self.user = user + self.hostname = hostname + self.heartbeatCount = heartbeatCount + self.agentInfo = agentInfo + self.blockedByExtId = blockedByExtId + self.blockedByIntId = blockedByIntId + self.lockIdInternal = lockIdInternal + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.lockid = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tablename = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.partname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.state = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.type = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I64: + self.txnid = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.I64: + self.lastheartbeat = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.I64: + self.acquiredat = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRING: + self.user = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.STRING: + self.hostname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.I32: + self.heartbeatCount = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 13: + if ftype == TType.STRING: + self.agentInfo = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 14: + if ftype == TType.I64: + self.blockedByExtId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 15: + if ftype == TType.I64: + self.blockedByIntId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 16: + if ftype == TType.I64: + self.lockIdInternal = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ShowLocksResponseElement") + if self.lockid is not None: + oprot.writeFieldBegin("lockid", TType.I64, 1) + oprot.writeI64(self.lockid) + oprot.writeFieldEnd() + if self.dbname is not None: + oprot.writeFieldBegin("dbname", TType.STRING, 2) + oprot.writeString(self.dbname.encode("utf-8") if sys.version_info[0] == 2 else self.dbname) + oprot.writeFieldEnd() + if self.tablename is not None: + oprot.writeFieldBegin("tablename", TType.STRING, 3) + oprot.writeString(self.tablename.encode("utf-8") if sys.version_info[0] == 2 else self.tablename) + oprot.writeFieldEnd() + if self.partname is not None: + oprot.writeFieldBegin("partname", TType.STRING, 4) + oprot.writeString(self.partname.encode("utf-8") if sys.version_info[0] == 2 else self.partname) + oprot.writeFieldEnd() + if self.state is not None: + oprot.writeFieldBegin("state", TType.I32, 5) + oprot.writeI32(self.state) + oprot.writeFieldEnd() + if self.type is not None: + oprot.writeFieldBegin("type", TType.I32, 6) + oprot.writeI32(self.type) + oprot.writeFieldEnd() + if self.txnid is not None: + oprot.writeFieldBegin("txnid", TType.I64, 7) + oprot.writeI64(self.txnid) + oprot.writeFieldEnd() + if self.lastheartbeat is not None: + oprot.writeFieldBegin("lastheartbeat", TType.I64, 8) + oprot.writeI64(self.lastheartbeat) + oprot.writeFieldEnd() + if self.acquiredat is not None: + oprot.writeFieldBegin("acquiredat", TType.I64, 9) + oprot.writeI64(self.acquiredat) + oprot.writeFieldEnd() + if self.user is not None: + oprot.writeFieldBegin("user", TType.STRING, 10) + oprot.writeString(self.user.encode("utf-8") if sys.version_info[0] == 2 else self.user) + oprot.writeFieldEnd() + if self.hostname is not None: + oprot.writeFieldBegin("hostname", TType.STRING, 11) + oprot.writeString(self.hostname.encode("utf-8") if sys.version_info[0] == 2 else self.hostname) + oprot.writeFieldEnd() + if self.heartbeatCount is not None: + oprot.writeFieldBegin("heartbeatCount", TType.I32, 12) + oprot.writeI32(self.heartbeatCount) + oprot.writeFieldEnd() + if self.agentInfo is not None: + oprot.writeFieldBegin("agentInfo", TType.STRING, 13) + oprot.writeString(self.agentInfo.encode("utf-8") if sys.version_info[0] == 2 else self.agentInfo) + oprot.writeFieldEnd() + if self.blockedByExtId is not None: + oprot.writeFieldBegin("blockedByExtId", TType.I64, 14) + oprot.writeI64(self.blockedByExtId) + oprot.writeFieldEnd() + if self.blockedByIntId is not None: + oprot.writeFieldBegin("blockedByIntId", TType.I64, 15) + oprot.writeI64(self.blockedByIntId) + oprot.writeFieldEnd() + if self.lockIdInternal is not None: + oprot.writeFieldBegin("lockIdInternal", TType.I64, 16) + oprot.writeI64(self.lockIdInternal) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.lockid is None: + raise TProtocolException(message="Required field lockid is unset!") + if self.dbname is None: + raise TProtocolException(message="Required field dbname is unset!") + if self.state is None: + raise TProtocolException(message="Required field state is unset!") + if self.type is None: + raise TProtocolException(message="Required field type is unset!") + if self.lastheartbeat is None: + raise TProtocolException(message="Required field lastheartbeat is unset!") + if self.user is None: + raise TProtocolException(message="Required field user is unset!") + if self.hostname is None: + raise TProtocolException(message="Required field hostname is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ShowLocksResponse: + """ + Attributes: + - locks + + """ + + def __init__( + self, + locks=None, + ): + self.locks = locks + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.locks = [] + (_etype733, _size730) = iprot.readListBegin() + for _i734 in range(_size730): + _elem735 = ShowLocksResponseElement() + _elem735.read(iprot) + self.locks.append(_elem735) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ShowLocksResponse") + if self.locks is not None: + oprot.writeFieldBegin("locks", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.locks)) + for iter736 in self.locks: + iter736.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class HeartbeatRequest: + """ + Attributes: + - lockid + - txnid + + """ + + def __init__( + self, + lockid=None, + txnid=None, + ): + self.lockid = lockid + self.txnid = txnid + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.lockid = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.txnid = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("HeartbeatRequest") + if self.lockid is not None: + oprot.writeFieldBegin("lockid", TType.I64, 1) + oprot.writeI64(self.lockid) + oprot.writeFieldEnd() + if self.txnid is not None: + oprot.writeFieldBegin("txnid", TType.I64, 2) + oprot.writeI64(self.txnid) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class HeartbeatTxnRangeRequest: + """ + Attributes: + - min + - max + + """ + + def __init__( + self, + min=None, + max=None, + ): + self.min = min + self.max = max + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.min = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.max = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("HeartbeatTxnRangeRequest") + if self.min is not None: + oprot.writeFieldBegin("min", TType.I64, 1) + oprot.writeI64(self.min) + oprot.writeFieldEnd() + if self.max is not None: + oprot.writeFieldBegin("max", TType.I64, 2) + oprot.writeI64(self.max) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.min is None: + raise TProtocolException(message="Required field min is unset!") + if self.max is None: + raise TProtocolException(message="Required field max is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class HeartbeatTxnRangeResponse: + """ + Attributes: + - aborted + - nosuch + + """ + + def __init__( + self, + aborted=None, + nosuch=None, + ): + self.aborted = aborted + self.nosuch = nosuch + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.SET: + self.aborted = set() + (_etype740, _size737) = iprot.readSetBegin() + for _i741 in range(_size737): + _elem742 = iprot.readI64() + self.aborted.add(_elem742) + iprot.readSetEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.SET: + self.nosuch = set() + (_etype746, _size743) = iprot.readSetBegin() + for _i747 in range(_size743): + _elem748 = iprot.readI64() + self.nosuch.add(_elem748) + iprot.readSetEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("HeartbeatTxnRangeResponse") + if self.aborted is not None: + oprot.writeFieldBegin("aborted", TType.SET, 1) + oprot.writeSetBegin(TType.I64, len(self.aborted)) + for iter749 in self.aborted: + oprot.writeI64(iter749) + oprot.writeSetEnd() + oprot.writeFieldEnd() + if self.nosuch is not None: + oprot.writeFieldBegin("nosuch", TType.SET, 2) + oprot.writeSetBegin(TType.I64, len(self.nosuch)) + for iter750 in self.nosuch: + oprot.writeI64(iter750) + oprot.writeSetEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.aborted is None: + raise TProtocolException(message="Required field aborted is unset!") + if self.nosuch is None: + raise TProtocolException(message="Required field nosuch is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class CompactionRequest: + """ + Attributes: + - dbname + - tablename + - partitionname + - type + - runas + - properties + - initiatorId + - initiatorVersion + + """ + + def __init__( + self, + dbname=None, + tablename=None, + partitionname=None, + type=None, + runas=None, + properties=None, + initiatorId=None, + initiatorVersion=None, + ): + self.dbname = dbname + self.tablename = tablename + self.partitionname = partitionname + self.type = type + self.runas = runas + self.properties = properties + self.initiatorId = initiatorId + self.initiatorVersion = initiatorVersion + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tablename = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.partitionname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.type = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.runas = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.MAP: + self.properties = {} + (_ktype752, _vtype753, _size751) = iprot.readMapBegin() + for _i755 in range(_size751): + _key756 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val757 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.properties[_key756] = _val757 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.initiatorId = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRING: + self.initiatorVersion = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("CompactionRequest") + if self.dbname is not None: + oprot.writeFieldBegin("dbname", TType.STRING, 1) + oprot.writeString(self.dbname.encode("utf-8") if sys.version_info[0] == 2 else self.dbname) + oprot.writeFieldEnd() + if self.tablename is not None: + oprot.writeFieldBegin("tablename", TType.STRING, 2) + oprot.writeString(self.tablename.encode("utf-8") if sys.version_info[0] == 2 else self.tablename) + oprot.writeFieldEnd() + if self.partitionname is not None: + oprot.writeFieldBegin("partitionname", TType.STRING, 3) + oprot.writeString(self.partitionname.encode("utf-8") if sys.version_info[0] == 2 else self.partitionname) + oprot.writeFieldEnd() + if self.type is not None: + oprot.writeFieldBegin("type", TType.I32, 4) + oprot.writeI32(self.type) + oprot.writeFieldEnd() + if self.runas is not None: + oprot.writeFieldBegin("runas", TType.STRING, 5) + oprot.writeString(self.runas.encode("utf-8") if sys.version_info[0] == 2 else self.runas) + oprot.writeFieldEnd() + if self.properties is not None: + oprot.writeFieldBegin("properties", TType.MAP, 6) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.properties)) + for kiter758, viter759 in self.properties.items(): + oprot.writeString(kiter758.encode("utf-8") if sys.version_info[0] == 2 else kiter758) + oprot.writeString(viter759.encode("utf-8") if sys.version_info[0] == 2 else viter759) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.initiatorId is not None: + oprot.writeFieldBegin("initiatorId", TType.STRING, 7) + oprot.writeString(self.initiatorId.encode("utf-8") if sys.version_info[0] == 2 else self.initiatorId) + oprot.writeFieldEnd() + if self.initiatorVersion is not None: + oprot.writeFieldBegin("initiatorVersion", TType.STRING, 8) + oprot.writeString(self.initiatorVersion.encode("utf-8") if sys.version_info[0] == 2 else self.initiatorVersion) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbname is None: + raise TProtocolException(message="Required field dbname is unset!") + if self.tablename is None: + raise TProtocolException(message="Required field tablename is unset!") + if self.type is None: + raise TProtocolException(message="Required field type is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class CompactionInfoStruct: + """ + Attributes: + - id + - dbname + - tablename + - partitionname + - type + - runas + - properties + - toomanyaborts + - state + - workerId + - start + - highestWriteId + - errorMessage + - hasoldabort + - enqueueTime + - retryRetention + + """ + + def __init__( + self, + id=None, + dbname=None, + tablename=None, + partitionname=None, + type=None, + runas=None, + properties=None, + toomanyaborts=None, + state=None, + workerId=None, + start=None, + highestWriteId=None, + errorMessage=None, + hasoldabort=None, + enqueueTime=None, + retryRetention=None, + ): + self.id = id + self.dbname = dbname + self.tablename = tablename + self.partitionname = partitionname + self.type = type + self.runas = runas + self.properties = properties + self.toomanyaborts = toomanyaborts + self.state = state + self.workerId = workerId + self.start = start + self.highestWriteId = highestWriteId + self.errorMessage = errorMessage + self.hasoldabort = hasoldabort + self.enqueueTime = enqueueTime + self.retryRetention = retryRetention + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.id = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tablename = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.partitionname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.type = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.runas = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.properties = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.BOOL: + self.toomanyaborts = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.STRING: + self.state = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRING: + self.workerId = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.I64: + self.start = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.I64: + self.highestWriteId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 13: + if ftype == TType.STRING: + self.errorMessage = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 14: + if ftype == TType.BOOL: + self.hasoldabort = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 15: + if ftype == TType.I64: + self.enqueueTime = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 16: + if ftype == TType.I64: + self.retryRetention = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("CompactionInfoStruct") + if self.id is not None: + oprot.writeFieldBegin("id", TType.I64, 1) + oprot.writeI64(self.id) + oprot.writeFieldEnd() + if self.dbname is not None: + oprot.writeFieldBegin("dbname", TType.STRING, 2) + oprot.writeString(self.dbname.encode("utf-8") if sys.version_info[0] == 2 else self.dbname) + oprot.writeFieldEnd() + if self.tablename is not None: + oprot.writeFieldBegin("tablename", TType.STRING, 3) + oprot.writeString(self.tablename.encode("utf-8") if sys.version_info[0] == 2 else self.tablename) + oprot.writeFieldEnd() + if self.partitionname is not None: + oprot.writeFieldBegin("partitionname", TType.STRING, 4) + oprot.writeString(self.partitionname.encode("utf-8") if sys.version_info[0] == 2 else self.partitionname) + oprot.writeFieldEnd() + if self.type is not None: + oprot.writeFieldBegin("type", TType.I32, 5) + oprot.writeI32(self.type) + oprot.writeFieldEnd() + if self.runas is not None: + oprot.writeFieldBegin("runas", TType.STRING, 6) + oprot.writeString(self.runas.encode("utf-8") if sys.version_info[0] == 2 else self.runas) + oprot.writeFieldEnd() + if self.properties is not None: + oprot.writeFieldBegin("properties", TType.STRING, 7) + oprot.writeString(self.properties.encode("utf-8") if sys.version_info[0] == 2 else self.properties) + oprot.writeFieldEnd() + if self.toomanyaborts is not None: + oprot.writeFieldBegin("toomanyaborts", TType.BOOL, 8) + oprot.writeBool(self.toomanyaborts) + oprot.writeFieldEnd() + if self.state is not None: + oprot.writeFieldBegin("state", TType.STRING, 9) + oprot.writeString(self.state.encode("utf-8") if sys.version_info[0] == 2 else self.state) + oprot.writeFieldEnd() + if self.workerId is not None: + oprot.writeFieldBegin("workerId", TType.STRING, 10) + oprot.writeString(self.workerId.encode("utf-8") if sys.version_info[0] == 2 else self.workerId) + oprot.writeFieldEnd() + if self.start is not None: + oprot.writeFieldBegin("start", TType.I64, 11) + oprot.writeI64(self.start) + oprot.writeFieldEnd() + if self.highestWriteId is not None: + oprot.writeFieldBegin("highestWriteId", TType.I64, 12) + oprot.writeI64(self.highestWriteId) + oprot.writeFieldEnd() + if self.errorMessage is not None: + oprot.writeFieldBegin("errorMessage", TType.STRING, 13) + oprot.writeString(self.errorMessage.encode("utf-8") if sys.version_info[0] == 2 else self.errorMessage) + oprot.writeFieldEnd() + if self.hasoldabort is not None: + oprot.writeFieldBegin("hasoldabort", TType.BOOL, 14) + oprot.writeBool(self.hasoldabort) + oprot.writeFieldEnd() + if self.enqueueTime is not None: + oprot.writeFieldBegin("enqueueTime", TType.I64, 15) + oprot.writeI64(self.enqueueTime) + oprot.writeFieldEnd() + if self.retryRetention is not None: + oprot.writeFieldBegin("retryRetention", TType.I64, 16) + oprot.writeI64(self.retryRetention) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.id is None: + raise TProtocolException(message="Required field id is unset!") + if self.dbname is None: + raise TProtocolException(message="Required field dbname is unset!") + if self.tablename is None: + raise TProtocolException(message="Required field tablename is unset!") + if self.type is None: + raise TProtocolException(message="Required field type is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class OptionalCompactionInfoStruct: + """ + Attributes: + - ci + + """ + + def __init__( + self, + ci=None, + ): + self.ci = ci + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.ci = CompactionInfoStruct() + self.ci.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("OptionalCompactionInfoStruct") + if self.ci is not None: + oprot.writeFieldBegin("ci", TType.STRUCT, 1) + self.ci.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class CompactionMetricsDataStruct: + """ + Attributes: + - dbname + - tblname + - partitionname + - type + - metricvalue + - version + - threshold + + """ + + def __init__( + self, + dbname=None, + tblname=None, + partitionname=None, + type=None, + metricvalue=None, + version=None, + threshold=None, + ): + self.dbname = dbname + self.tblname = tblname + self.partitionname = partitionname + self.type = type + self.metricvalue = metricvalue + self.version = version + self.threshold = threshold + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tblname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.partitionname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.type = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.metricvalue = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.version = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I32: + self.threshold = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("CompactionMetricsDataStruct") + if self.dbname is not None: + oprot.writeFieldBegin("dbname", TType.STRING, 1) + oprot.writeString(self.dbname.encode("utf-8") if sys.version_info[0] == 2 else self.dbname) + oprot.writeFieldEnd() + if self.tblname is not None: + oprot.writeFieldBegin("tblname", TType.STRING, 2) + oprot.writeString(self.tblname.encode("utf-8") if sys.version_info[0] == 2 else self.tblname) + oprot.writeFieldEnd() + if self.partitionname is not None: + oprot.writeFieldBegin("partitionname", TType.STRING, 3) + oprot.writeString(self.partitionname.encode("utf-8") if sys.version_info[0] == 2 else self.partitionname) + oprot.writeFieldEnd() + if self.type is not None: + oprot.writeFieldBegin("type", TType.I32, 4) + oprot.writeI32(self.type) + oprot.writeFieldEnd() + if self.metricvalue is not None: + oprot.writeFieldBegin("metricvalue", TType.I32, 5) + oprot.writeI32(self.metricvalue) + oprot.writeFieldEnd() + if self.version is not None: + oprot.writeFieldBegin("version", TType.I32, 6) + oprot.writeI32(self.version) + oprot.writeFieldEnd() + if self.threshold is not None: + oprot.writeFieldBegin("threshold", TType.I32, 7) + oprot.writeI32(self.threshold) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbname is None: + raise TProtocolException(message="Required field dbname is unset!") + if self.tblname is None: + raise TProtocolException(message="Required field tblname is unset!") + if self.type is None: + raise TProtocolException(message="Required field type is unset!") + if self.metricvalue is None: + raise TProtocolException(message="Required field metricvalue is unset!") + if self.version is None: + raise TProtocolException(message="Required field version is unset!") + if self.threshold is None: + raise TProtocolException(message="Required field threshold is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class CompactionMetricsDataResponse: + """ + Attributes: + - data + + """ + + def __init__( + self, + data=None, + ): + self.data = data + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.data = CompactionMetricsDataStruct() + self.data.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("CompactionMetricsDataResponse") + if self.data is not None: + oprot.writeFieldBegin("data", TType.STRUCT, 1) + self.data.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class CompactionMetricsDataRequest: + """ + Attributes: + - dbName + - tblName + - partitionName + - type + + """ + + def __init__( + self, + dbName=None, + tblName=None, + partitionName=None, + type=None, + ): + self.dbName = dbName + self.tblName = tblName + self.partitionName = partitionName + self.type = type + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tblName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.partitionName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.type = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("CompactionMetricsDataRequest") + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 1) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tblName is not None: + oprot.writeFieldBegin("tblName", TType.STRING, 2) + oprot.writeString(self.tblName.encode("utf-8") if sys.version_info[0] == 2 else self.tblName) + oprot.writeFieldEnd() + if self.partitionName is not None: + oprot.writeFieldBegin("partitionName", TType.STRING, 3) + oprot.writeString(self.partitionName.encode("utf-8") if sys.version_info[0] == 2 else self.partitionName) + oprot.writeFieldEnd() + if self.type is not None: + oprot.writeFieldBegin("type", TType.I32, 4) + oprot.writeI32(self.type) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.tblName is None: + raise TProtocolException(message="Required field tblName is unset!") + if self.type is None: + raise TProtocolException(message="Required field type is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class CompactionResponse: + """ + Attributes: + - id + - state + - accepted + - errormessage + + """ + + def __init__( + self, + id=None, + state=None, + accepted=None, + errormessage=None, + ): + self.id = id + self.state = state + self.accepted = accepted + self.errormessage = errormessage + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.id = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.state = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.accepted = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.errormessage = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("CompactionResponse") + if self.id is not None: + oprot.writeFieldBegin("id", TType.I64, 1) + oprot.writeI64(self.id) + oprot.writeFieldEnd() + if self.state is not None: + oprot.writeFieldBegin("state", TType.STRING, 2) + oprot.writeString(self.state.encode("utf-8") if sys.version_info[0] == 2 else self.state) + oprot.writeFieldEnd() + if self.accepted is not None: + oprot.writeFieldBegin("accepted", TType.BOOL, 3) + oprot.writeBool(self.accepted) + oprot.writeFieldEnd() + if self.errormessage is not None: + oprot.writeFieldBegin("errormessage", TType.STRING, 4) + oprot.writeString(self.errormessage.encode("utf-8") if sys.version_info[0] == 2 else self.errormessage) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.id is None: + raise TProtocolException(message="Required field id is unset!") + if self.state is None: + raise TProtocolException(message="Required field state is unset!") + if self.accepted is None: + raise TProtocolException(message="Required field accepted is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ShowCompactRequest: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ShowCompactRequest") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ShowCompactResponseElement: + """ + Attributes: + - dbname + - tablename + - partitionname + - type + - state + - workerid + - start + - runAs + - hightestTxnId + - metaInfo + - endTime + - hadoopJobId + - id + - errorMessage + - enqueueTime + - workerVersion + - initiatorId + - initiatorVersion + - cleanerStart + + """ + + def __init__( + self, + dbname=None, + tablename=None, + partitionname=None, + type=None, + state=None, + workerid=None, + start=None, + runAs=None, + hightestTxnId=None, + metaInfo=None, + endTime=None, + hadoopJobId="None", + id=None, + errorMessage=None, + enqueueTime=None, + workerVersion=None, + initiatorId=None, + initiatorVersion=None, + cleanerStart=None, + ): + self.dbname = dbname + self.tablename = tablename + self.partitionname = partitionname + self.type = type + self.state = state + self.workerid = workerid + self.start = start + self.runAs = runAs + self.hightestTxnId = hightestTxnId + self.metaInfo = metaInfo + self.endTime = endTime + self.hadoopJobId = hadoopJobId + self.id = id + self.errorMessage = errorMessage + self.enqueueTime = enqueueTime + self.workerVersion = workerVersion + self.initiatorId = initiatorId + self.initiatorVersion = initiatorVersion + self.cleanerStart = cleanerStart + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tablename = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.partitionname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.type = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.state = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.workerid = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I64: + self.start = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRING: + self.runAs = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.I64: + self.hightestTxnId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRING: + self.metaInfo = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.I64: + self.endTime = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.STRING: + self.hadoopJobId = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 13: + if ftype == TType.I64: + self.id = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 14: + if ftype == TType.STRING: + self.errorMessage = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 15: + if ftype == TType.I64: + self.enqueueTime = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 16: + if ftype == TType.STRING: + self.workerVersion = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 17: + if ftype == TType.STRING: + self.initiatorId = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 18: + if ftype == TType.STRING: + self.initiatorVersion = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 19: + if ftype == TType.I64: + self.cleanerStart = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ShowCompactResponseElement") + if self.dbname is not None: + oprot.writeFieldBegin("dbname", TType.STRING, 1) + oprot.writeString(self.dbname.encode("utf-8") if sys.version_info[0] == 2 else self.dbname) + oprot.writeFieldEnd() + if self.tablename is not None: + oprot.writeFieldBegin("tablename", TType.STRING, 2) + oprot.writeString(self.tablename.encode("utf-8") if sys.version_info[0] == 2 else self.tablename) + oprot.writeFieldEnd() + if self.partitionname is not None: + oprot.writeFieldBegin("partitionname", TType.STRING, 3) + oprot.writeString(self.partitionname.encode("utf-8") if sys.version_info[0] == 2 else self.partitionname) + oprot.writeFieldEnd() + if self.type is not None: + oprot.writeFieldBegin("type", TType.I32, 4) + oprot.writeI32(self.type) + oprot.writeFieldEnd() + if self.state is not None: + oprot.writeFieldBegin("state", TType.STRING, 5) + oprot.writeString(self.state.encode("utf-8") if sys.version_info[0] == 2 else self.state) + oprot.writeFieldEnd() + if self.workerid is not None: + oprot.writeFieldBegin("workerid", TType.STRING, 6) + oprot.writeString(self.workerid.encode("utf-8") if sys.version_info[0] == 2 else self.workerid) + oprot.writeFieldEnd() + if self.start is not None: + oprot.writeFieldBegin("start", TType.I64, 7) + oprot.writeI64(self.start) + oprot.writeFieldEnd() + if self.runAs is not None: + oprot.writeFieldBegin("runAs", TType.STRING, 8) + oprot.writeString(self.runAs.encode("utf-8") if sys.version_info[0] == 2 else self.runAs) + oprot.writeFieldEnd() + if self.hightestTxnId is not None: + oprot.writeFieldBegin("hightestTxnId", TType.I64, 9) + oprot.writeI64(self.hightestTxnId) + oprot.writeFieldEnd() + if self.metaInfo is not None: + oprot.writeFieldBegin("metaInfo", TType.STRING, 10) + oprot.writeString(self.metaInfo.encode("utf-8") if sys.version_info[0] == 2 else self.metaInfo) + oprot.writeFieldEnd() + if self.endTime is not None: + oprot.writeFieldBegin("endTime", TType.I64, 11) + oprot.writeI64(self.endTime) + oprot.writeFieldEnd() + if self.hadoopJobId is not None: + oprot.writeFieldBegin("hadoopJobId", TType.STRING, 12) + oprot.writeString(self.hadoopJobId.encode("utf-8") if sys.version_info[0] == 2 else self.hadoopJobId) + oprot.writeFieldEnd() + if self.id is not None: + oprot.writeFieldBegin("id", TType.I64, 13) + oprot.writeI64(self.id) + oprot.writeFieldEnd() + if self.errorMessage is not None: + oprot.writeFieldBegin("errorMessage", TType.STRING, 14) + oprot.writeString(self.errorMessage.encode("utf-8") if sys.version_info[0] == 2 else self.errorMessage) + oprot.writeFieldEnd() + if self.enqueueTime is not None: + oprot.writeFieldBegin("enqueueTime", TType.I64, 15) + oprot.writeI64(self.enqueueTime) + oprot.writeFieldEnd() + if self.workerVersion is not None: + oprot.writeFieldBegin("workerVersion", TType.STRING, 16) + oprot.writeString(self.workerVersion.encode("utf-8") if sys.version_info[0] == 2 else self.workerVersion) + oprot.writeFieldEnd() + if self.initiatorId is not None: + oprot.writeFieldBegin("initiatorId", TType.STRING, 17) + oprot.writeString(self.initiatorId.encode("utf-8") if sys.version_info[0] == 2 else self.initiatorId) + oprot.writeFieldEnd() + if self.initiatorVersion is not None: + oprot.writeFieldBegin("initiatorVersion", TType.STRING, 18) + oprot.writeString(self.initiatorVersion.encode("utf-8") if sys.version_info[0] == 2 else self.initiatorVersion) + oprot.writeFieldEnd() + if self.cleanerStart is not None: + oprot.writeFieldBegin("cleanerStart", TType.I64, 19) + oprot.writeI64(self.cleanerStart) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbname is None: + raise TProtocolException(message="Required field dbname is unset!") + if self.tablename is None: + raise TProtocolException(message="Required field tablename is unset!") + if self.type is None: + raise TProtocolException(message="Required field type is unset!") + if self.state is None: + raise TProtocolException(message="Required field state is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ShowCompactResponse: + """ + Attributes: + - compacts + + """ + + def __init__( + self, + compacts=None, + ): + self.compacts = compacts + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.compacts = [] + (_etype763, _size760) = iprot.readListBegin() + for _i764 in range(_size760): + _elem765 = ShowCompactResponseElement() + _elem765.read(iprot) + self.compacts.append(_elem765) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ShowCompactResponse") + if self.compacts is not None: + oprot.writeFieldBegin("compacts", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.compacts)) + for iter766 in self.compacts: + iter766.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.compacts is None: + raise TProtocolException(message="Required field compacts is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetLatestCommittedCompactionInfoRequest: + """ + Attributes: + - dbname + - tablename + - partitionnames + - lastCompactionId + + """ + + def __init__( + self, + dbname=None, + tablename=None, + partitionnames=None, + lastCompactionId=None, + ): + self.dbname = dbname + self.tablename = tablename + self.partitionnames = partitionnames + self.lastCompactionId = lastCompactionId + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tablename = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.partitionnames = [] + (_etype770, _size767) = iprot.readListBegin() + for _i771 in range(_size767): + _elem772 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.partitionnames.append(_elem772) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.lastCompactionId = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetLatestCommittedCompactionInfoRequest") + if self.dbname is not None: + oprot.writeFieldBegin("dbname", TType.STRING, 1) + oprot.writeString(self.dbname.encode("utf-8") if sys.version_info[0] == 2 else self.dbname) + oprot.writeFieldEnd() + if self.tablename is not None: + oprot.writeFieldBegin("tablename", TType.STRING, 2) + oprot.writeString(self.tablename.encode("utf-8") if sys.version_info[0] == 2 else self.tablename) + oprot.writeFieldEnd() + if self.partitionnames is not None: + oprot.writeFieldBegin("partitionnames", TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.partitionnames)) + for iter773 in self.partitionnames: + oprot.writeString(iter773.encode("utf-8") if sys.version_info[0] == 2 else iter773) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.lastCompactionId is not None: + oprot.writeFieldBegin("lastCompactionId", TType.I64, 4) + oprot.writeI64(self.lastCompactionId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbname is None: + raise TProtocolException(message="Required field dbname is unset!") + if self.tablename is None: + raise TProtocolException(message="Required field tablename is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetLatestCommittedCompactionInfoResponse: + """ + Attributes: + - compactions + + """ + + def __init__( + self, + compactions=None, + ): + self.compactions = compactions + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.compactions = [] + (_etype777, _size774) = iprot.readListBegin() + for _i778 in range(_size774): + _elem779 = CompactionInfoStruct() + _elem779.read(iprot) + self.compactions.append(_elem779) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetLatestCommittedCompactionInfoResponse") + if self.compactions is not None: + oprot.writeFieldBegin("compactions", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.compactions)) + for iter780 in self.compactions: + iter780.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.compactions is None: + raise TProtocolException(message="Required field compactions is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class FindNextCompactRequest: + """ + Attributes: + - workerId + - workerVersion + + """ + + def __init__( + self, + workerId=None, + workerVersion=None, + ): + self.workerId = workerId + self.workerVersion = workerVersion + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.workerId = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.workerVersion = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("FindNextCompactRequest") + if self.workerId is not None: + oprot.writeFieldBegin("workerId", TType.STRING, 1) + oprot.writeString(self.workerId.encode("utf-8") if sys.version_info[0] == 2 else self.workerId) + oprot.writeFieldEnd() + if self.workerVersion is not None: + oprot.writeFieldBegin("workerVersion", TType.STRING, 2) + oprot.writeString(self.workerVersion.encode("utf-8") if sys.version_info[0] == 2 else self.workerVersion) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class AddDynamicPartitions: + """ + Attributes: + - txnid + - writeid + - dbname + - tablename + - partitionnames + - operationType + + """ + + def __init__( + self, + txnid=None, + writeid=None, + dbname=None, + tablename=None, + partitionnames=None, + operationType=5, + ): + self.txnid = txnid + self.writeid = writeid + self.dbname = dbname + self.tablename = tablename + self.partitionnames = partitionnames + self.operationType = operationType + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.txnid = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.writeid = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.dbname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.tablename = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.partitionnames = [] + (_etype784, _size781) = iprot.readListBegin() + for _i785 in range(_size781): + _elem786 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.partitionnames.append(_elem786) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.operationType = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("AddDynamicPartitions") + if self.txnid is not None: + oprot.writeFieldBegin("txnid", TType.I64, 1) + oprot.writeI64(self.txnid) + oprot.writeFieldEnd() + if self.writeid is not None: + oprot.writeFieldBegin("writeid", TType.I64, 2) + oprot.writeI64(self.writeid) + oprot.writeFieldEnd() + if self.dbname is not None: + oprot.writeFieldBegin("dbname", TType.STRING, 3) + oprot.writeString(self.dbname.encode("utf-8") if sys.version_info[0] == 2 else self.dbname) + oprot.writeFieldEnd() + if self.tablename is not None: + oprot.writeFieldBegin("tablename", TType.STRING, 4) + oprot.writeString(self.tablename.encode("utf-8") if sys.version_info[0] == 2 else self.tablename) + oprot.writeFieldEnd() + if self.partitionnames is not None: + oprot.writeFieldBegin("partitionnames", TType.LIST, 5) + oprot.writeListBegin(TType.STRING, len(self.partitionnames)) + for iter787 in self.partitionnames: + oprot.writeString(iter787.encode("utf-8") if sys.version_info[0] == 2 else iter787) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.operationType is not None: + oprot.writeFieldBegin("operationType", TType.I32, 6) + oprot.writeI32(self.operationType) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.txnid is None: + raise TProtocolException(message="Required field txnid is unset!") + if self.writeid is None: + raise TProtocolException(message="Required field writeid is unset!") + if self.dbname is None: + raise TProtocolException(message="Required field dbname is unset!") + if self.tablename is None: + raise TProtocolException(message="Required field tablename is unset!") + if self.partitionnames is None: + raise TProtocolException(message="Required field partitionnames is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class BasicTxnInfo: + """ + Attributes: + - isnull + - time + - txnid + - dbname + - tablename + - partitionname + + """ + + def __init__( + self, + isnull=None, + time=None, + txnid=None, + dbname=None, + tablename=None, + partitionname=None, + ): + self.isnull = isnull + self.time = time + self.txnid = txnid + self.dbname = dbname + self.tablename = tablename + self.partitionname = partitionname + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.BOOL: + self.isnull = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.time = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.txnid = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.dbname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.tablename = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.partitionname = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("BasicTxnInfo") + if self.isnull is not None: + oprot.writeFieldBegin("isnull", TType.BOOL, 1) + oprot.writeBool(self.isnull) + oprot.writeFieldEnd() + if self.time is not None: + oprot.writeFieldBegin("time", TType.I64, 2) + oprot.writeI64(self.time) + oprot.writeFieldEnd() + if self.txnid is not None: + oprot.writeFieldBegin("txnid", TType.I64, 3) + oprot.writeI64(self.txnid) + oprot.writeFieldEnd() + if self.dbname is not None: + oprot.writeFieldBegin("dbname", TType.STRING, 4) + oprot.writeString(self.dbname.encode("utf-8") if sys.version_info[0] == 2 else self.dbname) + oprot.writeFieldEnd() + if self.tablename is not None: + oprot.writeFieldBegin("tablename", TType.STRING, 5) + oprot.writeString(self.tablename.encode("utf-8") if sys.version_info[0] == 2 else self.tablename) + oprot.writeFieldEnd() + if self.partitionname is not None: + oprot.writeFieldBegin("partitionname", TType.STRING, 6) + oprot.writeString(self.partitionname.encode("utf-8") if sys.version_info[0] == 2 else self.partitionname) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.isnull is None: + raise TProtocolException(message="Required field isnull is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class NotificationEventRequest: + """ + Attributes: + - lastEvent + - maxEvents + - eventTypeSkipList + + """ + + def __init__( + self, + lastEvent=None, + maxEvents=None, + eventTypeSkipList=None, + ): + self.lastEvent = lastEvent + self.maxEvents = maxEvents + self.eventTypeSkipList = eventTypeSkipList + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.lastEvent = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.maxEvents = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.eventTypeSkipList = [] + (_etype791, _size788) = iprot.readListBegin() + for _i792 in range(_size788): + _elem793 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.eventTypeSkipList.append(_elem793) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("NotificationEventRequest") + if self.lastEvent is not None: + oprot.writeFieldBegin("lastEvent", TType.I64, 1) + oprot.writeI64(self.lastEvent) + oprot.writeFieldEnd() + if self.maxEvents is not None: + oprot.writeFieldBegin("maxEvents", TType.I32, 2) + oprot.writeI32(self.maxEvents) + oprot.writeFieldEnd() + if self.eventTypeSkipList is not None: + oprot.writeFieldBegin("eventTypeSkipList", TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.eventTypeSkipList)) + for iter794 in self.eventTypeSkipList: + oprot.writeString(iter794.encode("utf-8") if sys.version_info[0] == 2 else iter794) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.lastEvent is None: + raise TProtocolException(message="Required field lastEvent is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class NotificationEvent: + """ + Attributes: + - eventId + - eventTime + - eventType + - dbName + - tableName + - message + - messageFormat + - catName + + """ + + def __init__( + self, + eventId=None, + eventTime=None, + eventType=None, + dbName=None, + tableName=None, + message=None, + messageFormat=None, + catName=None, + ): + self.eventId = eventId + self.eventTime = eventTime + self.eventType = eventType + self.dbName = dbName + self.tableName = tableName + self.message = message + self.messageFormat = messageFormat + self.catName = catName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.eventId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.eventTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.eventType = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.tableName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.message = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.messageFormat = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("NotificationEvent") + if self.eventId is not None: + oprot.writeFieldBegin("eventId", TType.I64, 1) + oprot.writeI64(self.eventId) + oprot.writeFieldEnd() + if self.eventTime is not None: + oprot.writeFieldBegin("eventTime", TType.I32, 2) + oprot.writeI32(self.eventTime) + oprot.writeFieldEnd() + if self.eventType is not None: + oprot.writeFieldBegin("eventType", TType.STRING, 3) + oprot.writeString(self.eventType.encode("utf-8") if sys.version_info[0] == 2 else self.eventType) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 4) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tableName is not None: + oprot.writeFieldBegin("tableName", TType.STRING, 5) + oprot.writeString(self.tableName.encode("utf-8") if sys.version_info[0] == 2 else self.tableName) + oprot.writeFieldEnd() + if self.message is not None: + oprot.writeFieldBegin("message", TType.STRING, 6) + oprot.writeString(self.message.encode("utf-8") if sys.version_info[0] == 2 else self.message) + oprot.writeFieldEnd() + if self.messageFormat is not None: + oprot.writeFieldBegin("messageFormat", TType.STRING, 7) + oprot.writeString(self.messageFormat.encode("utf-8") if sys.version_info[0] == 2 else self.messageFormat) + oprot.writeFieldEnd() + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 8) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.eventId is None: + raise TProtocolException(message="Required field eventId is unset!") + if self.eventTime is None: + raise TProtocolException(message="Required field eventTime is unset!") + if self.eventType is None: + raise TProtocolException(message="Required field eventType is unset!") + if self.message is None: + raise TProtocolException(message="Required field message is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class NotificationEventResponse: + """ + Attributes: + - events + + """ + + def __init__( + self, + events=None, + ): + self.events = events + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.events = [] + (_etype798, _size795) = iprot.readListBegin() + for _i799 in range(_size795): + _elem800 = NotificationEvent() + _elem800.read(iprot) + self.events.append(_elem800) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("NotificationEventResponse") + if self.events is not None: + oprot.writeFieldBegin("events", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.events)) + for iter801 in self.events: + iter801.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.events is None: + raise TProtocolException(message="Required field events is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class CurrentNotificationEventId: + """ + Attributes: + - eventId + + """ + + def __init__( + self, + eventId=None, + ): + self.eventId = eventId + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.eventId = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("CurrentNotificationEventId") + if self.eventId is not None: + oprot.writeFieldBegin("eventId", TType.I64, 1) + oprot.writeI64(self.eventId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.eventId is None: + raise TProtocolException(message="Required field eventId is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class NotificationEventsCountRequest: + """ + Attributes: + - fromEventId + - dbName + - catName + - toEventId + - limit + + """ + + def __init__( + self, + fromEventId=None, + dbName=None, + catName=None, + toEventId=None, + limit=None, + ): + self.fromEventId = fromEventId + self.dbName = dbName + self.catName = catName + self.toEventId = toEventId + self.limit = limit + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.fromEventId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.toEventId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I64: + self.limit = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("NotificationEventsCountRequest") + if self.fromEventId is not None: + oprot.writeFieldBegin("fromEventId", TType.I64, 1) + oprot.writeI64(self.fromEventId) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 2) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 3) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.toEventId is not None: + oprot.writeFieldBegin("toEventId", TType.I64, 4) + oprot.writeI64(self.toEventId) + oprot.writeFieldEnd() + if self.limit is not None: + oprot.writeFieldBegin("limit", TType.I64, 5) + oprot.writeI64(self.limit) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.fromEventId is None: + raise TProtocolException(message="Required field fromEventId is unset!") + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class NotificationEventsCountResponse: + """ + Attributes: + - eventsCount + + """ + + def __init__( + self, + eventsCount=None, + ): + self.eventsCount = eventsCount + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.eventsCount = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("NotificationEventsCountResponse") + if self.eventsCount is not None: + oprot.writeFieldBegin("eventsCount", TType.I64, 1) + oprot.writeI64(self.eventsCount) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.eventsCount is None: + raise TProtocolException(message="Required field eventsCount is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class InsertEventRequestData: + """ + Attributes: + - replace + - filesAdded + - filesAddedChecksum + - subDirectoryList + - partitionVal + + """ + + def __init__( + self, + replace=None, + filesAdded=None, + filesAddedChecksum=None, + subDirectoryList=None, + partitionVal=None, + ): + self.replace = replace + self.filesAdded = filesAdded + self.filesAddedChecksum = filesAddedChecksum + self.subDirectoryList = subDirectoryList + self.partitionVal = partitionVal + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.BOOL: + self.replace = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.filesAdded = [] + (_etype805, _size802) = iprot.readListBegin() + for _i806 in range(_size802): + _elem807 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.filesAdded.append(_elem807) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.filesAddedChecksum = [] + (_etype811, _size808) = iprot.readListBegin() + for _i812 in range(_size808): + _elem813 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.filesAddedChecksum.append(_elem813) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.subDirectoryList = [] + (_etype817, _size814) = iprot.readListBegin() + for _i818 in range(_size814): + _elem819 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.subDirectoryList.append(_elem819) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.partitionVal = [] + (_etype823, _size820) = iprot.readListBegin() + for _i824 in range(_size820): + _elem825 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.partitionVal.append(_elem825) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("InsertEventRequestData") + if self.replace is not None: + oprot.writeFieldBegin("replace", TType.BOOL, 1) + oprot.writeBool(self.replace) + oprot.writeFieldEnd() + if self.filesAdded is not None: + oprot.writeFieldBegin("filesAdded", TType.LIST, 2) + oprot.writeListBegin(TType.STRING, len(self.filesAdded)) + for iter826 in self.filesAdded: + oprot.writeString(iter826.encode("utf-8") if sys.version_info[0] == 2 else iter826) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.filesAddedChecksum is not None: + oprot.writeFieldBegin("filesAddedChecksum", TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.filesAddedChecksum)) + for iter827 in self.filesAddedChecksum: + oprot.writeString(iter827.encode("utf-8") if sys.version_info[0] == 2 else iter827) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.subDirectoryList is not None: + oprot.writeFieldBegin("subDirectoryList", TType.LIST, 4) + oprot.writeListBegin(TType.STRING, len(self.subDirectoryList)) + for iter828 in self.subDirectoryList: + oprot.writeString(iter828.encode("utf-8") if sys.version_info[0] == 2 else iter828) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.partitionVal is not None: + oprot.writeFieldBegin("partitionVal", TType.LIST, 5) + oprot.writeListBegin(TType.STRING, len(self.partitionVal)) + for iter829 in self.partitionVal: + oprot.writeString(iter829.encode("utf-8") if sys.version_info[0] == 2 else iter829) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.filesAdded is None: + raise TProtocolException(message="Required field filesAdded is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class FireEventRequestData: + """ + Attributes: + - insertData + - insertDatas + + """ + + def __init__( + self, + insertData=None, + insertDatas=None, + ): + self.insertData = insertData + self.insertDatas = insertDatas + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.insertData = InsertEventRequestData() + self.insertData.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.insertDatas = [] + (_etype833, _size830) = iprot.readListBegin() + for _i834 in range(_size830): + _elem835 = InsertEventRequestData() + _elem835.read(iprot) + self.insertDatas.append(_elem835) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("FireEventRequestData") + if self.insertData is not None: + oprot.writeFieldBegin("insertData", TType.STRUCT, 1) + self.insertData.write(oprot) + oprot.writeFieldEnd() + if self.insertDatas is not None: + oprot.writeFieldBegin("insertDatas", TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.insertDatas)) + for iter836 in self.insertDatas: + iter836.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class FireEventRequest: + """ + Attributes: + - successful + - data + - dbName + - tableName + - partitionVals + - catName + + """ + + def __init__( + self, + successful=None, + data=None, + dbName=None, + tableName=None, + partitionVals=None, + catName=None, + ): + self.successful = successful + self.data = data + self.dbName = dbName + self.tableName = tableName + self.partitionVals = partitionVals + self.catName = catName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.BOOL: + self.successful = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.data = FireEventRequestData() + self.data.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.tableName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.partitionVals = [] + (_etype840, _size837) = iprot.readListBegin() + for _i841 in range(_size837): + _elem842 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.partitionVals.append(_elem842) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("FireEventRequest") + if self.successful is not None: + oprot.writeFieldBegin("successful", TType.BOOL, 1) + oprot.writeBool(self.successful) + oprot.writeFieldEnd() + if self.data is not None: + oprot.writeFieldBegin("data", TType.STRUCT, 2) + self.data.write(oprot) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 3) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tableName is not None: + oprot.writeFieldBegin("tableName", TType.STRING, 4) + oprot.writeString(self.tableName.encode("utf-8") if sys.version_info[0] == 2 else self.tableName) + oprot.writeFieldEnd() + if self.partitionVals is not None: + oprot.writeFieldBegin("partitionVals", TType.LIST, 5) + oprot.writeListBegin(TType.STRING, len(self.partitionVals)) + for iter843 in self.partitionVals: + oprot.writeString(iter843.encode("utf-8") if sys.version_info[0] == 2 else iter843) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 6) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.successful is None: + raise TProtocolException(message="Required field successful is unset!") + if self.data is None: + raise TProtocolException(message="Required field data is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class FireEventResponse: + """ + Attributes: + - eventIds + + """ + + def __init__( + self, + eventIds=None, + ): + self.eventIds = eventIds + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.eventIds = [] + (_etype847, _size844) = iprot.readListBegin() + for _i848 in range(_size844): + _elem849 = iprot.readI64() + self.eventIds.append(_elem849) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("FireEventResponse") + if self.eventIds is not None: + oprot.writeFieldBegin("eventIds", TType.LIST, 1) + oprot.writeListBegin(TType.I64, len(self.eventIds)) + for iter850 in self.eventIds: + oprot.writeI64(iter850) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WriteNotificationLogRequest: + """ + Attributes: + - txnId + - writeId + - db + - table + - fileInfo + - partitionVals + + """ + + def __init__( + self, + txnId=None, + writeId=None, + db=None, + table=None, + fileInfo=None, + partitionVals=None, + ): + self.txnId = txnId + self.writeId = writeId + self.db = db + self.table = table + self.fileInfo = fileInfo + self.partitionVals = partitionVals + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.txnId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.writeId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.db = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.table = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.fileInfo = InsertEventRequestData() + self.fileInfo.read(iprot) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.LIST: + self.partitionVals = [] + (_etype854, _size851) = iprot.readListBegin() + for _i855 in range(_size851): + _elem856 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.partitionVals.append(_elem856) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WriteNotificationLogRequest") + if self.txnId is not None: + oprot.writeFieldBegin("txnId", TType.I64, 1) + oprot.writeI64(self.txnId) + oprot.writeFieldEnd() + if self.writeId is not None: + oprot.writeFieldBegin("writeId", TType.I64, 2) + oprot.writeI64(self.writeId) + oprot.writeFieldEnd() + if self.db is not None: + oprot.writeFieldBegin("db", TType.STRING, 3) + oprot.writeString(self.db.encode("utf-8") if sys.version_info[0] == 2 else self.db) + oprot.writeFieldEnd() + if self.table is not None: + oprot.writeFieldBegin("table", TType.STRING, 4) + oprot.writeString(self.table.encode("utf-8") if sys.version_info[0] == 2 else self.table) + oprot.writeFieldEnd() + if self.fileInfo is not None: + oprot.writeFieldBegin("fileInfo", TType.STRUCT, 5) + self.fileInfo.write(oprot) + oprot.writeFieldEnd() + if self.partitionVals is not None: + oprot.writeFieldBegin("partitionVals", TType.LIST, 6) + oprot.writeListBegin(TType.STRING, len(self.partitionVals)) + for iter857 in self.partitionVals: + oprot.writeString(iter857.encode("utf-8") if sys.version_info[0] == 2 else iter857) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.txnId is None: + raise TProtocolException(message="Required field txnId is unset!") + if self.writeId is None: + raise TProtocolException(message="Required field writeId is unset!") + if self.db is None: + raise TProtocolException(message="Required field db is unset!") + if self.table is None: + raise TProtocolException(message="Required field table is unset!") + if self.fileInfo is None: + raise TProtocolException(message="Required field fileInfo is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WriteNotificationLogResponse: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WriteNotificationLogResponse") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WriteNotificationLogBatchRequest: + """ + Attributes: + - catalog + - db + - table + - requestList + + """ + + def __init__( + self, + catalog=None, + db=None, + table=None, + requestList=None, + ): + self.catalog = catalog + self.db = db + self.table = table + self.requestList = requestList + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catalog = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.db = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.table = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.requestList = [] + (_etype861, _size858) = iprot.readListBegin() + for _i862 in range(_size858): + _elem863 = WriteNotificationLogRequest() + _elem863.read(iprot) + self.requestList.append(_elem863) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WriteNotificationLogBatchRequest") + if self.catalog is not None: + oprot.writeFieldBegin("catalog", TType.STRING, 1) + oprot.writeString(self.catalog.encode("utf-8") if sys.version_info[0] == 2 else self.catalog) + oprot.writeFieldEnd() + if self.db is not None: + oprot.writeFieldBegin("db", TType.STRING, 2) + oprot.writeString(self.db.encode("utf-8") if sys.version_info[0] == 2 else self.db) + oprot.writeFieldEnd() + if self.table is not None: + oprot.writeFieldBegin("table", TType.STRING, 3) + oprot.writeString(self.table.encode("utf-8") if sys.version_info[0] == 2 else self.table) + oprot.writeFieldEnd() + if self.requestList is not None: + oprot.writeFieldBegin("requestList", TType.LIST, 4) + oprot.writeListBegin(TType.STRUCT, len(self.requestList)) + for iter864 in self.requestList: + iter864.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.catalog is None: + raise TProtocolException(message="Required field catalog is unset!") + if self.db is None: + raise TProtocolException(message="Required field db is unset!") + if self.table is None: + raise TProtocolException(message="Required field table is unset!") + if self.requestList is None: + raise TProtocolException(message="Required field requestList is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WriteNotificationLogBatchResponse: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WriteNotificationLogBatchResponse") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class MetadataPpdResult: + """ + Attributes: + - metadata + - includeBitset + + """ + + def __init__( + self, + metadata=None, + includeBitset=None, + ): + self.metadata = metadata + self.includeBitset = includeBitset + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.metadata = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.includeBitset = iprot.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("MetadataPpdResult") + if self.metadata is not None: + oprot.writeFieldBegin("metadata", TType.STRING, 1) + oprot.writeBinary(self.metadata) + oprot.writeFieldEnd() + if self.includeBitset is not None: + oprot.writeFieldBegin("includeBitset", TType.STRING, 2) + oprot.writeBinary(self.includeBitset) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetFileMetadataByExprResult: + """ + Attributes: + - metadata + - isSupported + + """ + + def __init__( + self, + metadata=None, + isSupported=None, + ): + self.metadata = metadata + self.isSupported = isSupported + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.MAP: + self.metadata = {} + (_ktype866, _vtype867, _size865) = iprot.readMapBegin() + for _i869 in range(_size865): + _key870 = iprot.readI64() + _val871 = MetadataPpdResult() + _val871.read(iprot) + self.metadata[_key870] = _val871 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.isSupported = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetFileMetadataByExprResult") + if self.metadata is not None: + oprot.writeFieldBegin("metadata", TType.MAP, 1) + oprot.writeMapBegin(TType.I64, TType.STRUCT, len(self.metadata)) + for kiter872, viter873 in self.metadata.items(): + oprot.writeI64(kiter872) + viter873.write(oprot) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.isSupported is not None: + oprot.writeFieldBegin("isSupported", TType.BOOL, 2) + oprot.writeBool(self.isSupported) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.metadata is None: + raise TProtocolException(message="Required field metadata is unset!") + if self.isSupported is None: + raise TProtocolException(message="Required field isSupported is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetFileMetadataByExprRequest: + """ + Attributes: + - fileIds + - expr + - doGetFooters + - type + + """ + + def __init__( + self, + fileIds=None, + expr=None, + doGetFooters=None, + type=None, + ): + self.fileIds = fileIds + self.expr = expr + self.doGetFooters = doGetFooters + self.type = type + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.fileIds = [] + (_etype877, _size874) = iprot.readListBegin() + for _i878 in range(_size874): + _elem879 = iprot.readI64() + self.fileIds.append(_elem879) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.expr = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.doGetFooters = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.type = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetFileMetadataByExprRequest") + if self.fileIds is not None: + oprot.writeFieldBegin("fileIds", TType.LIST, 1) + oprot.writeListBegin(TType.I64, len(self.fileIds)) + for iter880 in self.fileIds: + oprot.writeI64(iter880) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.expr is not None: + oprot.writeFieldBegin("expr", TType.STRING, 2) + oprot.writeBinary(self.expr) + oprot.writeFieldEnd() + if self.doGetFooters is not None: + oprot.writeFieldBegin("doGetFooters", TType.BOOL, 3) + oprot.writeBool(self.doGetFooters) + oprot.writeFieldEnd() + if self.type is not None: + oprot.writeFieldBegin("type", TType.I32, 4) + oprot.writeI32(self.type) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.fileIds is None: + raise TProtocolException(message="Required field fileIds is unset!") + if self.expr is None: + raise TProtocolException(message="Required field expr is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetFileMetadataResult: + """ + Attributes: + - metadata + - isSupported + + """ + + def __init__( + self, + metadata=None, + isSupported=None, + ): + self.metadata = metadata + self.isSupported = isSupported + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.MAP: + self.metadata = {} + (_ktype882, _vtype883, _size881) = iprot.readMapBegin() + for _i885 in range(_size881): + _key886 = iprot.readI64() + _val887 = iprot.readBinary() + self.metadata[_key886] = _val887 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.isSupported = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetFileMetadataResult") + if self.metadata is not None: + oprot.writeFieldBegin("metadata", TType.MAP, 1) + oprot.writeMapBegin(TType.I64, TType.STRING, len(self.metadata)) + for kiter888, viter889 in self.metadata.items(): + oprot.writeI64(kiter888) + oprot.writeBinary(viter889) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.isSupported is not None: + oprot.writeFieldBegin("isSupported", TType.BOOL, 2) + oprot.writeBool(self.isSupported) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.metadata is None: + raise TProtocolException(message="Required field metadata is unset!") + if self.isSupported is None: + raise TProtocolException(message="Required field isSupported is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetFileMetadataRequest: + """ + Attributes: + - fileIds + + """ + + def __init__( + self, + fileIds=None, + ): + self.fileIds = fileIds + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.fileIds = [] + (_etype893, _size890) = iprot.readListBegin() + for _i894 in range(_size890): + _elem895 = iprot.readI64() + self.fileIds.append(_elem895) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetFileMetadataRequest") + if self.fileIds is not None: + oprot.writeFieldBegin("fileIds", TType.LIST, 1) + oprot.writeListBegin(TType.I64, len(self.fileIds)) + for iter896 in self.fileIds: + oprot.writeI64(iter896) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.fileIds is None: + raise TProtocolException(message="Required field fileIds is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class PutFileMetadataResult: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("PutFileMetadataResult") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class PutFileMetadataRequest: + """ + Attributes: + - fileIds + - metadata + - type + + """ + + def __init__( + self, + fileIds=None, + metadata=None, + type=None, + ): + self.fileIds = fileIds + self.metadata = metadata + self.type = type + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.fileIds = [] + (_etype900, _size897) = iprot.readListBegin() + for _i901 in range(_size897): + _elem902 = iprot.readI64() + self.fileIds.append(_elem902) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.metadata = [] + (_etype906, _size903) = iprot.readListBegin() + for _i907 in range(_size903): + _elem908 = iprot.readBinary() + self.metadata.append(_elem908) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.type = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("PutFileMetadataRequest") + if self.fileIds is not None: + oprot.writeFieldBegin("fileIds", TType.LIST, 1) + oprot.writeListBegin(TType.I64, len(self.fileIds)) + for iter909 in self.fileIds: + oprot.writeI64(iter909) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.metadata is not None: + oprot.writeFieldBegin("metadata", TType.LIST, 2) + oprot.writeListBegin(TType.STRING, len(self.metadata)) + for iter910 in self.metadata: + oprot.writeBinary(iter910) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.type is not None: + oprot.writeFieldBegin("type", TType.I32, 3) + oprot.writeI32(self.type) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.fileIds is None: + raise TProtocolException(message="Required field fileIds is unset!") + if self.metadata is None: + raise TProtocolException(message="Required field metadata is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ClearFileMetadataResult: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ClearFileMetadataResult") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ClearFileMetadataRequest: + """ + Attributes: + - fileIds + + """ + + def __init__( + self, + fileIds=None, + ): + self.fileIds = fileIds + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.fileIds = [] + (_etype914, _size911) = iprot.readListBegin() + for _i915 in range(_size911): + _elem916 = iprot.readI64() + self.fileIds.append(_elem916) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ClearFileMetadataRequest") + if self.fileIds is not None: + oprot.writeFieldBegin("fileIds", TType.LIST, 1) + oprot.writeListBegin(TType.I64, len(self.fileIds)) + for iter917 in self.fileIds: + oprot.writeI64(iter917) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.fileIds is None: + raise TProtocolException(message="Required field fileIds is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class CacheFileMetadataResult: + """ + Attributes: + - isSupported + + """ + + def __init__( + self, + isSupported=None, + ): + self.isSupported = isSupported + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.BOOL: + self.isSupported = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("CacheFileMetadataResult") + if self.isSupported is not None: + oprot.writeFieldBegin("isSupported", TType.BOOL, 1) + oprot.writeBool(self.isSupported) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.isSupported is None: + raise TProtocolException(message="Required field isSupported is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class CacheFileMetadataRequest: + """ + Attributes: + - dbName + - tblName + - partName + - isAllParts + + """ + + def __init__( + self, + dbName=None, + tblName=None, + partName=None, + isAllParts=None, + ): + self.dbName = dbName + self.tblName = tblName + self.partName = partName + self.isAllParts = isAllParts + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tblName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.partName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.isAllParts = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("CacheFileMetadataRequest") + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 1) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tblName is not None: + oprot.writeFieldBegin("tblName", TType.STRING, 2) + oprot.writeString(self.tblName.encode("utf-8") if sys.version_info[0] == 2 else self.tblName) + oprot.writeFieldEnd() + if self.partName is not None: + oprot.writeFieldBegin("partName", TType.STRING, 3) + oprot.writeString(self.partName.encode("utf-8") if sys.version_info[0] == 2 else self.partName) + oprot.writeFieldEnd() + if self.isAllParts is not None: + oprot.writeFieldBegin("isAllParts", TType.BOOL, 4) + oprot.writeBool(self.isAllParts) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.tblName is None: + raise TProtocolException(message="Required field tblName is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetAllFunctionsResponse: + """ + Attributes: + - functions + + """ + + def __init__( + self, + functions=None, + ): + self.functions = functions + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.functions = [] + (_etype921, _size918) = iprot.readListBegin() + for _i922 in range(_size918): + _elem923 = Function() + _elem923.read(iprot) + self.functions.append(_elem923) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetAllFunctionsResponse") + if self.functions is not None: + oprot.writeFieldBegin("functions", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.functions)) + for iter924 in self.functions: + iter924.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ClientCapabilities: + """ + Attributes: + - values + + """ + + def __init__( + self, + values=None, + ): + self.values = values + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.values = [] + (_etype928, _size925) = iprot.readListBegin() + for _i929 in range(_size925): + _elem930 = iprot.readI32() + self.values.append(_elem930) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ClientCapabilities") + if self.values is not None: + oprot.writeFieldBegin("values", TType.LIST, 1) + oprot.writeListBegin(TType.I32, len(self.values)) + for iter931 in self.values: + oprot.writeI32(iter931) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.values is None: + raise TProtocolException(message="Required field values is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetProjectionsSpec: + """ + Attributes: + - fieldList + - includeParamKeyPattern + - excludeParamKeyPattern + + """ + + def __init__( + self, + fieldList=None, + includeParamKeyPattern=None, + excludeParamKeyPattern=None, + ): + self.fieldList = fieldList + self.includeParamKeyPattern = includeParamKeyPattern + self.excludeParamKeyPattern = excludeParamKeyPattern + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.fieldList = [] + (_etype935, _size932) = iprot.readListBegin() + for _i936 in range(_size932): + _elem937 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.fieldList.append(_elem937) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.includeParamKeyPattern = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.excludeParamKeyPattern = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetProjectionsSpec") + if self.fieldList is not None: + oprot.writeFieldBegin("fieldList", TType.LIST, 1) + oprot.writeListBegin(TType.STRING, len(self.fieldList)) + for iter938 in self.fieldList: + oprot.writeString(iter938.encode("utf-8") if sys.version_info[0] == 2 else iter938) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.includeParamKeyPattern is not None: + oprot.writeFieldBegin("includeParamKeyPattern", TType.STRING, 2) + oprot.writeString( + self.includeParamKeyPattern.encode("utf-8") if sys.version_info[0] == 2 else self.includeParamKeyPattern + ) + oprot.writeFieldEnd() + if self.excludeParamKeyPattern is not None: + oprot.writeFieldBegin("excludeParamKeyPattern", TType.STRING, 3) + oprot.writeString( + self.excludeParamKeyPattern.encode("utf-8") if sys.version_info[0] == 2 else self.excludeParamKeyPattern + ) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetTableRequest: + """ + Attributes: + - dbName + - tblName + - capabilities + - catName + - validWriteIdList + - getColumnStats + - processorCapabilities + - processorIdentifier + - engine + - id + + """ + + def __init__( + self, + dbName=None, + tblName=None, + capabilities=None, + catName=None, + validWriteIdList=None, + getColumnStats=None, + processorCapabilities=None, + processorIdentifier=None, + engine=None, + id=-1, + ): + self.dbName = dbName + self.tblName = tblName + self.capabilities = capabilities + self.catName = catName + self.validWriteIdList = validWriteIdList + self.getColumnStats = getColumnStats + self.processorCapabilities = processorCapabilities + self.processorIdentifier = processorIdentifier + self.engine = engine + self.id = id + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tblName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.capabilities = ClientCapabilities() + self.capabilities.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.validWriteIdList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + self.getColumnStats = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.LIST: + self.processorCapabilities = [] + (_etype942, _size939) = iprot.readListBegin() + for _i943 in range(_size939): + _elem944 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.processorCapabilities.append(_elem944) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.STRING: + self.processorIdentifier = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRING: + self.engine = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.I64: + self.id = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetTableRequest") + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 1) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tblName is not None: + oprot.writeFieldBegin("tblName", TType.STRING, 2) + oprot.writeString(self.tblName.encode("utf-8") if sys.version_info[0] == 2 else self.tblName) + oprot.writeFieldEnd() + if self.capabilities is not None: + oprot.writeFieldBegin("capabilities", TType.STRUCT, 3) + self.capabilities.write(oprot) + oprot.writeFieldEnd() + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 4) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.validWriteIdList is not None: + oprot.writeFieldBegin("validWriteIdList", TType.STRING, 6) + oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList) + oprot.writeFieldEnd() + if self.getColumnStats is not None: + oprot.writeFieldBegin("getColumnStats", TType.BOOL, 7) + oprot.writeBool(self.getColumnStats) + oprot.writeFieldEnd() + if self.processorCapabilities is not None: + oprot.writeFieldBegin("processorCapabilities", TType.LIST, 8) + oprot.writeListBegin(TType.STRING, len(self.processorCapabilities)) + for iter945 in self.processorCapabilities: + oprot.writeString(iter945.encode("utf-8") if sys.version_info[0] == 2 else iter945) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.processorIdentifier is not None: + oprot.writeFieldBegin("processorIdentifier", TType.STRING, 9) + oprot.writeString(self.processorIdentifier.encode("utf-8") if sys.version_info[0] == 2 else self.processorIdentifier) + oprot.writeFieldEnd() + if self.engine is not None: + oprot.writeFieldBegin("engine", TType.STRING, 10) + oprot.writeString(self.engine.encode("utf-8") if sys.version_info[0] == 2 else self.engine) + oprot.writeFieldEnd() + if self.id is not None: + oprot.writeFieldBegin("id", TType.I64, 11) + oprot.writeI64(self.id) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.tblName is None: + raise TProtocolException(message="Required field tblName is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetTableResult: + """ + Attributes: + - table + - isStatsCompliant + + """ + + def __init__( + self, + table=None, + isStatsCompliant=None, + ): + self.table = table + self.isStatsCompliant = isStatsCompliant + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.table = Table() + self.table.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.isStatsCompliant = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetTableResult") + if self.table is not None: + oprot.writeFieldBegin("table", TType.STRUCT, 1) + self.table.write(oprot) + oprot.writeFieldEnd() + if self.isStatsCompliant is not None: + oprot.writeFieldBegin("isStatsCompliant", TType.BOOL, 2) + oprot.writeBool(self.isStatsCompliant) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.table is None: + raise TProtocolException(message="Required field table is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetTablesRequest: + """ + Attributes: + - dbName + - tblNames + - capabilities + - catName + - processorCapabilities + - processorIdentifier + - projectionSpec + - tablesPattern + + """ + + def __init__( + self, + dbName=None, + tblNames=None, + capabilities=None, + catName=None, + processorCapabilities=None, + processorIdentifier=None, + projectionSpec=None, + tablesPattern=None, + ): + self.dbName = dbName + self.tblNames = tblNames + self.capabilities = capabilities + self.catName = catName + self.processorCapabilities = processorCapabilities + self.processorIdentifier = processorIdentifier + self.projectionSpec = projectionSpec + self.tablesPattern = tablesPattern + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.tblNames = [] + (_etype949, _size946) = iprot.readListBegin() + for _i950 in range(_size946): + _elem951 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.tblNames.append(_elem951) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.capabilities = ClientCapabilities() + self.capabilities.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.processorCapabilities = [] + (_etype955, _size952) = iprot.readListBegin() + for _i956 in range(_size952): + _elem957 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.processorCapabilities.append(_elem957) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.processorIdentifier = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRUCT: + self.projectionSpec = GetProjectionsSpec() + self.projectionSpec.read(iprot) + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRING: + self.tablesPattern = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetTablesRequest") + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 1) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tblNames is not None: + oprot.writeFieldBegin("tblNames", TType.LIST, 2) + oprot.writeListBegin(TType.STRING, len(self.tblNames)) + for iter958 in self.tblNames: + oprot.writeString(iter958.encode("utf-8") if sys.version_info[0] == 2 else iter958) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.capabilities is not None: + oprot.writeFieldBegin("capabilities", TType.STRUCT, 3) + self.capabilities.write(oprot) + oprot.writeFieldEnd() + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 4) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.processorCapabilities is not None: + oprot.writeFieldBegin("processorCapabilities", TType.LIST, 5) + oprot.writeListBegin(TType.STRING, len(self.processorCapabilities)) + for iter959 in self.processorCapabilities: + oprot.writeString(iter959.encode("utf-8") if sys.version_info[0] == 2 else iter959) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.processorIdentifier is not None: + oprot.writeFieldBegin("processorIdentifier", TType.STRING, 6) + oprot.writeString(self.processorIdentifier.encode("utf-8") if sys.version_info[0] == 2 else self.processorIdentifier) + oprot.writeFieldEnd() + if self.projectionSpec is not None: + oprot.writeFieldBegin("projectionSpec", TType.STRUCT, 7) + self.projectionSpec.write(oprot) + oprot.writeFieldEnd() + if self.tablesPattern is not None: + oprot.writeFieldBegin("tablesPattern", TType.STRING, 8) + oprot.writeString(self.tablesPattern.encode("utf-8") if sys.version_info[0] == 2 else self.tablesPattern) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetTablesResult: + """ + Attributes: + - tables + + """ + + def __init__( + self, + tables=None, + ): + self.tables = tables + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.tables = [] + (_etype963, _size960) = iprot.readListBegin() + for _i964 in range(_size960): + _elem965 = Table() + _elem965.read(iprot) + self.tables.append(_elem965) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetTablesResult") + if self.tables is not None: + oprot.writeFieldBegin("tables", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.tables)) + for iter966 in self.tables: + iter966.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.tables is None: + raise TProtocolException(message="Required field tables is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetTablesExtRequest: + """ + Attributes: + - catalog + - database + - tableNamePattern + - requestedFields + - limit + - processorCapabilities + - processorIdentifier + + """ + + def __init__( + self, + catalog=None, + database=None, + tableNamePattern=None, + requestedFields=None, + limit=None, + processorCapabilities=None, + processorIdentifier=None, + ): + self.catalog = catalog + self.database = database + self.tableNamePattern = tableNamePattern + self.requestedFields = requestedFields + self.limit = limit + self.processorCapabilities = processorCapabilities + self.processorIdentifier = processorIdentifier + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catalog = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.database = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tableNamePattern = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.requestedFields = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.limit = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.LIST: + self.processorCapabilities = [] + (_etype970, _size967) = iprot.readListBegin() + for _i971 in range(_size967): + _elem972 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.processorCapabilities.append(_elem972) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.processorIdentifier = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetTablesExtRequest") + if self.catalog is not None: + oprot.writeFieldBegin("catalog", TType.STRING, 1) + oprot.writeString(self.catalog.encode("utf-8") if sys.version_info[0] == 2 else self.catalog) + oprot.writeFieldEnd() + if self.database is not None: + oprot.writeFieldBegin("database", TType.STRING, 2) + oprot.writeString(self.database.encode("utf-8") if sys.version_info[0] == 2 else self.database) + oprot.writeFieldEnd() + if self.tableNamePattern is not None: + oprot.writeFieldBegin("tableNamePattern", TType.STRING, 3) + oprot.writeString(self.tableNamePattern.encode("utf-8") if sys.version_info[0] == 2 else self.tableNamePattern) + oprot.writeFieldEnd() + if self.requestedFields is not None: + oprot.writeFieldBegin("requestedFields", TType.I32, 4) + oprot.writeI32(self.requestedFields) + oprot.writeFieldEnd() + if self.limit is not None: + oprot.writeFieldBegin("limit", TType.I32, 5) + oprot.writeI32(self.limit) + oprot.writeFieldEnd() + if self.processorCapabilities is not None: + oprot.writeFieldBegin("processorCapabilities", TType.LIST, 6) + oprot.writeListBegin(TType.STRING, len(self.processorCapabilities)) + for iter973 in self.processorCapabilities: + oprot.writeString(iter973.encode("utf-8") if sys.version_info[0] == 2 else iter973) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.processorIdentifier is not None: + oprot.writeFieldBegin("processorIdentifier", TType.STRING, 7) + oprot.writeString(self.processorIdentifier.encode("utf-8") if sys.version_info[0] == 2 else self.processorIdentifier) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.catalog is None: + raise TProtocolException(message="Required field catalog is unset!") + if self.database is None: + raise TProtocolException(message="Required field database is unset!") + if self.tableNamePattern is None: + raise TProtocolException(message="Required field tableNamePattern is unset!") + if self.requestedFields is None: + raise TProtocolException(message="Required field requestedFields is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ExtendedTableInfo: + """ + Attributes: + - tblName + - accessType + - requiredReadCapabilities + - requiredWriteCapabilities + + """ + + def __init__( + self, + tblName=None, + accessType=None, + requiredReadCapabilities=None, + requiredWriteCapabilities=None, + ): + self.tblName = tblName + self.accessType = accessType + self.requiredReadCapabilities = requiredReadCapabilities + self.requiredWriteCapabilities = requiredWriteCapabilities + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tblName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.accessType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.requiredReadCapabilities = [] + (_etype977, _size974) = iprot.readListBegin() + for _i978 in range(_size974): + _elem979 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.requiredReadCapabilities.append(_elem979) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.requiredWriteCapabilities = [] + (_etype983, _size980) = iprot.readListBegin() + for _i984 in range(_size980): + _elem985 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.requiredWriteCapabilities.append(_elem985) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ExtendedTableInfo") + if self.tblName is not None: + oprot.writeFieldBegin("tblName", TType.STRING, 1) + oprot.writeString(self.tblName.encode("utf-8") if sys.version_info[0] == 2 else self.tblName) + oprot.writeFieldEnd() + if self.accessType is not None: + oprot.writeFieldBegin("accessType", TType.I32, 2) + oprot.writeI32(self.accessType) + oprot.writeFieldEnd() + if self.requiredReadCapabilities is not None: + oprot.writeFieldBegin("requiredReadCapabilities", TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.requiredReadCapabilities)) + for iter986 in self.requiredReadCapabilities: + oprot.writeString(iter986.encode("utf-8") if sys.version_info[0] == 2 else iter986) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.requiredWriteCapabilities is not None: + oprot.writeFieldBegin("requiredWriteCapabilities", TType.LIST, 4) + oprot.writeListBegin(TType.STRING, len(self.requiredWriteCapabilities)) + for iter987 in self.requiredWriteCapabilities: + oprot.writeString(iter987.encode("utf-8") if sys.version_info[0] == 2 else iter987) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.tblName is None: + raise TProtocolException(message="Required field tblName is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetDatabaseRequest: + """ + Attributes: + - name + - catalogName + - processorCapabilities + - processorIdentifier + + """ + + def __init__( + self, + name=None, + catalogName=None, + processorCapabilities=None, + processorIdentifier=None, + ): + self.name = name + self.catalogName = catalogName + self.processorCapabilities = processorCapabilities + self.processorIdentifier = processorIdentifier + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.catalogName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.processorCapabilities = [] + (_etype991, _size988) = iprot.readListBegin() + for _i992 in range(_size988): + _elem993 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.processorCapabilities.append(_elem993) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.processorIdentifier = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetDatabaseRequest") + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRING, 1) + oprot.writeString(self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + if self.catalogName is not None: + oprot.writeFieldBegin("catalogName", TType.STRING, 2) + oprot.writeString(self.catalogName.encode("utf-8") if sys.version_info[0] == 2 else self.catalogName) + oprot.writeFieldEnd() + if self.processorCapabilities is not None: + oprot.writeFieldBegin("processorCapabilities", TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.processorCapabilities)) + for iter994 in self.processorCapabilities: + oprot.writeString(iter994.encode("utf-8") if sys.version_info[0] == 2 else iter994) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.processorIdentifier is not None: + oprot.writeFieldBegin("processorIdentifier", TType.STRING, 4) + oprot.writeString(self.processorIdentifier.encode("utf-8") if sys.version_info[0] == 2 else self.processorIdentifier) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class DropDatabaseRequest: + """ + Attributes: + - name + - catalogName + - ignoreUnknownDb + - deleteData + - cascade + - softDelete + - txnId + - deleteManagedDir + + """ + + def __init__( + self, + name=None, + catalogName=None, + ignoreUnknownDb=None, + deleteData=None, + cascade=None, + softDelete=False, + txnId=0, + deleteManagedDir=True, + ): + self.name = name + self.catalogName = catalogName + self.ignoreUnknownDb = ignoreUnknownDb + self.deleteData = deleteData + self.cascade = cascade + self.softDelete = softDelete + self.txnId = txnId + self.deleteManagedDir = deleteManagedDir + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.catalogName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.ignoreUnknownDb = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.BOOL: + self.cascade = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.BOOL: + self.softDelete = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I64: + self.txnId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.BOOL: + self.deleteManagedDir = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("DropDatabaseRequest") + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRING, 1) + oprot.writeString(self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + if self.catalogName is not None: + oprot.writeFieldBegin("catalogName", TType.STRING, 2) + oprot.writeString(self.catalogName.encode("utf-8") if sys.version_info[0] == 2 else self.catalogName) + oprot.writeFieldEnd() + if self.ignoreUnknownDb is not None: + oprot.writeFieldBegin("ignoreUnknownDb", TType.BOOL, 3) + oprot.writeBool(self.ignoreUnknownDb) + oprot.writeFieldEnd() + if self.deleteData is not None: + oprot.writeFieldBegin("deleteData", TType.BOOL, 4) + oprot.writeBool(self.deleteData) + oprot.writeFieldEnd() + if self.cascade is not None: + oprot.writeFieldBegin("cascade", TType.BOOL, 5) + oprot.writeBool(self.cascade) + oprot.writeFieldEnd() + if self.softDelete is not None: + oprot.writeFieldBegin("softDelete", TType.BOOL, 6) + oprot.writeBool(self.softDelete) + oprot.writeFieldEnd() + if self.txnId is not None: + oprot.writeFieldBegin("txnId", TType.I64, 7) + oprot.writeI64(self.txnId) + oprot.writeFieldEnd() + if self.deleteManagedDir is not None: + oprot.writeFieldBegin("deleteManagedDir", TType.BOOL, 8) + oprot.writeBool(self.deleteManagedDir) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.name is None: + raise TProtocolException(message="Required field name is unset!") + if self.ignoreUnknownDb is None: + raise TProtocolException(message="Required field ignoreUnknownDb is unset!") + if self.deleteData is None: + raise TProtocolException(message="Required field deleteData is unset!") + if self.cascade is None: + raise TProtocolException(message="Required field cascade is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class CmRecycleRequest: + """ + Attributes: + - dataPath + - purge + + """ + + def __init__( + self, + dataPath=None, + purge=None, + ): + self.dataPath = dataPath + self.purge = purge + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dataPath = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.purge = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("CmRecycleRequest") + if self.dataPath is not None: + oprot.writeFieldBegin("dataPath", TType.STRING, 1) + oprot.writeString(self.dataPath.encode("utf-8") if sys.version_info[0] == 2 else self.dataPath) + oprot.writeFieldEnd() + if self.purge is not None: + oprot.writeFieldBegin("purge", TType.BOOL, 2) + oprot.writeBool(self.purge) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dataPath is None: + raise TProtocolException(message="Required field dataPath is unset!") + if self.purge is None: + raise TProtocolException(message="Required field purge is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class CmRecycleResponse: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("CmRecycleResponse") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TableMeta: + """ + Attributes: + - dbName + - tableName + - tableType + - comments + - catName + + """ + + def __init__( + self, + dbName=None, + tableName=None, + tableType=None, + comments=None, + catName=None, + ): + self.dbName = dbName + self.tableName = tableName + self.tableType = tableType + self.comments = comments + self.catName = catName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tableName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tableType = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.comments = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("TableMeta") + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 1) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tableName is not None: + oprot.writeFieldBegin("tableName", TType.STRING, 2) + oprot.writeString(self.tableName.encode("utf-8") if sys.version_info[0] == 2 else self.tableName) + oprot.writeFieldEnd() + if self.tableType is not None: + oprot.writeFieldBegin("tableType", TType.STRING, 3) + oprot.writeString(self.tableType.encode("utf-8") if sys.version_info[0] == 2 else self.tableType) + oprot.writeFieldEnd() + if self.comments is not None: + oprot.writeFieldBegin("comments", TType.STRING, 4) + oprot.writeString(self.comments.encode("utf-8") if sys.version_info[0] == 2 else self.comments) + oprot.writeFieldEnd() + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 5) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.tableName is None: + raise TProtocolException(message="Required field tableName is unset!") + if self.tableType is None: + raise TProtocolException(message="Required field tableType is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class Materialization: + """ + Attributes: + - sourceTablesUpdateDeleteModified + - sourceTablesCompacted + + """ + + def __init__( + self, + sourceTablesUpdateDeleteModified=None, + sourceTablesCompacted=None, + ): + self.sourceTablesUpdateDeleteModified = sourceTablesUpdateDeleteModified + self.sourceTablesCompacted = sourceTablesCompacted + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.BOOL: + self.sourceTablesUpdateDeleteModified = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.sourceTablesCompacted = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("Materialization") + if self.sourceTablesUpdateDeleteModified is not None: + oprot.writeFieldBegin("sourceTablesUpdateDeleteModified", TType.BOOL, 1) + oprot.writeBool(self.sourceTablesUpdateDeleteModified) + oprot.writeFieldEnd() + if self.sourceTablesCompacted is not None: + oprot.writeFieldBegin("sourceTablesCompacted", TType.BOOL, 2) + oprot.writeBool(self.sourceTablesCompacted) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.sourceTablesUpdateDeleteModified is None: + raise TProtocolException(message="Required field sourceTablesUpdateDeleteModified is unset!") + if self.sourceTablesCompacted is None: + raise TProtocolException(message="Required field sourceTablesCompacted is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMResourcePlan: + """ + Attributes: + - name + - status + - queryParallelism + - defaultPoolPath + - ns + + """ + + def __init__( + self, + name=None, + status=None, + queryParallelism=None, + defaultPoolPath=None, + ns=None, + ): + self.name = name + self.status = status + self.queryParallelism = queryParallelism + self.defaultPoolPath = defaultPoolPath + self.ns = ns + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.status = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.queryParallelism = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.defaultPoolPath = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.ns = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMResourcePlan") + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRING, 1) + oprot.writeString(self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + if self.status is not None: + oprot.writeFieldBegin("status", TType.I32, 2) + oprot.writeI32(self.status) + oprot.writeFieldEnd() + if self.queryParallelism is not None: + oprot.writeFieldBegin("queryParallelism", TType.I32, 3) + oprot.writeI32(self.queryParallelism) + oprot.writeFieldEnd() + if self.defaultPoolPath is not None: + oprot.writeFieldBegin("defaultPoolPath", TType.STRING, 4) + oprot.writeString(self.defaultPoolPath.encode("utf-8") if sys.version_info[0] == 2 else self.defaultPoolPath) + oprot.writeFieldEnd() + if self.ns is not None: + oprot.writeFieldBegin("ns", TType.STRING, 5) + oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.name is None: + raise TProtocolException(message="Required field name is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMNullableResourcePlan: + """ + Attributes: + - name + - status + - queryParallelism + - isSetQueryParallelism + - defaultPoolPath + - isSetDefaultPoolPath + - ns + + """ + + def __init__( + self, + name=None, + status=None, + queryParallelism=None, + isSetQueryParallelism=None, + defaultPoolPath=None, + isSetDefaultPoolPath=None, + ns=None, + ): + self.name = name + self.status = status + self.queryParallelism = queryParallelism + self.isSetQueryParallelism = isSetQueryParallelism + self.defaultPoolPath = defaultPoolPath + self.isSetDefaultPoolPath = isSetDefaultPoolPath + self.ns = ns + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.status = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.queryParallelism = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.BOOL: + self.isSetQueryParallelism = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.defaultPoolPath = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + self.isSetDefaultPoolPath = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRING: + self.ns = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMNullableResourcePlan") + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRING, 1) + oprot.writeString(self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + if self.status is not None: + oprot.writeFieldBegin("status", TType.I32, 2) + oprot.writeI32(self.status) + oprot.writeFieldEnd() + if self.queryParallelism is not None: + oprot.writeFieldBegin("queryParallelism", TType.I32, 4) + oprot.writeI32(self.queryParallelism) + oprot.writeFieldEnd() + if self.isSetQueryParallelism is not None: + oprot.writeFieldBegin("isSetQueryParallelism", TType.BOOL, 5) + oprot.writeBool(self.isSetQueryParallelism) + oprot.writeFieldEnd() + if self.defaultPoolPath is not None: + oprot.writeFieldBegin("defaultPoolPath", TType.STRING, 6) + oprot.writeString(self.defaultPoolPath.encode("utf-8") if sys.version_info[0] == 2 else self.defaultPoolPath) + oprot.writeFieldEnd() + if self.isSetDefaultPoolPath is not None: + oprot.writeFieldBegin("isSetDefaultPoolPath", TType.BOOL, 7) + oprot.writeBool(self.isSetDefaultPoolPath) + oprot.writeFieldEnd() + if self.ns is not None: + oprot.writeFieldBegin("ns", TType.STRING, 8) + oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMPool: + """ + Attributes: + - resourcePlanName + - poolPath + - allocFraction + - queryParallelism + - schedulingPolicy + - ns + + """ + + def __init__( + self, + resourcePlanName=None, + poolPath=None, + allocFraction=None, + queryParallelism=None, + schedulingPolicy=None, + ns=None, + ): + self.resourcePlanName = resourcePlanName + self.poolPath = poolPath + self.allocFraction = allocFraction + self.queryParallelism = queryParallelism + self.schedulingPolicy = schedulingPolicy + self.ns = ns + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.resourcePlanName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.poolPath = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.DOUBLE: + self.allocFraction = iprot.readDouble() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.queryParallelism = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.schedulingPolicy = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.ns = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMPool") + if self.resourcePlanName is not None: + oprot.writeFieldBegin("resourcePlanName", TType.STRING, 1) + oprot.writeString(self.resourcePlanName.encode("utf-8") if sys.version_info[0] == 2 else self.resourcePlanName) + oprot.writeFieldEnd() + if self.poolPath is not None: + oprot.writeFieldBegin("poolPath", TType.STRING, 2) + oprot.writeString(self.poolPath.encode("utf-8") if sys.version_info[0] == 2 else self.poolPath) + oprot.writeFieldEnd() + if self.allocFraction is not None: + oprot.writeFieldBegin("allocFraction", TType.DOUBLE, 3) + oprot.writeDouble(self.allocFraction) + oprot.writeFieldEnd() + if self.queryParallelism is not None: + oprot.writeFieldBegin("queryParallelism", TType.I32, 4) + oprot.writeI32(self.queryParallelism) + oprot.writeFieldEnd() + if self.schedulingPolicy is not None: + oprot.writeFieldBegin("schedulingPolicy", TType.STRING, 5) + oprot.writeString(self.schedulingPolicy.encode("utf-8") if sys.version_info[0] == 2 else self.schedulingPolicy) + oprot.writeFieldEnd() + if self.ns is not None: + oprot.writeFieldBegin("ns", TType.STRING, 6) + oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.resourcePlanName is None: + raise TProtocolException(message="Required field resourcePlanName is unset!") + if self.poolPath is None: + raise TProtocolException(message="Required field poolPath is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMNullablePool: + """ + Attributes: + - resourcePlanName + - poolPath + - allocFraction + - queryParallelism + - schedulingPolicy + - isSetSchedulingPolicy + - ns + + """ + + def __init__( + self, + resourcePlanName=None, + poolPath=None, + allocFraction=None, + queryParallelism=None, + schedulingPolicy=None, + isSetSchedulingPolicy=None, + ns=None, + ): + self.resourcePlanName = resourcePlanName + self.poolPath = poolPath + self.allocFraction = allocFraction + self.queryParallelism = queryParallelism + self.schedulingPolicy = schedulingPolicy + self.isSetSchedulingPolicy = isSetSchedulingPolicy + self.ns = ns + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.resourcePlanName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.poolPath = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.DOUBLE: + self.allocFraction = iprot.readDouble() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.queryParallelism = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.schedulingPolicy = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.BOOL: + self.isSetSchedulingPolicy = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.ns = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMNullablePool") + if self.resourcePlanName is not None: + oprot.writeFieldBegin("resourcePlanName", TType.STRING, 1) + oprot.writeString(self.resourcePlanName.encode("utf-8") if sys.version_info[0] == 2 else self.resourcePlanName) + oprot.writeFieldEnd() + if self.poolPath is not None: + oprot.writeFieldBegin("poolPath", TType.STRING, 2) + oprot.writeString(self.poolPath.encode("utf-8") if sys.version_info[0] == 2 else self.poolPath) + oprot.writeFieldEnd() + if self.allocFraction is not None: + oprot.writeFieldBegin("allocFraction", TType.DOUBLE, 3) + oprot.writeDouble(self.allocFraction) + oprot.writeFieldEnd() + if self.queryParallelism is not None: + oprot.writeFieldBegin("queryParallelism", TType.I32, 4) + oprot.writeI32(self.queryParallelism) + oprot.writeFieldEnd() + if self.schedulingPolicy is not None: + oprot.writeFieldBegin("schedulingPolicy", TType.STRING, 5) + oprot.writeString(self.schedulingPolicy.encode("utf-8") if sys.version_info[0] == 2 else self.schedulingPolicy) + oprot.writeFieldEnd() + if self.isSetSchedulingPolicy is not None: + oprot.writeFieldBegin("isSetSchedulingPolicy", TType.BOOL, 6) + oprot.writeBool(self.isSetSchedulingPolicy) + oprot.writeFieldEnd() + if self.ns is not None: + oprot.writeFieldBegin("ns", TType.STRING, 7) + oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.resourcePlanName is None: + raise TProtocolException(message="Required field resourcePlanName is unset!") + if self.poolPath is None: + raise TProtocolException(message="Required field poolPath is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMTrigger: + """ + Attributes: + - resourcePlanName + - triggerName + - triggerExpression + - actionExpression + - isInUnmanaged + - ns + + """ + + def __init__( + self, + resourcePlanName=None, + triggerName=None, + triggerExpression=None, + actionExpression=None, + isInUnmanaged=None, + ns=None, + ): + self.resourcePlanName = resourcePlanName + self.triggerName = triggerName + self.triggerExpression = triggerExpression + self.actionExpression = actionExpression + self.isInUnmanaged = isInUnmanaged + self.ns = ns + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.resourcePlanName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.triggerName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.triggerExpression = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.actionExpression = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.BOOL: + self.isInUnmanaged = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.ns = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMTrigger") + if self.resourcePlanName is not None: + oprot.writeFieldBegin("resourcePlanName", TType.STRING, 1) + oprot.writeString(self.resourcePlanName.encode("utf-8") if sys.version_info[0] == 2 else self.resourcePlanName) + oprot.writeFieldEnd() + if self.triggerName is not None: + oprot.writeFieldBegin("triggerName", TType.STRING, 2) + oprot.writeString(self.triggerName.encode("utf-8") if sys.version_info[0] == 2 else self.triggerName) + oprot.writeFieldEnd() + if self.triggerExpression is not None: + oprot.writeFieldBegin("triggerExpression", TType.STRING, 3) + oprot.writeString(self.triggerExpression.encode("utf-8") if sys.version_info[0] == 2 else self.triggerExpression) + oprot.writeFieldEnd() + if self.actionExpression is not None: + oprot.writeFieldBegin("actionExpression", TType.STRING, 4) + oprot.writeString(self.actionExpression.encode("utf-8") if sys.version_info[0] == 2 else self.actionExpression) + oprot.writeFieldEnd() + if self.isInUnmanaged is not None: + oprot.writeFieldBegin("isInUnmanaged", TType.BOOL, 5) + oprot.writeBool(self.isInUnmanaged) + oprot.writeFieldEnd() + if self.ns is not None: + oprot.writeFieldBegin("ns", TType.STRING, 6) + oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.resourcePlanName is None: + raise TProtocolException(message="Required field resourcePlanName is unset!") + if self.triggerName is None: + raise TProtocolException(message="Required field triggerName is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMMapping: + """ + Attributes: + - resourcePlanName + - entityType + - entityName + - poolPath + - ordering + - ns + + """ + + def __init__( + self, + resourcePlanName=None, + entityType=None, + entityName=None, + poolPath=None, + ordering=None, + ns=None, + ): + self.resourcePlanName = resourcePlanName + self.entityType = entityType + self.entityName = entityName + self.poolPath = poolPath + self.ordering = ordering + self.ns = ns + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.resourcePlanName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.entityType = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.entityName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.poolPath = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.ordering = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.ns = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMMapping") + if self.resourcePlanName is not None: + oprot.writeFieldBegin("resourcePlanName", TType.STRING, 1) + oprot.writeString(self.resourcePlanName.encode("utf-8") if sys.version_info[0] == 2 else self.resourcePlanName) + oprot.writeFieldEnd() + if self.entityType is not None: + oprot.writeFieldBegin("entityType", TType.STRING, 2) + oprot.writeString(self.entityType.encode("utf-8") if sys.version_info[0] == 2 else self.entityType) + oprot.writeFieldEnd() + if self.entityName is not None: + oprot.writeFieldBegin("entityName", TType.STRING, 3) + oprot.writeString(self.entityName.encode("utf-8") if sys.version_info[0] == 2 else self.entityName) + oprot.writeFieldEnd() + if self.poolPath is not None: + oprot.writeFieldBegin("poolPath", TType.STRING, 4) + oprot.writeString(self.poolPath.encode("utf-8") if sys.version_info[0] == 2 else self.poolPath) + oprot.writeFieldEnd() + if self.ordering is not None: + oprot.writeFieldBegin("ordering", TType.I32, 5) + oprot.writeI32(self.ordering) + oprot.writeFieldEnd() + if self.ns is not None: + oprot.writeFieldBegin("ns", TType.STRING, 6) + oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.resourcePlanName is None: + raise TProtocolException(message="Required field resourcePlanName is unset!") + if self.entityType is None: + raise TProtocolException(message="Required field entityType is unset!") + if self.entityName is None: + raise TProtocolException(message="Required field entityName is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMPoolTrigger: + """ + Attributes: + - pool + - trigger + - ns + + """ + + def __init__( + self, + pool=None, + trigger=None, + ns=None, + ): + self.pool = pool + self.trigger = trigger + self.ns = ns + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.pool = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.trigger = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.ns = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMPoolTrigger") + if self.pool is not None: + oprot.writeFieldBegin("pool", TType.STRING, 1) + oprot.writeString(self.pool.encode("utf-8") if sys.version_info[0] == 2 else self.pool) + oprot.writeFieldEnd() + if self.trigger is not None: + oprot.writeFieldBegin("trigger", TType.STRING, 2) + oprot.writeString(self.trigger.encode("utf-8") if sys.version_info[0] == 2 else self.trigger) + oprot.writeFieldEnd() + if self.ns is not None: + oprot.writeFieldBegin("ns", TType.STRING, 3) + oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.pool is None: + raise TProtocolException(message="Required field pool is unset!") + if self.trigger is None: + raise TProtocolException(message="Required field trigger is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMFullResourcePlan: + """ + Attributes: + - plan + - pools + - mappings + - triggers + - poolTriggers + + """ + + def __init__( + self, + plan=None, + pools=None, + mappings=None, + triggers=None, + poolTriggers=None, + ): + self.plan = plan + self.pools = pools + self.mappings = mappings + self.triggers = triggers + self.poolTriggers = poolTriggers + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.plan = WMResourcePlan() + self.plan.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.pools = [] + (_etype998, _size995) = iprot.readListBegin() + for _i999 in range(_size995): + _elem1000 = WMPool() + _elem1000.read(iprot) + self.pools.append(_elem1000) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.mappings = [] + (_etype1004, _size1001) = iprot.readListBegin() + for _i1005 in range(_size1001): + _elem1006 = WMMapping() + _elem1006.read(iprot) + self.mappings.append(_elem1006) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.triggers = [] + (_etype1010, _size1007) = iprot.readListBegin() + for _i1011 in range(_size1007): + _elem1012 = WMTrigger() + _elem1012.read(iprot) + self.triggers.append(_elem1012) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.poolTriggers = [] + (_etype1016, _size1013) = iprot.readListBegin() + for _i1017 in range(_size1013): + _elem1018 = WMPoolTrigger() + _elem1018.read(iprot) + self.poolTriggers.append(_elem1018) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMFullResourcePlan") + if self.plan is not None: + oprot.writeFieldBegin("plan", TType.STRUCT, 1) + self.plan.write(oprot) + oprot.writeFieldEnd() + if self.pools is not None: + oprot.writeFieldBegin("pools", TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.pools)) + for iter1019 in self.pools: + iter1019.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.mappings is not None: + oprot.writeFieldBegin("mappings", TType.LIST, 3) + oprot.writeListBegin(TType.STRUCT, len(self.mappings)) + for iter1020 in self.mappings: + iter1020.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.triggers is not None: + oprot.writeFieldBegin("triggers", TType.LIST, 4) + oprot.writeListBegin(TType.STRUCT, len(self.triggers)) + for iter1021 in self.triggers: + iter1021.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.poolTriggers is not None: + oprot.writeFieldBegin("poolTriggers", TType.LIST, 5) + oprot.writeListBegin(TType.STRUCT, len(self.poolTriggers)) + for iter1022 in self.poolTriggers: + iter1022.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.plan is None: + raise TProtocolException(message="Required field plan is unset!") + if self.pools is None: + raise TProtocolException(message="Required field pools is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMCreateResourcePlanRequest: + """ + Attributes: + - resourcePlan + - copyFrom + + """ + + def __init__( + self, + resourcePlan=None, + copyFrom=None, + ): + self.resourcePlan = resourcePlan + self.copyFrom = copyFrom + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.resourcePlan = WMResourcePlan() + self.resourcePlan.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.copyFrom = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMCreateResourcePlanRequest") + if self.resourcePlan is not None: + oprot.writeFieldBegin("resourcePlan", TType.STRUCT, 1) + self.resourcePlan.write(oprot) + oprot.writeFieldEnd() + if self.copyFrom is not None: + oprot.writeFieldBegin("copyFrom", TType.STRING, 2) + oprot.writeString(self.copyFrom.encode("utf-8") if sys.version_info[0] == 2 else self.copyFrom) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMCreateResourcePlanResponse: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMCreateResourcePlanResponse") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMGetActiveResourcePlanRequest: + """ + Attributes: + - ns + + """ + + def __init__( + self, + ns=None, + ): + self.ns = ns + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.ns = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMGetActiveResourcePlanRequest") + if self.ns is not None: + oprot.writeFieldBegin("ns", TType.STRING, 1) + oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMGetActiveResourcePlanResponse: + """ + Attributes: + - resourcePlan + + """ + + def __init__( + self, + resourcePlan=None, + ): + self.resourcePlan = resourcePlan + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.resourcePlan = WMFullResourcePlan() + self.resourcePlan.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMGetActiveResourcePlanResponse") + if self.resourcePlan is not None: + oprot.writeFieldBegin("resourcePlan", TType.STRUCT, 1) + self.resourcePlan.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMGetResourcePlanRequest: + """ + Attributes: + - resourcePlanName + - ns + + """ + + def __init__( + self, + resourcePlanName=None, + ns=None, + ): + self.resourcePlanName = resourcePlanName + self.ns = ns + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.resourcePlanName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.ns = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMGetResourcePlanRequest") + if self.resourcePlanName is not None: + oprot.writeFieldBegin("resourcePlanName", TType.STRING, 1) + oprot.writeString(self.resourcePlanName.encode("utf-8") if sys.version_info[0] == 2 else self.resourcePlanName) + oprot.writeFieldEnd() + if self.ns is not None: + oprot.writeFieldBegin("ns", TType.STRING, 2) + oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMGetResourcePlanResponse: + """ + Attributes: + - resourcePlan + + """ + + def __init__( + self, + resourcePlan=None, + ): + self.resourcePlan = resourcePlan + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.resourcePlan = WMFullResourcePlan() + self.resourcePlan.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMGetResourcePlanResponse") + if self.resourcePlan is not None: + oprot.writeFieldBegin("resourcePlan", TType.STRUCT, 1) + self.resourcePlan.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMGetAllResourcePlanRequest: + """ + Attributes: + - ns + + """ + + def __init__( + self, + ns=None, + ): + self.ns = ns + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.ns = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMGetAllResourcePlanRequest") + if self.ns is not None: + oprot.writeFieldBegin("ns", TType.STRING, 1) + oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMGetAllResourcePlanResponse: + """ + Attributes: + - resourcePlans + + """ + + def __init__( + self, + resourcePlans=None, + ): + self.resourcePlans = resourcePlans + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.resourcePlans = [] + (_etype1026, _size1023) = iprot.readListBegin() + for _i1027 in range(_size1023): + _elem1028 = WMResourcePlan() + _elem1028.read(iprot) + self.resourcePlans.append(_elem1028) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMGetAllResourcePlanResponse") + if self.resourcePlans is not None: + oprot.writeFieldBegin("resourcePlans", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.resourcePlans)) + for iter1029 in self.resourcePlans: + iter1029.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMAlterResourcePlanRequest: + """ + Attributes: + - resourcePlanName + - resourcePlan + - isEnableAndActivate + - isForceDeactivate + - isReplace + - ns + + """ + + def __init__( + self, + resourcePlanName=None, + resourcePlan=None, + isEnableAndActivate=None, + isForceDeactivate=None, + isReplace=None, + ns=None, + ): + self.resourcePlanName = resourcePlanName + self.resourcePlan = resourcePlan + self.isEnableAndActivate = isEnableAndActivate + self.isForceDeactivate = isForceDeactivate + self.isReplace = isReplace + self.ns = ns + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.resourcePlanName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.resourcePlan = WMNullableResourcePlan() + self.resourcePlan.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.isEnableAndActivate = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.isForceDeactivate = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.BOOL: + self.isReplace = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.ns = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMAlterResourcePlanRequest") + if self.resourcePlanName is not None: + oprot.writeFieldBegin("resourcePlanName", TType.STRING, 1) + oprot.writeString(self.resourcePlanName.encode("utf-8") if sys.version_info[0] == 2 else self.resourcePlanName) + oprot.writeFieldEnd() + if self.resourcePlan is not None: + oprot.writeFieldBegin("resourcePlan", TType.STRUCT, 2) + self.resourcePlan.write(oprot) + oprot.writeFieldEnd() + if self.isEnableAndActivate is not None: + oprot.writeFieldBegin("isEnableAndActivate", TType.BOOL, 3) + oprot.writeBool(self.isEnableAndActivate) + oprot.writeFieldEnd() + if self.isForceDeactivate is not None: + oprot.writeFieldBegin("isForceDeactivate", TType.BOOL, 4) + oprot.writeBool(self.isForceDeactivate) + oprot.writeFieldEnd() + if self.isReplace is not None: + oprot.writeFieldBegin("isReplace", TType.BOOL, 5) + oprot.writeBool(self.isReplace) + oprot.writeFieldEnd() + if self.ns is not None: + oprot.writeFieldBegin("ns", TType.STRING, 6) + oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMAlterResourcePlanResponse: + """ + Attributes: + - fullResourcePlan + + """ + + def __init__( + self, + fullResourcePlan=None, + ): + self.fullResourcePlan = fullResourcePlan + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.fullResourcePlan = WMFullResourcePlan() + self.fullResourcePlan.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMAlterResourcePlanResponse") + if self.fullResourcePlan is not None: + oprot.writeFieldBegin("fullResourcePlan", TType.STRUCT, 1) + self.fullResourcePlan.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMValidateResourcePlanRequest: + """ + Attributes: + - resourcePlanName + - ns + + """ + + def __init__( + self, + resourcePlanName=None, + ns=None, + ): + self.resourcePlanName = resourcePlanName + self.ns = ns + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.resourcePlanName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.ns = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMValidateResourcePlanRequest") + if self.resourcePlanName is not None: + oprot.writeFieldBegin("resourcePlanName", TType.STRING, 1) + oprot.writeString(self.resourcePlanName.encode("utf-8") if sys.version_info[0] == 2 else self.resourcePlanName) + oprot.writeFieldEnd() + if self.ns is not None: + oprot.writeFieldBegin("ns", TType.STRING, 2) + oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMValidateResourcePlanResponse: + """ + Attributes: + - errors + - warnings + + """ + + def __init__( + self, + errors=None, + warnings=None, + ): + self.errors = errors + self.warnings = warnings + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.errors = [] + (_etype1033, _size1030) = iprot.readListBegin() + for _i1034 in range(_size1030): + _elem1035 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.errors.append(_elem1035) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.warnings = [] + (_etype1039, _size1036) = iprot.readListBegin() + for _i1040 in range(_size1036): + _elem1041 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.warnings.append(_elem1041) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMValidateResourcePlanResponse") + if self.errors is not None: + oprot.writeFieldBegin("errors", TType.LIST, 1) + oprot.writeListBegin(TType.STRING, len(self.errors)) + for iter1042 in self.errors: + oprot.writeString(iter1042.encode("utf-8") if sys.version_info[0] == 2 else iter1042) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.warnings is not None: + oprot.writeFieldBegin("warnings", TType.LIST, 2) + oprot.writeListBegin(TType.STRING, len(self.warnings)) + for iter1043 in self.warnings: + oprot.writeString(iter1043.encode("utf-8") if sys.version_info[0] == 2 else iter1043) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMDropResourcePlanRequest: + """ + Attributes: + - resourcePlanName + - ns + + """ + + def __init__( + self, + resourcePlanName=None, + ns=None, + ): + self.resourcePlanName = resourcePlanName + self.ns = ns + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.resourcePlanName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.ns = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMDropResourcePlanRequest") + if self.resourcePlanName is not None: + oprot.writeFieldBegin("resourcePlanName", TType.STRING, 1) + oprot.writeString(self.resourcePlanName.encode("utf-8") if sys.version_info[0] == 2 else self.resourcePlanName) + oprot.writeFieldEnd() + if self.ns is not None: + oprot.writeFieldBegin("ns", TType.STRING, 2) + oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMDropResourcePlanResponse: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMDropResourcePlanResponse") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMCreateTriggerRequest: + """ + Attributes: + - trigger + + """ + + def __init__( + self, + trigger=None, + ): + self.trigger = trigger + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.trigger = WMTrigger() + self.trigger.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMCreateTriggerRequest") + if self.trigger is not None: + oprot.writeFieldBegin("trigger", TType.STRUCT, 1) + self.trigger.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMCreateTriggerResponse: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMCreateTriggerResponse") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMAlterTriggerRequest: + """ + Attributes: + - trigger + + """ + + def __init__( + self, + trigger=None, + ): + self.trigger = trigger + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.trigger = WMTrigger() + self.trigger.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMAlterTriggerRequest") + if self.trigger is not None: + oprot.writeFieldBegin("trigger", TType.STRUCT, 1) + self.trigger.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMAlterTriggerResponse: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMAlterTriggerResponse") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMDropTriggerRequest: + """ + Attributes: + - resourcePlanName + - triggerName + - ns + + """ + + def __init__( + self, + resourcePlanName=None, + triggerName=None, + ns=None, + ): + self.resourcePlanName = resourcePlanName + self.triggerName = triggerName + self.ns = ns + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.resourcePlanName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.triggerName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.ns = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMDropTriggerRequest") + if self.resourcePlanName is not None: + oprot.writeFieldBegin("resourcePlanName", TType.STRING, 1) + oprot.writeString(self.resourcePlanName.encode("utf-8") if sys.version_info[0] == 2 else self.resourcePlanName) + oprot.writeFieldEnd() + if self.triggerName is not None: + oprot.writeFieldBegin("triggerName", TType.STRING, 2) + oprot.writeString(self.triggerName.encode("utf-8") if sys.version_info[0] == 2 else self.triggerName) + oprot.writeFieldEnd() + if self.ns is not None: + oprot.writeFieldBegin("ns", TType.STRING, 3) + oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMDropTriggerResponse: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMDropTriggerResponse") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMGetTriggersForResourePlanRequest: + """ + Attributes: + - resourcePlanName + - ns + + """ + + def __init__( + self, + resourcePlanName=None, + ns=None, + ): + self.resourcePlanName = resourcePlanName + self.ns = ns + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.resourcePlanName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.ns = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMGetTriggersForResourePlanRequest") + if self.resourcePlanName is not None: + oprot.writeFieldBegin("resourcePlanName", TType.STRING, 1) + oprot.writeString(self.resourcePlanName.encode("utf-8") if sys.version_info[0] == 2 else self.resourcePlanName) + oprot.writeFieldEnd() + if self.ns is not None: + oprot.writeFieldBegin("ns", TType.STRING, 2) + oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMGetTriggersForResourePlanResponse: + """ + Attributes: + - triggers + + """ + + def __init__( + self, + triggers=None, + ): + self.triggers = triggers + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.triggers = [] + (_etype1047, _size1044) = iprot.readListBegin() + for _i1048 in range(_size1044): + _elem1049 = WMTrigger() + _elem1049.read(iprot) + self.triggers.append(_elem1049) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMGetTriggersForResourePlanResponse") + if self.triggers is not None: + oprot.writeFieldBegin("triggers", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.triggers)) + for iter1050 in self.triggers: + iter1050.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMCreatePoolRequest: + """ + Attributes: + - pool + + """ + + def __init__( + self, + pool=None, + ): + self.pool = pool + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.pool = WMPool() + self.pool.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMCreatePoolRequest") + if self.pool is not None: + oprot.writeFieldBegin("pool", TType.STRUCT, 1) + self.pool.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMCreatePoolResponse: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMCreatePoolResponse") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMAlterPoolRequest: + """ + Attributes: + - pool + - poolPath + + """ + + def __init__( + self, + pool=None, + poolPath=None, + ): + self.pool = pool + self.poolPath = poolPath + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.pool = WMNullablePool() + self.pool.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.poolPath = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMAlterPoolRequest") + if self.pool is not None: + oprot.writeFieldBegin("pool", TType.STRUCT, 1) + self.pool.write(oprot) + oprot.writeFieldEnd() + if self.poolPath is not None: + oprot.writeFieldBegin("poolPath", TType.STRING, 2) + oprot.writeString(self.poolPath.encode("utf-8") if sys.version_info[0] == 2 else self.poolPath) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMAlterPoolResponse: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMAlterPoolResponse") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMDropPoolRequest: + """ + Attributes: + - resourcePlanName + - poolPath + - ns + + """ + + def __init__( + self, + resourcePlanName=None, + poolPath=None, + ns=None, + ): + self.resourcePlanName = resourcePlanName + self.poolPath = poolPath + self.ns = ns + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.resourcePlanName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.poolPath = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.ns = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMDropPoolRequest") + if self.resourcePlanName is not None: + oprot.writeFieldBegin("resourcePlanName", TType.STRING, 1) + oprot.writeString(self.resourcePlanName.encode("utf-8") if sys.version_info[0] == 2 else self.resourcePlanName) + oprot.writeFieldEnd() + if self.poolPath is not None: + oprot.writeFieldBegin("poolPath", TType.STRING, 2) + oprot.writeString(self.poolPath.encode("utf-8") if sys.version_info[0] == 2 else self.poolPath) + oprot.writeFieldEnd() + if self.ns is not None: + oprot.writeFieldBegin("ns", TType.STRING, 3) + oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMDropPoolResponse: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMDropPoolResponse") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMCreateOrUpdateMappingRequest: + """ + Attributes: + - mapping + - update + + """ + + def __init__( + self, + mapping=None, + update=None, + ): + self.mapping = mapping + self.update = update + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.mapping = WMMapping() + self.mapping.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.update = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMCreateOrUpdateMappingRequest") + if self.mapping is not None: + oprot.writeFieldBegin("mapping", TType.STRUCT, 1) + self.mapping.write(oprot) + oprot.writeFieldEnd() + if self.update is not None: + oprot.writeFieldBegin("update", TType.BOOL, 2) + oprot.writeBool(self.update) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMCreateOrUpdateMappingResponse: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMCreateOrUpdateMappingResponse") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMDropMappingRequest: + """ + Attributes: + - mapping + + """ + + def __init__( + self, + mapping=None, + ): + self.mapping = mapping + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.mapping = WMMapping() + self.mapping.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMDropMappingRequest") + if self.mapping is not None: + oprot.writeFieldBegin("mapping", TType.STRUCT, 1) + self.mapping.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMDropMappingResponse: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMDropMappingResponse") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMCreateOrDropTriggerToPoolMappingRequest: + """ + Attributes: + - resourcePlanName + - triggerName + - poolPath + - drop + - ns + + """ + + def __init__( + self, + resourcePlanName=None, + triggerName=None, + poolPath=None, + drop=None, + ns=None, + ): + self.resourcePlanName = resourcePlanName + self.triggerName = triggerName + self.poolPath = poolPath + self.drop = drop + self.ns = ns + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.resourcePlanName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.triggerName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.poolPath = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.drop = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.ns = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMCreateOrDropTriggerToPoolMappingRequest") + if self.resourcePlanName is not None: + oprot.writeFieldBegin("resourcePlanName", TType.STRING, 1) + oprot.writeString(self.resourcePlanName.encode("utf-8") if sys.version_info[0] == 2 else self.resourcePlanName) + oprot.writeFieldEnd() + if self.triggerName is not None: + oprot.writeFieldBegin("triggerName", TType.STRING, 2) + oprot.writeString(self.triggerName.encode("utf-8") if sys.version_info[0] == 2 else self.triggerName) + oprot.writeFieldEnd() + if self.poolPath is not None: + oprot.writeFieldBegin("poolPath", TType.STRING, 3) + oprot.writeString(self.poolPath.encode("utf-8") if sys.version_info[0] == 2 else self.poolPath) + oprot.writeFieldEnd() + if self.drop is not None: + oprot.writeFieldBegin("drop", TType.BOOL, 4) + oprot.writeBool(self.drop) + oprot.writeFieldEnd() + if self.ns is not None: + oprot.writeFieldBegin("ns", TType.STRING, 5) + oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class WMCreateOrDropTriggerToPoolMappingResponse: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("WMCreateOrDropTriggerToPoolMappingResponse") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ISchema: + """ + Attributes: + - schemaType + - name + - catName + - dbName + - compatibility + - validationLevel + - canEvolve + - schemaGroup + - description + + """ + + def __init__( + self, + schemaType=None, + name=None, + catName=None, + dbName=None, + compatibility=None, + validationLevel=None, + canEvolve=None, + schemaGroup=None, + description=None, + ): + self.schemaType = schemaType + self.name = name + self.catName = catName + self.dbName = dbName + self.compatibility = compatibility + self.validationLevel = validationLevel + self.canEvolve = canEvolve + self.schemaGroup = schemaGroup + self.description = description + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.schemaType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.compatibility = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.validationLevel = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + self.canEvolve = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRING: + self.schemaGroup = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.STRING: + self.description = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ISchema") + if self.schemaType is not None: + oprot.writeFieldBegin("schemaType", TType.I32, 1) + oprot.writeI32(self.schemaType) + oprot.writeFieldEnd() + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRING, 2) + oprot.writeString(self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 3) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 4) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.compatibility is not None: + oprot.writeFieldBegin("compatibility", TType.I32, 5) + oprot.writeI32(self.compatibility) + oprot.writeFieldEnd() + if self.validationLevel is not None: + oprot.writeFieldBegin("validationLevel", TType.I32, 6) + oprot.writeI32(self.validationLevel) + oprot.writeFieldEnd() + if self.canEvolve is not None: + oprot.writeFieldBegin("canEvolve", TType.BOOL, 7) + oprot.writeBool(self.canEvolve) + oprot.writeFieldEnd() + if self.schemaGroup is not None: + oprot.writeFieldBegin("schemaGroup", TType.STRING, 8) + oprot.writeString(self.schemaGroup.encode("utf-8") if sys.version_info[0] == 2 else self.schemaGroup) + oprot.writeFieldEnd() + if self.description is not None: + oprot.writeFieldBegin("description", TType.STRING, 9) + oprot.writeString(self.description.encode("utf-8") if sys.version_info[0] == 2 else self.description) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ISchemaName: + """ + Attributes: + - catName + - dbName + - schemaName + + """ + + def __init__( + self, + catName=None, + dbName=None, + schemaName=None, + ): + self.catName = catName + self.dbName = dbName + self.schemaName = schemaName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.schemaName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ISchemaName") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 2) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.schemaName is not None: + oprot.writeFieldBegin("schemaName", TType.STRING, 3) + oprot.writeString(self.schemaName.encode("utf-8") if sys.version_info[0] == 2 else self.schemaName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class AlterISchemaRequest: + """ + Attributes: + - name + - newSchema + + """ + + def __init__( + self, + name=None, + newSchema=None, + ): + self.name = name + self.newSchema = newSchema + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.name = ISchemaName() + self.name.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.newSchema = ISchema() + self.newSchema.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("AlterISchemaRequest") + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRUCT, 1) + self.name.write(oprot) + oprot.writeFieldEnd() + if self.newSchema is not None: + oprot.writeFieldBegin("newSchema", TType.STRUCT, 3) + self.newSchema.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class SchemaVersion: + """ + Attributes: + - schema + - version + - createdAt + - cols + - state + - description + - schemaText + - fingerprint + - name + - serDe + + """ + + def __init__( + self, + schema=None, + version=None, + createdAt=None, + cols=None, + state=None, + description=None, + schemaText=None, + fingerprint=None, + name=None, + serDe=None, + ): + self.schema = schema + self.version = version + self.createdAt = createdAt + self.cols = cols + self.state = state + self.description = description + self.schemaText = schemaText + self.fingerprint = fingerprint + self.name = name + self.serDe = serDe + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.schema = ISchemaName() + self.schema.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.version = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.createdAt = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.cols = [] + (_etype1054, _size1051) = iprot.readListBegin() + for _i1055 in range(_size1051): + _elem1056 = FieldSchema() + _elem1056.read(iprot) + self.cols.append(_elem1056) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.state = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.description = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.schemaText = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRING: + self.fingerprint = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.STRING: + self.name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRUCT: + self.serDe = SerDeInfo() + self.serDe.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("SchemaVersion") + if self.schema is not None: + oprot.writeFieldBegin("schema", TType.STRUCT, 1) + self.schema.write(oprot) + oprot.writeFieldEnd() + if self.version is not None: + oprot.writeFieldBegin("version", TType.I32, 2) + oprot.writeI32(self.version) + oprot.writeFieldEnd() + if self.createdAt is not None: + oprot.writeFieldBegin("createdAt", TType.I64, 3) + oprot.writeI64(self.createdAt) + oprot.writeFieldEnd() + if self.cols is not None: + oprot.writeFieldBegin("cols", TType.LIST, 4) + oprot.writeListBegin(TType.STRUCT, len(self.cols)) + for iter1057 in self.cols: + iter1057.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.state is not None: + oprot.writeFieldBegin("state", TType.I32, 5) + oprot.writeI32(self.state) + oprot.writeFieldEnd() + if self.description is not None: + oprot.writeFieldBegin("description", TType.STRING, 6) + oprot.writeString(self.description.encode("utf-8") if sys.version_info[0] == 2 else self.description) + oprot.writeFieldEnd() + if self.schemaText is not None: + oprot.writeFieldBegin("schemaText", TType.STRING, 7) + oprot.writeString(self.schemaText.encode("utf-8") if sys.version_info[0] == 2 else self.schemaText) + oprot.writeFieldEnd() + if self.fingerprint is not None: + oprot.writeFieldBegin("fingerprint", TType.STRING, 8) + oprot.writeString(self.fingerprint.encode("utf-8") if sys.version_info[0] == 2 else self.fingerprint) + oprot.writeFieldEnd() + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRING, 9) + oprot.writeString(self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + if self.serDe is not None: + oprot.writeFieldBegin("serDe", TType.STRUCT, 10) + self.serDe.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class SchemaVersionDescriptor: + """ + Attributes: + - schema + - version + + """ + + def __init__( + self, + schema=None, + version=None, + ): + self.schema = schema + self.version = version + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.schema = ISchemaName() + self.schema.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.version = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("SchemaVersionDescriptor") + if self.schema is not None: + oprot.writeFieldBegin("schema", TType.STRUCT, 1) + self.schema.write(oprot) + oprot.writeFieldEnd() + if self.version is not None: + oprot.writeFieldBegin("version", TType.I32, 2) + oprot.writeI32(self.version) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class FindSchemasByColsRqst: + """ + Attributes: + - colName + - colNamespace + - type + + """ + + def __init__( + self, + colName=None, + colNamespace=None, + type=None, + ): + self.colName = colName + self.colNamespace = colNamespace + self.type = type + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.colName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.colNamespace = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.type = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("FindSchemasByColsRqst") + if self.colName is not None: + oprot.writeFieldBegin("colName", TType.STRING, 1) + oprot.writeString(self.colName.encode("utf-8") if sys.version_info[0] == 2 else self.colName) + oprot.writeFieldEnd() + if self.colNamespace is not None: + oprot.writeFieldBegin("colNamespace", TType.STRING, 2) + oprot.writeString(self.colNamespace.encode("utf-8") if sys.version_info[0] == 2 else self.colNamespace) + oprot.writeFieldEnd() + if self.type is not None: + oprot.writeFieldBegin("type", TType.STRING, 3) + oprot.writeString(self.type.encode("utf-8") if sys.version_info[0] == 2 else self.type) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class FindSchemasByColsResp: + """ + Attributes: + - schemaVersions + + """ + + def __init__( + self, + schemaVersions=None, + ): + self.schemaVersions = schemaVersions + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.schemaVersions = [] + (_etype1061, _size1058) = iprot.readListBegin() + for _i1062 in range(_size1058): + _elem1063 = SchemaVersionDescriptor() + _elem1063.read(iprot) + self.schemaVersions.append(_elem1063) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("FindSchemasByColsResp") + if self.schemaVersions is not None: + oprot.writeFieldBegin("schemaVersions", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.schemaVersions)) + for iter1064 in self.schemaVersions: + iter1064.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class MapSchemaVersionToSerdeRequest: + """ + Attributes: + - schemaVersion + - serdeName + + """ + + def __init__( + self, + schemaVersion=None, + serdeName=None, + ): + self.schemaVersion = schemaVersion + self.serdeName = serdeName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.schemaVersion = SchemaVersionDescriptor() + self.schemaVersion.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.serdeName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("MapSchemaVersionToSerdeRequest") + if self.schemaVersion is not None: + oprot.writeFieldBegin("schemaVersion", TType.STRUCT, 1) + self.schemaVersion.write(oprot) + oprot.writeFieldEnd() + if self.serdeName is not None: + oprot.writeFieldBegin("serdeName", TType.STRING, 2) + oprot.writeString(self.serdeName.encode("utf-8") if sys.version_info[0] == 2 else self.serdeName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class SetSchemaVersionStateRequest: + """ + Attributes: + - schemaVersion + - state + + """ + + def __init__( + self, + schemaVersion=None, + state=None, + ): + self.schemaVersion = schemaVersion + self.state = state + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.schemaVersion = SchemaVersionDescriptor() + self.schemaVersion.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.state = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("SetSchemaVersionStateRequest") + if self.schemaVersion is not None: + oprot.writeFieldBegin("schemaVersion", TType.STRUCT, 1) + self.schemaVersion.write(oprot) + oprot.writeFieldEnd() + if self.state is not None: + oprot.writeFieldBegin("state", TType.I32, 2) + oprot.writeI32(self.state) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetSerdeRequest: + """ + Attributes: + - serdeName + + """ + + def __init__( + self, + serdeName=None, + ): + self.serdeName = serdeName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.serdeName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetSerdeRequest") + if self.serdeName is not None: + oprot.writeFieldBegin("serdeName", TType.STRING, 1) + oprot.writeString(self.serdeName.encode("utf-8") if sys.version_info[0] == 2 else self.serdeName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class RuntimeStat: + """ + Attributes: + - createTime + - weight + - payload + + """ + + def __init__( + self, + createTime=None, + weight=None, + payload=None, + ): + self.createTime = createTime + self.weight = weight + self.payload = payload + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.createTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.weight = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.payload = iprot.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("RuntimeStat") + if self.createTime is not None: + oprot.writeFieldBegin("createTime", TType.I32, 1) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.weight is not None: + oprot.writeFieldBegin("weight", TType.I32, 2) + oprot.writeI32(self.weight) + oprot.writeFieldEnd() + if self.payload is not None: + oprot.writeFieldBegin("payload", TType.STRING, 3) + oprot.writeBinary(self.payload) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.weight is None: + raise TProtocolException(message="Required field weight is unset!") + if self.payload is None: + raise TProtocolException(message="Required field payload is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetRuntimeStatsRequest: + """ + Attributes: + - maxWeight + - maxCreateTime + + """ + + def __init__( + self, + maxWeight=None, + maxCreateTime=None, + ): + self.maxWeight = maxWeight + self.maxCreateTime = maxCreateTime + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.maxWeight = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.maxCreateTime = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetRuntimeStatsRequest") + if self.maxWeight is not None: + oprot.writeFieldBegin("maxWeight", TType.I32, 1) + oprot.writeI32(self.maxWeight) + oprot.writeFieldEnd() + if self.maxCreateTime is not None: + oprot.writeFieldBegin("maxCreateTime", TType.I32, 2) + oprot.writeI32(self.maxCreateTime) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.maxWeight is None: + raise TProtocolException(message="Required field maxWeight is unset!") + if self.maxCreateTime is None: + raise TProtocolException(message="Required field maxCreateTime is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class CreateTableRequest: + """ + Attributes: + - table + - envContext + - primaryKeys + - foreignKeys + - uniqueConstraints + - notNullConstraints + - defaultConstraints + - checkConstraints + - processorCapabilities + - processorIdentifier + + """ + + def __init__( + self, + table=None, + envContext=None, + primaryKeys=None, + foreignKeys=None, + uniqueConstraints=None, + notNullConstraints=None, + defaultConstraints=None, + checkConstraints=None, + processorCapabilities=None, + processorIdentifier=None, + ): + self.table = table + self.envContext = envContext + self.primaryKeys = primaryKeys + self.foreignKeys = foreignKeys + self.uniqueConstraints = uniqueConstraints + self.notNullConstraints = notNullConstraints + self.defaultConstraints = defaultConstraints + self.checkConstraints = checkConstraints + self.processorCapabilities = processorCapabilities + self.processorIdentifier = processorIdentifier + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.table = Table() + self.table.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.envContext = EnvironmentContext() + self.envContext.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.primaryKeys = [] + (_etype1068, _size1065) = iprot.readListBegin() + for _i1069 in range(_size1065): + _elem1070 = SQLPrimaryKey() + _elem1070.read(iprot) + self.primaryKeys.append(_elem1070) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.foreignKeys = [] + (_etype1074, _size1071) = iprot.readListBegin() + for _i1075 in range(_size1071): + _elem1076 = SQLForeignKey() + _elem1076.read(iprot) + self.foreignKeys.append(_elem1076) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.uniqueConstraints = [] + (_etype1080, _size1077) = iprot.readListBegin() + for _i1081 in range(_size1077): + _elem1082 = SQLUniqueConstraint() + _elem1082.read(iprot) + self.uniqueConstraints.append(_elem1082) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.LIST: + self.notNullConstraints = [] + (_etype1086, _size1083) = iprot.readListBegin() + for _i1087 in range(_size1083): + _elem1088 = SQLNotNullConstraint() + _elem1088.read(iprot) + self.notNullConstraints.append(_elem1088) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.LIST: + self.defaultConstraints = [] + (_etype1092, _size1089) = iprot.readListBegin() + for _i1093 in range(_size1089): + _elem1094 = SQLDefaultConstraint() + _elem1094.read(iprot) + self.defaultConstraints.append(_elem1094) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.LIST: + self.checkConstraints = [] + (_etype1098, _size1095) = iprot.readListBegin() + for _i1099 in range(_size1095): + _elem1100 = SQLCheckConstraint() + _elem1100.read(iprot) + self.checkConstraints.append(_elem1100) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.LIST: + self.processorCapabilities = [] + (_etype1104, _size1101) = iprot.readListBegin() + for _i1105 in range(_size1101): + _elem1106 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.processorCapabilities.append(_elem1106) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRING: + self.processorIdentifier = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("CreateTableRequest") + if self.table is not None: + oprot.writeFieldBegin("table", TType.STRUCT, 1) + self.table.write(oprot) + oprot.writeFieldEnd() + if self.envContext is not None: + oprot.writeFieldBegin("envContext", TType.STRUCT, 2) + self.envContext.write(oprot) + oprot.writeFieldEnd() + if self.primaryKeys is not None: + oprot.writeFieldBegin("primaryKeys", TType.LIST, 3) + oprot.writeListBegin(TType.STRUCT, len(self.primaryKeys)) + for iter1107 in self.primaryKeys: + iter1107.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.foreignKeys is not None: + oprot.writeFieldBegin("foreignKeys", TType.LIST, 4) + oprot.writeListBegin(TType.STRUCT, len(self.foreignKeys)) + for iter1108 in self.foreignKeys: + iter1108.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.uniqueConstraints is not None: + oprot.writeFieldBegin("uniqueConstraints", TType.LIST, 5) + oprot.writeListBegin(TType.STRUCT, len(self.uniqueConstraints)) + for iter1109 in self.uniqueConstraints: + iter1109.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.notNullConstraints is not None: + oprot.writeFieldBegin("notNullConstraints", TType.LIST, 6) + oprot.writeListBegin(TType.STRUCT, len(self.notNullConstraints)) + for iter1110 in self.notNullConstraints: + iter1110.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.defaultConstraints is not None: + oprot.writeFieldBegin("defaultConstraints", TType.LIST, 7) + oprot.writeListBegin(TType.STRUCT, len(self.defaultConstraints)) + for iter1111 in self.defaultConstraints: + iter1111.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.checkConstraints is not None: + oprot.writeFieldBegin("checkConstraints", TType.LIST, 8) + oprot.writeListBegin(TType.STRUCT, len(self.checkConstraints)) + for iter1112 in self.checkConstraints: + iter1112.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.processorCapabilities is not None: + oprot.writeFieldBegin("processorCapabilities", TType.LIST, 9) + oprot.writeListBegin(TType.STRING, len(self.processorCapabilities)) + for iter1113 in self.processorCapabilities: + oprot.writeString(iter1113.encode("utf-8") if sys.version_info[0] == 2 else iter1113) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.processorIdentifier is not None: + oprot.writeFieldBegin("processorIdentifier", TType.STRING, 10) + oprot.writeString(self.processorIdentifier.encode("utf-8") if sys.version_info[0] == 2 else self.processorIdentifier) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.table is None: + raise TProtocolException(message="Required field table is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class CreateDatabaseRequest: + """ + Attributes: + - databaseName + - description + - locationUri + - parameters + - privileges + - ownerName + - ownerType + - catalogName + - createTime + - managedLocationUri + - type + - dataConnectorName + + """ + + def __init__( + self, + databaseName=None, + description=None, + locationUri=None, + parameters=None, + privileges=None, + ownerName=None, + ownerType=None, + catalogName=None, + createTime=None, + managedLocationUri=None, + type=None, + dataConnectorName=None, + ): + self.databaseName = databaseName + self.description = description + self.locationUri = locationUri + self.parameters = parameters + self.privileges = privileges + self.ownerName = ownerName + self.ownerType = ownerType + self.catalogName = catalogName + self.createTime = createTime + self.managedLocationUri = managedLocationUri + self.type = type + self.dataConnectorName = dataConnectorName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.databaseName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.description = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.locationUri = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.parameters = {} + (_ktype1115, _vtype1116, _size1114) = iprot.readMapBegin() + for _i1118 in range(_size1114): + _key1119 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val1120 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.parameters[_key1119] = _val1120 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.privileges = PrincipalPrivilegeSet() + self.privileges.read(iprot) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.ownerName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I32: + self.ownerType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRING: + self.catalogName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.I32: + self.createTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRING: + self.managedLocationUri = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.STRING: + self.type = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.STRING: + self.dataConnectorName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("CreateDatabaseRequest") + if self.databaseName is not None: + oprot.writeFieldBegin("databaseName", TType.STRING, 1) + oprot.writeString(self.databaseName.encode("utf-8") if sys.version_info[0] == 2 else self.databaseName) + oprot.writeFieldEnd() + if self.description is not None: + oprot.writeFieldBegin("description", TType.STRING, 2) + oprot.writeString(self.description.encode("utf-8") if sys.version_info[0] == 2 else self.description) + oprot.writeFieldEnd() + if self.locationUri is not None: + oprot.writeFieldBegin("locationUri", TType.STRING, 3) + oprot.writeString(self.locationUri.encode("utf-8") if sys.version_info[0] == 2 else self.locationUri) + oprot.writeFieldEnd() + if self.parameters is not None: + oprot.writeFieldBegin("parameters", TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) + for kiter1121, viter1122 in self.parameters.items(): + oprot.writeString(kiter1121.encode("utf-8") if sys.version_info[0] == 2 else kiter1121) + oprot.writeString(viter1122.encode("utf-8") if sys.version_info[0] == 2 else viter1122) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.privileges is not None: + oprot.writeFieldBegin("privileges", TType.STRUCT, 5) + self.privileges.write(oprot) + oprot.writeFieldEnd() + if self.ownerName is not None: + oprot.writeFieldBegin("ownerName", TType.STRING, 6) + oprot.writeString(self.ownerName.encode("utf-8") if sys.version_info[0] == 2 else self.ownerName) + oprot.writeFieldEnd() + if self.ownerType is not None: + oprot.writeFieldBegin("ownerType", TType.I32, 7) + oprot.writeI32(self.ownerType) + oprot.writeFieldEnd() + if self.catalogName is not None: + oprot.writeFieldBegin("catalogName", TType.STRING, 8) + oprot.writeString(self.catalogName.encode("utf-8") if sys.version_info[0] == 2 else self.catalogName) + oprot.writeFieldEnd() + if self.createTime is not None: + oprot.writeFieldBegin("createTime", TType.I32, 9) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.managedLocationUri is not None: + oprot.writeFieldBegin("managedLocationUri", TType.STRING, 10) + oprot.writeString(self.managedLocationUri.encode("utf-8") if sys.version_info[0] == 2 else self.managedLocationUri) + oprot.writeFieldEnd() + if self.type is not None: + oprot.writeFieldBegin("type", TType.STRING, 11) + oprot.writeString(self.type.encode("utf-8") if sys.version_info[0] == 2 else self.type) + oprot.writeFieldEnd() + if self.dataConnectorName is not None: + oprot.writeFieldBegin("dataConnectorName", TType.STRING, 12) + oprot.writeString(self.dataConnectorName.encode("utf-8") if sys.version_info[0] == 2 else self.dataConnectorName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.databaseName is None: + raise TProtocolException(message="Required field databaseName is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class CreateDataConnectorRequest: + """ + Attributes: + - connector + + """ + + def __init__( + self, + connector=None, + ): + self.connector = connector + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.connector = DataConnector() + self.connector.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("CreateDataConnectorRequest") + if self.connector is not None: + oprot.writeFieldBegin("connector", TType.STRUCT, 1) + self.connector.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetDataConnectorRequest: + """ + Attributes: + - connectorName + + """ + + def __init__( + self, + connectorName=None, + ): + self.connectorName = connectorName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.connectorName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetDataConnectorRequest") + if self.connectorName is not None: + oprot.writeFieldBegin("connectorName", TType.STRING, 1) + oprot.writeString(self.connectorName.encode("utf-8") if sys.version_info[0] == 2 else self.connectorName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.connectorName is None: + raise TProtocolException(message="Required field connectorName is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ScheduledQueryPollRequest: + """ + Attributes: + - clusterNamespace + + """ + + def __init__( + self, + clusterNamespace=None, + ): + self.clusterNamespace = clusterNamespace + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.clusterNamespace = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ScheduledQueryPollRequest") + if self.clusterNamespace is not None: + oprot.writeFieldBegin("clusterNamespace", TType.STRING, 1) + oprot.writeString(self.clusterNamespace.encode("utf-8") if sys.version_info[0] == 2 else self.clusterNamespace) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.clusterNamespace is None: + raise TProtocolException(message="Required field clusterNamespace is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ScheduledQueryKey: + """ + Attributes: + - scheduleName + - clusterNamespace + + """ + + def __init__( + self, + scheduleName=None, + clusterNamespace=None, + ): + self.scheduleName = scheduleName + self.clusterNamespace = clusterNamespace + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.scheduleName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.clusterNamespace = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ScheduledQueryKey") + if self.scheduleName is not None: + oprot.writeFieldBegin("scheduleName", TType.STRING, 1) + oprot.writeString(self.scheduleName.encode("utf-8") if sys.version_info[0] == 2 else self.scheduleName) + oprot.writeFieldEnd() + if self.clusterNamespace is not None: + oprot.writeFieldBegin("clusterNamespace", TType.STRING, 2) + oprot.writeString(self.clusterNamespace.encode("utf-8") if sys.version_info[0] == 2 else self.clusterNamespace) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.scheduleName is None: + raise TProtocolException(message="Required field scheduleName is unset!") + if self.clusterNamespace is None: + raise TProtocolException(message="Required field clusterNamespace is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ScheduledQueryPollResponse: + """ + Attributes: + - scheduleKey + - executionId + - query + - user + + """ + + def __init__( + self, + scheduleKey=None, + executionId=None, + query=None, + user=None, + ): + self.scheduleKey = scheduleKey + self.executionId = executionId + self.query = query + self.user = user + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.scheduleKey = ScheduledQueryKey() + self.scheduleKey.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.executionId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.query = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.user = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ScheduledQueryPollResponse") + if self.scheduleKey is not None: + oprot.writeFieldBegin("scheduleKey", TType.STRUCT, 1) + self.scheduleKey.write(oprot) + oprot.writeFieldEnd() + if self.executionId is not None: + oprot.writeFieldBegin("executionId", TType.I64, 2) + oprot.writeI64(self.executionId) + oprot.writeFieldEnd() + if self.query is not None: + oprot.writeFieldBegin("query", TType.STRING, 3) + oprot.writeString(self.query.encode("utf-8") if sys.version_info[0] == 2 else self.query) + oprot.writeFieldEnd() + if self.user is not None: + oprot.writeFieldBegin("user", TType.STRING, 4) + oprot.writeString(self.user.encode("utf-8") if sys.version_info[0] == 2 else self.user) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ScheduledQuery: + """ + Attributes: + - scheduleKey + - enabled + - schedule + - user + - query + - nextExecution + + """ + + def __init__( + self, + scheduleKey=None, + enabled=None, + schedule=None, + user=None, + query=None, + nextExecution=None, + ): + self.scheduleKey = scheduleKey + self.enabled = enabled + self.schedule = schedule + self.user = user + self.query = query + self.nextExecution = nextExecution + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.scheduleKey = ScheduledQueryKey() + self.scheduleKey.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.enabled = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.schedule = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.user = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.query = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I32: + self.nextExecution = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ScheduledQuery") + if self.scheduleKey is not None: + oprot.writeFieldBegin("scheduleKey", TType.STRUCT, 1) + self.scheduleKey.write(oprot) + oprot.writeFieldEnd() + if self.enabled is not None: + oprot.writeFieldBegin("enabled", TType.BOOL, 2) + oprot.writeBool(self.enabled) + oprot.writeFieldEnd() + if self.schedule is not None: + oprot.writeFieldBegin("schedule", TType.STRING, 4) + oprot.writeString(self.schedule.encode("utf-8") if sys.version_info[0] == 2 else self.schedule) + oprot.writeFieldEnd() + if self.user is not None: + oprot.writeFieldBegin("user", TType.STRING, 5) + oprot.writeString(self.user.encode("utf-8") if sys.version_info[0] == 2 else self.user) + oprot.writeFieldEnd() + if self.query is not None: + oprot.writeFieldBegin("query", TType.STRING, 6) + oprot.writeString(self.query.encode("utf-8") if sys.version_info[0] == 2 else self.query) + oprot.writeFieldEnd() + if self.nextExecution is not None: + oprot.writeFieldBegin("nextExecution", TType.I32, 7) + oprot.writeI32(self.nextExecution) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.scheduleKey is None: + raise TProtocolException(message="Required field scheduleKey is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ScheduledQueryMaintenanceRequest: + """ + Attributes: + - type + - scheduledQuery + + """ + + def __init__( + self, + type=None, + scheduledQuery=None, + ): + self.type = type + self.scheduledQuery = scheduledQuery + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.type = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.scheduledQuery = ScheduledQuery() + self.scheduledQuery.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ScheduledQueryMaintenanceRequest") + if self.type is not None: + oprot.writeFieldBegin("type", TType.I32, 1) + oprot.writeI32(self.type) + oprot.writeFieldEnd() + if self.scheduledQuery is not None: + oprot.writeFieldBegin("scheduledQuery", TType.STRUCT, 2) + self.scheduledQuery.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.type is None: + raise TProtocolException(message="Required field type is unset!") + if self.scheduledQuery is None: + raise TProtocolException(message="Required field scheduledQuery is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ScheduledQueryProgressInfo: + """ + Attributes: + - scheduledExecutionId + - state + - executorQueryId + - errorMessage + + """ + + def __init__( + self, + scheduledExecutionId=None, + state=None, + executorQueryId=None, + errorMessage=None, + ): + self.scheduledExecutionId = scheduledExecutionId + self.state = state + self.executorQueryId = executorQueryId + self.errorMessage = errorMessage + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.scheduledExecutionId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.state = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.executorQueryId = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.errorMessage = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ScheduledQueryProgressInfo") + if self.scheduledExecutionId is not None: + oprot.writeFieldBegin("scheduledExecutionId", TType.I64, 1) + oprot.writeI64(self.scheduledExecutionId) + oprot.writeFieldEnd() + if self.state is not None: + oprot.writeFieldBegin("state", TType.I32, 2) + oprot.writeI32(self.state) + oprot.writeFieldEnd() + if self.executorQueryId is not None: + oprot.writeFieldBegin("executorQueryId", TType.STRING, 3) + oprot.writeString(self.executorQueryId.encode("utf-8") if sys.version_info[0] == 2 else self.executorQueryId) + oprot.writeFieldEnd() + if self.errorMessage is not None: + oprot.writeFieldBegin("errorMessage", TType.STRING, 4) + oprot.writeString(self.errorMessage.encode("utf-8") if sys.version_info[0] == 2 else self.errorMessage) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.scheduledExecutionId is None: + raise TProtocolException(message="Required field scheduledExecutionId is unset!") + if self.state is None: + raise TProtocolException(message="Required field state is unset!") + if self.executorQueryId is None: + raise TProtocolException(message="Required field executorQueryId is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class AlterPartitionsRequest: + """ + Attributes: + - catName + - dbName + - tableName + - partitions + - environmentContext + - writeId + - validWriteIdList + + """ + + def __init__( + self, + catName=None, + dbName=None, + tableName=None, + partitions=None, + environmentContext=None, + writeId=-1, + validWriteIdList=None, + ): + self.catName = catName + self.dbName = dbName + self.tableName = tableName + self.partitions = partitions + self.environmentContext = environmentContext + self.writeId = writeId + self.validWriteIdList = validWriteIdList + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tableName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.partitions = [] + (_etype1126, _size1123) = iprot.readListBegin() + for _i1127 in range(_size1123): + _elem1128 = Partition() + _elem1128.read(iprot) + self.partitions.append(_elem1128) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.environmentContext = EnvironmentContext() + self.environmentContext.read(iprot) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I64: + self.writeId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.validWriteIdList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("AlterPartitionsRequest") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 2) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tableName is not None: + oprot.writeFieldBegin("tableName", TType.STRING, 3) + oprot.writeString(self.tableName.encode("utf-8") if sys.version_info[0] == 2 else self.tableName) + oprot.writeFieldEnd() + if self.partitions is not None: + oprot.writeFieldBegin("partitions", TType.LIST, 4) + oprot.writeListBegin(TType.STRUCT, len(self.partitions)) + for iter1129 in self.partitions: + iter1129.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.environmentContext is not None: + oprot.writeFieldBegin("environmentContext", TType.STRUCT, 5) + self.environmentContext.write(oprot) + oprot.writeFieldEnd() + if self.writeId is not None: + oprot.writeFieldBegin("writeId", TType.I64, 6) + oprot.writeI64(self.writeId) + oprot.writeFieldEnd() + if self.validWriteIdList is not None: + oprot.writeFieldBegin("validWriteIdList", TType.STRING, 7) + oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.tableName is None: + raise TProtocolException(message="Required field tableName is unset!") + if self.partitions is None: + raise TProtocolException(message="Required field partitions is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class AlterPartitionsResponse: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("AlterPartitionsResponse") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class RenamePartitionRequest: + """ + Attributes: + - catName + - dbName + - tableName + - partVals + - newPart + - validWriteIdList + - txnId + - clonePart + + """ + + def __init__( + self, + catName=None, + dbName=None, + tableName=None, + partVals=None, + newPart=None, + validWriteIdList=None, + txnId=None, + clonePart=None, + ): + self.catName = catName + self.dbName = dbName + self.tableName = tableName + self.partVals = partVals + self.newPart = newPart + self.validWriteIdList = validWriteIdList + self.txnId = txnId + self.clonePart = clonePart + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tableName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.partVals = [] + (_etype1133, _size1130) = iprot.readListBegin() + for _i1134 in range(_size1130): + _elem1135 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.partVals.append(_elem1135) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.newPart = Partition() + self.newPart.read(iprot) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.validWriteIdList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I64: + self.txnId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.BOOL: + self.clonePart = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("RenamePartitionRequest") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 2) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tableName is not None: + oprot.writeFieldBegin("tableName", TType.STRING, 3) + oprot.writeString(self.tableName.encode("utf-8") if sys.version_info[0] == 2 else self.tableName) + oprot.writeFieldEnd() + if self.partVals is not None: + oprot.writeFieldBegin("partVals", TType.LIST, 4) + oprot.writeListBegin(TType.STRING, len(self.partVals)) + for iter1136 in self.partVals: + oprot.writeString(iter1136.encode("utf-8") if sys.version_info[0] == 2 else iter1136) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.newPart is not None: + oprot.writeFieldBegin("newPart", TType.STRUCT, 5) + self.newPart.write(oprot) + oprot.writeFieldEnd() + if self.validWriteIdList is not None: + oprot.writeFieldBegin("validWriteIdList", TType.STRING, 6) + oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList) + oprot.writeFieldEnd() + if self.txnId is not None: + oprot.writeFieldBegin("txnId", TType.I64, 7) + oprot.writeI64(self.txnId) + oprot.writeFieldEnd() + if self.clonePart is not None: + oprot.writeFieldBegin("clonePart", TType.BOOL, 8) + oprot.writeBool(self.clonePart) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.tableName is None: + raise TProtocolException(message="Required field tableName is unset!") + if self.partVals is None: + raise TProtocolException(message="Required field partVals is unset!") + if self.newPart is None: + raise TProtocolException(message="Required field newPart is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class RenamePartitionResponse: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("RenamePartitionResponse") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class AlterTableRequest: + """ + Attributes: + - catName + - dbName + - tableName + - table + - environmentContext + - writeId + - validWriteIdList + - processorCapabilities + - processorIdentifier + + """ + + def __init__( + self, + catName=None, + dbName=None, + tableName=None, + table=None, + environmentContext=None, + writeId=-1, + validWriteIdList=None, + processorCapabilities=None, + processorIdentifier=None, + ): + self.catName = catName + self.dbName = dbName + self.tableName = tableName + self.table = table + self.environmentContext = environmentContext + self.writeId = writeId + self.validWriteIdList = validWriteIdList + self.processorCapabilities = processorCapabilities + self.processorIdentifier = processorIdentifier + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tableName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.table = Table() + self.table.read(iprot) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.environmentContext = EnvironmentContext() + self.environmentContext.read(iprot) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I64: + self.writeId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.validWriteIdList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.LIST: + self.processorCapabilities = [] + (_etype1140, _size1137) = iprot.readListBegin() + for _i1141 in range(_size1137): + _elem1142 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.processorCapabilities.append(_elem1142) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.STRING: + self.processorIdentifier = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("AlterTableRequest") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 2) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tableName is not None: + oprot.writeFieldBegin("tableName", TType.STRING, 3) + oprot.writeString(self.tableName.encode("utf-8") if sys.version_info[0] == 2 else self.tableName) + oprot.writeFieldEnd() + if self.table is not None: + oprot.writeFieldBegin("table", TType.STRUCT, 4) + self.table.write(oprot) + oprot.writeFieldEnd() + if self.environmentContext is not None: + oprot.writeFieldBegin("environmentContext", TType.STRUCT, 5) + self.environmentContext.write(oprot) + oprot.writeFieldEnd() + if self.writeId is not None: + oprot.writeFieldBegin("writeId", TType.I64, 6) + oprot.writeI64(self.writeId) + oprot.writeFieldEnd() + if self.validWriteIdList is not None: + oprot.writeFieldBegin("validWriteIdList", TType.STRING, 7) + oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList) + oprot.writeFieldEnd() + if self.processorCapabilities is not None: + oprot.writeFieldBegin("processorCapabilities", TType.LIST, 8) + oprot.writeListBegin(TType.STRING, len(self.processorCapabilities)) + for iter1143 in self.processorCapabilities: + oprot.writeString(iter1143.encode("utf-8") if sys.version_info[0] == 2 else iter1143) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.processorIdentifier is not None: + oprot.writeFieldBegin("processorIdentifier", TType.STRING, 9) + oprot.writeString(self.processorIdentifier.encode("utf-8") if sys.version_info[0] == 2 else self.processorIdentifier) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.tableName is None: + raise TProtocolException(message="Required field tableName is unset!") + if self.table is None: + raise TProtocolException(message="Required field table is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class AlterTableResponse: + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("AlterTableResponse") + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetPartitionsFilterSpec: + """ + Attributes: + - filterMode + - filters + + """ + + def __init__( + self, + filterMode=None, + filters=None, + ): + self.filterMode = filterMode + self.filters = filters + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 7: + if ftype == TType.I32: + self.filterMode = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.LIST: + self.filters = [] + (_etype1147, _size1144) = iprot.readListBegin() + for _i1148 in range(_size1144): + _elem1149 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.filters.append(_elem1149) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetPartitionsFilterSpec") + if self.filterMode is not None: + oprot.writeFieldBegin("filterMode", TType.I32, 7) + oprot.writeI32(self.filterMode) + oprot.writeFieldEnd() + if self.filters is not None: + oprot.writeFieldBegin("filters", TType.LIST, 8) + oprot.writeListBegin(TType.STRING, len(self.filters)) + for iter1150 in self.filters: + oprot.writeString(iter1150.encode("utf-8") if sys.version_info[0] == 2 else iter1150) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetPartitionsResponse: + """ + Attributes: + - partitionSpec + + """ + + def __init__( + self, + partitionSpec=None, + ): + self.partitionSpec = partitionSpec + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.partitionSpec = [] + (_etype1154, _size1151) = iprot.readListBegin() + for _i1155 in range(_size1151): + _elem1156 = PartitionSpec() + _elem1156.read(iprot) + self.partitionSpec.append(_elem1156) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetPartitionsResponse") + if self.partitionSpec is not None: + oprot.writeFieldBegin("partitionSpec", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.partitionSpec)) + for iter1157 in self.partitionSpec: + iter1157.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetPartitionsRequest: + """ + Attributes: + - catName + - dbName + - tblName + - withAuth + - user + - groupNames + - projectionSpec + - filterSpec + - processorCapabilities + - processorIdentifier + - validWriteIdList + + """ + + def __init__( + self, + catName=None, + dbName=None, + tblName=None, + withAuth=None, + user=None, + groupNames=None, + projectionSpec=None, + filterSpec=None, + processorCapabilities=None, + processorIdentifier=None, + validWriteIdList=None, + ): + self.catName = catName + self.dbName = dbName + self.tblName = tblName + self.withAuth = withAuth + self.user = user + self.groupNames = groupNames + self.projectionSpec = projectionSpec + self.filterSpec = filterSpec + self.processorCapabilities = processorCapabilities + self.processorIdentifier = processorIdentifier + self.validWriteIdList = validWriteIdList + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tblName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.withAuth = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.user = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.LIST: + self.groupNames = [] + (_etype1161, _size1158) = iprot.readListBegin() + for _i1162 in range(_size1158): + _elem1163 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.groupNames.append(_elem1163) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRUCT: + self.projectionSpec = GetProjectionsSpec() + self.projectionSpec.read(iprot) + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRUCT: + self.filterSpec = GetPartitionsFilterSpec() + self.filterSpec.read(iprot) + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.LIST: + self.processorCapabilities = [] + (_etype1167, _size1164) = iprot.readListBegin() + for _i1168 in range(_size1164): + _elem1169 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.processorCapabilities.append(_elem1169) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRING: + self.processorIdentifier = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.STRING: + self.validWriteIdList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetPartitionsRequest") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 2) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tblName is not None: + oprot.writeFieldBegin("tblName", TType.STRING, 3) + oprot.writeString(self.tblName.encode("utf-8") if sys.version_info[0] == 2 else self.tblName) + oprot.writeFieldEnd() + if self.withAuth is not None: + oprot.writeFieldBegin("withAuth", TType.BOOL, 4) + oprot.writeBool(self.withAuth) + oprot.writeFieldEnd() + if self.user is not None: + oprot.writeFieldBegin("user", TType.STRING, 5) + oprot.writeString(self.user.encode("utf-8") if sys.version_info[0] == 2 else self.user) + oprot.writeFieldEnd() + if self.groupNames is not None: + oprot.writeFieldBegin("groupNames", TType.LIST, 6) + oprot.writeListBegin(TType.STRING, len(self.groupNames)) + for iter1170 in self.groupNames: + oprot.writeString(iter1170.encode("utf-8") if sys.version_info[0] == 2 else iter1170) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.projectionSpec is not None: + oprot.writeFieldBegin("projectionSpec", TType.STRUCT, 7) + self.projectionSpec.write(oprot) + oprot.writeFieldEnd() + if self.filterSpec is not None: + oprot.writeFieldBegin("filterSpec", TType.STRUCT, 8) + self.filterSpec.write(oprot) + oprot.writeFieldEnd() + if self.processorCapabilities is not None: + oprot.writeFieldBegin("processorCapabilities", TType.LIST, 9) + oprot.writeListBegin(TType.STRING, len(self.processorCapabilities)) + for iter1171 in self.processorCapabilities: + oprot.writeString(iter1171.encode("utf-8") if sys.version_info[0] == 2 else iter1171) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.processorIdentifier is not None: + oprot.writeFieldBegin("processorIdentifier", TType.STRING, 10) + oprot.writeString(self.processorIdentifier.encode("utf-8") if sys.version_info[0] == 2 else self.processorIdentifier) + oprot.writeFieldEnd() + if self.validWriteIdList is not None: + oprot.writeFieldBegin("validWriteIdList", TType.STRING, 11) + oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetFieldsRequest: + """ + Attributes: + - catName + - dbName + - tblName + - envContext + - validWriteIdList + - id + + """ + + def __init__( + self, + catName=None, + dbName=None, + tblName=None, + envContext=None, + validWriteIdList=None, + id=-1, + ): + self.catName = catName + self.dbName = dbName + self.tblName = tblName + self.envContext = envContext + self.validWriteIdList = validWriteIdList + self.id = id + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tblName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.envContext = EnvironmentContext() + self.envContext.read(iprot) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.validWriteIdList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I64: + self.id = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetFieldsRequest") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 2) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tblName is not None: + oprot.writeFieldBegin("tblName", TType.STRING, 3) + oprot.writeString(self.tblName.encode("utf-8") if sys.version_info[0] == 2 else self.tblName) + oprot.writeFieldEnd() + if self.envContext is not None: + oprot.writeFieldBegin("envContext", TType.STRUCT, 4) + self.envContext.write(oprot) + oprot.writeFieldEnd() + if self.validWriteIdList is not None: + oprot.writeFieldBegin("validWriteIdList", TType.STRING, 5) + oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList) + oprot.writeFieldEnd() + if self.id is not None: + oprot.writeFieldBegin("id", TType.I64, 6) + oprot.writeI64(self.id) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.tblName is None: + raise TProtocolException(message="Required field tblName is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetFieldsResponse: + """ + Attributes: + - fields + + """ + + def __init__( + self, + fields=None, + ): + self.fields = fields + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.fields = [] + (_etype1175, _size1172) = iprot.readListBegin() + for _i1176 in range(_size1172): + _elem1177 = FieldSchema() + _elem1177.read(iprot) + self.fields.append(_elem1177) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetFieldsResponse") + if self.fields is not None: + oprot.writeFieldBegin("fields", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.fields)) + for iter1178 in self.fields: + iter1178.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.fields is None: + raise TProtocolException(message="Required field fields is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetSchemaRequest: + """ + Attributes: + - catName + - dbName + - tblName + - envContext + - validWriteIdList + - id + + """ + + def __init__( + self, + catName=None, + dbName=None, + tblName=None, + envContext=None, + validWriteIdList=None, + id=-1, + ): + self.catName = catName + self.dbName = dbName + self.tblName = tblName + self.envContext = envContext + self.validWriteIdList = validWriteIdList + self.id = id + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tblName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.envContext = EnvironmentContext() + self.envContext.read(iprot) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.validWriteIdList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I64: + self.id = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetSchemaRequest") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 2) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tblName is not None: + oprot.writeFieldBegin("tblName", TType.STRING, 3) + oprot.writeString(self.tblName.encode("utf-8") if sys.version_info[0] == 2 else self.tblName) + oprot.writeFieldEnd() + if self.envContext is not None: + oprot.writeFieldBegin("envContext", TType.STRUCT, 4) + self.envContext.write(oprot) + oprot.writeFieldEnd() + if self.validWriteIdList is not None: + oprot.writeFieldBegin("validWriteIdList", TType.STRING, 5) + oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList) + oprot.writeFieldEnd() + if self.id is not None: + oprot.writeFieldBegin("id", TType.I64, 6) + oprot.writeI64(self.id) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.tblName is None: + raise TProtocolException(message="Required field tblName is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetSchemaResponse: + """ + Attributes: + - fields + + """ + + def __init__( + self, + fields=None, + ): + self.fields = fields + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.fields = [] + (_etype1182, _size1179) = iprot.readListBegin() + for _i1183 in range(_size1179): + _elem1184 = FieldSchema() + _elem1184.read(iprot) + self.fields.append(_elem1184) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetSchemaResponse") + if self.fields is not None: + oprot.writeFieldBegin("fields", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.fields)) + for iter1185 in self.fields: + iter1185.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.fields is None: + raise TProtocolException(message="Required field fields is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetPartitionRequest: + """ + Attributes: + - catName + - dbName + - tblName + - partVals + - validWriteIdList + - id + + """ + + def __init__( + self, + catName=None, + dbName=None, + tblName=None, + partVals=None, + validWriteIdList=None, + id=-1, + ): + self.catName = catName + self.dbName = dbName + self.tblName = tblName + self.partVals = partVals + self.validWriteIdList = validWriteIdList + self.id = id + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tblName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.partVals = [] + (_etype1189, _size1186) = iprot.readListBegin() + for _i1190 in range(_size1186): + _elem1191 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.partVals.append(_elem1191) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.validWriteIdList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I64: + self.id = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetPartitionRequest") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 2) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tblName is not None: + oprot.writeFieldBegin("tblName", TType.STRING, 3) + oprot.writeString(self.tblName.encode("utf-8") if sys.version_info[0] == 2 else self.tblName) + oprot.writeFieldEnd() + if self.partVals is not None: + oprot.writeFieldBegin("partVals", TType.LIST, 4) + oprot.writeListBegin(TType.STRING, len(self.partVals)) + for iter1192 in self.partVals: + oprot.writeString(iter1192.encode("utf-8") if sys.version_info[0] == 2 else iter1192) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.validWriteIdList is not None: + oprot.writeFieldBegin("validWriteIdList", TType.STRING, 5) + oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList) + oprot.writeFieldEnd() + if self.id is not None: + oprot.writeFieldBegin("id", TType.I64, 6) + oprot.writeI64(self.id) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.tblName is None: + raise TProtocolException(message="Required field tblName is unset!") + if self.partVals is None: + raise TProtocolException(message="Required field partVals is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetPartitionResponse: + """ + Attributes: + - partition + + """ + + def __init__( + self, + partition=None, + ): + self.partition = partition + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.partition = Partition() + self.partition.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetPartitionResponse") + if self.partition is not None: + oprot.writeFieldBegin("partition", TType.STRUCT, 1) + self.partition.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.partition is None: + raise TProtocolException(message="Required field partition is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class PartitionsRequest: + """ + Attributes: + - catName + - dbName + - tblName + - maxParts + - validWriteIdList + - id + + """ + + def __init__( + self, + catName=None, + dbName=None, + tblName=None, + maxParts=-1, + validWriteIdList=None, + id=-1, + ): + self.catName = catName + self.dbName = dbName + self.tblName = tblName + self.maxParts = maxParts + self.validWriteIdList = validWriteIdList + self.id = id + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tblName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I16: + self.maxParts = iprot.readI16() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.validWriteIdList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I64: + self.id = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("PartitionsRequest") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 2) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tblName is not None: + oprot.writeFieldBegin("tblName", TType.STRING, 3) + oprot.writeString(self.tblName.encode("utf-8") if sys.version_info[0] == 2 else self.tblName) + oprot.writeFieldEnd() + if self.maxParts is not None: + oprot.writeFieldBegin("maxParts", TType.I16, 4) + oprot.writeI16(self.maxParts) + oprot.writeFieldEnd() + if self.validWriteIdList is not None: + oprot.writeFieldBegin("validWriteIdList", TType.STRING, 5) + oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList) + oprot.writeFieldEnd() + if self.id is not None: + oprot.writeFieldBegin("id", TType.I64, 6) + oprot.writeI64(self.id) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.tblName is None: + raise TProtocolException(message="Required field tblName is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class PartitionsResponse: + """ + Attributes: + - partitions + + """ + + def __init__( + self, + partitions=None, + ): + self.partitions = partitions + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.partitions = [] + (_etype1196, _size1193) = iprot.readListBegin() + for _i1197 in range(_size1193): + _elem1198 = Partition() + _elem1198.read(iprot) + self.partitions.append(_elem1198) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("PartitionsResponse") + if self.partitions is not None: + oprot.writeFieldBegin("partitions", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.partitions)) + for iter1199 in self.partitions: + iter1199.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.partitions is None: + raise TProtocolException(message="Required field partitions is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetPartitionNamesPsRequest: + """ + Attributes: + - catName + - dbName + - tblName + - partValues + - maxParts + - validWriteIdList + - id + + """ + + def __init__( + self, + catName=None, + dbName=None, + tblName=None, + partValues=None, + maxParts=-1, + validWriteIdList=None, + id=-1, + ): + self.catName = catName + self.dbName = dbName + self.tblName = tblName + self.partValues = partValues + self.maxParts = maxParts + self.validWriteIdList = validWriteIdList + self.id = id + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tblName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.partValues = [] + (_etype1203, _size1200) = iprot.readListBegin() + for _i1204 in range(_size1200): + _elem1205 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.partValues.append(_elem1205) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I16: + self.maxParts = iprot.readI16() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.validWriteIdList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I64: + self.id = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetPartitionNamesPsRequest") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 2) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tblName is not None: + oprot.writeFieldBegin("tblName", TType.STRING, 3) + oprot.writeString(self.tblName.encode("utf-8") if sys.version_info[0] == 2 else self.tblName) + oprot.writeFieldEnd() + if self.partValues is not None: + oprot.writeFieldBegin("partValues", TType.LIST, 4) + oprot.writeListBegin(TType.STRING, len(self.partValues)) + for iter1206 in self.partValues: + oprot.writeString(iter1206.encode("utf-8") if sys.version_info[0] == 2 else iter1206) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.maxParts is not None: + oprot.writeFieldBegin("maxParts", TType.I16, 5) + oprot.writeI16(self.maxParts) + oprot.writeFieldEnd() + if self.validWriteIdList is not None: + oprot.writeFieldBegin("validWriteIdList", TType.STRING, 6) + oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList) + oprot.writeFieldEnd() + if self.id is not None: + oprot.writeFieldBegin("id", TType.I64, 7) + oprot.writeI64(self.id) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.tblName is None: + raise TProtocolException(message="Required field tblName is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetPartitionNamesPsResponse: + """ + Attributes: + - names + + """ + + def __init__( + self, + names=None, + ): + self.names = names + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.names = [] + (_etype1210, _size1207) = iprot.readListBegin() + for _i1211 in range(_size1207): + _elem1212 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.names.append(_elem1212) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetPartitionNamesPsResponse") + if self.names is not None: + oprot.writeFieldBegin("names", TType.LIST, 1) + oprot.writeListBegin(TType.STRING, len(self.names)) + for iter1213 in self.names: + oprot.writeString(iter1213.encode("utf-8") if sys.version_info[0] == 2 else iter1213) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.names is None: + raise TProtocolException(message="Required field names is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetPartitionsPsWithAuthRequest: + """ + Attributes: + - catName + - dbName + - tblName + - partVals + - maxParts + - userName + - groupNames + - validWriteIdList + - id + + """ + + def __init__( + self, + catName=None, + dbName=None, + tblName=None, + partVals=None, + maxParts=-1, + userName=None, + groupNames=None, + validWriteIdList=None, + id=-1, + ): + self.catName = catName + self.dbName = dbName + self.tblName = tblName + self.partVals = partVals + self.maxParts = maxParts + self.userName = userName + self.groupNames = groupNames + self.validWriteIdList = validWriteIdList + self.id = id + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tblName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.partVals = [] + (_etype1217, _size1214) = iprot.readListBegin() + for _i1218 in range(_size1214): + _elem1219 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.partVals.append(_elem1219) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I16: + self.maxParts = iprot.readI16() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.userName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.LIST: + self.groupNames = [] + (_etype1223, _size1220) = iprot.readListBegin() + for _i1224 in range(_size1220): + _elem1225 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.groupNames.append(_elem1225) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRING: + self.validWriteIdList = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.I64: + self.id = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetPartitionsPsWithAuthRequest") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 2) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tblName is not None: + oprot.writeFieldBegin("tblName", TType.STRING, 3) + oprot.writeString(self.tblName.encode("utf-8") if sys.version_info[0] == 2 else self.tblName) + oprot.writeFieldEnd() + if self.partVals is not None: + oprot.writeFieldBegin("partVals", TType.LIST, 4) + oprot.writeListBegin(TType.STRING, len(self.partVals)) + for iter1226 in self.partVals: + oprot.writeString(iter1226.encode("utf-8") if sys.version_info[0] == 2 else iter1226) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.maxParts is not None: + oprot.writeFieldBegin("maxParts", TType.I16, 5) + oprot.writeI16(self.maxParts) + oprot.writeFieldEnd() + if self.userName is not None: + oprot.writeFieldBegin("userName", TType.STRING, 6) + oprot.writeString(self.userName.encode("utf-8") if sys.version_info[0] == 2 else self.userName) + oprot.writeFieldEnd() + if self.groupNames is not None: + oprot.writeFieldBegin("groupNames", TType.LIST, 7) + oprot.writeListBegin(TType.STRING, len(self.groupNames)) + for iter1227 in self.groupNames: + oprot.writeString(iter1227.encode("utf-8") if sys.version_info[0] == 2 else iter1227) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.validWriteIdList is not None: + oprot.writeFieldBegin("validWriteIdList", TType.STRING, 8) + oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList) + oprot.writeFieldEnd() + if self.id is not None: + oprot.writeFieldBegin("id", TType.I64, 9) + oprot.writeI64(self.id) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.tblName is None: + raise TProtocolException(message="Required field tblName is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetPartitionsPsWithAuthResponse: + """ + Attributes: + - partitions + + """ + + def __init__( + self, + partitions=None, + ): + self.partitions = partitions + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.partitions = [] + (_etype1231, _size1228) = iprot.readListBegin() + for _i1232 in range(_size1228): + _elem1233 = Partition() + _elem1233.read(iprot) + self.partitions.append(_elem1233) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetPartitionsPsWithAuthResponse") + if self.partitions is not None: + oprot.writeFieldBegin("partitions", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.partitions)) + for iter1234 in self.partitions: + iter1234.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.partitions is None: + raise TProtocolException(message="Required field partitions is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ReplicationMetrics: + """ + Attributes: + - scheduledExecutionId + - policy + - dumpExecutionId + - metadata + - progress + - messageFormat + + """ + + def __init__( + self, + scheduledExecutionId=None, + policy=None, + dumpExecutionId=None, + metadata=None, + progress=None, + messageFormat=None, + ): + self.scheduledExecutionId = scheduledExecutionId + self.policy = policy + self.dumpExecutionId = dumpExecutionId + self.metadata = metadata + self.progress = progress + self.messageFormat = messageFormat + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.scheduledExecutionId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.policy = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.dumpExecutionId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.metadata = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.progress = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.messageFormat = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ReplicationMetrics") + if self.scheduledExecutionId is not None: + oprot.writeFieldBegin("scheduledExecutionId", TType.I64, 1) + oprot.writeI64(self.scheduledExecutionId) + oprot.writeFieldEnd() + if self.policy is not None: + oprot.writeFieldBegin("policy", TType.STRING, 2) + oprot.writeString(self.policy.encode("utf-8") if sys.version_info[0] == 2 else self.policy) + oprot.writeFieldEnd() + if self.dumpExecutionId is not None: + oprot.writeFieldBegin("dumpExecutionId", TType.I64, 3) + oprot.writeI64(self.dumpExecutionId) + oprot.writeFieldEnd() + if self.metadata is not None: + oprot.writeFieldBegin("metadata", TType.STRING, 4) + oprot.writeString(self.metadata.encode("utf-8") if sys.version_info[0] == 2 else self.metadata) + oprot.writeFieldEnd() + if self.progress is not None: + oprot.writeFieldBegin("progress", TType.STRING, 5) + oprot.writeString(self.progress.encode("utf-8") if sys.version_info[0] == 2 else self.progress) + oprot.writeFieldEnd() + if self.messageFormat is not None: + oprot.writeFieldBegin("messageFormat", TType.STRING, 6) + oprot.writeString(self.messageFormat.encode("utf-8") if sys.version_info[0] == 2 else self.messageFormat) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.scheduledExecutionId is None: + raise TProtocolException(message="Required field scheduledExecutionId is unset!") + if self.policy is None: + raise TProtocolException(message="Required field policy is unset!") + if self.dumpExecutionId is None: + raise TProtocolException(message="Required field dumpExecutionId is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ReplicationMetricList: + """ + Attributes: + - replicationMetricList + + """ + + def __init__( + self, + replicationMetricList=None, + ): + self.replicationMetricList = replicationMetricList + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.replicationMetricList = [] + (_etype1238, _size1235) = iprot.readListBegin() + for _i1239 in range(_size1235): + _elem1240 = ReplicationMetrics() + _elem1240.read(iprot) + self.replicationMetricList.append(_elem1240) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ReplicationMetricList") + if self.replicationMetricList is not None: + oprot.writeFieldBegin("replicationMetricList", TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.replicationMetricList)) + for iter1241 in self.replicationMetricList: + iter1241.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.replicationMetricList is None: + raise TProtocolException(message="Required field replicationMetricList is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetReplicationMetricsRequest: + """ + Attributes: + - scheduledExecutionId + - policy + - dumpExecutionId + + """ + + def __init__( + self, + scheduledExecutionId=None, + policy=None, + dumpExecutionId=None, + ): + self.scheduledExecutionId = scheduledExecutionId + self.policy = policy + self.dumpExecutionId = dumpExecutionId + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.scheduledExecutionId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.policy = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.dumpExecutionId = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetReplicationMetricsRequest") + if self.scheduledExecutionId is not None: + oprot.writeFieldBegin("scheduledExecutionId", TType.I64, 1) + oprot.writeI64(self.scheduledExecutionId) + oprot.writeFieldEnd() + if self.policy is not None: + oprot.writeFieldBegin("policy", TType.STRING, 2) + oprot.writeString(self.policy.encode("utf-8") if sys.version_info[0] == 2 else self.policy) + oprot.writeFieldEnd() + if self.dumpExecutionId is not None: + oprot.writeFieldBegin("dumpExecutionId", TType.I64, 3) + oprot.writeI64(self.dumpExecutionId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetOpenTxnsRequest: + """ + Attributes: + - excludeTxnTypes + + """ + + def __init__( + self, + excludeTxnTypes=None, + ): + self.excludeTxnTypes = excludeTxnTypes + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.excludeTxnTypes = [] + (_etype1245, _size1242) = iprot.readListBegin() + for _i1246 in range(_size1242): + _elem1247 = iprot.readI32() + self.excludeTxnTypes.append(_elem1247) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetOpenTxnsRequest") + if self.excludeTxnTypes is not None: + oprot.writeFieldBegin("excludeTxnTypes", TType.LIST, 1) + oprot.writeListBegin(TType.I32, len(self.excludeTxnTypes)) + for iter1248 in self.excludeTxnTypes: + oprot.writeI32(iter1248) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class StoredProcedureRequest: + """ + Attributes: + - catName + - dbName + - procName + + """ + + def __init__( + self, + catName=None, + dbName=None, + procName=None, + ): + self.catName = catName + self.dbName = dbName + self.procName = procName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.procName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("StoredProcedureRequest") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 2) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.procName is not None: + oprot.writeFieldBegin("procName", TType.STRING, 3) + oprot.writeString(self.procName.encode("utf-8") if sys.version_info[0] == 2 else self.procName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.catName is None: + raise TProtocolException(message="Required field catName is unset!") + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.procName is None: + raise TProtocolException(message="Required field procName is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ListStoredProcedureRequest: + """ + Attributes: + - catName + - dbName + + """ + + def __init__( + self, + catName=None, + dbName=None, + ): + self.catName = catName + self.dbName = dbName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ListStoredProcedureRequest") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 2) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.catName is None: + raise TProtocolException(message="Required field catName is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class StoredProcedure: + """ + Attributes: + - name + - dbName + - catName + - ownerName + - source + + """ + + def __init__( + self, + name=None, + dbName=None, + catName=None, + ownerName=None, + source=None, + ): + self.name = name + self.dbName = dbName + self.catName = catName + self.ownerName = ownerName + self.source = source + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.ownerName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.source = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("StoredProcedure") + if self.name is not None: + oprot.writeFieldBegin("name", TType.STRING, 1) + oprot.writeString(self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 2) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 3) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.ownerName is not None: + oprot.writeFieldBegin("ownerName", TType.STRING, 4) + oprot.writeString(self.ownerName.encode("utf-8") if sys.version_info[0] == 2 else self.ownerName) + oprot.writeFieldEnd() + if self.source is not None: + oprot.writeFieldBegin("source", TType.STRING, 5) + oprot.writeString(self.source.encode("utf-8") if sys.version_info[0] == 2 else self.source) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class AddPackageRequest: + """ + Attributes: + - catName + - dbName + - packageName + - ownerName + - header + - body + + """ + + def __init__( + self, + catName=None, + dbName=None, + packageName=None, + ownerName=None, + header=None, + body=None, + ): + self.catName = catName + self.dbName = dbName + self.packageName = packageName + self.ownerName = ownerName + self.header = header + self.body = body + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.packageName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.ownerName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.header = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.body = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("AddPackageRequest") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 2) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.packageName is not None: + oprot.writeFieldBegin("packageName", TType.STRING, 3) + oprot.writeString(self.packageName.encode("utf-8") if sys.version_info[0] == 2 else self.packageName) + oprot.writeFieldEnd() + if self.ownerName is not None: + oprot.writeFieldBegin("ownerName", TType.STRING, 4) + oprot.writeString(self.ownerName.encode("utf-8") if sys.version_info[0] == 2 else self.ownerName) + oprot.writeFieldEnd() + if self.header is not None: + oprot.writeFieldBegin("header", TType.STRING, 5) + oprot.writeString(self.header.encode("utf-8") if sys.version_info[0] == 2 else self.header) + oprot.writeFieldEnd() + if self.body is not None: + oprot.writeFieldBegin("body", TType.STRING, 6) + oprot.writeString(self.body.encode("utf-8") if sys.version_info[0] == 2 else self.body) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetPackageRequest: + """ + Attributes: + - catName + - dbName + - packageName + + """ + + def __init__( + self, + catName=None, + dbName=None, + packageName=None, + ): + self.catName = catName + self.dbName = dbName + self.packageName = packageName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.packageName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetPackageRequest") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 2) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.packageName is not None: + oprot.writeFieldBegin("packageName", TType.STRING, 3) + oprot.writeString(self.packageName.encode("utf-8") if sys.version_info[0] == 2 else self.packageName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.catName is None: + raise TProtocolException(message="Required field catName is unset!") + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.packageName is None: + raise TProtocolException(message="Required field packageName is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class DropPackageRequest: + """ + Attributes: + - catName + - dbName + - packageName + + """ + + def __init__( + self, + catName=None, + dbName=None, + packageName=None, + ): + self.catName = catName + self.dbName = dbName + self.packageName = packageName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.packageName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("DropPackageRequest") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 2) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.packageName is not None: + oprot.writeFieldBegin("packageName", TType.STRING, 3) + oprot.writeString(self.packageName.encode("utf-8") if sys.version_info[0] == 2 else self.packageName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.catName is None: + raise TProtocolException(message="Required field catName is unset!") + if self.dbName is None: + raise TProtocolException(message="Required field dbName is unset!") + if self.packageName is None: + raise TProtocolException(message="Required field packageName is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ListPackageRequest: + """ + Attributes: + - catName + - dbName + + """ + + def __init__( + self, + catName=None, + dbName=None, + ): + self.catName = catName + self.dbName = dbName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ListPackageRequest") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 2) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.catName is None: + raise TProtocolException(message="Required field catName is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class Package: + """ + Attributes: + - catName + - dbName + - packageName + - ownerName + - header + - body + + """ + + def __init__( + self, + catName=None, + dbName=None, + packageName=None, + ownerName=None, + header=None, + body=None, + ): + self.catName = catName + self.dbName = dbName + self.packageName = packageName + self.ownerName = ownerName + self.header = header + self.body = body + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.catName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.packageName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.ownerName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.header = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.body = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("Package") + if self.catName is not None: + oprot.writeFieldBegin("catName", TType.STRING, 1) + oprot.writeString(self.catName.encode("utf-8") if sys.version_info[0] == 2 else self.catName) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 2) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.packageName is not None: + oprot.writeFieldBegin("packageName", TType.STRING, 3) + oprot.writeString(self.packageName.encode("utf-8") if sys.version_info[0] == 2 else self.packageName) + oprot.writeFieldEnd() + if self.ownerName is not None: + oprot.writeFieldBegin("ownerName", TType.STRING, 4) + oprot.writeString(self.ownerName.encode("utf-8") if sys.version_info[0] == 2 else self.ownerName) + oprot.writeFieldEnd() + if self.header is not None: + oprot.writeFieldBegin("header", TType.STRING, 5) + oprot.writeString(self.header.encode("utf-8") if sys.version_info[0] == 2 else self.header) + oprot.writeFieldEnd() + if self.body is not None: + oprot.writeFieldBegin("body", TType.STRING, 6) + oprot.writeString(self.body.encode("utf-8") if sys.version_info[0] == 2 else self.body) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class GetAllWriteEventInfoRequest: + """ + Attributes: + - txnId + - dbName + - tableName + + """ + + def __init__( + self, + txnId=None, + dbName=None, + tableName=None, + ): + self.txnId = txnId + self.dbName = dbName + self.tableName = tableName + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.txnId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tableName = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("GetAllWriteEventInfoRequest") + if self.txnId is not None: + oprot.writeFieldBegin("txnId", TType.I64, 1) + oprot.writeI64(self.txnId) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin("dbName", TType.STRING, 2) + oprot.writeString(self.dbName.encode("utf-8") if sys.version_info[0] == 2 else self.dbName) + oprot.writeFieldEnd() + if self.tableName is not None: + oprot.writeFieldBegin("tableName", TType.STRING, 3) + oprot.writeString(self.tableName.encode("utf-8") if sys.version_info[0] == 2 else self.tableName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.txnId is None: + raise TProtocolException(message="Required field txnId is unset!") + return + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class MetaException(TException): + """ + Attributes: + - message + + """ + + def __init__( + self, + message=None, + ): + super().__setattr__("message", message) + + def __setattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __delattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __hash__(self): + return hash(self.__class__) ^ hash((self.message,)) + + @classmethod + def read(cls, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): + return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) + iprot.readStructBegin() + message = None + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + message = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + return cls( + message=message, + ) + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("MetaException") + if self.message is not None: + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString(self.message.encode("utf-8") if sys.version_info[0] == 2 else self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class UnknownTableException(TException): + """ + Attributes: + - message + + """ + + def __init__( + self, + message=None, + ): + super().__setattr__("message", message) + + def __setattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __delattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __hash__(self): + return hash(self.__class__) ^ hash((self.message,)) + + @classmethod + def read(cls, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): + return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) + iprot.readStructBegin() + message = None + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + message = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + return cls( + message=message, + ) + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("UnknownTableException") + if self.message is not None: + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString(self.message.encode("utf-8") if sys.version_info[0] == 2 else self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class UnknownDBException(TException): + """ + Attributes: + - message + + """ + + def __init__( + self, + message=None, + ): + super().__setattr__("message", message) + + def __setattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __delattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __hash__(self): + return hash(self.__class__) ^ hash((self.message,)) + + @classmethod + def read(cls, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): + return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) + iprot.readStructBegin() + message = None + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + message = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + return cls( + message=message, + ) + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("UnknownDBException") + if self.message is not None: + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString(self.message.encode("utf-8") if sys.version_info[0] == 2 else self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class AlreadyExistsException(TException): + """ + Attributes: + - message + + """ + + def __init__( + self, + message=None, + ): + super().__setattr__("message", message) + + def __setattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __delattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __hash__(self): + return hash(self.__class__) ^ hash((self.message,)) + + @classmethod + def read(cls, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): + return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) + iprot.readStructBegin() + message = None + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + message = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + return cls( + message=message, + ) + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("AlreadyExistsException") + if self.message is not None: + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString(self.message.encode("utf-8") if sys.version_info[0] == 2 else self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class InvalidPartitionException(TException): + """ + Attributes: + - message + + """ + + def __init__( + self, + message=None, + ): + super().__setattr__("message", message) + + def __setattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __delattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __hash__(self): + return hash(self.__class__) ^ hash((self.message,)) + + @classmethod + def read(cls, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): + return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) + iprot.readStructBegin() + message = None + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + message = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + return cls( + message=message, + ) + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("InvalidPartitionException") + if self.message is not None: + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString(self.message.encode("utf-8") if sys.version_info[0] == 2 else self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class UnknownPartitionException(TException): + """ + Attributes: + - message + + """ + + def __init__( + self, + message=None, + ): + super().__setattr__("message", message) + + def __setattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __delattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __hash__(self): + return hash(self.__class__) ^ hash((self.message,)) + + @classmethod + def read(cls, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): + return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) + iprot.readStructBegin() + message = None + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + message = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + return cls( + message=message, + ) + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("UnknownPartitionException") + if self.message is not None: + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString(self.message.encode("utf-8") if sys.version_info[0] == 2 else self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class InvalidObjectException(TException): + """ + Attributes: + - message + + """ + + def __init__( + self, + message=None, + ): + super().__setattr__("message", message) + + def __setattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __delattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __hash__(self): + return hash(self.__class__) ^ hash((self.message,)) + + @classmethod + def read(cls, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): + return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) + iprot.readStructBegin() + message = None + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + message = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + return cls( + message=message, + ) + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("InvalidObjectException") + if self.message is not None: + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString(self.message.encode("utf-8") if sys.version_info[0] == 2 else self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class NoSuchObjectException(TException): + """ + Attributes: + - message + + """ + + def __init__( + self, + message=None, + ): + super().__setattr__("message", message) + + def __setattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __delattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __hash__(self): + return hash(self.__class__) ^ hash((self.message,)) + + @classmethod + def read(cls, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): + return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) + iprot.readStructBegin() + message = None + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + message = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + return cls( + message=message, + ) + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("NoSuchObjectException") + if self.message is not None: + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString(self.message.encode("utf-8") if sys.version_info[0] == 2 else self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class InvalidOperationException(TException): + """ + Attributes: + - message + + """ + + def __init__( + self, + message=None, + ): + super().__setattr__("message", message) + + def __setattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __delattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __hash__(self): + return hash(self.__class__) ^ hash((self.message,)) + + @classmethod + def read(cls, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): + return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) + iprot.readStructBegin() + message = None + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + message = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + return cls( + message=message, + ) + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("InvalidOperationException") + if self.message is not None: + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString(self.message.encode("utf-8") if sys.version_info[0] == 2 else self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ConfigValSecurityException(TException): + """ + Attributes: + - message + + """ + + def __init__( + self, + message=None, + ): + super().__setattr__("message", message) + + def __setattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __delattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __hash__(self): + return hash(self.__class__) ^ hash((self.message,)) + + @classmethod + def read(cls, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): + return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) + iprot.readStructBegin() + message = None + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + message = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + return cls( + message=message, + ) + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("ConfigValSecurityException") + if self.message is not None: + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString(self.message.encode("utf-8") if sys.version_info[0] == 2 else self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class InvalidInputException(TException): + """ + Attributes: + - message + + """ + + def __init__( + self, + message=None, + ): + super().__setattr__("message", message) + + def __setattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __delattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __hash__(self): + return hash(self.__class__) ^ hash((self.message,)) + + @classmethod + def read(cls, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): + return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) + iprot.readStructBegin() + message = None + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + message = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + return cls( + message=message, + ) + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("InvalidInputException") + if self.message is not None: + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString(self.message.encode("utf-8") if sys.version_info[0] == 2 else self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class NoSuchTxnException(TException): + """ + Attributes: + - message + + """ + + def __init__( + self, + message=None, + ): + super().__setattr__("message", message) + + def __setattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __delattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __hash__(self): + return hash(self.__class__) ^ hash((self.message,)) + + @classmethod + def read(cls, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): + return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) + iprot.readStructBegin() + message = None + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + message = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + return cls( + message=message, + ) + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("NoSuchTxnException") + if self.message is not None: + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString(self.message.encode("utf-8") if sys.version_info[0] == 2 else self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TxnAbortedException(TException): + """ + Attributes: + - message + + """ + + def __init__( + self, + message=None, + ): + super().__setattr__("message", message) + + def __setattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __delattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __hash__(self): + return hash(self.__class__) ^ hash((self.message,)) + + @classmethod + def read(cls, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): + return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) + iprot.readStructBegin() + message = None + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + message = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + return cls( + message=message, + ) + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("TxnAbortedException") + if self.message is not None: + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString(self.message.encode("utf-8") if sys.version_info[0] == 2 else self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TxnOpenException(TException): + """ + Attributes: + - message + + """ + + def __init__( + self, + message=None, + ): + super().__setattr__("message", message) + + def __setattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __delattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __hash__(self): + return hash(self.__class__) ^ hash((self.message,)) + + @classmethod + def read(cls, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): + return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) + iprot.readStructBegin() + message = None + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + message = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + return cls( + message=message, + ) + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("TxnOpenException") + if self.message is not None: + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString(self.message.encode("utf-8") if sys.version_info[0] == 2 else self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class NoSuchLockException(TException): + """ + Attributes: + - message + + """ + + def __init__( + self, + message=None, + ): + super().__setattr__("message", message) + + def __setattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __delattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __hash__(self): + return hash(self.__class__) ^ hash((self.message,)) + + @classmethod + def read(cls, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): + return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) + iprot.readStructBegin() + message = None + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + message = ( + iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + return cls( + message=message, + ) + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin("NoSuchLockException") + if self.message is not None: + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString(self.message.encode("utf-8") if sys.version_info[0] == 2 else self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()] + return "{}({})".format(self.__class__.__name__, ", ".join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +all_structs.append(Version) +Version.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "version", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "comments", + "UTF8", + None, + ), # 2 +) +all_structs.append(FieldSchema) +FieldSchema.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "type", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "comment", + "UTF8", + None, + ), # 3 +) +all_structs.append(EnvironmentContext) +EnvironmentContext.thrift_spec = ( + None, # 0 + ( + 1, + TType.MAP, + "properties", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 1 +) +all_structs.append(SQLPrimaryKey) +SQLPrimaryKey.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "table_db", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "table_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "column_name", + "UTF8", + None, + ), # 3 + ( + 4, + TType.I32, + "key_seq", + None, + None, + ), # 4 + ( + 5, + TType.STRING, + "pk_name", + "UTF8", + None, + ), # 5 + ( + 6, + TType.BOOL, + "enable_cstr", + None, + None, + ), # 6 + ( + 7, + TType.BOOL, + "validate_cstr", + None, + None, + ), # 7 + ( + 8, + TType.BOOL, + "rely_cstr", + None, + None, + ), # 8 + ( + 9, + TType.STRING, + "catName", + "UTF8", + None, + ), # 9 +) +all_structs.append(SQLForeignKey) +SQLForeignKey.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "pktable_db", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "pktable_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "pkcolumn_name", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "fktable_db", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "fktable_name", + "UTF8", + None, + ), # 5 + ( + 6, + TType.STRING, + "fkcolumn_name", + "UTF8", + None, + ), # 6 + ( + 7, + TType.I32, + "key_seq", + None, + None, + ), # 7 + ( + 8, + TType.I32, + "update_rule", + None, + None, + ), # 8 + ( + 9, + TType.I32, + "delete_rule", + None, + None, + ), # 9 + ( + 10, + TType.STRING, + "fk_name", + "UTF8", + None, + ), # 10 + ( + 11, + TType.STRING, + "pk_name", + "UTF8", + None, + ), # 11 + ( + 12, + TType.BOOL, + "enable_cstr", + None, + None, + ), # 12 + ( + 13, + TType.BOOL, + "validate_cstr", + None, + None, + ), # 13 + ( + 14, + TType.BOOL, + "rely_cstr", + None, + None, + ), # 14 + ( + 15, + TType.STRING, + "catName", + "UTF8", + None, + ), # 15 +) +all_structs.append(SQLUniqueConstraint) +SQLUniqueConstraint.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "table_db", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "table_name", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "column_name", + "UTF8", + None, + ), # 4 + ( + 5, + TType.I32, + "key_seq", + None, + None, + ), # 5 + ( + 6, + TType.STRING, + "uk_name", + "UTF8", + None, + ), # 6 + ( + 7, + TType.BOOL, + "enable_cstr", + None, + None, + ), # 7 + ( + 8, + TType.BOOL, + "validate_cstr", + None, + None, + ), # 8 + ( + 9, + TType.BOOL, + "rely_cstr", + None, + None, + ), # 9 +) +all_structs.append(SQLNotNullConstraint) +SQLNotNullConstraint.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "table_db", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "table_name", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "column_name", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "nn_name", + "UTF8", + None, + ), # 5 + ( + 6, + TType.BOOL, + "enable_cstr", + None, + None, + ), # 6 + ( + 7, + TType.BOOL, + "validate_cstr", + None, + None, + ), # 7 + ( + 8, + TType.BOOL, + "rely_cstr", + None, + None, + ), # 8 +) +all_structs.append(SQLDefaultConstraint) +SQLDefaultConstraint.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "table_db", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "table_name", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "column_name", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "default_value", + "UTF8", + None, + ), # 5 + ( + 6, + TType.STRING, + "dc_name", + "UTF8", + None, + ), # 6 + ( + 7, + TType.BOOL, + "enable_cstr", + None, + None, + ), # 7 + ( + 8, + TType.BOOL, + "validate_cstr", + None, + None, + ), # 8 + ( + 9, + TType.BOOL, + "rely_cstr", + None, + None, + ), # 9 +) +all_structs.append(SQLCheckConstraint) +SQLCheckConstraint.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "table_db", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "table_name", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "column_name", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "check_expression", + "UTF8", + None, + ), # 5 + ( + 6, + TType.STRING, + "dc_name", + "UTF8", + None, + ), # 6 + ( + 7, + TType.BOOL, + "enable_cstr", + None, + None, + ), # 7 + ( + 8, + TType.BOOL, + "validate_cstr", + None, + None, + ), # 8 + ( + 9, + TType.BOOL, + "rely_cstr", + None, + None, + ), # 9 +) +all_structs.append(SQLAllTableConstraints) +SQLAllTableConstraints.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "primaryKeys", + (TType.STRUCT, [SQLPrimaryKey, None], False), + None, + ), # 1 + ( + 2, + TType.LIST, + "foreignKeys", + (TType.STRUCT, [SQLForeignKey, None], False), + None, + ), # 2 + ( + 3, + TType.LIST, + "uniqueConstraints", + (TType.STRUCT, [SQLUniqueConstraint, None], False), + None, + ), # 3 + ( + 4, + TType.LIST, + "notNullConstraints", + (TType.STRUCT, [SQLNotNullConstraint, None], False), + None, + ), # 4 + ( + 5, + TType.LIST, + "defaultConstraints", + (TType.STRUCT, [SQLDefaultConstraint, None], False), + None, + ), # 5 + ( + 6, + TType.LIST, + "checkConstraints", + (TType.STRUCT, [SQLCheckConstraint, None], False), + None, + ), # 6 +) +all_structs.append(Type) +Type.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "type1", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "type2", + "UTF8", + None, + ), # 3 + ( + 4, + TType.LIST, + "fields", + (TType.STRUCT, [FieldSchema, None], False), + None, + ), # 4 +) +all_structs.append(HiveObjectRef) +HiveObjectRef.thrift_spec = ( + None, # 0 + ( + 1, + TType.I32, + "objectType", + None, + None, + ), # 1 + ( + 2, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "objectName", + "UTF8", + None, + ), # 3 + ( + 4, + TType.LIST, + "partValues", + (TType.STRING, "UTF8", False), + None, + ), # 4 + ( + 5, + TType.STRING, + "columnName", + "UTF8", + None, + ), # 5 + ( + 6, + TType.STRING, + "catName", + "UTF8", + None, + ), # 6 +) +all_structs.append(PrivilegeGrantInfo) +PrivilegeGrantInfo.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "privilege", + "UTF8", + None, + ), # 1 + ( + 2, + TType.I32, + "createTime", + None, + None, + ), # 2 + ( + 3, + TType.STRING, + "grantor", + "UTF8", + None, + ), # 3 + ( + 4, + TType.I32, + "grantorType", + None, + None, + ), # 4 + ( + 5, + TType.BOOL, + "grantOption", + None, + None, + ), # 5 +) +all_structs.append(HiveObjectPrivilege) +HiveObjectPrivilege.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "hiveObject", + [HiveObjectRef, None], + None, + ), # 1 + ( + 2, + TType.STRING, + "principalName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.I32, + "principalType", + None, + None, + ), # 3 + ( + 4, + TType.STRUCT, + "grantInfo", + [PrivilegeGrantInfo, None], + None, + ), # 4 + ( + 5, + TType.STRING, + "authorizer", + "UTF8", + None, + ), # 5 +) +all_structs.append(PrivilegeBag) +PrivilegeBag.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "privileges", + (TType.STRUCT, [HiveObjectPrivilege, None], False), + None, + ), # 1 +) +all_structs.append(PrincipalPrivilegeSet) +PrincipalPrivilegeSet.thrift_spec = ( + None, # 0 + ( + 1, + TType.MAP, + "userPrivileges", + (TType.STRING, "UTF8", TType.LIST, (TType.STRUCT, [PrivilegeGrantInfo, None], False), False), + None, + ), # 1 + ( + 2, + TType.MAP, + "groupPrivileges", + (TType.STRING, "UTF8", TType.LIST, (TType.STRUCT, [PrivilegeGrantInfo, None], False), False), + None, + ), # 2 + ( + 3, + TType.MAP, + "rolePrivileges", + (TType.STRING, "UTF8", TType.LIST, (TType.STRUCT, [PrivilegeGrantInfo, None], False), False), + None, + ), # 3 +) +all_structs.append(GrantRevokePrivilegeRequest) +GrantRevokePrivilegeRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.I32, + "requestType", + None, + None, + ), # 1 + ( + 2, + TType.STRUCT, + "privileges", + [PrivilegeBag, None], + None, + ), # 2 + ( + 3, + TType.BOOL, + "revokeGrantOption", + None, + None, + ), # 3 +) +all_structs.append(GrantRevokePrivilegeResponse) +GrantRevokePrivilegeResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.BOOL, + "success", + None, + None, + ), # 1 +) +all_structs.append(TruncateTableRequest) +TruncateTableRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tableName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "partNames", + (TType.STRING, "UTF8", False), + None, + ), # 3 + ( + 4, + TType.I64, + "writeId", + None, + -1, + ), # 4 + ( + 5, + TType.STRING, + "validWriteIdList", + "UTF8", + None, + ), # 5 + ( + 6, + TType.STRUCT, + "environmentContext", + [EnvironmentContext, None], + None, + ), # 6 +) +all_structs.append(TruncateTableResponse) +TruncateTableResponse.thrift_spec = () +all_structs.append(Role) +Role.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "roleName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.I32, + "createTime", + None, + None, + ), # 2 + ( + 3, + TType.STRING, + "ownerName", + "UTF8", + None, + ), # 3 +) +all_structs.append(RolePrincipalGrant) +RolePrincipalGrant.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "roleName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "principalName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.I32, + "principalType", + None, + None, + ), # 3 + ( + 4, + TType.BOOL, + "grantOption", + None, + None, + ), # 4 + ( + 5, + TType.I32, + "grantTime", + None, + None, + ), # 5 + ( + 6, + TType.STRING, + "grantorName", + "UTF8", + None, + ), # 6 + ( + 7, + TType.I32, + "grantorPrincipalType", + None, + None, + ), # 7 +) +all_structs.append(GetRoleGrantsForPrincipalRequest) +GetRoleGrantsForPrincipalRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "principal_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.I32, + "principal_type", + None, + None, + ), # 2 +) +all_structs.append(GetRoleGrantsForPrincipalResponse) +GetRoleGrantsForPrincipalResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "principalGrants", + (TType.STRUCT, [RolePrincipalGrant, None], False), + None, + ), # 1 +) +all_structs.append(GetPrincipalsInRoleRequest) +GetPrincipalsInRoleRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "roleName", + "UTF8", + None, + ), # 1 +) +all_structs.append(GetPrincipalsInRoleResponse) +GetPrincipalsInRoleResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "principalGrants", + (TType.STRUCT, [RolePrincipalGrant, None], False), + None, + ), # 1 +) +all_structs.append(GrantRevokeRoleRequest) +GrantRevokeRoleRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.I32, + "requestType", + None, + None, + ), # 1 + ( + 2, + TType.STRING, + "roleName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "principalName", + "UTF8", + None, + ), # 3 + ( + 4, + TType.I32, + "principalType", + None, + None, + ), # 4 + ( + 5, + TType.STRING, + "grantor", + "UTF8", + None, + ), # 5 + ( + 6, + TType.I32, + "grantorType", + None, + None, + ), # 6 + ( + 7, + TType.BOOL, + "grantOption", + None, + None, + ), # 7 +) +all_structs.append(GrantRevokeRoleResponse) +GrantRevokeRoleResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.BOOL, + "success", + None, + None, + ), # 1 +) +all_structs.append(Catalog) +Catalog.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "description", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "locationUri", + "UTF8", + None, + ), # 3 + ( + 4, + TType.I32, + "createTime", + None, + None, + ), # 4 +) +all_structs.append(CreateCatalogRequest) +CreateCatalogRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "catalog", + [Catalog, None], + None, + ), # 1 +) +all_structs.append(AlterCatalogRequest) +AlterCatalogRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRUCT, + "newCat", + [Catalog, None], + None, + ), # 2 +) +all_structs.append(GetCatalogRequest) +GetCatalogRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "name", + "UTF8", + None, + ), # 1 +) +all_structs.append(GetCatalogResponse) +GetCatalogResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "catalog", + [Catalog, None], + None, + ), # 1 +) +all_structs.append(GetCatalogsResponse) +GetCatalogsResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "names", + (TType.STRING, "UTF8", False), + None, + ), # 1 +) +all_structs.append(DropCatalogRequest) +DropCatalogRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "name", + "UTF8", + None, + ), # 1 +) +all_structs.append(Database) +Database.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "description", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "locationUri", + "UTF8", + None, + ), # 3 + ( + 4, + TType.MAP, + "parameters", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 4 + ( + 5, + TType.STRUCT, + "privileges", + [PrincipalPrivilegeSet, None], + None, + ), # 5 + ( + 6, + TType.STRING, + "ownerName", + "UTF8", + None, + ), # 6 + ( + 7, + TType.I32, + "ownerType", + None, + None, + ), # 7 + ( + 8, + TType.STRING, + "catalogName", + "UTF8", + None, + ), # 8 + ( + 9, + TType.I32, + "createTime", + None, + None, + ), # 9 + ( + 10, + TType.STRING, + "managedLocationUri", + "UTF8", + None, + ), # 10 + ( + 11, + TType.I32, + "type", + None, + None, + ), # 11 + ( + 12, + TType.STRING, + "connector_name", + "UTF8", + None, + ), # 12 + ( + 13, + TType.STRING, + "remote_dbname", + "UTF8", + None, + ), # 13 +) +all_structs.append(SerDeInfo) +SerDeInfo.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "serializationLib", + "UTF8", + None, + ), # 2 + ( + 3, + TType.MAP, + "parameters", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 3 + ( + 4, + TType.STRING, + "description", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "serializerClass", + "UTF8", + None, + ), # 5 + ( + 6, + TType.STRING, + "deserializerClass", + "UTF8", + None, + ), # 6 + ( + 7, + TType.I32, + "serdeType", + None, + None, + ), # 7 +) +all_structs.append(Order) +Order.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "col", + "UTF8", + None, + ), # 1 + ( + 2, + TType.I32, + "order", + None, + None, + ), # 2 +) +all_structs.append(SkewedInfo) +SkewedInfo.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "skewedColNames", + (TType.STRING, "UTF8", False), + None, + ), # 1 + ( + 2, + TType.LIST, + "skewedColValues", + (TType.LIST, (TType.STRING, "UTF8", False), False), + None, + ), # 2 + ( + 3, + TType.MAP, + "skewedColValueLocationMaps", + (TType.LIST, (TType.STRING, "UTF8", False), TType.STRING, "UTF8", False), + None, + ), # 3 +) +all_structs.append(StorageDescriptor) +StorageDescriptor.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "cols", + (TType.STRUCT, [FieldSchema, None], False), + None, + ), # 1 + ( + 2, + TType.STRING, + "location", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "inputFormat", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "outputFormat", + "UTF8", + None, + ), # 4 + ( + 5, + TType.BOOL, + "compressed", + None, + None, + ), # 5 + ( + 6, + TType.I32, + "numBuckets", + None, + None, + ), # 6 + ( + 7, + TType.STRUCT, + "serdeInfo", + [SerDeInfo, None], + None, + ), # 7 + ( + 8, + TType.LIST, + "bucketCols", + (TType.STRING, "UTF8", False), + None, + ), # 8 + ( + 9, + TType.LIST, + "sortCols", + (TType.STRUCT, [Order, None], False), + None, + ), # 9 + ( + 10, + TType.MAP, + "parameters", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 10 + ( + 11, + TType.STRUCT, + "skewedInfo", + [SkewedInfo, None], + None, + ), # 11 + ( + 12, + TType.BOOL, + "storedAsSubDirectories", + None, + None, + ), # 12 +) +all_structs.append(CreationMetadata) +CreationMetadata.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "tblName", + "UTF8", + None, + ), # 3 + ( + 4, + TType.SET, + "tablesUsed", + (TType.STRING, "UTF8", False), + None, + ), # 4 + ( + 5, + TType.STRING, + "validTxnList", + "UTF8", + None, + ), # 5 + ( + 6, + TType.I64, + "materializationTime", + None, + None, + ), # 6 + ( + 7, + TType.LIST, + "sourceTables", + (TType.STRUCT, [SourceTable, None], False), + None, + ), # 7 +) +all_structs.append(BooleanColumnStatsData) +BooleanColumnStatsData.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "numTrues", + None, + None, + ), # 1 + ( + 2, + TType.I64, + "numFalses", + None, + None, + ), # 2 + ( + 3, + TType.I64, + "numNulls", + None, + None, + ), # 3 + ( + 4, + TType.STRING, + "bitVectors", + "BINARY", + None, + ), # 4 +) +all_structs.append(DoubleColumnStatsData) +DoubleColumnStatsData.thrift_spec = ( + None, # 0 + ( + 1, + TType.DOUBLE, + "lowValue", + None, + None, + ), # 1 + ( + 2, + TType.DOUBLE, + "highValue", + None, + None, + ), # 2 + ( + 3, + TType.I64, + "numNulls", + None, + None, + ), # 3 + ( + 4, + TType.I64, + "numDVs", + None, + None, + ), # 4 + ( + 5, + TType.STRING, + "bitVectors", + "BINARY", + None, + ), # 5 +) +all_structs.append(LongColumnStatsData) +LongColumnStatsData.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "lowValue", + None, + None, + ), # 1 + ( + 2, + TType.I64, + "highValue", + None, + None, + ), # 2 + ( + 3, + TType.I64, + "numNulls", + None, + None, + ), # 3 + ( + 4, + TType.I64, + "numDVs", + None, + None, + ), # 4 + ( + 5, + TType.STRING, + "bitVectors", + "BINARY", + None, + ), # 5 +) +all_structs.append(StringColumnStatsData) +StringColumnStatsData.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "maxColLen", + None, + None, + ), # 1 + ( + 2, + TType.DOUBLE, + "avgColLen", + None, + None, + ), # 2 + ( + 3, + TType.I64, + "numNulls", + None, + None, + ), # 3 + ( + 4, + TType.I64, + "numDVs", + None, + None, + ), # 4 + ( + 5, + TType.STRING, + "bitVectors", + "BINARY", + None, + ), # 5 +) +all_structs.append(BinaryColumnStatsData) +BinaryColumnStatsData.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "maxColLen", + None, + None, + ), # 1 + ( + 2, + TType.DOUBLE, + "avgColLen", + None, + None, + ), # 2 + ( + 3, + TType.I64, + "numNulls", + None, + None, + ), # 3 + ( + 4, + TType.STRING, + "bitVectors", + "BINARY", + None, + ), # 4 +) +all_structs.append(Decimal) +Decimal.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "unscaled", + "BINARY", + None, + ), # 1 + None, # 2 + ( + 3, + TType.I16, + "scale", + None, + None, + ), # 3 +) +all_structs.append(DecimalColumnStatsData) +DecimalColumnStatsData.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "lowValue", + [Decimal, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "highValue", + [Decimal, None], + None, + ), # 2 + ( + 3, + TType.I64, + "numNulls", + None, + None, + ), # 3 + ( + 4, + TType.I64, + "numDVs", + None, + None, + ), # 4 + ( + 5, + TType.STRING, + "bitVectors", + "BINARY", + None, + ), # 5 +) +all_structs.append(Date) +Date.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "daysSinceEpoch", + None, + None, + ), # 1 +) +all_structs.append(DateColumnStatsData) +DateColumnStatsData.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "lowValue", + [Date, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "highValue", + [Date, None], + None, + ), # 2 + ( + 3, + TType.I64, + "numNulls", + None, + None, + ), # 3 + ( + 4, + TType.I64, + "numDVs", + None, + None, + ), # 4 + ( + 5, + TType.STRING, + "bitVectors", + "BINARY", + None, + ), # 5 +) +all_structs.append(Timestamp) +Timestamp.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "secondsSinceEpoch", + None, + None, + ), # 1 +) +all_structs.append(TimestampColumnStatsData) +TimestampColumnStatsData.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "lowValue", + [Timestamp, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "highValue", + [Timestamp, None], + None, + ), # 2 + ( + 3, + TType.I64, + "numNulls", + None, + None, + ), # 3 + ( + 4, + TType.I64, + "numDVs", + None, + None, + ), # 4 + ( + 5, + TType.STRING, + "bitVectors", + "BINARY", + None, + ), # 5 +) +all_structs.append(ColumnStatisticsData) +ColumnStatisticsData.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "booleanStats", + [BooleanColumnStatsData, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "longStats", + [LongColumnStatsData, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "doubleStats", + [DoubleColumnStatsData, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "stringStats", + [StringColumnStatsData, None], + None, + ), # 4 + ( + 5, + TType.STRUCT, + "binaryStats", + [BinaryColumnStatsData, None], + None, + ), # 5 + ( + 6, + TType.STRUCT, + "decimalStats", + [DecimalColumnStatsData, None], + None, + ), # 6 + ( + 7, + TType.STRUCT, + "dateStats", + [DateColumnStatsData, None], + None, + ), # 7 + ( + 8, + TType.STRUCT, + "timestampStats", + [TimestampColumnStatsData, None], + None, + ), # 8 +) +all_structs.append(ColumnStatisticsObj) +ColumnStatisticsObj.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "colName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "colType", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRUCT, + "statsData", + [ColumnStatisticsData, None], + None, + ), # 3 +) +all_structs.append(ColumnStatisticsDesc) +ColumnStatisticsDesc.thrift_spec = ( + None, # 0 + ( + 1, + TType.BOOL, + "isTblLevel", + None, + None, + ), # 1 + ( + 2, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "tableName", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "partName", + "UTF8", + None, + ), # 4 + ( + 5, + TType.I64, + "lastAnalyzed", + None, + None, + ), # 5 + ( + 6, + TType.STRING, + "catName", + "UTF8", + None, + ), # 6 +) +all_structs.append(ColumnStatistics) +ColumnStatistics.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "statsDesc", + [ColumnStatisticsDesc, None], + None, + ), # 1 + ( + 2, + TType.LIST, + "statsObj", + (TType.STRUCT, [ColumnStatisticsObj, None], False), + None, + ), # 2 + ( + 3, + TType.BOOL, + "isStatsCompliant", + None, + None, + ), # 3 + ( + 4, + TType.STRING, + "engine", + "UTF8", + None, + ), # 4 +) +all_structs.append(FileMetadata) +FileMetadata.thrift_spec = ( + None, # 0 + ( + 1, + TType.BYTE, + "type", + None, + 1, + ), # 1 + ( + 2, + TType.BYTE, + "version", + None, + 1, + ), # 2 + ( + 3, + TType.LIST, + "data", + (TType.STRING, "BINARY", False), + None, + ), # 3 +) +all_structs.append(ObjectDictionary) +ObjectDictionary.thrift_spec = ( + None, # 0 + ( + 1, + TType.MAP, + "values", + (TType.STRING, "UTF8", TType.LIST, (TType.STRING, "BINARY", False), False), + None, + ), # 1 +) +all_structs.append(Table) +Table.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "tableName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "owner", + "UTF8", + None, + ), # 3 + ( + 4, + TType.I32, + "createTime", + None, + None, + ), # 4 + ( + 5, + TType.I32, + "lastAccessTime", + None, + None, + ), # 5 + ( + 6, + TType.I32, + "retention", + None, + None, + ), # 6 + ( + 7, + TType.STRUCT, + "sd", + [StorageDescriptor, None], + None, + ), # 7 + ( + 8, + TType.LIST, + "partitionKeys", + (TType.STRUCT, [FieldSchema, None], False), + None, + ), # 8 + ( + 9, + TType.MAP, + "parameters", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 9 + ( + 10, + TType.STRING, + "viewOriginalText", + "UTF8", + None, + ), # 10 + ( + 11, + TType.STRING, + "viewExpandedText", + "UTF8", + None, + ), # 11 + ( + 12, + TType.STRING, + "tableType", + "UTF8", + None, + ), # 12 + ( + 13, + TType.STRUCT, + "privileges", + [PrincipalPrivilegeSet, None], + None, + ), # 13 + ( + 14, + TType.BOOL, + "temporary", + None, + False, + ), # 14 + ( + 15, + TType.BOOL, + "rewriteEnabled", + None, + None, + ), # 15 + ( + 16, + TType.STRUCT, + "creationMetadata", + [CreationMetadata, None], + None, + ), # 16 + ( + 17, + TType.STRING, + "catName", + "UTF8", + None, + ), # 17 + ( + 18, + TType.I32, + "ownerType", + None, + 1, + ), # 18 + ( + 19, + TType.I64, + "writeId", + None, + -1, + ), # 19 + ( + 20, + TType.BOOL, + "isStatsCompliant", + None, + None, + ), # 20 + ( + 21, + TType.STRUCT, + "colStats", + [ColumnStatistics, None], + None, + ), # 21 + ( + 22, + TType.BYTE, + "accessType", + None, + None, + ), # 22 + ( + 23, + TType.LIST, + "requiredReadCapabilities", + (TType.STRING, "UTF8", False), + None, + ), # 23 + ( + 24, + TType.LIST, + "requiredWriteCapabilities", + (TType.STRING, "UTF8", False), + None, + ), # 24 + ( + 25, + TType.I64, + "id", + None, + None, + ), # 25 + ( + 26, + TType.STRUCT, + "fileMetadata", + [FileMetadata, None], + None, + ), # 26 + ( + 27, + TType.STRUCT, + "dictionary", + [ObjectDictionary, None], + None, + ), # 27 + ( + 28, + TType.I64, + "txnId", + None, + None, + ), # 28 +) +all_structs.append(SourceTable) +SourceTable.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "table", + [Table, None], + None, + ), # 1 + ( + 2, + TType.I64, + "insertedCount", + None, + None, + ), # 2 + ( + 3, + TType.I64, + "updatedCount", + None, + None, + ), # 3 + ( + 4, + TType.I64, + "deletedCount", + None, + None, + ), # 4 +) +all_structs.append(Partition) +Partition.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "values", + (TType.STRING, "UTF8", False), + None, + ), # 1 + ( + 2, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "tableName", + "UTF8", + None, + ), # 3 + ( + 4, + TType.I32, + "createTime", + None, + None, + ), # 4 + ( + 5, + TType.I32, + "lastAccessTime", + None, + None, + ), # 5 + ( + 6, + TType.STRUCT, + "sd", + [StorageDescriptor, None], + None, + ), # 6 + ( + 7, + TType.MAP, + "parameters", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 7 + ( + 8, + TType.STRUCT, + "privileges", + [PrincipalPrivilegeSet, None], + None, + ), # 8 + ( + 9, + TType.STRING, + "catName", + "UTF8", + None, + ), # 9 + ( + 10, + TType.I64, + "writeId", + None, + -1, + ), # 10 + ( + 11, + TType.BOOL, + "isStatsCompliant", + None, + None, + ), # 11 + ( + 12, + TType.STRUCT, + "colStats", + [ColumnStatistics, None], + None, + ), # 12 + ( + 13, + TType.STRUCT, + "fileMetadata", + [FileMetadata, None], + None, + ), # 13 +) +all_structs.append(PartitionWithoutSD) +PartitionWithoutSD.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "values", + (TType.STRING, "UTF8", False), + None, + ), # 1 + ( + 2, + TType.I32, + "createTime", + None, + None, + ), # 2 + ( + 3, + TType.I32, + "lastAccessTime", + None, + None, + ), # 3 + ( + 4, + TType.STRING, + "relativePath", + "UTF8", + None, + ), # 4 + ( + 5, + TType.MAP, + "parameters", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 5 + ( + 6, + TType.STRUCT, + "privileges", + [PrincipalPrivilegeSet, None], + None, + ), # 6 +) +all_structs.append(PartitionSpecWithSharedSD) +PartitionSpecWithSharedSD.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "partitions", + (TType.STRUCT, [PartitionWithoutSD, None], False), + None, + ), # 1 + ( + 2, + TType.STRUCT, + "sd", + [StorageDescriptor, None], + None, + ), # 2 +) +all_structs.append(PartitionListComposingSpec) +PartitionListComposingSpec.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "partitions", + (TType.STRUCT, [Partition, None], False), + None, + ), # 1 +) +all_structs.append(PartitionSpec) +PartitionSpec.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tableName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "rootPath", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRUCT, + "sharedSDPartitionSpec", + [PartitionSpecWithSharedSD, None], + None, + ), # 4 + ( + 5, + TType.STRUCT, + "partitionList", + [PartitionListComposingSpec, None], + None, + ), # 5 + ( + 6, + TType.STRING, + "catName", + "UTF8", + None, + ), # 6 + ( + 7, + TType.I64, + "writeId", + None, + -1, + ), # 7 + ( + 8, + TType.BOOL, + "isStatsCompliant", + None, + None, + ), # 8 +) +all_structs.append(AggrStats) +AggrStats.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "colStats", + (TType.STRUCT, [ColumnStatisticsObj, None], False), + None, + ), # 1 + ( + 2, + TType.I64, + "partsFound", + None, + None, + ), # 2 + ( + 3, + TType.BOOL, + "isStatsCompliant", + None, + None, + ), # 3 +) +all_structs.append(SetPartitionsStatsRequest) +SetPartitionsStatsRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "colStats", + (TType.STRUCT, [ColumnStatistics, None], False), + None, + ), # 1 + ( + 2, + TType.BOOL, + "needMerge", + None, + None, + ), # 2 + ( + 3, + TType.I64, + "writeId", + None, + -1, + ), # 3 + ( + 4, + TType.STRING, + "validWriteIdList", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "engine", + "UTF8", + None, + ), # 5 +) +all_structs.append(SetPartitionsStatsResponse) +SetPartitionsStatsResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.BOOL, + "result", + None, + None, + ), # 1 +) +all_structs.append(Schema) +Schema.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "fieldSchemas", + (TType.STRUCT, [FieldSchema, None], False), + None, + ), # 1 + ( + 2, + TType.MAP, + "properties", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 2 +) +all_structs.append(PrimaryKeysRequest) +PrimaryKeysRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "catName", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "validWriteIdList", + "UTF8", + None, + ), # 4 + ( + 5, + TType.I64, + "tableId", + None, + -1, + ), # 5 +) +all_structs.append(PrimaryKeysResponse) +PrimaryKeysResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "primaryKeys", + (TType.STRUCT, [SQLPrimaryKey, None], False), + None, + ), # 1 +) +all_structs.append(ForeignKeysRequest) +ForeignKeysRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "parent_db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "parent_tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "foreign_db_name", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "foreign_tbl_name", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "catName", + "UTF8", + None, + ), # 5 + ( + 6, + TType.STRING, + "validWriteIdList", + "UTF8", + None, + ), # 6 + ( + 7, + TType.I64, + "tableId", + None, + -1, + ), # 7 +) +all_structs.append(ForeignKeysResponse) +ForeignKeysResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "foreignKeys", + (TType.STRUCT, [SQLForeignKey, None], False), + None, + ), # 1 +) +all_structs.append(UniqueConstraintsRequest) +UniqueConstraintsRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "validWriteIdList", + "UTF8", + None, + ), # 4 + ( + 5, + TType.I64, + "tableId", + None, + -1, + ), # 5 +) +all_structs.append(UniqueConstraintsResponse) +UniqueConstraintsResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "uniqueConstraints", + (TType.STRUCT, [SQLUniqueConstraint, None], False), + None, + ), # 1 +) +all_structs.append(NotNullConstraintsRequest) +NotNullConstraintsRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "validWriteIdList", + "UTF8", + None, + ), # 4 + ( + 5, + TType.I64, + "tableId", + None, + -1, + ), # 5 +) +all_structs.append(NotNullConstraintsResponse) +NotNullConstraintsResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "notNullConstraints", + (TType.STRUCT, [SQLNotNullConstraint, None], False), + None, + ), # 1 +) +all_structs.append(DefaultConstraintsRequest) +DefaultConstraintsRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "validWriteIdList", + "UTF8", + None, + ), # 4 + ( + 5, + TType.I64, + "tableId", + None, + -1, + ), # 5 +) +all_structs.append(DefaultConstraintsResponse) +DefaultConstraintsResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "defaultConstraints", + (TType.STRUCT, [SQLDefaultConstraint, None], False), + None, + ), # 1 +) +all_structs.append(CheckConstraintsRequest) +CheckConstraintsRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "validWriteIdList", + "UTF8", + None, + ), # 4 + ( + 5, + TType.I64, + "tableId", + None, + -1, + ), # 5 +) +all_structs.append(CheckConstraintsResponse) +CheckConstraintsResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "checkConstraints", + (TType.STRUCT, [SQLCheckConstraint, None], False), + None, + ), # 1 +) +all_structs.append(AllTableConstraintsRequest) +AllTableConstraintsRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tblName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "catName", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "validWriteIdList", + "UTF8", + None, + ), # 4 + ( + 5, + TType.I64, + "tableId", + None, + -1, + ), # 5 +) +all_structs.append(AllTableConstraintsResponse) +AllTableConstraintsResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "allTableConstraints", + [SQLAllTableConstraints, None], + None, + ), # 1 +) +all_structs.append(DropConstraintRequest) +DropConstraintRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbname", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tablename", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "constraintname", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "catName", + "UTF8", + None, + ), # 4 +) +all_structs.append(AddPrimaryKeyRequest) +AddPrimaryKeyRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "primaryKeyCols", + (TType.STRUCT, [SQLPrimaryKey, None], False), + None, + ), # 1 +) +all_structs.append(AddForeignKeyRequest) +AddForeignKeyRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "foreignKeyCols", + (TType.STRUCT, [SQLForeignKey, None], False), + None, + ), # 1 +) +all_structs.append(AddUniqueConstraintRequest) +AddUniqueConstraintRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "uniqueConstraintCols", + (TType.STRUCT, [SQLUniqueConstraint, None], False), + None, + ), # 1 +) +all_structs.append(AddNotNullConstraintRequest) +AddNotNullConstraintRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "notNullConstraintCols", + (TType.STRUCT, [SQLNotNullConstraint, None], False), + None, + ), # 1 +) +all_structs.append(AddDefaultConstraintRequest) +AddDefaultConstraintRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "defaultConstraintCols", + (TType.STRUCT, [SQLDefaultConstraint, None], False), + None, + ), # 1 +) +all_structs.append(AddCheckConstraintRequest) +AddCheckConstraintRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "checkConstraintCols", + (TType.STRUCT, [SQLCheckConstraint, None], False), + None, + ), # 1 +) +all_structs.append(PartitionsByExprResult) +PartitionsByExprResult.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "partitions", + (TType.STRUCT, [Partition, None], False), + None, + ), # 1 + ( + 2, + TType.BOOL, + "hasUnknownPartitions", + None, + None, + ), # 2 +) +all_structs.append(PartitionsSpecByExprResult) +PartitionsSpecByExprResult.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "partitionsSpec", + (TType.STRUCT, [PartitionSpec, None], False), + None, + ), # 1 + ( + 2, + TType.BOOL, + "hasUnknownPartitions", + None, + None, + ), # 2 +) +all_structs.append(PartitionsByExprRequest) +PartitionsByExprRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tblName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "expr", + "BINARY", + None, + ), # 3 + ( + 4, + TType.STRING, + "defaultPartitionName", + "UTF8", + None, + ), # 4 + ( + 5, + TType.I16, + "maxParts", + None, + -1, + ), # 5 + ( + 6, + TType.STRING, + "catName", + "UTF8", + None, + ), # 6 + ( + 7, + TType.STRING, + "order", + "UTF8", + None, + ), # 7 + ( + 8, + TType.STRING, + "validWriteIdList", + "UTF8", + None, + ), # 8 + ( + 9, + TType.I64, + "id", + None, + -1, + ), # 9 +) +all_structs.append(TableStatsResult) +TableStatsResult.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "tableStats", + (TType.STRUCT, [ColumnStatisticsObj, None], False), + None, + ), # 1 + ( + 2, + TType.BOOL, + "isStatsCompliant", + None, + None, + ), # 2 +) +all_structs.append(PartitionsStatsResult) +PartitionsStatsResult.thrift_spec = ( + None, # 0 + ( + 1, + TType.MAP, + "partStats", + (TType.STRING, "UTF8", TType.LIST, (TType.STRUCT, [ColumnStatisticsObj, None], False), False), + None, + ), # 1 + ( + 2, + TType.BOOL, + "isStatsCompliant", + None, + None, + ), # 2 +) +all_structs.append(TableStatsRequest) +TableStatsRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tblName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "colNames", + (TType.STRING, "UTF8", False), + None, + ), # 3 + ( + 4, + TType.STRING, + "catName", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "validWriteIdList", + "UTF8", + None, + ), # 5 + ( + 6, + TType.STRING, + "engine", + "UTF8", + None, + ), # 6 + ( + 7, + TType.I64, + "id", + None, + -1, + ), # 7 +) +all_structs.append(PartitionsStatsRequest) +PartitionsStatsRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tblName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "colNames", + (TType.STRING, "UTF8", False), + None, + ), # 3 + ( + 4, + TType.LIST, + "partNames", + (TType.STRING, "UTF8", False), + None, + ), # 4 + ( + 5, + TType.STRING, + "catName", + "UTF8", + None, + ), # 5 + ( + 6, + TType.STRING, + "validWriteIdList", + "UTF8", + None, + ), # 6 + ( + 7, + TType.STRING, + "engine", + "UTF8", + None, + ), # 7 +) +all_structs.append(AddPartitionsResult) +AddPartitionsResult.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "partitions", + (TType.STRUCT, [Partition, None], False), + None, + ), # 1 + ( + 2, + TType.BOOL, + "isStatsCompliant", + None, + None, + ), # 2 +) +all_structs.append(AddPartitionsRequest) +AddPartitionsRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tblName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "parts", + (TType.STRUCT, [Partition, None], False), + None, + ), # 3 + ( + 4, + TType.BOOL, + "ifNotExists", + None, + None, + ), # 4 + ( + 5, + TType.BOOL, + "needResult", + None, + True, + ), # 5 + ( + 6, + TType.STRING, + "catName", + "UTF8", + None, + ), # 6 + ( + 7, + TType.STRING, + "validWriteIdList", + "UTF8", + None, + ), # 7 +) +all_structs.append(DropPartitionsResult) +DropPartitionsResult.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "partitions", + (TType.STRUCT, [Partition, None], False), + None, + ), # 1 +) +all_structs.append(DropPartitionsExpr) +DropPartitionsExpr.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "expr", + "BINARY", + None, + ), # 1 + ( + 2, + TType.I32, + "partArchiveLevel", + None, + None, + ), # 2 +) +all_structs.append(RequestPartsSpec) +RequestPartsSpec.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "names", + (TType.STRING, "UTF8", False), + None, + ), # 1 + ( + 2, + TType.LIST, + "exprs", + (TType.STRUCT, [DropPartitionsExpr, None], False), + None, + ), # 2 +) +all_structs.append(DropPartitionsRequest) +DropPartitionsRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tblName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRUCT, + "parts", + [RequestPartsSpec, None], + None, + ), # 3 + ( + 4, + TType.BOOL, + "deleteData", + None, + None, + ), # 4 + ( + 5, + TType.BOOL, + "ifExists", + None, + True, + ), # 5 + ( + 6, + TType.BOOL, + "ignoreProtection", + None, + None, + ), # 6 + ( + 7, + TType.STRUCT, + "environmentContext", + [EnvironmentContext, None], + None, + ), # 7 + ( + 8, + TType.BOOL, + "needResult", + None, + True, + ), # 8 + ( + 9, + TType.STRING, + "catName", + "UTF8", + None, + ), # 9 +) +all_structs.append(PartitionValuesRequest) +PartitionValuesRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tblName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "partitionKeys", + (TType.STRUCT, [FieldSchema, None], False), + None, + ), # 3 + ( + 4, + TType.BOOL, + "applyDistinct", + None, + True, + ), # 4 + ( + 5, + TType.STRING, + "filter", + "UTF8", + None, + ), # 5 + ( + 6, + TType.LIST, + "partitionOrder", + (TType.STRUCT, [FieldSchema, None], False), + None, + ), # 6 + ( + 7, + TType.BOOL, + "ascending", + None, + True, + ), # 7 + ( + 8, + TType.I64, + "maxParts", + None, + -1, + ), # 8 + ( + 9, + TType.STRING, + "catName", + "UTF8", + None, + ), # 9 + ( + 10, + TType.STRING, + "validWriteIdList", + "UTF8", + None, + ), # 10 +) +all_structs.append(PartitionValuesRow) +PartitionValuesRow.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "row", + (TType.STRING, "UTF8", False), + None, + ), # 1 +) +all_structs.append(PartitionValuesResponse) +PartitionValuesResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "partitionValues", + (TType.STRUCT, [PartitionValuesRow, None], False), + None, + ), # 1 +) +all_structs.append(GetPartitionsByNamesRequest) +GetPartitionsByNamesRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "db_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tbl_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "names", + (TType.STRING, "UTF8", False), + None, + ), # 3 + ( + 4, + TType.BOOL, + "get_col_stats", + None, + None, + ), # 4 + ( + 5, + TType.LIST, + "processorCapabilities", + (TType.STRING, "UTF8", False), + None, + ), # 5 + ( + 6, + TType.STRING, + "processorIdentifier", + "UTF8", + None, + ), # 6 + ( + 7, + TType.STRING, + "engine", + "UTF8", + None, + ), # 7 + ( + 8, + TType.STRING, + "validWriteIdList", + "UTF8", + None, + ), # 8 + ( + 9, + TType.BOOL, + "getFileMetadata", + None, + None, + ), # 9 + ( + 10, + TType.I64, + "id", + None, + -1, + ), # 10 +) +all_structs.append(GetPartitionsByNamesResult) +GetPartitionsByNamesResult.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "partitions", + (TType.STRUCT, [Partition, None], False), + None, + ), # 1 + ( + 2, + TType.STRUCT, + "dictionary", + [ObjectDictionary, None], + None, + ), # 2 +) +all_structs.append(DataConnector) +DataConnector.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "type", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "url", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "description", + "UTF8", + None, + ), # 4 + ( + 5, + TType.MAP, + "parameters", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 5 + ( + 6, + TType.STRING, + "ownerName", + "UTF8", + None, + ), # 6 + ( + 7, + TType.I32, + "ownerType", + None, + None, + ), # 7 + ( + 8, + TType.I32, + "createTime", + None, + None, + ), # 8 +) +all_structs.append(ResourceUri) +ResourceUri.thrift_spec = ( + None, # 0 + ( + 1, + TType.I32, + "resourceType", + None, + None, + ), # 1 + ( + 2, + TType.STRING, + "uri", + "UTF8", + None, + ), # 2 +) +all_structs.append(Function) +Function.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "functionName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "className", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "ownerName", + "UTF8", + None, + ), # 4 + ( + 5, + TType.I32, + "ownerType", + None, + None, + ), # 5 + ( + 6, + TType.I32, + "createTime", + None, + None, + ), # 6 + ( + 7, + TType.I32, + "functionType", + None, + None, + ), # 7 + ( + 8, + TType.LIST, + "resourceUris", + (TType.STRUCT, [ResourceUri, None], False), + None, + ), # 8 + ( + 9, + TType.STRING, + "catName", + "UTF8", + None, + ), # 9 +) +all_structs.append(TxnInfo) +TxnInfo.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "id", + None, + None, + ), # 1 + ( + 2, + TType.I32, + "state", + None, + None, + ), # 2 + ( + 3, + TType.STRING, + "user", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "hostname", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "agentInfo", + "UTF8", + "Unknown", + ), # 5 + ( + 6, + TType.I32, + "heartbeatCount", + None, + 0, + ), # 6 + ( + 7, + TType.STRING, + "metaInfo", + "UTF8", + None, + ), # 7 + ( + 8, + TType.I64, + "startedTime", + None, + None, + ), # 8 + ( + 9, + TType.I64, + "lastHeartbeatTime", + None, + None, + ), # 9 +) +all_structs.append(GetOpenTxnsInfoResponse) +GetOpenTxnsInfoResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "txn_high_water_mark", + None, + None, + ), # 1 + ( + 2, + TType.LIST, + "open_txns", + (TType.STRUCT, [TxnInfo, None], False), + None, + ), # 2 +) +all_structs.append(GetOpenTxnsResponse) +GetOpenTxnsResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "txn_high_water_mark", + None, + None, + ), # 1 + ( + 2, + TType.LIST, + "open_txns", + (TType.I64, None, False), + None, + ), # 2 + ( + 3, + TType.I64, + "min_open_txn", + None, + None, + ), # 3 + ( + 4, + TType.STRING, + "abortedBits", + "BINARY", + None, + ), # 4 +) +all_structs.append(OpenTxnRequest) +OpenTxnRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.I32, + "num_txns", + None, + None, + ), # 1 + ( + 2, + TType.STRING, + "user", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "hostname", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "agentInfo", + "UTF8", + "Unknown", + ), # 4 + ( + 5, + TType.STRING, + "replPolicy", + "UTF8", + None, + ), # 5 + ( + 6, + TType.LIST, + "replSrcTxnIds", + (TType.I64, None, False), + None, + ), # 6 + ( + 7, + TType.I32, + "txn_type", + None, + 0, + ), # 7 +) +all_structs.append(OpenTxnsResponse) +OpenTxnsResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "txn_ids", + (TType.I64, None, False), + None, + ), # 1 +) +all_structs.append(AbortTxnRequest) +AbortTxnRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "txnid", + None, + None, + ), # 1 + ( + 2, + TType.STRING, + "replPolicy", + "UTF8", + None, + ), # 2 + ( + 3, + TType.I32, + "txn_type", + None, + None, + ), # 3 +) +all_structs.append(AbortTxnsRequest) +AbortTxnsRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "txn_ids", + (TType.I64, None, False), + None, + ), # 1 +) +all_structs.append(CommitTxnKeyValue) +CommitTxnKeyValue.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "tableId", + None, + None, + ), # 1 + ( + 2, + TType.STRING, + "key", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "value", + "UTF8", + None, + ), # 3 +) +all_structs.append(WriteEventInfo) +WriteEventInfo.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "writeId", + None, + None, + ), # 1 + ( + 2, + TType.STRING, + "database", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "table", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "files", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "partition", + "UTF8", + None, + ), # 5 + ( + 6, + TType.STRING, + "tableObj", + "UTF8", + None, + ), # 6 + ( + 7, + TType.STRING, + "partitionObj", + "UTF8", + None, + ), # 7 +) +all_structs.append(ReplLastIdInfo) +ReplLastIdInfo.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "database", + "UTF8", + None, + ), # 1 + ( + 2, + TType.I64, + "lastReplId", + None, + None, + ), # 2 + ( + 3, + TType.STRING, + "table", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "catalog", + "UTF8", + None, + ), # 4 + ( + 5, + TType.LIST, + "partitionList", + (TType.STRING, "UTF8", False), + None, + ), # 5 +) +all_structs.append(UpdateTransactionalStatsRequest) +UpdateTransactionalStatsRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "tableId", + None, + None, + ), # 1 + ( + 2, + TType.I64, + "insertCount", + None, + None, + ), # 2 + ( + 3, + TType.I64, + "updatedCount", + None, + None, + ), # 3 + ( + 4, + TType.I64, + "deletedCount", + None, + None, + ), # 4 +) +all_structs.append(CommitTxnRequest) +CommitTxnRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "txnid", + None, + None, + ), # 1 + ( + 2, + TType.STRING, + "replPolicy", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "writeEventInfos", + (TType.STRUCT, [WriteEventInfo, None], False), + None, + ), # 3 + ( + 4, + TType.STRUCT, + "replLastIdInfo", + [ReplLastIdInfo, None], + None, + ), # 4 + ( + 5, + TType.STRUCT, + "keyValue", + [CommitTxnKeyValue, None], + None, + ), # 5 + ( + 6, + TType.BOOL, + "exclWriteEnabled", + None, + True, + ), # 6 + ( + 7, + TType.I32, + "txn_type", + None, + None, + ), # 7 +) +all_structs.append(ReplTblWriteIdStateRequest) +ReplTblWriteIdStateRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "validWriteIdlist", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "user", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "hostName", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "tableName", + "UTF8", + None, + ), # 5 + ( + 6, + TType.LIST, + "partNames", + (TType.STRING, "UTF8", False), + None, + ), # 6 +) +all_structs.append(GetValidWriteIdsRequest) +GetValidWriteIdsRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "fullTableNames", + (TType.STRING, "UTF8", False), + None, + ), # 1 + ( + 2, + TType.STRING, + "validTxnList", + "UTF8", + None, + ), # 2 + ( + 3, + TType.I64, + "writeId", + None, + None, + ), # 3 +) +all_structs.append(TableValidWriteIds) +TableValidWriteIds.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "fullTableName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.I64, + "writeIdHighWaterMark", + None, + None, + ), # 2 + ( + 3, + TType.LIST, + "invalidWriteIds", + (TType.I64, None, False), + None, + ), # 3 + ( + 4, + TType.I64, + "minOpenWriteId", + None, + None, + ), # 4 + ( + 5, + TType.STRING, + "abortedBits", + "BINARY", + None, + ), # 5 +) +all_structs.append(GetValidWriteIdsResponse) +GetValidWriteIdsResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "tblValidWriteIds", + (TType.STRUCT, [TableValidWriteIds, None], False), + None, + ), # 1 +) +all_structs.append(TxnToWriteId) +TxnToWriteId.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "txnId", + None, + None, + ), # 1 + ( + 2, + TType.I64, + "writeId", + None, + None, + ), # 2 +) +all_structs.append(AllocateTableWriteIdsRequest) +AllocateTableWriteIdsRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tableName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "txnIds", + (TType.I64, None, False), + None, + ), # 3 + ( + 4, + TType.STRING, + "replPolicy", + "UTF8", + None, + ), # 4 + ( + 5, + TType.LIST, + "srcTxnToWriteIdList", + (TType.STRUCT, [TxnToWriteId, None], False), + None, + ), # 5 +) +all_structs.append(AllocateTableWriteIdsResponse) +AllocateTableWriteIdsResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "txnToWriteIds", + (TType.STRUCT, [TxnToWriteId, None], False), + None, + ), # 1 +) +all_structs.append(MaxAllocatedTableWriteIdRequest) +MaxAllocatedTableWriteIdRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tableName", + "UTF8", + None, + ), # 2 +) +all_structs.append(MaxAllocatedTableWriteIdResponse) +MaxAllocatedTableWriteIdResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "maxWriteId", + None, + None, + ), # 1 +) +all_structs.append(SeedTableWriteIdsRequest) +SeedTableWriteIdsRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tableName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.I64, + "seedWriteId", + None, + None, + ), # 3 +) +all_structs.append(SeedTxnIdRequest) +SeedTxnIdRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "seedTxnId", + None, + None, + ), # 1 +) +all_structs.append(LockComponent) +LockComponent.thrift_spec = ( + None, # 0 + ( + 1, + TType.I32, + "type", + None, + None, + ), # 1 + ( + 2, + TType.I32, + "level", + None, + None, + ), # 2 + ( + 3, + TType.STRING, + "dbname", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "tablename", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "partitionname", + "UTF8", + None, + ), # 5 + ( + 6, + TType.I32, + "operationType", + None, + 5, + ), # 6 + ( + 7, + TType.BOOL, + "isTransactional", + None, + False, + ), # 7 + ( + 8, + TType.BOOL, + "isDynamicPartitionWrite", + None, + False, + ), # 8 +) +all_structs.append(LockRequest) +LockRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "component", + (TType.STRUCT, [LockComponent, None], False), + None, + ), # 1 + ( + 2, + TType.I64, + "txnid", + None, + None, + ), # 2 + ( + 3, + TType.STRING, + "user", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "hostname", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "agentInfo", + "UTF8", + "Unknown", + ), # 5 + ( + 6, + TType.BOOL, + "zeroWaitReadEnabled", + None, + False, + ), # 6 + ( + 7, + TType.BOOL, + "exclusiveCTAS", + None, + False, + ), # 7 +) +all_structs.append(LockResponse) +LockResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "lockid", + None, + None, + ), # 1 + ( + 2, + TType.I32, + "state", + None, + None, + ), # 2 + ( + 3, + TType.STRING, + "errorMessage", + "UTF8", + None, + ), # 3 +) +all_structs.append(CheckLockRequest) +CheckLockRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "lockid", + None, + None, + ), # 1 + ( + 2, + TType.I64, + "txnid", + None, + None, + ), # 2 + ( + 3, + TType.I64, + "elapsed_ms", + None, + None, + ), # 3 +) +all_structs.append(UnlockRequest) +UnlockRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "lockid", + None, + None, + ), # 1 +) +all_structs.append(ShowLocksRequest) +ShowLocksRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbname", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tablename", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "partname", + "UTF8", + None, + ), # 3 + ( + 4, + TType.BOOL, + "isExtended", + None, + False, + ), # 4 + ( + 5, + TType.I64, + "txnid", + None, + None, + ), # 5 +) +all_structs.append(ShowLocksResponseElement) +ShowLocksResponseElement.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "lockid", + None, + None, + ), # 1 + ( + 2, + TType.STRING, + "dbname", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "tablename", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "partname", + "UTF8", + None, + ), # 4 + ( + 5, + TType.I32, + "state", + None, + None, + ), # 5 + ( + 6, + TType.I32, + "type", + None, + None, + ), # 6 + ( + 7, + TType.I64, + "txnid", + None, + None, + ), # 7 + ( + 8, + TType.I64, + "lastheartbeat", + None, + None, + ), # 8 + ( + 9, + TType.I64, + "acquiredat", + None, + None, + ), # 9 + ( + 10, + TType.STRING, + "user", + "UTF8", + None, + ), # 10 + ( + 11, + TType.STRING, + "hostname", + "UTF8", + None, + ), # 11 + ( + 12, + TType.I32, + "heartbeatCount", + None, + 0, + ), # 12 + ( + 13, + TType.STRING, + "agentInfo", + "UTF8", + None, + ), # 13 + ( + 14, + TType.I64, + "blockedByExtId", + None, + None, + ), # 14 + ( + 15, + TType.I64, + "blockedByIntId", + None, + None, + ), # 15 + ( + 16, + TType.I64, + "lockIdInternal", + None, + None, + ), # 16 +) +all_structs.append(ShowLocksResponse) +ShowLocksResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "locks", + (TType.STRUCT, [ShowLocksResponseElement, None], False), + None, + ), # 1 +) +all_structs.append(HeartbeatRequest) +HeartbeatRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "lockid", + None, + None, + ), # 1 + ( + 2, + TType.I64, + "txnid", + None, + None, + ), # 2 +) +all_structs.append(HeartbeatTxnRangeRequest) +HeartbeatTxnRangeRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "min", + None, + None, + ), # 1 + ( + 2, + TType.I64, + "max", + None, + None, + ), # 2 +) +all_structs.append(HeartbeatTxnRangeResponse) +HeartbeatTxnRangeResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.SET, + "aborted", + (TType.I64, None, False), + None, + ), # 1 + ( + 2, + TType.SET, + "nosuch", + (TType.I64, None, False), + None, + ), # 2 +) +all_structs.append(CompactionRequest) +CompactionRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbname", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tablename", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "partitionname", + "UTF8", + None, + ), # 3 + ( + 4, + TType.I32, + "type", + None, + None, + ), # 4 + ( + 5, + TType.STRING, + "runas", + "UTF8", + None, + ), # 5 + ( + 6, + TType.MAP, + "properties", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 6 + ( + 7, + TType.STRING, + "initiatorId", + "UTF8", + None, + ), # 7 + ( + 8, + TType.STRING, + "initiatorVersion", + "UTF8", + None, + ), # 8 +) +all_structs.append(CompactionInfoStruct) +CompactionInfoStruct.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "id", + None, + None, + ), # 1 + ( + 2, + TType.STRING, + "dbname", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "tablename", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "partitionname", + "UTF8", + None, + ), # 4 + ( + 5, + TType.I32, + "type", + None, + None, + ), # 5 + ( + 6, + TType.STRING, + "runas", + "UTF8", + None, + ), # 6 + ( + 7, + TType.STRING, + "properties", + "UTF8", + None, + ), # 7 + ( + 8, + TType.BOOL, + "toomanyaborts", + None, + None, + ), # 8 + ( + 9, + TType.STRING, + "state", + "UTF8", + None, + ), # 9 + ( + 10, + TType.STRING, + "workerId", + "UTF8", + None, + ), # 10 + ( + 11, + TType.I64, + "start", + None, + None, + ), # 11 + ( + 12, + TType.I64, + "highestWriteId", + None, + None, + ), # 12 + ( + 13, + TType.STRING, + "errorMessage", + "UTF8", + None, + ), # 13 + ( + 14, + TType.BOOL, + "hasoldabort", + None, + None, + ), # 14 + ( + 15, + TType.I64, + "enqueueTime", + None, + None, + ), # 15 + ( + 16, + TType.I64, + "retryRetention", + None, + None, + ), # 16 +) +all_structs.append(OptionalCompactionInfoStruct) +OptionalCompactionInfoStruct.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "ci", + [CompactionInfoStruct, None], + None, + ), # 1 +) +all_structs.append(CompactionMetricsDataStruct) +CompactionMetricsDataStruct.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbname", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tblname", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "partitionname", + "UTF8", + None, + ), # 3 + ( + 4, + TType.I32, + "type", + None, + None, + ), # 4 + ( + 5, + TType.I32, + "metricvalue", + None, + None, + ), # 5 + ( + 6, + TType.I32, + "version", + None, + None, + ), # 6 + ( + 7, + TType.I32, + "threshold", + None, + None, + ), # 7 +) +all_structs.append(CompactionMetricsDataResponse) +CompactionMetricsDataResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "data", + [CompactionMetricsDataStruct, None], + None, + ), # 1 +) +all_structs.append(CompactionMetricsDataRequest) +CompactionMetricsDataRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tblName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "partitionName", + "UTF8", + None, + ), # 3 + ( + 4, + TType.I32, + "type", + None, + None, + ), # 4 +) +all_structs.append(CompactionResponse) +CompactionResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "id", + None, + None, + ), # 1 + ( + 2, + TType.STRING, + "state", + "UTF8", + None, + ), # 2 + ( + 3, + TType.BOOL, + "accepted", + None, + None, + ), # 3 + ( + 4, + TType.STRING, + "errormessage", + "UTF8", + None, + ), # 4 +) +all_structs.append(ShowCompactRequest) +ShowCompactRequest.thrift_spec = () +all_structs.append(ShowCompactResponseElement) +ShowCompactResponseElement.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbname", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tablename", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "partitionname", + "UTF8", + None, + ), # 3 + ( + 4, + TType.I32, + "type", + None, + None, + ), # 4 + ( + 5, + TType.STRING, + "state", + "UTF8", + None, + ), # 5 + ( + 6, + TType.STRING, + "workerid", + "UTF8", + None, + ), # 6 + ( + 7, + TType.I64, + "start", + None, + None, + ), # 7 + ( + 8, + TType.STRING, + "runAs", + "UTF8", + None, + ), # 8 + ( + 9, + TType.I64, + "hightestTxnId", + None, + None, + ), # 9 + ( + 10, + TType.STRING, + "metaInfo", + "UTF8", + None, + ), # 10 + ( + 11, + TType.I64, + "endTime", + None, + None, + ), # 11 + ( + 12, + TType.STRING, + "hadoopJobId", + "UTF8", + "None", + ), # 12 + ( + 13, + TType.I64, + "id", + None, + None, + ), # 13 + ( + 14, + TType.STRING, + "errorMessage", + "UTF8", + None, + ), # 14 + ( + 15, + TType.I64, + "enqueueTime", + None, + None, + ), # 15 + ( + 16, + TType.STRING, + "workerVersion", + "UTF8", + None, + ), # 16 + ( + 17, + TType.STRING, + "initiatorId", + "UTF8", + None, + ), # 17 + ( + 18, + TType.STRING, + "initiatorVersion", + "UTF8", + None, + ), # 18 + ( + 19, + TType.I64, + "cleanerStart", + None, + None, + ), # 19 +) +all_structs.append(ShowCompactResponse) +ShowCompactResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "compacts", + (TType.STRUCT, [ShowCompactResponseElement, None], False), + None, + ), # 1 +) +all_structs.append(GetLatestCommittedCompactionInfoRequest) +GetLatestCommittedCompactionInfoRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbname", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tablename", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "partitionnames", + (TType.STRING, "UTF8", False), + None, + ), # 3 + ( + 4, + TType.I64, + "lastCompactionId", + None, + None, + ), # 4 +) +all_structs.append(GetLatestCommittedCompactionInfoResponse) +GetLatestCommittedCompactionInfoResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "compactions", + (TType.STRUCT, [CompactionInfoStruct, None], False), + None, + ), # 1 +) +all_structs.append(FindNextCompactRequest) +FindNextCompactRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "workerId", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "workerVersion", + "UTF8", + None, + ), # 2 +) +all_structs.append(AddDynamicPartitions) +AddDynamicPartitions.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "txnid", + None, + None, + ), # 1 + ( + 2, + TType.I64, + "writeid", + None, + None, + ), # 2 + ( + 3, + TType.STRING, + "dbname", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "tablename", + "UTF8", + None, + ), # 4 + ( + 5, + TType.LIST, + "partitionnames", + (TType.STRING, "UTF8", False), + None, + ), # 5 + ( + 6, + TType.I32, + "operationType", + None, + 5, + ), # 6 +) +all_structs.append(BasicTxnInfo) +BasicTxnInfo.thrift_spec = ( + None, # 0 + ( + 1, + TType.BOOL, + "isnull", + None, + None, + ), # 1 + ( + 2, + TType.I64, + "time", + None, + None, + ), # 2 + ( + 3, + TType.I64, + "txnid", + None, + None, + ), # 3 + ( + 4, + TType.STRING, + "dbname", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "tablename", + "UTF8", + None, + ), # 5 + ( + 6, + TType.STRING, + "partitionname", + "UTF8", + None, + ), # 6 +) +all_structs.append(NotificationEventRequest) +NotificationEventRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "lastEvent", + None, + None, + ), # 1 + ( + 2, + TType.I32, + "maxEvents", + None, + None, + ), # 2 + ( + 3, + TType.LIST, + "eventTypeSkipList", + (TType.STRING, "UTF8", False), + None, + ), # 3 +) +all_structs.append(NotificationEvent) +NotificationEvent.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "eventId", + None, + None, + ), # 1 + ( + 2, + TType.I32, + "eventTime", + None, + None, + ), # 2 + ( + 3, + TType.STRING, + "eventType", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "tableName", + "UTF8", + None, + ), # 5 + ( + 6, + TType.STRING, + "message", + "UTF8", + None, + ), # 6 + ( + 7, + TType.STRING, + "messageFormat", + "UTF8", + None, + ), # 7 + ( + 8, + TType.STRING, + "catName", + "UTF8", + None, + ), # 8 +) +all_structs.append(NotificationEventResponse) +NotificationEventResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "events", + (TType.STRUCT, [NotificationEvent, None], False), + None, + ), # 1 +) +all_structs.append(CurrentNotificationEventId) +CurrentNotificationEventId.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "eventId", + None, + None, + ), # 1 +) +all_structs.append(NotificationEventsCountRequest) +NotificationEventsCountRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "fromEventId", + None, + None, + ), # 1 + ( + 2, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "catName", + "UTF8", + None, + ), # 3 + ( + 4, + TType.I64, + "toEventId", + None, + None, + ), # 4 + ( + 5, + TType.I64, + "limit", + None, + None, + ), # 5 +) +all_structs.append(NotificationEventsCountResponse) +NotificationEventsCountResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "eventsCount", + None, + None, + ), # 1 +) +all_structs.append(InsertEventRequestData) +InsertEventRequestData.thrift_spec = ( + None, # 0 + ( + 1, + TType.BOOL, + "replace", + None, + None, + ), # 1 + ( + 2, + TType.LIST, + "filesAdded", + (TType.STRING, "UTF8", False), + None, + ), # 2 + ( + 3, + TType.LIST, + "filesAddedChecksum", + (TType.STRING, "UTF8", False), + None, + ), # 3 + ( + 4, + TType.LIST, + "subDirectoryList", + (TType.STRING, "UTF8", False), + None, + ), # 4 + ( + 5, + TType.LIST, + "partitionVal", + (TType.STRING, "UTF8", False), + None, + ), # 5 +) +all_structs.append(FireEventRequestData) +FireEventRequestData.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "insertData", + [InsertEventRequestData, None], + None, + ), # 1 + ( + 2, + TType.LIST, + "insertDatas", + (TType.STRUCT, [InsertEventRequestData, None], False), + None, + ), # 2 +) +all_structs.append(FireEventRequest) +FireEventRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.BOOL, + "successful", + None, + None, + ), # 1 + ( + 2, + TType.STRUCT, + "data", + [FireEventRequestData, None], + None, + ), # 2 + ( + 3, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "tableName", + "UTF8", + None, + ), # 4 + ( + 5, + TType.LIST, + "partitionVals", + (TType.STRING, "UTF8", False), + None, + ), # 5 + ( + 6, + TType.STRING, + "catName", + "UTF8", + None, + ), # 6 +) +all_structs.append(FireEventResponse) +FireEventResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "eventIds", + (TType.I64, None, False), + None, + ), # 1 +) +all_structs.append(WriteNotificationLogRequest) +WriteNotificationLogRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "txnId", + None, + None, + ), # 1 + ( + 2, + TType.I64, + "writeId", + None, + None, + ), # 2 + ( + 3, + TType.STRING, + "db", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "table", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRUCT, + "fileInfo", + [InsertEventRequestData, None], + None, + ), # 5 + ( + 6, + TType.LIST, + "partitionVals", + (TType.STRING, "UTF8", False), + None, + ), # 6 +) +all_structs.append(WriteNotificationLogResponse) +WriteNotificationLogResponse.thrift_spec = () +all_structs.append(WriteNotificationLogBatchRequest) +WriteNotificationLogBatchRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catalog", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "db", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "table", + "UTF8", + None, + ), # 3 + ( + 4, + TType.LIST, + "requestList", + (TType.STRUCT, [WriteNotificationLogRequest, None], False), + None, + ), # 4 +) +all_structs.append(WriteNotificationLogBatchResponse) +WriteNotificationLogBatchResponse.thrift_spec = () +all_structs.append(MetadataPpdResult) +MetadataPpdResult.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "metadata", + "BINARY", + None, + ), # 1 + ( + 2, + TType.STRING, + "includeBitset", + "BINARY", + None, + ), # 2 +) +all_structs.append(GetFileMetadataByExprResult) +GetFileMetadataByExprResult.thrift_spec = ( + None, # 0 + ( + 1, + TType.MAP, + "metadata", + (TType.I64, None, TType.STRUCT, [MetadataPpdResult, None], False), + None, + ), # 1 + ( + 2, + TType.BOOL, + "isSupported", + None, + None, + ), # 2 +) +all_structs.append(GetFileMetadataByExprRequest) +GetFileMetadataByExprRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "fileIds", + (TType.I64, None, False), + None, + ), # 1 + ( + 2, + TType.STRING, + "expr", + "BINARY", + None, + ), # 2 + ( + 3, + TType.BOOL, + "doGetFooters", + None, + None, + ), # 3 + ( + 4, + TType.I32, + "type", + None, + None, + ), # 4 +) +all_structs.append(GetFileMetadataResult) +GetFileMetadataResult.thrift_spec = ( + None, # 0 + ( + 1, + TType.MAP, + "metadata", + (TType.I64, None, TType.STRING, "BINARY", False), + None, + ), # 1 + ( + 2, + TType.BOOL, + "isSupported", + None, + None, + ), # 2 +) +all_structs.append(GetFileMetadataRequest) +GetFileMetadataRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "fileIds", + (TType.I64, None, False), + None, + ), # 1 +) +all_structs.append(PutFileMetadataResult) +PutFileMetadataResult.thrift_spec = () +all_structs.append(PutFileMetadataRequest) +PutFileMetadataRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "fileIds", + (TType.I64, None, False), + None, + ), # 1 + ( + 2, + TType.LIST, + "metadata", + (TType.STRING, "BINARY", False), + None, + ), # 2 + ( + 3, + TType.I32, + "type", + None, + None, + ), # 3 +) +all_structs.append(ClearFileMetadataResult) +ClearFileMetadataResult.thrift_spec = () +all_structs.append(ClearFileMetadataRequest) +ClearFileMetadataRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "fileIds", + (TType.I64, None, False), + None, + ), # 1 +) +all_structs.append(CacheFileMetadataResult) +CacheFileMetadataResult.thrift_spec = ( + None, # 0 + ( + 1, + TType.BOOL, + "isSupported", + None, + None, + ), # 1 +) +all_structs.append(CacheFileMetadataRequest) +CacheFileMetadataRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tblName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "partName", + "UTF8", + None, + ), # 3 + ( + 4, + TType.BOOL, + "isAllParts", + None, + None, + ), # 4 +) +all_structs.append(GetAllFunctionsResponse) +GetAllFunctionsResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "functions", + (TType.STRUCT, [Function, None], False), + None, + ), # 1 +) +all_structs.append(ClientCapabilities) +ClientCapabilities.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "values", + (TType.I32, None, False), + None, + ), # 1 +) +all_structs.append(GetProjectionsSpec) +GetProjectionsSpec.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "fieldList", + (TType.STRING, "UTF8", False), + None, + ), # 1 + ( + 2, + TType.STRING, + "includeParamKeyPattern", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "excludeParamKeyPattern", + "UTF8", + None, + ), # 3 +) +all_structs.append(GetTableRequest) +GetTableRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tblName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRUCT, + "capabilities", + [ClientCapabilities, None], + None, + ), # 3 + ( + 4, + TType.STRING, + "catName", + "UTF8", + None, + ), # 4 + None, # 5 + ( + 6, + TType.STRING, + "validWriteIdList", + "UTF8", + None, + ), # 6 + ( + 7, + TType.BOOL, + "getColumnStats", + None, + None, + ), # 7 + ( + 8, + TType.LIST, + "processorCapabilities", + (TType.STRING, "UTF8", False), + None, + ), # 8 + ( + 9, + TType.STRING, + "processorIdentifier", + "UTF8", + None, + ), # 9 + ( + 10, + TType.STRING, + "engine", + "UTF8", + None, + ), # 10 + ( + 11, + TType.I64, + "id", + None, + -1, + ), # 11 +) +all_structs.append(GetTableResult) +GetTableResult.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "table", + [Table, None], + None, + ), # 1 + ( + 2, + TType.BOOL, + "isStatsCompliant", + None, + None, + ), # 2 +) +all_structs.append(GetTablesRequest) +GetTablesRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.LIST, + "tblNames", + (TType.STRING, "UTF8", False), + None, + ), # 2 + ( + 3, + TType.STRUCT, + "capabilities", + [ClientCapabilities, None], + None, + ), # 3 + ( + 4, + TType.STRING, + "catName", + "UTF8", + None, + ), # 4 + ( + 5, + TType.LIST, + "processorCapabilities", + (TType.STRING, "UTF8", False), + None, + ), # 5 + ( + 6, + TType.STRING, + "processorIdentifier", + "UTF8", + None, + ), # 6 + ( + 7, + TType.STRUCT, + "projectionSpec", + [GetProjectionsSpec, None], + None, + ), # 7 + ( + 8, + TType.STRING, + "tablesPattern", + "UTF8", + None, + ), # 8 +) +all_structs.append(GetTablesResult) +GetTablesResult.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "tables", + (TType.STRUCT, [Table, None], False), + None, + ), # 1 +) +all_structs.append(GetTablesExtRequest) +GetTablesExtRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catalog", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "database", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "tableNamePattern", + "UTF8", + None, + ), # 3 + ( + 4, + TType.I32, + "requestedFields", + None, + None, + ), # 4 + ( + 5, + TType.I32, + "limit", + None, + None, + ), # 5 + ( + 6, + TType.LIST, + "processorCapabilities", + (TType.STRING, "UTF8", False), + None, + ), # 6 + ( + 7, + TType.STRING, + "processorIdentifier", + "UTF8", + None, + ), # 7 +) +all_structs.append(ExtendedTableInfo) +ExtendedTableInfo.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "tblName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.I32, + "accessType", + None, + None, + ), # 2 + ( + 3, + TType.LIST, + "requiredReadCapabilities", + (TType.STRING, "UTF8", False), + None, + ), # 3 + ( + 4, + TType.LIST, + "requiredWriteCapabilities", + (TType.STRING, "UTF8", False), + None, + ), # 4 +) +all_structs.append(GetDatabaseRequest) +GetDatabaseRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "catalogName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "processorCapabilities", + (TType.STRING, "UTF8", False), + None, + ), # 3 + ( + 4, + TType.STRING, + "processorIdentifier", + "UTF8", + None, + ), # 4 +) +all_structs.append(DropDatabaseRequest) +DropDatabaseRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "catalogName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.BOOL, + "ignoreUnknownDb", + None, + None, + ), # 3 + ( + 4, + TType.BOOL, + "deleteData", + None, + None, + ), # 4 + ( + 5, + TType.BOOL, + "cascade", + None, + None, + ), # 5 + ( + 6, + TType.BOOL, + "softDelete", + None, + False, + ), # 6 + ( + 7, + TType.I64, + "txnId", + None, + 0, + ), # 7 + ( + 8, + TType.BOOL, + "deleteManagedDir", + None, + True, + ), # 8 +) +all_structs.append(CmRecycleRequest) +CmRecycleRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dataPath", + "UTF8", + None, + ), # 1 + ( + 2, + TType.BOOL, + "purge", + None, + None, + ), # 2 +) +all_structs.append(CmRecycleResponse) +CmRecycleResponse.thrift_spec = () +all_structs.append(TableMeta) +TableMeta.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "tableName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "tableType", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "comments", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "catName", + "UTF8", + None, + ), # 5 +) +all_structs.append(Materialization) +Materialization.thrift_spec = ( + None, # 0 + ( + 1, + TType.BOOL, + "sourceTablesUpdateDeleteModified", + None, + None, + ), # 1 + ( + 2, + TType.BOOL, + "sourceTablesCompacted", + None, + None, + ), # 2 +) +all_structs.append(WMResourcePlan) +WMResourcePlan.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.I32, + "status", + None, + None, + ), # 2 + ( + 3, + TType.I32, + "queryParallelism", + None, + None, + ), # 3 + ( + 4, + TType.STRING, + "defaultPoolPath", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "ns", + "UTF8", + None, + ), # 5 +) +all_structs.append(WMNullableResourcePlan) +WMNullableResourcePlan.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.I32, + "status", + None, + None, + ), # 2 + None, # 3 + ( + 4, + TType.I32, + "queryParallelism", + None, + None, + ), # 4 + ( + 5, + TType.BOOL, + "isSetQueryParallelism", + None, + None, + ), # 5 + ( + 6, + TType.STRING, + "defaultPoolPath", + "UTF8", + None, + ), # 6 + ( + 7, + TType.BOOL, + "isSetDefaultPoolPath", + None, + None, + ), # 7 + ( + 8, + TType.STRING, + "ns", + "UTF8", + None, + ), # 8 +) +all_structs.append(WMPool) +WMPool.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "resourcePlanName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "poolPath", + "UTF8", + None, + ), # 2 + ( + 3, + TType.DOUBLE, + "allocFraction", + None, + None, + ), # 3 + ( + 4, + TType.I32, + "queryParallelism", + None, + None, + ), # 4 + ( + 5, + TType.STRING, + "schedulingPolicy", + "UTF8", + None, + ), # 5 + ( + 6, + TType.STRING, + "ns", + "UTF8", + None, + ), # 6 +) +all_structs.append(WMNullablePool) +WMNullablePool.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "resourcePlanName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "poolPath", + "UTF8", + None, + ), # 2 + ( + 3, + TType.DOUBLE, + "allocFraction", + None, + None, + ), # 3 + ( + 4, + TType.I32, + "queryParallelism", + None, + None, + ), # 4 + ( + 5, + TType.STRING, + "schedulingPolicy", + "UTF8", + None, + ), # 5 + ( + 6, + TType.BOOL, + "isSetSchedulingPolicy", + None, + None, + ), # 6 + ( + 7, + TType.STRING, + "ns", + "UTF8", + None, + ), # 7 +) +all_structs.append(WMTrigger) +WMTrigger.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "resourcePlanName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "triggerName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "triggerExpression", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "actionExpression", + "UTF8", + None, + ), # 4 + ( + 5, + TType.BOOL, + "isInUnmanaged", + None, + None, + ), # 5 + ( + 6, + TType.STRING, + "ns", + "UTF8", + None, + ), # 6 +) +all_structs.append(WMMapping) +WMMapping.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "resourcePlanName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "entityType", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "entityName", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "poolPath", + "UTF8", + None, + ), # 4 + ( + 5, + TType.I32, + "ordering", + None, + None, + ), # 5 + ( + 6, + TType.STRING, + "ns", + "UTF8", + None, + ), # 6 +) +all_structs.append(WMPoolTrigger) +WMPoolTrigger.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "pool", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "trigger", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "ns", + "UTF8", + None, + ), # 3 +) +all_structs.append(WMFullResourcePlan) +WMFullResourcePlan.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "plan", + [WMResourcePlan, None], + None, + ), # 1 + ( + 2, + TType.LIST, + "pools", + (TType.STRUCT, [WMPool, None], False), + None, + ), # 2 + ( + 3, + TType.LIST, + "mappings", + (TType.STRUCT, [WMMapping, None], False), + None, + ), # 3 + ( + 4, + TType.LIST, + "triggers", + (TType.STRUCT, [WMTrigger, None], False), + None, + ), # 4 + ( + 5, + TType.LIST, + "poolTriggers", + (TType.STRUCT, [WMPoolTrigger, None], False), + None, + ), # 5 +) +all_structs.append(WMCreateResourcePlanRequest) +WMCreateResourcePlanRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "resourcePlan", + [WMResourcePlan, None], + None, + ), # 1 + ( + 2, + TType.STRING, + "copyFrom", + "UTF8", + None, + ), # 2 +) +all_structs.append(WMCreateResourcePlanResponse) +WMCreateResourcePlanResponse.thrift_spec = () +all_structs.append(WMGetActiveResourcePlanRequest) +WMGetActiveResourcePlanRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "ns", + "UTF8", + None, + ), # 1 +) +all_structs.append(WMGetActiveResourcePlanResponse) +WMGetActiveResourcePlanResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "resourcePlan", + [WMFullResourcePlan, None], + None, + ), # 1 +) +all_structs.append(WMGetResourcePlanRequest) +WMGetResourcePlanRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "resourcePlanName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "ns", + "UTF8", + None, + ), # 2 +) +all_structs.append(WMGetResourcePlanResponse) +WMGetResourcePlanResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "resourcePlan", + [WMFullResourcePlan, None], + None, + ), # 1 +) +all_structs.append(WMGetAllResourcePlanRequest) +WMGetAllResourcePlanRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "ns", + "UTF8", + None, + ), # 1 +) +all_structs.append(WMGetAllResourcePlanResponse) +WMGetAllResourcePlanResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "resourcePlans", + (TType.STRUCT, [WMResourcePlan, None], False), + None, + ), # 1 +) +all_structs.append(WMAlterResourcePlanRequest) +WMAlterResourcePlanRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "resourcePlanName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRUCT, + "resourcePlan", + [WMNullableResourcePlan, None], + None, + ), # 2 + ( + 3, + TType.BOOL, + "isEnableAndActivate", + None, + None, + ), # 3 + ( + 4, + TType.BOOL, + "isForceDeactivate", + None, + None, + ), # 4 + ( + 5, + TType.BOOL, + "isReplace", + None, + None, + ), # 5 + ( + 6, + TType.STRING, + "ns", + "UTF8", + None, + ), # 6 +) +all_structs.append(WMAlterResourcePlanResponse) +WMAlterResourcePlanResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "fullResourcePlan", + [WMFullResourcePlan, None], + None, + ), # 1 +) +all_structs.append(WMValidateResourcePlanRequest) +WMValidateResourcePlanRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "resourcePlanName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "ns", + "UTF8", + None, + ), # 2 +) +all_structs.append(WMValidateResourcePlanResponse) +WMValidateResourcePlanResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "errors", + (TType.STRING, "UTF8", False), + None, + ), # 1 + ( + 2, + TType.LIST, + "warnings", + (TType.STRING, "UTF8", False), + None, + ), # 2 +) +all_structs.append(WMDropResourcePlanRequest) +WMDropResourcePlanRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "resourcePlanName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "ns", + "UTF8", + None, + ), # 2 +) +all_structs.append(WMDropResourcePlanResponse) +WMDropResourcePlanResponse.thrift_spec = () +all_structs.append(WMCreateTriggerRequest) +WMCreateTriggerRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "trigger", + [WMTrigger, None], + None, + ), # 1 +) +all_structs.append(WMCreateTriggerResponse) +WMCreateTriggerResponse.thrift_spec = () +all_structs.append(WMAlterTriggerRequest) +WMAlterTriggerRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "trigger", + [WMTrigger, None], + None, + ), # 1 +) +all_structs.append(WMAlterTriggerResponse) +WMAlterTriggerResponse.thrift_spec = () +all_structs.append(WMDropTriggerRequest) +WMDropTriggerRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "resourcePlanName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "triggerName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "ns", + "UTF8", + None, + ), # 3 +) +all_structs.append(WMDropTriggerResponse) +WMDropTriggerResponse.thrift_spec = () +all_structs.append(WMGetTriggersForResourePlanRequest) +WMGetTriggersForResourePlanRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "resourcePlanName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "ns", + "UTF8", + None, + ), # 2 +) +all_structs.append(WMGetTriggersForResourePlanResponse) +WMGetTriggersForResourePlanResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "triggers", + (TType.STRUCT, [WMTrigger, None], False), + None, + ), # 1 +) +all_structs.append(WMCreatePoolRequest) +WMCreatePoolRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "pool", + [WMPool, None], + None, + ), # 1 +) +all_structs.append(WMCreatePoolResponse) +WMCreatePoolResponse.thrift_spec = () +all_structs.append(WMAlterPoolRequest) +WMAlterPoolRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "pool", + [WMNullablePool, None], + None, + ), # 1 + ( + 2, + TType.STRING, + "poolPath", + "UTF8", + None, + ), # 2 +) +all_structs.append(WMAlterPoolResponse) +WMAlterPoolResponse.thrift_spec = () +all_structs.append(WMDropPoolRequest) +WMDropPoolRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "resourcePlanName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "poolPath", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "ns", + "UTF8", + None, + ), # 3 +) +all_structs.append(WMDropPoolResponse) +WMDropPoolResponse.thrift_spec = () +all_structs.append(WMCreateOrUpdateMappingRequest) +WMCreateOrUpdateMappingRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "mapping", + [WMMapping, None], + None, + ), # 1 + ( + 2, + TType.BOOL, + "update", + None, + None, + ), # 2 +) +all_structs.append(WMCreateOrUpdateMappingResponse) +WMCreateOrUpdateMappingResponse.thrift_spec = () +all_structs.append(WMDropMappingRequest) +WMDropMappingRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "mapping", + [WMMapping, None], + None, + ), # 1 +) +all_structs.append(WMDropMappingResponse) +WMDropMappingResponse.thrift_spec = () +all_structs.append(WMCreateOrDropTriggerToPoolMappingRequest) +WMCreateOrDropTriggerToPoolMappingRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "resourcePlanName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "triggerName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "poolPath", + "UTF8", + None, + ), # 3 + ( + 4, + TType.BOOL, + "drop", + None, + None, + ), # 4 + ( + 5, + TType.STRING, + "ns", + "UTF8", + None, + ), # 5 +) +all_structs.append(WMCreateOrDropTriggerToPoolMappingResponse) +WMCreateOrDropTriggerToPoolMappingResponse.thrift_spec = () +all_structs.append(ISchema) +ISchema.thrift_spec = ( + None, # 0 + ( + 1, + TType.I32, + "schemaType", + None, + None, + ), # 1 + ( + 2, + TType.STRING, + "name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "catName", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 4 + ( + 5, + TType.I32, + "compatibility", + None, + None, + ), # 5 + ( + 6, + TType.I32, + "validationLevel", + None, + None, + ), # 6 + ( + 7, + TType.BOOL, + "canEvolve", + None, + None, + ), # 7 + ( + 8, + TType.STRING, + "schemaGroup", + "UTF8", + None, + ), # 8 + ( + 9, + TType.STRING, + "description", + "UTF8", + None, + ), # 9 +) +all_structs.append(ISchemaName) +ISchemaName.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "schemaName", + "UTF8", + None, + ), # 3 +) +all_structs.append(AlterISchemaRequest) +AlterISchemaRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "name", + [ISchemaName, None], + None, + ), # 1 + None, # 2 + ( + 3, + TType.STRUCT, + "newSchema", + [ISchema, None], + None, + ), # 3 +) +all_structs.append(SchemaVersion) +SchemaVersion.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "schema", + [ISchemaName, None], + None, + ), # 1 + ( + 2, + TType.I32, + "version", + None, + None, + ), # 2 + ( + 3, + TType.I64, + "createdAt", + None, + None, + ), # 3 + ( + 4, + TType.LIST, + "cols", + (TType.STRUCT, [FieldSchema, None], False), + None, + ), # 4 + ( + 5, + TType.I32, + "state", + None, + None, + ), # 5 + ( + 6, + TType.STRING, + "description", + "UTF8", + None, + ), # 6 + ( + 7, + TType.STRING, + "schemaText", + "UTF8", + None, + ), # 7 + ( + 8, + TType.STRING, + "fingerprint", + "UTF8", + None, + ), # 8 + ( + 9, + TType.STRING, + "name", + "UTF8", + None, + ), # 9 + ( + 10, + TType.STRUCT, + "serDe", + [SerDeInfo, None], + None, + ), # 10 +) +all_structs.append(SchemaVersionDescriptor) +SchemaVersionDescriptor.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "schema", + [ISchemaName, None], + None, + ), # 1 + ( + 2, + TType.I32, + "version", + None, + None, + ), # 2 +) +all_structs.append(FindSchemasByColsRqst) +FindSchemasByColsRqst.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "colName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "colNamespace", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "type", + "UTF8", + None, + ), # 3 +) +all_structs.append(FindSchemasByColsResp) +FindSchemasByColsResp.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "schemaVersions", + (TType.STRUCT, [SchemaVersionDescriptor, None], False), + None, + ), # 1 +) +all_structs.append(MapSchemaVersionToSerdeRequest) +MapSchemaVersionToSerdeRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "schemaVersion", + [SchemaVersionDescriptor, None], + None, + ), # 1 + ( + 2, + TType.STRING, + "serdeName", + "UTF8", + None, + ), # 2 +) +all_structs.append(SetSchemaVersionStateRequest) +SetSchemaVersionStateRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "schemaVersion", + [SchemaVersionDescriptor, None], + None, + ), # 1 + ( + 2, + TType.I32, + "state", + None, + None, + ), # 2 +) +all_structs.append(GetSerdeRequest) +GetSerdeRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "serdeName", + "UTF8", + None, + ), # 1 +) +all_structs.append(RuntimeStat) +RuntimeStat.thrift_spec = ( + None, # 0 + ( + 1, + TType.I32, + "createTime", + None, + None, + ), # 1 + ( + 2, + TType.I32, + "weight", + None, + None, + ), # 2 + ( + 3, + TType.STRING, + "payload", + "BINARY", + None, + ), # 3 +) +all_structs.append(GetRuntimeStatsRequest) +GetRuntimeStatsRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.I32, + "maxWeight", + None, + None, + ), # 1 + ( + 2, + TType.I32, + "maxCreateTime", + None, + None, + ), # 2 +) +all_structs.append(CreateTableRequest) +CreateTableRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "table", + [Table, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "envContext", + [EnvironmentContext, None], + None, + ), # 2 + ( + 3, + TType.LIST, + "primaryKeys", + (TType.STRUCT, [SQLPrimaryKey, None], False), + None, + ), # 3 + ( + 4, + TType.LIST, + "foreignKeys", + (TType.STRUCT, [SQLForeignKey, None], False), + None, + ), # 4 + ( + 5, + TType.LIST, + "uniqueConstraints", + (TType.STRUCT, [SQLUniqueConstraint, None], False), + None, + ), # 5 + ( + 6, + TType.LIST, + "notNullConstraints", + (TType.STRUCT, [SQLNotNullConstraint, None], False), + None, + ), # 6 + ( + 7, + TType.LIST, + "defaultConstraints", + (TType.STRUCT, [SQLDefaultConstraint, None], False), + None, + ), # 7 + ( + 8, + TType.LIST, + "checkConstraints", + (TType.STRUCT, [SQLCheckConstraint, None], False), + None, + ), # 8 + ( + 9, + TType.LIST, + "processorCapabilities", + (TType.STRING, "UTF8", False), + None, + ), # 9 + ( + 10, + TType.STRING, + "processorIdentifier", + "UTF8", + None, + ), # 10 +) +all_structs.append(CreateDatabaseRequest) +CreateDatabaseRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "databaseName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "description", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "locationUri", + "UTF8", + None, + ), # 3 + ( + 4, + TType.MAP, + "parameters", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 4 + ( + 5, + TType.STRUCT, + "privileges", + [PrincipalPrivilegeSet, None], + None, + ), # 5 + ( + 6, + TType.STRING, + "ownerName", + "UTF8", + None, + ), # 6 + ( + 7, + TType.I32, + "ownerType", + None, + None, + ), # 7 + ( + 8, + TType.STRING, + "catalogName", + "UTF8", + None, + ), # 8 + ( + 9, + TType.I32, + "createTime", + None, + None, + ), # 9 + ( + 10, + TType.STRING, + "managedLocationUri", + "UTF8", + None, + ), # 10 + ( + 11, + TType.STRING, + "type", + "UTF8", + None, + ), # 11 + ( + 12, + TType.STRING, + "dataConnectorName", + "UTF8", + None, + ), # 12 +) +all_structs.append(CreateDataConnectorRequest) +CreateDataConnectorRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "connector", + [DataConnector, None], + None, + ), # 1 +) +all_structs.append(GetDataConnectorRequest) +GetDataConnectorRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "connectorName", + "UTF8", + None, + ), # 1 +) +all_structs.append(ScheduledQueryPollRequest) +ScheduledQueryPollRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "clusterNamespace", + "UTF8", + None, + ), # 1 +) +all_structs.append(ScheduledQueryKey) +ScheduledQueryKey.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "scheduleName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "clusterNamespace", + "UTF8", + None, + ), # 2 +) +all_structs.append(ScheduledQueryPollResponse) +ScheduledQueryPollResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "scheduleKey", + [ScheduledQueryKey, None], + None, + ), # 1 + ( + 2, + TType.I64, + "executionId", + None, + None, + ), # 2 + ( + 3, + TType.STRING, + "query", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "user", + "UTF8", + None, + ), # 4 +) +all_structs.append(ScheduledQuery) +ScheduledQuery.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "scheduleKey", + [ScheduledQueryKey, None], + None, + ), # 1 + ( + 2, + TType.BOOL, + "enabled", + None, + None, + ), # 2 + None, # 3 + ( + 4, + TType.STRING, + "schedule", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "user", + "UTF8", + None, + ), # 5 + ( + 6, + TType.STRING, + "query", + "UTF8", + None, + ), # 6 + ( + 7, + TType.I32, + "nextExecution", + None, + None, + ), # 7 +) +all_structs.append(ScheduledQueryMaintenanceRequest) +ScheduledQueryMaintenanceRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.I32, + "type", + None, + None, + ), # 1 + ( + 2, + TType.STRUCT, + "scheduledQuery", + [ScheduledQuery, None], + None, + ), # 2 +) +all_structs.append(ScheduledQueryProgressInfo) +ScheduledQueryProgressInfo.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "scheduledExecutionId", + None, + None, + ), # 1 + ( + 2, + TType.I32, + "state", + None, + None, + ), # 2 + ( + 3, + TType.STRING, + "executorQueryId", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "errorMessage", + "UTF8", + None, + ), # 4 +) +all_structs.append(AlterPartitionsRequest) +AlterPartitionsRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "tableName", + "UTF8", + None, + ), # 3 + ( + 4, + TType.LIST, + "partitions", + (TType.STRUCT, [Partition, None], False), + None, + ), # 4 + ( + 5, + TType.STRUCT, + "environmentContext", + [EnvironmentContext, None], + None, + ), # 5 + ( + 6, + TType.I64, + "writeId", + None, + -1, + ), # 6 + ( + 7, + TType.STRING, + "validWriteIdList", + "UTF8", + None, + ), # 7 +) +all_structs.append(AlterPartitionsResponse) +AlterPartitionsResponse.thrift_spec = () +all_structs.append(RenamePartitionRequest) +RenamePartitionRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "tableName", + "UTF8", + None, + ), # 3 + ( + 4, + TType.LIST, + "partVals", + (TType.STRING, "UTF8", False), + None, + ), # 4 + ( + 5, + TType.STRUCT, + "newPart", + [Partition, None], + None, + ), # 5 + ( + 6, + TType.STRING, + "validWriteIdList", + "UTF8", + None, + ), # 6 + ( + 7, + TType.I64, + "txnId", + None, + None, + ), # 7 + ( + 8, + TType.BOOL, + "clonePart", + None, + None, + ), # 8 +) +all_structs.append(RenamePartitionResponse) +RenamePartitionResponse.thrift_spec = () +all_structs.append(AlterTableRequest) +AlterTableRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "tableName", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRUCT, + "table", + [Table, None], + None, + ), # 4 + ( + 5, + TType.STRUCT, + "environmentContext", + [EnvironmentContext, None], + None, + ), # 5 + ( + 6, + TType.I64, + "writeId", + None, + -1, + ), # 6 + ( + 7, + TType.STRING, + "validWriteIdList", + "UTF8", + None, + ), # 7 + ( + 8, + TType.LIST, + "processorCapabilities", + (TType.STRING, "UTF8", False), + None, + ), # 8 + ( + 9, + TType.STRING, + "processorIdentifier", + "UTF8", + None, + ), # 9 +) +all_structs.append(AlterTableResponse) +AlterTableResponse.thrift_spec = () +all_structs.append(GetPartitionsFilterSpec) +GetPartitionsFilterSpec.thrift_spec = ( + None, # 0 + None, # 1 + None, # 2 + None, # 3 + None, # 4 + None, # 5 + None, # 6 + ( + 7, + TType.I32, + "filterMode", + None, + None, + ), # 7 + ( + 8, + TType.LIST, + "filters", + (TType.STRING, "UTF8", False), + None, + ), # 8 +) +all_structs.append(GetPartitionsResponse) +GetPartitionsResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "partitionSpec", + (TType.STRUCT, [PartitionSpec, None], False), + None, + ), # 1 +) +all_structs.append(GetPartitionsRequest) +GetPartitionsRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "tblName", + "UTF8", + None, + ), # 3 + ( + 4, + TType.BOOL, + "withAuth", + None, + None, + ), # 4 + ( + 5, + TType.STRING, + "user", + "UTF8", + None, + ), # 5 + ( + 6, + TType.LIST, + "groupNames", + (TType.STRING, "UTF8", False), + None, + ), # 6 + ( + 7, + TType.STRUCT, + "projectionSpec", + [GetProjectionsSpec, None], + None, + ), # 7 + ( + 8, + TType.STRUCT, + "filterSpec", + [GetPartitionsFilterSpec, None], + None, + ), # 8 + ( + 9, + TType.LIST, + "processorCapabilities", + (TType.STRING, "UTF8", False), + None, + ), # 9 + ( + 10, + TType.STRING, + "processorIdentifier", + "UTF8", + None, + ), # 10 + ( + 11, + TType.STRING, + "validWriteIdList", + "UTF8", + None, + ), # 11 +) +all_structs.append(GetFieldsRequest) +GetFieldsRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "tblName", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRUCT, + "envContext", + [EnvironmentContext, None], + None, + ), # 4 + ( + 5, + TType.STRING, + "validWriteIdList", + "UTF8", + None, + ), # 5 + ( + 6, + TType.I64, + "id", + None, + -1, + ), # 6 +) +all_structs.append(GetFieldsResponse) +GetFieldsResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "fields", + (TType.STRUCT, [FieldSchema, None], False), + None, + ), # 1 +) +all_structs.append(GetSchemaRequest) +GetSchemaRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "tblName", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRUCT, + "envContext", + [EnvironmentContext, None], + None, + ), # 4 + ( + 5, + TType.STRING, + "validWriteIdList", + "UTF8", + None, + ), # 5 + ( + 6, + TType.I64, + "id", + None, + -1, + ), # 6 +) +all_structs.append(GetSchemaResponse) +GetSchemaResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "fields", + (TType.STRUCT, [FieldSchema, None], False), + None, + ), # 1 +) +all_structs.append(GetPartitionRequest) +GetPartitionRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "tblName", + "UTF8", + None, + ), # 3 + ( + 4, + TType.LIST, + "partVals", + (TType.STRING, "UTF8", False), + None, + ), # 4 + ( + 5, + TType.STRING, + "validWriteIdList", + "UTF8", + None, + ), # 5 + ( + 6, + TType.I64, + "id", + None, + -1, + ), # 6 +) +all_structs.append(GetPartitionResponse) +GetPartitionResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "partition", + [Partition, None], + None, + ), # 1 +) +all_structs.append(PartitionsRequest) +PartitionsRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "tblName", + "UTF8", + None, + ), # 3 + ( + 4, + TType.I16, + "maxParts", + None, + -1, + ), # 4 + ( + 5, + TType.STRING, + "validWriteIdList", + "UTF8", + None, + ), # 5 + ( + 6, + TType.I64, + "id", + None, + -1, + ), # 6 +) +all_structs.append(PartitionsResponse) +PartitionsResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "partitions", + (TType.STRUCT, [Partition, None], False), + None, + ), # 1 +) +all_structs.append(GetPartitionNamesPsRequest) +GetPartitionNamesPsRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "tblName", + "UTF8", + None, + ), # 3 + ( + 4, + TType.LIST, + "partValues", + (TType.STRING, "UTF8", False), + None, + ), # 4 + ( + 5, + TType.I16, + "maxParts", + None, + -1, + ), # 5 + ( + 6, + TType.STRING, + "validWriteIdList", + "UTF8", + None, + ), # 6 + ( + 7, + TType.I64, + "id", + None, + -1, + ), # 7 +) +all_structs.append(GetPartitionNamesPsResponse) +GetPartitionNamesPsResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "names", + (TType.STRING, "UTF8", False), + None, + ), # 1 +) +all_structs.append(GetPartitionsPsWithAuthRequest) +GetPartitionsPsWithAuthRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "tblName", + "UTF8", + None, + ), # 3 + ( + 4, + TType.LIST, + "partVals", + (TType.STRING, "UTF8", False), + None, + ), # 4 + ( + 5, + TType.I16, + "maxParts", + None, + -1, + ), # 5 + ( + 6, + TType.STRING, + "userName", + "UTF8", + None, + ), # 6 + ( + 7, + TType.LIST, + "groupNames", + (TType.STRING, "UTF8", False), + None, + ), # 7 + ( + 8, + TType.STRING, + "validWriteIdList", + "UTF8", + None, + ), # 8 + ( + 9, + TType.I64, + "id", + None, + -1, + ), # 9 +) +all_structs.append(GetPartitionsPsWithAuthResponse) +GetPartitionsPsWithAuthResponse.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "partitions", + (TType.STRUCT, [Partition, None], False), + None, + ), # 1 +) +all_structs.append(ReplicationMetrics) +ReplicationMetrics.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "scheduledExecutionId", + None, + None, + ), # 1 + ( + 2, + TType.STRING, + "policy", + "UTF8", + None, + ), # 2 + ( + 3, + TType.I64, + "dumpExecutionId", + None, + None, + ), # 3 + ( + 4, + TType.STRING, + "metadata", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "progress", + "UTF8", + None, + ), # 5 + ( + 6, + TType.STRING, + "messageFormat", + "UTF8", + None, + ), # 6 +) +all_structs.append(ReplicationMetricList) +ReplicationMetricList.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "replicationMetricList", + (TType.STRUCT, [ReplicationMetrics, None], False), + None, + ), # 1 +) +all_structs.append(GetReplicationMetricsRequest) +GetReplicationMetricsRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "scheduledExecutionId", + None, + None, + ), # 1 + ( + 2, + TType.STRING, + "policy", + "UTF8", + None, + ), # 2 + ( + 3, + TType.I64, + "dumpExecutionId", + None, + None, + ), # 3 +) +all_structs.append(GetOpenTxnsRequest) +GetOpenTxnsRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "excludeTxnTypes", + (TType.I32, None, False), + None, + ), # 1 +) +all_structs.append(StoredProcedureRequest) +StoredProcedureRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "procName", + "UTF8", + None, + ), # 3 +) +all_structs.append(ListStoredProcedureRequest) +ListStoredProcedureRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 2 +) +all_structs.append(StoredProcedure) +StoredProcedure.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "catName", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "ownerName", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "source", + "UTF8", + None, + ), # 5 +) +all_structs.append(AddPackageRequest) +AddPackageRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "packageName", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "ownerName", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "header", + "UTF8", + None, + ), # 5 + ( + 6, + TType.STRING, + "body", + "UTF8", + None, + ), # 6 +) +all_structs.append(GetPackageRequest) +GetPackageRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "packageName", + "UTF8", + None, + ), # 3 +) +all_structs.append(DropPackageRequest) +DropPackageRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "packageName", + "UTF8", + None, + ), # 3 +) +all_structs.append(ListPackageRequest) +ListPackageRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 2 +) +all_structs.append(Package) +Package.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "catName", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "packageName", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "ownerName", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "header", + "UTF8", + None, + ), # 5 + ( + 6, + TType.STRING, + "body", + "UTF8", + None, + ), # 6 +) +all_structs.append(GetAllWriteEventInfoRequest) +GetAllWriteEventInfoRequest.thrift_spec = ( + None, # 0 + ( + 1, + TType.I64, + "txnId", + None, + None, + ), # 1 + ( + 2, + TType.STRING, + "dbName", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "tableName", + "UTF8", + None, + ), # 3 +) +all_structs.append(MetaException) +MetaException.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 +) +all_structs.append(UnknownTableException) +UnknownTableException.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 +) +all_structs.append(UnknownDBException) +UnknownDBException.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 +) +all_structs.append(AlreadyExistsException) +AlreadyExistsException.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 +) +all_structs.append(InvalidPartitionException) +InvalidPartitionException.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 +) +all_structs.append(UnknownPartitionException) +UnknownPartitionException.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 +) +all_structs.append(InvalidObjectException) +InvalidObjectException.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 +) +all_structs.append(NoSuchObjectException) +NoSuchObjectException.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 +) +all_structs.append(InvalidOperationException) +InvalidOperationException.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 +) +all_structs.append(ConfigValSecurityException) +ConfigValSecurityException.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 +) +all_structs.append(InvalidInputException) +InvalidInputException.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 +) +all_structs.append(NoSuchTxnException) +NoSuchTxnException.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 +) +all_structs.append(TxnAbortedException) +TxnAbortedException.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 +) +all_structs.append(TxnOpenException) +TxnOpenException.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 +) +all_structs.append(NoSuchLockException) +NoSuchLockException.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 +) +fix_spec(all_structs) +del all_structs