diff --git a/.github/workflows/standardization_lint.yaml b/.github/workflows/standardization_lint.yaml
index 5b9e5fc265..481c65398b 100644
--- a/.github/workflows/standardization_lint.yaml
+++ b/.github/workflows/standardization_lint.yaml
@@ -69,7 +69,7 @@ jobs:
- uses: hadolint/hadolint-action@v2.1.0
with:
recursive: true
- ignore: 'DL3033,DL3013,DL3059,SC2086,DL3003,SC2164,DL3008,DL3007,DL3006'
+ ignore: 'DL3033,DL3013,DL3059,SC2086,DL3003,SC2164,DL3008,DL3007,DL3006,DL4001'
license_check:
name: Check License
diff --git a/.gitignore b/.gitignore
index 509dbfb07e..e70e26a5b9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -136,6 +136,8 @@ java-client/.vscode/
java-client/google-java-format-*
java-client/pegasus-*
java-client/dependency-reduced-pom.xml
+java-client/src/main/java/org/apache/pegasus/apps/*
+java-client/src/main/java/org/apache/pegasus/replication/*
# Created by .ignore support plugin (hsz.mobi)
### SBT template
diff --git a/README.md b/README.md
index a80060be7a..820a3bc1b4 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,9 @@ under the License.
-->
[github-release]: https://github.com/apache/incubator-pegasus/releases
+
[PacificA]: https://www.microsoft.com/en-us/research/publication/pacifica-replication-in-log-based-distributed-storage-systems/
+
[pegasus-rocksdb]: https://github.com/xiaomi/pegasus-rocksdb
[hbase]: https://hbase.apache.org/
[website]: https://pegasus.apache.org
diff --git a/docker/pegasus-build-env/centos6/Dockerfile b/docker/pegasus-build-env/centos6/Dockerfile
index 61e9c5f182..8e6c174018 100644
--- a/docker/pegasus-build-env/centos6/Dockerfile
+++ b/docker/pegasus-build-env/centos6/Dockerfile
@@ -26,10 +26,10 @@ RUN curl https://www.getpagespeed.com/files/centos6-scl-eol.repo --output /etc/y
RUN curl https://www.getpagespeed.com/files/centos6-scl-rh-eol.repo --output /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo
# diable gpgcheck, otherwise the repo check will be failed.
-RUN sed -i s/"gpgcheck=1"/"gpgcheck=0"/g /etc/yum.repos.d/CentOS-Base.repo
-RUN sed -i s/"gpgcheck=1"/"gpgcheck=0"/g /etc/yum.repos.d/epel.repo
-RUN sed -i s/"gpgcheck=1"/"gpgcheck=0"/g /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo
-RUN sed -i s/"gpgcheck=1"/"gpgcheck=0"/g /etc/yum.repos.d/CentOS-SCLo-scl.repo
+RUN sed -i 's/gpgcheck=1/gpgcheck=0/g' /etc/yum.repos.d/CentOS-Base.repo
+RUN sed -i 's/gpgcheck=1/gpgcheck=0/g' /etc/yum.repos.d/epel.repo
+RUN sed -i 's/gpgcheck=1/gpgcheck=0/g' /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo
+RUN sed -i 's/gpgcheck=1/gpgcheck=0/g' /etc/yum.repos.d/CentOS-SCLo-scl.repo
RUN yum -y install \
devtoolset-7-gcc \
@@ -42,7 +42,7 @@ RUN yum -y install \
python27 \
python34 \
automake \
- autoconf \
+ autoconf \
make \
libtool \
file \
@@ -78,4 +78,10 @@ ENV LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/amd64/server:$PYTHON2_HOME/lib64/:$LD_LIB
RUN pip install --no-cache-dir cmake
+RUN wget --progress=dot:giga https://github.com/apache/thrift/archive/refs/tags/0.11.0.tar.gz -P /opt/thrift && \
+ cd /opt/thrift && tar xzf 0.11.0.tar.gz && cd thrift-0.11.0 && ./bootstrap.sh && \
+ ./configure --enable-libs=no && \
+ make -j$(($(nproc)/2+1)) && make install && cd - && \
+ rm -rf thrift-0.11.0 0.11.0.tar.gz
+
WORKDIR /root/apache
diff --git a/docker/pegasus-build-env/centos7/Dockerfile b/docker/pegasus-build-env/centos7/Dockerfile
index beea128ca3..dad92f6f6a 100644
--- a/docker/pegasus-build-env/centos7/Dockerfile
+++ b/docker/pegasus-build-env/centos7/Dockerfile
@@ -61,6 +61,12 @@ RUN wget --progress=dot:giga https://archive.apache.org/dist/maven/maven-3/3.8.3
&& tar -zxf apache-maven-3.8.3-bin.tar.gz \
&& rm apache-maven-3.8.3-bin.tar.gz
+RUN wget --progress=dot:giga https://github.com/apache/thrift/archive/refs/tags/0.11.0.tar.gz -P /opt/thrift && \
+ cd /opt/thrift && tar xzf 0.11.0.tar.gz && cd thrift-0.11.0 && ./bootstrap.sh && \
+ ./configure --enable-libs=no && \
+ make -j$(($(nproc)/2+1)) && make install && cd - && \
+ rm -rf thrift-0.11.0 0.11.0.tar.gz
+
ENV JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
ENV PATH="/opt/rh/devtoolset-7/root/bin/:${PATH}"
ENV PATH="/opt/maven/apache-maven-3.8.3/bin:${PATH}"
diff --git a/docker/pegasus-build-env/ubuntu1604/Dockerfile b/docker/pegasus-build-env/ubuntu1604/Dockerfile
index 4497470315..30a28b4655 100644
--- a/docker/pegasus-build-env/ubuntu1604/Dockerfile
+++ b/docker/pegasus-build-env/ubuntu1604/Dockerfile
@@ -60,4 +60,10 @@ RUN add-apt-repository ppa:git-core/ppa -y; \
RUN pip3 install --no-cache-dir cmake
+RUN wget --progress=dot:giga https://github.com/apache/thrift/archive/refs/tags/0.11.0.tar.gz -P /opt/thrift && \
+ cd /opt/thrift && tar xzf 0.11.0.tar.gz && cd thrift-0.11.0 && ./bootstrap.sh && \
+ ./configure --enable-libs=no && \
+ make -j$(($(nproc)/2+1)) && make install && cd - && \
+ rm -rf thrift-0.11.0 0.11.0.tar.gz
+
WORKDIR /root/apache
diff --git a/docker/pegasus-build-env/ubuntu1804/Dockerfile b/docker/pegasus-build-env/ubuntu1804/Dockerfile
index 9c6238aab5..0f18d6f0ab 100644
--- a/docker/pegasus-build-env/ubuntu1804/Dockerfile
+++ b/docker/pegasus-build-env/ubuntu1804/Dockerfile
@@ -62,6 +62,12 @@ RUN add-apt-repository ppa:git-core/ppa -y; \
RUN pip3 install --no-cache-dir cmake
+RUN wget --progress=dot:giga https://github.com/apache/thrift/archive/refs/tags/0.11.0.tar.gz -P /opt/thrift && \
+ cd /opt/thrift && tar xzf 0.11.0.tar.gz && cd thrift-0.11.0 && ./bootstrap.sh && \
+ ./configure --enable-libs=no && \
+ make -j$(($(nproc)/2+1)) && make install && cd - && \
+ rm -rf thrift-0.11.0 0.11.0.tar.gz
+
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
ENV CLASSPATH=$JAVA_HOME/lib/
ENV PATH=$JAVA_HOME/bin:$PATH
diff --git a/docker/pegasus-build-env/ubuntu2004/Dockerfile b/docker/pegasus-build-env/ubuntu2004/Dockerfile
index 7457540ab5..6438fb03bf 100644
--- a/docker/pegasus-build-env/ubuntu2004/Dockerfile
+++ b/docker/pegasus-build-env/ubuntu2004/Dockerfile
@@ -62,6 +62,12 @@ RUN add-apt-repository ppa:git-core/ppa -y; \
RUN pip3 install --no-cache-dir cmake
+RUN wget --progress=dot:giga https://github.com/apache/thrift/archive/refs/tags/0.11.0.tar.gz -P /opt/thrift && \
+ cd /opt/thrift && tar xzf 0.11.0.tar.gz && cd thrift-0.11.0 && ./bootstrap.sh && \
+ ./configure --enable-libs=no && \
+ make -j$(($(nproc)/2+1)) && make install && cd - && \
+ rm -rf thrift-0.11.0 0.11.0.tar.gz
+
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
ENV CLASSPATH=$JAVA_HOME/lib/
ENV PATH=$JAVA_HOME/bin:$PATH
diff --git a/java-client/README.md b/java-client/README.md
index 370bfb2520..f6683e16d9 100644
--- a/java-client/README.md
+++ b/java-client/README.md
@@ -24,12 +24,16 @@ under the License.
## Build
```
+cd idl && sh recompile_thrift.sh && cd -
+mvn spotless:apply
mvn clean package -DskipTests
```
## Install
```
+cd idl && sh recompile_thrift.sh && cd -
+mvn spotless:apply
mvn clean install -DskipTests
```
@@ -38,12 +42,16 @@ mvn clean install -DskipTests
To run test, you should start pegasus onebox firstly, and run test as:
```
+cd idl && sh recompile_thrift.sh && cd -
+mvn spotless:apply
mvn clean package
```
or specify one test:
```
+cd idl && sh recompile_thrift.sh && cd -
+mvn spotless:apply
mvn clean package -Dtest=TestPing
```
diff --git a/java-client/idl/recompile_thrift.sh b/java-client/idl/recompile_thrift.sh
index 1da0b97f93..286efd043a 100755
--- a/java-client/idl/recompile_thrift.sh
+++ b/java-client/idl/recompile_thrift.sh
@@ -19,21 +19,32 @@
# under the License.
#
-# method to get thrift 0.11.0:
-# wget http://mirrors.tuna.tsinghua.edu.cn/apache/thrift/0.11.0/thrift-0.11.0.tar.gz
-# tar xvf thrift-0.11.0.tar.gz
-# cd thrift-0.11.0
-# ./configure --with-csharp=no --with-java=no --with-python=no --with-erlang=no --with-perl=no \
-# --with-php=no --with-ruby=no --with-haskell=no --with-php_extension=no --with-rs=no --with-go=no
-# make
-# sudo make install
-#
-# Note: by default the thrift will be installed in /usr/local. If you'd like to install it somewhere else,
-# you'd better provide install path with option `--prefix=xxx'.
-
+function GenThriftTool() {
+ set -e
+ wget --progress=dot:giga https://github.com/apache/thrift/archive/refs/tags/0.11.0.tar.gz -O thrift-0.11.0.tar.gz
+ tar xzf thrift-0.11.0.tar.gz
+ pushd thrift-0.11.0
+ ./bootstrap.sh
+ ./configure --enable-libs=no
+ make -j$(($(nproc)/2+1))
+ make install
+ popd
+ rm -rf thrift-0.11.0 thrift-0.11.0.tar.gz
+ set +e
+}
+
+root=`dirname $0`
+root=`cd $root; pwd`
+
thrift=thrift
+which thrift
+if [ $? -ne 0 ]; then
+ echo "ERROR: not found thrift, try to get it"
+ GenThriftTool
+fi
+
if ! $thrift -version | grep "0.11.0" ; then
- echo "ERROR: thrift version should be 0.11.0"
+ echo "ERROR: thrift version should be 0.11.0, please manual fix it"
exit 1
fi
diff --git a/java-client/scripts/ci-test.sh b/java-client/scripts/ci-test.sh
index 5c69ce6e26..9b5cceeb7d 100755
--- a/java-client/scripts/ci-test.sh
+++ b/java-client/scripts/ci-test.sh
@@ -57,6 +57,13 @@ cd $PEGASUS_PKG
./run.sh start_onebox -w
cd ../
+
+pushd idl
+echo "bash recompile_thrift.sh"
+bash recompile_thrift.sh
+popd
+mvn spotless:apply
+
if ! mvn clean test
then
cd $PEGASUS_PKG
diff --git a/java-client/src/main/java/org/apache/pegasus/apps/batch_get_request.java b/java-client/src/main/java/org/apache/pegasus/apps/batch_get_request.java
deleted file mode 100644
index cf82ffc7ea..0000000000
--- a/java-client/src/main/java/org/apache/pegasus/apps/batch_get_request.java
+++ /dev/null
@@ -1,469 +0,0 @@
-/*
- * 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.11.0)
- *
- *
DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
- */
-package org.apache.pegasus.apps;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(
- value = "Autogenerated by Thrift Compiler (0.11.0)",
- date = "2022-02-12")
-public class batch_get_request
- implements org.apache.thrift.TBase,
- java.io.Serializable,
- Cloneable,
- Comparable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("batch_get_request");
-
- private static final org.apache.thrift.protocol.TField KEYS_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "keys", org.apache.thrift.protocol.TType.LIST, (short) 1);
-
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
- new batch_get_requestStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
- new batch_get_requestTupleSchemeFactory();
-
- public java.util.List keys; // required
-
- /**
- * The set of fields this struct contains, along with convenience methods for finding and
- * manipulating them.
- */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- KEYS((short) 1, "keys");
-
- private static final java.util.Map byName =
- new java.util.HashMap();
-
- static {
- for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /** Find the _Fields constant that matches fieldId, or null if its not found. */
- public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
- case 1: // KEYS
- return KEYS;
- default:
- return null;
- }
- }
-
- /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null)
- throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /** Find the _Fields constant that matches name, or null if its not found. */
- public static _Fields findByName(java.lang.String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final java.lang.String _fieldName;
-
- _Fields(short thriftId, java.lang.String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public java.lang.String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
- static {
- java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(
- _Fields.KEYS,
- new org.apache.thrift.meta_data.FieldMetaData(
- "keys",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(
- org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.STRUCT, "full_key"))));
- metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
- batch_get_request.class, metaDataMap);
- }
-
- public batch_get_request() {}
-
- public batch_get_request(java.util.List keys) {
- this();
- this.keys = keys;
- }
-
- /** Performs a deep copy on other. */
- public batch_get_request(batch_get_request other) {
- if (other.isSetKeys()) {
- java.util.List __this__keys = new java.util.ArrayList(other.keys.size());
- for (full_key other_element : other.keys) {
- __this__keys.add(new full_key(other_element));
- }
- this.keys = __this__keys;
- }
- }
-
- public batch_get_request deepCopy() {
- return new batch_get_request(this);
- }
-
- @Override
- public void clear() {
- this.keys = null;
- }
-
- public int getKeysSize() {
- return (this.keys == null) ? 0 : this.keys.size();
- }
-
- public java.util.Iterator getKeysIterator() {
- return (this.keys == null) ? null : this.keys.iterator();
- }
-
- public void addToKeys(full_key elem) {
- if (this.keys == null) {
- this.keys = new java.util.ArrayList();
- }
- this.keys.add(elem);
- }
-
- public java.util.List getKeys() {
- return this.keys;
- }
-
- public batch_get_request setKeys(java.util.List keys) {
- this.keys = keys;
- return this;
- }
-
- public void unsetKeys() {
- this.keys = null;
- }
-
- /** Returns true if field keys is set (has been assigned a value) and false otherwise */
- public boolean isSetKeys() {
- return this.keys != null;
- }
-
- public void setKeysIsSet(boolean value) {
- if (!value) {
- this.keys = null;
- }
- }
-
- public void setFieldValue(_Fields field, java.lang.Object value) {
- switch (field) {
- case KEYS:
- if (value == null) {
- unsetKeys();
- } else {
- setKeys((java.util.List) value);
- }
- break;
- }
- }
-
- public java.lang.Object getFieldValue(_Fields field) {
- switch (field) {
- case KEYS:
- return getKeys();
- }
- throw new java.lang.IllegalStateException();
- }
-
- /**
- * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new java.lang.IllegalArgumentException();
- }
-
- switch (field) {
- case KEYS:
- return isSetKeys();
- }
- throw new java.lang.IllegalStateException();
- }
-
- @Override
- public boolean equals(java.lang.Object that) {
- if (that == null) return false;
- if (that instanceof batch_get_request) return this.equals((batch_get_request) that);
- return false;
- }
-
- public boolean equals(batch_get_request that) {
- if (that == null) return false;
- if (this == that) return true;
-
- boolean this_present_keys = true && this.isSetKeys();
- boolean that_present_keys = true && that.isSetKeys();
- if (this_present_keys || that_present_keys) {
- if (!(this_present_keys && that_present_keys)) return false;
- if (!this.keys.equals(that.keys)) return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 1;
-
- hashCode = hashCode * 8191 + ((isSetKeys()) ? 131071 : 524287);
- if (isSetKeys()) hashCode = hashCode * 8191 + keys.hashCode();
-
- return hashCode;
- }
-
- @Override
- public int compareTo(batch_get_request other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = java.lang.Boolean.valueOf(isSetKeys()).compareTo(other.isSetKeys());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetKeys()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keys, other.keys);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- scheme(iprot).read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- scheme(oprot).write(oprot, this);
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("batch_get_request(");
- boolean first = true;
-
- sb.append("keys:");
- if (this.keys == null) {
- sb.append("null");
- } else {
- sb.append(this.keys);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, java.lang.ClassNotFoundException {
- try {
- read(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class batch_get_requestStandardSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public batch_get_requestStandardScheme getScheme() {
- return new batch_get_requestStandardScheme();
- }
- }
-
- private static class batch_get_requestStandardScheme
- extends org.apache.thrift.scheme.StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, batch_get_request struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true) {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // KEYS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
- struct.keys = new java.util.ArrayList(_list32.size);
- full_key _elem33;
- for (int _i34 = 0; _i34 < _list32.size; ++_i34) {
- _elem33 = new full_key();
- _elem33.read(iprot);
- struct.keys.add(_elem33);
- }
- iprot.readListEnd();
- }
- struct.setKeysIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, batch_get_request struct)
- throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.keys != null) {
- oprot.writeFieldBegin(KEYS_FIELD_DESC);
- {
- oprot.writeListBegin(
- new org.apache.thrift.protocol.TList(
- org.apache.thrift.protocol.TType.STRUCT, struct.keys.size()));
- for (full_key _iter35 : struct.keys) {
- _iter35.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
- }
-
- private static class batch_get_requestTupleSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public batch_get_requestTupleScheme getScheme() {
- return new batch_get_requestTupleScheme();
- }
- }
-
- private static class batch_get_requestTupleScheme
- extends org.apache.thrift.scheme.TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, batch_get_request struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol oprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet optionals = new java.util.BitSet();
- if (struct.isSetKeys()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetKeys()) {
- {
- oprot.writeI32(struct.keys.size());
- for (full_key _iter36 : struct.keys) {
- _iter36.write(oprot);
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, batch_get_request struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol iprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TList _list37 =
- new org.apache.thrift.protocol.TList(
- org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.keys = new java.util.ArrayList(_list37.size);
- full_key _elem38;
- for (int _i39 = 0; _i39 < _list37.size; ++_i39) {
- _elem38 = new full_key();
- _elem38.read(iprot);
- struct.keys.add(_elem38);
- }
- }
- struct.setKeysIsSet(true);
- }
- }
- }
-
- private static S scheme(
- org.apache.thrift.protocol.TProtocol proto) {
- return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
- ? STANDARD_SCHEME_FACTORY
- : TUPLE_SCHEME_FACTORY)
- .getScheme();
- }
-}
diff --git a/java-client/src/main/java/org/apache/pegasus/apps/batch_get_response.java b/java-client/src/main/java/org/apache/pegasus/apps/batch_get_response.java
deleted file mode 100644
index c912a468fe..0000000000
--- a/java-client/src/main/java/org/apache/pegasus/apps/batch_get_response.java
+++ /dev/null
@@ -1,896 +0,0 @@
-/*
- * 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.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
- */
-package org.apache.pegasus.apps;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(
- value = "Autogenerated by Thrift Compiler (0.11.0)",
- date = "2022-02-12")
-public class batch_get_response
- implements org.apache.thrift.TBase,
- java.io.Serializable,
- Cloneable,
- Comparable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("batch_get_response");
-
- private static final org.apache.thrift.protocol.TField ERROR_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "error", org.apache.thrift.protocol.TType.I32, (short) 1);
- private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "data", org.apache.thrift.protocol.TType.LIST, (short) 2);
- private static final org.apache.thrift.protocol.TField APP_ID_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "app_id", org.apache.thrift.protocol.TType.I32, (short) 3);
- private static final org.apache.thrift.protocol.TField PARTITION_INDEX_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "partition_index", org.apache.thrift.protocol.TType.I32, (short) 4);
- private static final org.apache.thrift.protocol.TField SERVER_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "server", org.apache.thrift.protocol.TType.STRING, (short) 6);
-
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
- new batch_get_responseStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
- new batch_get_responseTupleSchemeFactory();
-
- public int error; // required
- public java.util.List data; // required
- public int app_id; // required
- public int partition_index; // required
- public java.lang.String server; // required
-
- /**
- * The set of fields this struct contains, along with convenience methods for finding and
- * manipulating them.
- */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- ERROR((short) 1, "error"),
- DATA((short) 2, "data"),
- APP_ID((short) 3, "app_id"),
- PARTITION_INDEX((short) 4, "partition_index"),
- SERVER((short) 6, "server");
-
- private static final java.util.Map byName =
- new java.util.HashMap();
-
- static {
- for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /** Find the _Fields constant that matches fieldId, or null if its not found. */
- public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
- case 1: // ERROR
- return ERROR;
- case 2: // DATA
- return DATA;
- case 3: // APP_ID
- return APP_ID;
- case 4: // PARTITION_INDEX
- return PARTITION_INDEX;
- case 6: // SERVER
- return SERVER;
- default:
- return null;
- }
- }
-
- /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null)
- throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /** Find the _Fields constant that matches name, or null if its not found. */
- public static _Fields findByName(java.lang.String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final java.lang.String _fieldName;
-
- _Fields(short thriftId, java.lang.String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public java.lang.String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __ERROR_ISSET_ID = 0;
- private static final int __APP_ID_ISSET_ID = 1;
- private static final int __PARTITION_INDEX_ISSET_ID = 2;
- private byte __isset_bitfield = 0;
- public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
- static {
- java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(
- _Fields.ERROR,
- new org.apache.thrift.meta_data.FieldMetaData(
- "error",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(
- _Fields.DATA,
- new org.apache.thrift.meta_data.FieldMetaData(
- "data",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(
- org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.STRUCT, "full_data"))));
- tmpMap.put(
- _Fields.APP_ID,
- new org.apache.thrift.meta_data.FieldMetaData(
- "app_id",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(
- _Fields.PARTITION_INDEX,
- new org.apache.thrift.meta_data.FieldMetaData(
- "partition_index",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(
- _Fields.SERVER,
- new org.apache.thrift.meta_data.FieldMetaData(
- "server",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
- batch_get_response.class, metaDataMap);
- }
-
- public batch_get_response() {}
-
- public batch_get_response(
- int error,
- java.util.List data,
- int app_id,
- int partition_index,
- java.lang.String server) {
- this();
- this.error = error;
- setErrorIsSet(true);
- this.data = data;
- this.app_id = app_id;
- setApp_idIsSet(true);
- this.partition_index = partition_index;
- setPartition_indexIsSet(true);
- this.server = server;
- }
-
- /** Performs a deep copy on other. */
- public batch_get_response(batch_get_response other) {
- __isset_bitfield = other.__isset_bitfield;
- this.error = other.error;
- if (other.isSetData()) {
- java.util.List __this__data =
- new java.util.ArrayList(other.data.size());
- for (full_data other_element : other.data) {
- __this__data.add(new full_data(other_element));
- }
- this.data = __this__data;
- }
- this.app_id = other.app_id;
- this.partition_index = other.partition_index;
- if (other.isSetServer()) {
- this.server = other.server;
- }
- }
-
- public batch_get_response deepCopy() {
- return new batch_get_response(this);
- }
-
- @Override
- public void clear() {
- setErrorIsSet(false);
- this.error = 0;
- this.data = null;
- setApp_idIsSet(false);
- this.app_id = 0;
- setPartition_indexIsSet(false);
- this.partition_index = 0;
- this.server = null;
- }
-
- public int getError() {
- return this.error;
- }
-
- public batch_get_response setError(int error) {
- this.error = error;
- setErrorIsSet(true);
- return this;
- }
-
- public void unsetError() {
- __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ERROR_ISSET_ID);
- }
-
- /** Returns true if field error is set (has been assigned a value) and false otherwise */
- public boolean isSetError() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ERROR_ISSET_ID);
- }
-
- public void setErrorIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ERROR_ISSET_ID, value);
- }
-
- public int getDataSize() {
- return (this.data == null) ? 0 : this.data.size();
- }
-
- public java.util.Iterator getDataIterator() {
- return (this.data == null) ? null : this.data.iterator();
- }
-
- public void addToData(full_data elem) {
- if (this.data == null) {
- this.data = new java.util.ArrayList();
- }
- this.data.add(elem);
- }
-
- public java.util.List getData() {
- return this.data;
- }
-
- public batch_get_response setData(java.util.List data) {
- this.data = data;
- return this;
- }
-
- public void unsetData() {
- this.data = null;
- }
-
- /** Returns true if field data is set (has been assigned a value) and false otherwise */
- public boolean isSetData() {
- return this.data != null;
- }
-
- public void setDataIsSet(boolean value) {
- if (!value) {
- this.data = null;
- }
- }
-
- public int getApp_id() {
- return this.app_id;
- }
-
- public batch_get_response setApp_id(int app_id) {
- this.app_id = app_id;
- setApp_idIsSet(true);
- return this;
- }
-
- public void unsetApp_id() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __APP_ID_ISSET_ID);
- }
-
- /** Returns true if field app_id is set (has been assigned a value) and false otherwise */
- public boolean isSetApp_id() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __APP_ID_ISSET_ID);
- }
-
- public void setApp_idIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __APP_ID_ISSET_ID, value);
- }
-
- public int getPartition_index() {
- return this.partition_index;
- }
-
- public batch_get_response setPartition_index(int partition_index) {
- this.partition_index = partition_index;
- setPartition_indexIsSet(true);
- return this;
- }
-
- public void unsetPartition_index() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PARTITION_INDEX_ISSET_ID);
- }
-
- /**
- * Returns true if field partition_index is set (has been assigned a value) and false otherwise
- */
- public boolean isSetPartition_index() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PARTITION_INDEX_ISSET_ID);
- }
-
- public void setPartition_indexIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PARTITION_INDEX_ISSET_ID, value);
- }
-
- public java.lang.String getServer() {
- return this.server;
- }
-
- public batch_get_response setServer(java.lang.String server) {
- this.server = server;
- return this;
- }
-
- public void unsetServer() {
- this.server = null;
- }
-
- /** Returns true if field server is set (has been assigned a value) and false otherwise */
- public boolean isSetServer() {
- return this.server != null;
- }
-
- public void setServerIsSet(boolean value) {
- if (!value) {
- this.server = null;
- }
- }
-
- public void setFieldValue(_Fields field, java.lang.Object value) {
- switch (field) {
- case ERROR:
- if (value == null) {
- unsetError();
- } else {
- setError((java.lang.Integer) value);
- }
- break;
-
- case DATA:
- if (value == null) {
- unsetData();
- } else {
- setData((java.util.List) value);
- }
- break;
-
- case APP_ID:
- if (value == null) {
- unsetApp_id();
- } else {
- setApp_id((java.lang.Integer) value);
- }
- break;
-
- case PARTITION_INDEX:
- if (value == null) {
- unsetPartition_index();
- } else {
- setPartition_index((java.lang.Integer) value);
- }
- break;
-
- case SERVER:
- if (value == null) {
- unsetServer();
- } else {
- setServer((java.lang.String) value);
- }
- break;
- }
- }
-
- public java.lang.Object getFieldValue(_Fields field) {
- switch (field) {
- case ERROR:
- return getError();
-
- case DATA:
- return getData();
-
- case APP_ID:
- return getApp_id();
-
- case PARTITION_INDEX:
- return getPartition_index();
-
- case SERVER:
- return getServer();
- }
- throw new java.lang.IllegalStateException();
- }
-
- /**
- * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new java.lang.IllegalArgumentException();
- }
-
- switch (field) {
- case ERROR:
- return isSetError();
- case DATA:
- return isSetData();
- case APP_ID:
- return isSetApp_id();
- case PARTITION_INDEX:
- return isSetPartition_index();
- case SERVER:
- return isSetServer();
- }
- throw new java.lang.IllegalStateException();
- }
-
- @Override
- public boolean equals(java.lang.Object that) {
- if (that == null) return false;
- if (that instanceof batch_get_response) return this.equals((batch_get_response) that);
- return false;
- }
-
- public boolean equals(batch_get_response that) {
- if (that == null) return false;
- if (this == that) return true;
-
- boolean this_present_error = true;
- boolean that_present_error = true;
- if (this_present_error || that_present_error) {
- if (!(this_present_error && that_present_error)) return false;
- if (this.error != that.error) return false;
- }
-
- boolean this_present_data = true && this.isSetData();
- boolean that_present_data = true && that.isSetData();
- if (this_present_data || that_present_data) {
- if (!(this_present_data && that_present_data)) return false;
- if (!this.data.equals(that.data)) return false;
- }
-
- boolean this_present_app_id = true;
- boolean that_present_app_id = true;
- if (this_present_app_id || that_present_app_id) {
- if (!(this_present_app_id && that_present_app_id)) return false;
- if (this.app_id != that.app_id) return false;
- }
-
- boolean this_present_partition_index = true;
- boolean that_present_partition_index = true;
- if (this_present_partition_index || that_present_partition_index) {
- if (!(this_present_partition_index && that_present_partition_index)) return false;
- if (this.partition_index != that.partition_index) return false;
- }
-
- boolean this_present_server = true && this.isSetServer();
- boolean that_present_server = true && that.isSetServer();
- if (this_present_server || that_present_server) {
- if (!(this_present_server && that_present_server)) return false;
- if (!this.server.equals(that.server)) return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 1;
-
- hashCode = hashCode * 8191 + error;
-
- hashCode = hashCode * 8191 + ((isSetData()) ? 131071 : 524287);
- if (isSetData()) hashCode = hashCode * 8191 + data.hashCode();
-
- hashCode = hashCode * 8191 + app_id;
-
- hashCode = hashCode * 8191 + partition_index;
-
- hashCode = hashCode * 8191 + ((isSetServer()) ? 131071 : 524287);
- if (isSetServer()) hashCode = hashCode * 8191 + server.hashCode();
-
- return hashCode;
- }
-
- @Override
- public int compareTo(batch_get_response other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = java.lang.Boolean.valueOf(isSetError()).compareTo(other.isSetError());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetError()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.error, other.error);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetData()).compareTo(other.isSetData());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetData()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, other.data);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetApp_id()).compareTo(other.isSetApp_id());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetApp_id()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.app_id, other.app_id);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetPartition_index()).compareTo(other.isSetPartition_index());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPartition_index()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(this.partition_index, other.partition_index);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetServer()).compareTo(other.isSetServer());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetServer()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.server, other.server);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- scheme(iprot).read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- scheme(oprot).write(oprot, this);
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("batch_get_response(");
- boolean first = true;
-
- sb.append("error:");
- sb.append(this.error);
- first = false;
- if (!first) sb.append(", ");
- sb.append("data:");
- if (this.data == null) {
- sb.append("null");
- } else {
- sb.append(this.data);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("app_id:");
- sb.append(this.app_id);
- first = false;
- if (!first) sb.append(", ");
- sb.append("partition_index:");
- sb.append(this.partition_index);
- first = false;
- if (!first) sb.append(", ");
- sb.append("server:");
- if (this.server == null) {
- sb.append("null");
- } else {
- sb.append(this.server);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, java.lang.ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and
- // doesn't call the default constructor.
- __isset_bitfield = 0;
- read(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class batch_get_responseStandardSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public batch_get_responseStandardScheme getScheme() {
- return new batch_get_responseStandardScheme();
- }
- }
-
- private static class batch_get_responseStandardScheme
- extends org.apache.thrift.scheme.StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, batch_get_response struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true) {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // ERROR
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.error = iprot.readI32();
- struct.setErrorIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // DATA
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list40 = iprot.readListBegin();
- struct.data = new java.util.ArrayList(_list40.size);
- full_data _elem41;
- for (int _i42 = 0; _i42 < _list40.size; ++_i42) {
- _elem41 = new full_data();
- _elem41.read(iprot);
- struct.data.add(_elem41);
- }
- iprot.readListEnd();
- }
- struct.setDataIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // APP_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.app_id = iprot.readI32();
- struct.setApp_idIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // PARTITION_INDEX
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.partition_index = iprot.readI32();
- struct.setPartition_indexIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // SERVER
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.server = iprot.readString();
- struct.setServerIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, batch_get_response struct)
- throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldBegin(ERROR_FIELD_DESC);
- oprot.writeI32(struct.error);
- oprot.writeFieldEnd();
- if (struct.data != null) {
- oprot.writeFieldBegin(DATA_FIELD_DESC);
- {
- oprot.writeListBegin(
- new org.apache.thrift.protocol.TList(
- org.apache.thrift.protocol.TType.STRUCT, struct.data.size()));
- for (full_data _iter43 : struct.data) {
- _iter43.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(APP_ID_FIELD_DESC);
- oprot.writeI32(struct.app_id);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(PARTITION_INDEX_FIELD_DESC);
- oprot.writeI32(struct.partition_index);
- oprot.writeFieldEnd();
- if (struct.server != null) {
- oprot.writeFieldBegin(SERVER_FIELD_DESC);
- oprot.writeString(struct.server);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
- }
-
- private static class batch_get_responseTupleSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public batch_get_responseTupleScheme getScheme() {
- return new batch_get_responseTupleScheme();
- }
- }
-
- private static class batch_get_responseTupleScheme
- extends org.apache.thrift.scheme.TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, batch_get_response struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol oprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet optionals = new java.util.BitSet();
- if (struct.isSetError()) {
- optionals.set(0);
- }
- if (struct.isSetData()) {
- optionals.set(1);
- }
- if (struct.isSetApp_id()) {
- optionals.set(2);
- }
- if (struct.isSetPartition_index()) {
- optionals.set(3);
- }
- if (struct.isSetServer()) {
- optionals.set(4);
- }
- oprot.writeBitSet(optionals, 5);
- if (struct.isSetError()) {
- oprot.writeI32(struct.error);
- }
- if (struct.isSetData()) {
- {
- oprot.writeI32(struct.data.size());
- for (full_data _iter44 : struct.data) {
- _iter44.write(oprot);
- }
- }
- }
- if (struct.isSetApp_id()) {
- oprot.writeI32(struct.app_id);
- }
- if (struct.isSetPartition_index()) {
- oprot.writeI32(struct.partition_index);
- }
- if (struct.isSetServer()) {
- oprot.writeString(struct.server);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, batch_get_response struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol iprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(5);
- if (incoming.get(0)) {
- struct.error = iprot.readI32();
- struct.setErrorIsSet(true);
- }
- if (incoming.get(1)) {
- {
- org.apache.thrift.protocol.TList _list45 =
- new org.apache.thrift.protocol.TList(
- org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.data = new java.util.ArrayList(_list45.size);
- full_data _elem46;
- for (int _i47 = 0; _i47 < _list45.size; ++_i47) {
- _elem46 = new full_data();
- _elem46.read(iprot);
- struct.data.add(_elem46);
- }
- }
- struct.setDataIsSet(true);
- }
- if (incoming.get(2)) {
- struct.app_id = iprot.readI32();
- struct.setApp_idIsSet(true);
- }
- if (incoming.get(3)) {
- struct.partition_index = iprot.readI32();
- struct.setPartition_indexIsSet(true);
- }
- if (incoming.get(4)) {
- struct.server = iprot.readString();
- struct.setServerIsSet(true);
- }
- }
- }
-
- private static S scheme(
- org.apache.thrift.protocol.TProtocol proto) {
- return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
- ? STANDARD_SCHEME_FACTORY
- : TUPLE_SCHEME_FACTORY)
- .getScheme();
- }
-}
diff --git a/java-client/src/main/java/org/apache/pegasus/apps/cas_check_type.java b/java-client/src/main/java/org/apache/pegasus/apps/cas_check_type.java
deleted file mode 100644
index 62b4744f3d..0000000000
--- a/java-client/src/main/java/org/apache/pegasus/apps/cas_check_type.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * 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.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
- */
-package org.apache.pegasus.apps;
-
-public enum cas_check_type implements org.apache.thrift.TEnum {
- CT_NO_CHECK(0),
- CT_VALUE_NOT_EXIST(1),
- CT_VALUE_NOT_EXIST_OR_EMPTY(2),
- CT_VALUE_EXIST(3),
- CT_VALUE_NOT_EMPTY(4),
- CT_VALUE_MATCH_ANYWHERE(5),
- CT_VALUE_MATCH_PREFIX(6),
- CT_VALUE_MATCH_POSTFIX(7),
- CT_VALUE_BYTES_LESS(8),
- CT_VALUE_BYTES_LESS_OR_EQUAL(9),
- CT_VALUE_BYTES_EQUAL(10),
- CT_VALUE_BYTES_GREATER_OR_EQUAL(11),
- CT_VALUE_BYTES_GREATER(12),
- CT_VALUE_INT_LESS(13),
- CT_VALUE_INT_LESS_OR_EQUAL(14),
- CT_VALUE_INT_EQUAL(15),
- CT_VALUE_INT_GREATER_OR_EQUAL(16),
- CT_VALUE_INT_GREATER(17);
-
- private final int value;
-
- private cas_check_type(int value) {
- this.value = value;
- }
-
- /** Get the integer value of this enum value, as defined in the Thrift IDL. */
- public int getValue() {
- return value;
- }
-
- /**
- * Find a the enum type by its integer value, as defined in the Thrift IDL.
- *
- * @return null if the value is not found.
- */
- public static cas_check_type findByValue(int value) {
- switch (value) {
- case 0:
- return CT_NO_CHECK;
- case 1:
- return CT_VALUE_NOT_EXIST;
- case 2:
- return CT_VALUE_NOT_EXIST_OR_EMPTY;
- case 3:
- return CT_VALUE_EXIST;
- case 4:
- return CT_VALUE_NOT_EMPTY;
- case 5:
- return CT_VALUE_MATCH_ANYWHERE;
- case 6:
- return CT_VALUE_MATCH_PREFIX;
- case 7:
- return CT_VALUE_MATCH_POSTFIX;
- case 8:
- return CT_VALUE_BYTES_LESS;
- case 9:
- return CT_VALUE_BYTES_LESS_OR_EQUAL;
- case 10:
- return CT_VALUE_BYTES_EQUAL;
- case 11:
- return CT_VALUE_BYTES_GREATER_OR_EQUAL;
- case 12:
- return CT_VALUE_BYTES_GREATER;
- case 13:
- return CT_VALUE_INT_LESS;
- case 14:
- return CT_VALUE_INT_LESS_OR_EQUAL;
- case 15:
- return CT_VALUE_INT_EQUAL;
- case 16:
- return CT_VALUE_INT_GREATER_OR_EQUAL;
- case 17:
- return CT_VALUE_INT_GREATER;
- default:
- return null;
- }
- }
-}
diff --git a/java-client/src/main/java/org/apache/pegasus/apps/check_and_mutate_request.java b/java-client/src/main/java/org/apache/pegasus/apps/check_and_mutate_request.java
deleted file mode 100644
index 2abe18af9b..0000000000
--- a/java-client/src/main/java/org/apache/pegasus/apps/check_and_mutate_request.java
+++ /dev/null
@@ -1,1047 +0,0 @@
-/*
- * 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.11.0)
- *
- *
DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
- */
-package org.apache.pegasus.apps;
-
-import org.apache.pegasus.base.blob;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(
- value = "Autogenerated by Thrift Compiler (0.11.0)",
- date = "2020-04-13")
-public class check_and_mutate_request
- implements org.apache.thrift.TBase,
- java.io.Serializable,
- Cloneable,
- Comparable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("check_and_mutate_request");
-
- private static final org.apache.thrift.protocol.TField HASH_KEY_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "hash_key", org.apache.thrift.protocol.TType.STRUCT, (short) 1);
- private static final org.apache.thrift.protocol.TField CHECK_SORT_KEY_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "check_sort_key", org.apache.thrift.protocol.TType.STRUCT, (short) 2);
- private static final org.apache.thrift.protocol.TField CHECK_TYPE_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "check_type", org.apache.thrift.protocol.TType.I32, (short) 3);
- private static final org.apache.thrift.protocol.TField CHECK_OPERAND_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "check_operand", org.apache.thrift.protocol.TType.STRUCT, (short) 4);
- private static final org.apache.thrift.protocol.TField MUTATE_LIST_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "mutate_list", org.apache.thrift.protocol.TType.LIST, (short) 5);
- private static final org.apache.thrift.protocol.TField RETURN_CHECK_VALUE_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "return_check_value", org.apache.thrift.protocol.TType.BOOL, (short) 6);
-
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
- new check_and_mutate_requestStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
- new check_and_mutate_requestTupleSchemeFactory();
-
- public blob hash_key; // required
- public blob check_sort_key; // required
- /** @see cas_check_type */
- public cas_check_type check_type; // required
-
- public blob check_operand; // required
- public java.util.List mutate_list; // required
- public boolean return_check_value; // required
-
- /**
- * The set of fields this struct contains, along with convenience methods for finding and
- * manipulating them.
- */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- HASH_KEY((short) 1, "hash_key"),
- CHECK_SORT_KEY((short) 2, "check_sort_key"),
- /** @see cas_check_type */
- CHECK_TYPE((short) 3, "check_type"),
- CHECK_OPERAND((short) 4, "check_operand"),
- MUTATE_LIST((short) 5, "mutate_list"),
- RETURN_CHECK_VALUE((short) 6, "return_check_value");
-
- private static final java.util.Map byName =
- new java.util.HashMap();
-
- static {
- for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /** Find the _Fields constant that matches fieldId, or null if its not found. */
- public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
- case 1: // HASH_KEY
- return HASH_KEY;
- case 2: // CHECK_SORT_KEY
- return CHECK_SORT_KEY;
- case 3: // CHECK_TYPE
- return CHECK_TYPE;
- case 4: // CHECK_OPERAND
- return CHECK_OPERAND;
- case 5: // MUTATE_LIST
- return MUTATE_LIST;
- case 6: // RETURN_CHECK_VALUE
- return RETURN_CHECK_VALUE;
- default:
- return null;
- }
- }
-
- /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null)
- throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /** Find the _Fields constant that matches name, or null if its not found. */
- public static _Fields findByName(java.lang.String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final java.lang.String _fieldName;
-
- _Fields(short thriftId, java.lang.String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public java.lang.String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __RETURN_CHECK_VALUE_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
- static {
- java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(
- _Fields.HASH_KEY,
- new org.apache.thrift.meta_data.FieldMetaData(
- "hash_key",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- tmpMap.put(
- _Fields.CHECK_SORT_KEY,
- new org.apache.thrift.meta_data.FieldMetaData(
- "check_sort_key",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- tmpMap.put(
- _Fields.CHECK_TYPE,
- new org.apache.thrift.meta_data.FieldMetaData(
- "check_type",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.EnumMetaData(
- org.apache.thrift.protocol.TType.ENUM, cas_check_type.class)));
- tmpMap.put(
- _Fields.CHECK_OPERAND,
- new org.apache.thrift.meta_data.FieldMetaData(
- "check_operand",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- tmpMap.put(
- _Fields.MUTATE_LIST,
- new org.apache.thrift.meta_data.FieldMetaData(
- "mutate_list",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(
- org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, mutate.class))));
- tmpMap.put(
- _Fields.RETURN_CHECK_VALUE,
- new org.apache.thrift.meta_data.FieldMetaData(
- "return_check_value",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
- check_and_mutate_request.class, metaDataMap);
- }
-
- public check_and_mutate_request() {}
-
- public check_and_mutate_request(
- blob hash_key,
- blob check_sort_key,
- cas_check_type check_type,
- blob check_operand,
- java.util.List mutate_list,
- boolean return_check_value) {
- this();
- this.hash_key = hash_key;
- this.check_sort_key = check_sort_key;
- this.check_type = check_type;
- this.check_operand = check_operand;
- this.mutate_list = mutate_list;
- this.return_check_value = return_check_value;
- setReturn_check_valueIsSet(true);
- }
-
- /** Performs a deep copy on other. */
- public check_and_mutate_request(check_and_mutate_request other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetHash_key()) {
- this.hash_key = new blob(other.hash_key);
- }
- if (other.isSetCheck_sort_key()) {
- this.check_sort_key = new blob(other.check_sort_key);
- }
- if (other.isSetCheck_type()) {
- this.check_type = other.check_type;
- }
- if (other.isSetCheck_operand()) {
- this.check_operand = new blob(other.check_operand);
- }
- if (other.isSetMutate_list()) {
- java.util.List __this__mutate_list =
- new java.util.ArrayList(other.mutate_list.size());
- for (mutate other_element : other.mutate_list) {
- __this__mutate_list.add(new mutate(other_element));
- }
- this.mutate_list = __this__mutate_list;
- }
- this.return_check_value = other.return_check_value;
- }
-
- public check_and_mutate_request deepCopy() {
- return new check_and_mutate_request(this);
- }
-
- @Override
- public void clear() {
- this.hash_key = null;
- this.check_sort_key = null;
- this.check_type = null;
- this.check_operand = null;
- this.mutate_list = null;
- setReturn_check_valueIsSet(false);
- this.return_check_value = false;
- }
-
- public blob getHash_key() {
- return this.hash_key;
- }
-
- public check_and_mutate_request setHash_key(blob hash_key) {
- this.hash_key = hash_key;
- return this;
- }
-
- public void unsetHash_key() {
- this.hash_key = null;
- }
-
- /** Returns true if field hash_key is set (has been assigned a value) and false otherwise */
- public boolean isSetHash_key() {
- return this.hash_key != null;
- }
-
- public void setHash_keyIsSet(boolean value) {
- if (!value) {
- this.hash_key = null;
- }
- }
-
- public blob getCheck_sort_key() {
- return this.check_sort_key;
- }
-
- public check_and_mutate_request setCheck_sort_key(blob check_sort_key) {
- this.check_sort_key = check_sort_key;
- return this;
- }
-
- public void unsetCheck_sort_key() {
- this.check_sort_key = null;
- }
-
- /** Returns true if field check_sort_key is set (has been assigned a value) and false otherwise */
- public boolean isSetCheck_sort_key() {
- return this.check_sort_key != null;
- }
-
- public void setCheck_sort_keyIsSet(boolean value) {
- if (!value) {
- this.check_sort_key = null;
- }
- }
-
- /** @see cas_check_type */
- public cas_check_type getCheck_type() {
- return this.check_type;
- }
-
- /** @see cas_check_type */
- public check_and_mutate_request setCheck_type(cas_check_type check_type) {
- this.check_type = check_type;
- return this;
- }
-
- public void unsetCheck_type() {
- this.check_type = null;
- }
-
- /** Returns true if field check_type is set (has been assigned a value) and false otherwise */
- public boolean isSetCheck_type() {
- return this.check_type != null;
- }
-
- public void setCheck_typeIsSet(boolean value) {
- if (!value) {
- this.check_type = null;
- }
- }
-
- public blob getCheck_operand() {
- return this.check_operand;
- }
-
- public check_and_mutate_request setCheck_operand(blob check_operand) {
- this.check_operand = check_operand;
- return this;
- }
-
- public void unsetCheck_operand() {
- this.check_operand = null;
- }
-
- /** Returns true if field check_operand is set (has been assigned a value) and false otherwise */
- public boolean isSetCheck_operand() {
- return this.check_operand != null;
- }
-
- public void setCheck_operandIsSet(boolean value) {
- if (!value) {
- this.check_operand = null;
- }
- }
-
- public int getMutate_listSize() {
- return (this.mutate_list == null) ? 0 : this.mutate_list.size();
- }
-
- public java.util.Iterator getMutate_listIterator() {
- return (this.mutate_list == null) ? null : this.mutate_list.iterator();
- }
-
- public void addToMutate_list(mutate elem) {
- if (this.mutate_list == null) {
- this.mutate_list = new java.util.ArrayList();
- }
- this.mutate_list.add(elem);
- }
-
- public java.util.List getMutate_list() {
- return this.mutate_list;
- }
-
- public check_and_mutate_request setMutate_list(java.util.List mutate_list) {
- this.mutate_list = mutate_list;
- return this;
- }
-
- public void unsetMutate_list() {
- this.mutate_list = null;
- }
-
- /** Returns true if field mutate_list is set (has been assigned a value) and false otherwise */
- public boolean isSetMutate_list() {
- return this.mutate_list != null;
- }
-
- public void setMutate_listIsSet(boolean value) {
- if (!value) {
- this.mutate_list = null;
- }
- }
-
- public boolean isReturn_check_value() {
- return this.return_check_value;
- }
-
- public check_and_mutate_request setReturn_check_value(boolean return_check_value) {
- this.return_check_value = return_check_value;
- setReturn_check_valueIsSet(true);
- return this;
- }
-
- public void unsetReturn_check_value() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RETURN_CHECK_VALUE_ISSET_ID);
- }
-
- /**
- * Returns true if field return_check_value is set (has been assigned a value) and false otherwise
- */
- public boolean isSetReturn_check_value() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RETURN_CHECK_VALUE_ISSET_ID);
- }
-
- public void setReturn_check_valueIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(
- __isset_bitfield, __RETURN_CHECK_VALUE_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, java.lang.Object value) {
- switch (field) {
- case HASH_KEY:
- if (value == null) {
- unsetHash_key();
- } else {
- setHash_key((blob) value);
- }
- break;
-
- case CHECK_SORT_KEY:
- if (value == null) {
- unsetCheck_sort_key();
- } else {
- setCheck_sort_key((blob) value);
- }
- break;
-
- case CHECK_TYPE:
- if (value == null) {
- unsetCheck_type();
- } else {
- setCheck_type((cas_check_type) value);
- }
- break;
-
- case CHECK_OPERAND:
- if (value == null) {
- unsetCheck_operand();
- } else {
- setCheck_operand((blob) value);
- }
- break;
-
- case MUTATE_LIST:
- if (value == null) {
- unsetMutate_list();
- } else {
- setMutate_list((java.util.List) value);
- }
- break;
-
- case RETURN_CHECK_VALUE:
- if (value == null) {
- unsetReturn_check_value();
- } else {
- setReturn_check_value((java.lang.Boolean) value);
- }
- break;
- }
- }
-
- public java.lang.Object getFieldValue(_Fields field) {
- switch (field) {
- case HASH_KEY:
- return getHash_key();
-
- case CHECK_SORT_KEY:
- return getCheck_sort_key();
-
- case CHECK_TYPE:
- return getCheck_type();
-
- case CHECK_OPERAND:
- return getCheck_operand();
-
- case MUTATE_LIST:
- return getMutate_list();
-
- case RETURN_CHECK_VALUE:
- return isReturn_check_value();
- }
- throw new java.lang.IllegalStateException();
- }
-
- /**
- * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new java.lang.IllegalArgumentException();
- }
-
- switch (field) {
- case HASH_KEY:
- return isSetHash_key();
- case CHECK_SORT_KEY:
- return isSetCheck_sort_key();
- case CHECK_TYPE:
- return isSetCheck_type();
- case CHECK_OPERAND:
- return isSetCheck_operand();
- case MUTATE_LIST:
- return isSetMutate_list();
- case RETURN_CHECK_VALUE:
- return isSetReturn_check_value();
- }
- throw new java.lang.IllegalStateException();
- }
-
- @Override
- public boolean equals(java.lang.Object that) {
- if (that == null) return false;
- if (that instanceof check_and_mutate_request)
- return this.equals((check_and_mutate_request) that);
- return false;
- }
-
- public boolean equals(check_and_mutate_request that) {
- if (that == null) return false;
- if (this == that) return true;
-
- boolean this_present_hash_key = true && this.isSetHash_key();
- boolean that_present_hash_key = true && that.isSetHash_key();
- if (this_present_hash_key || that_present_hash_key) {
- if (!(this_present_hash_key && that_present_hash_key)) return false;
- if (!this.hash_key.equals(that.hash_key)) return false;
- }
-
- boolean this_present_check_sort_key = true && this.isSetCheck_sort_key();
- boolean that_present_check_sort_key = true && that.isSetCheck_sort_key();
- if (this_present_check_sort_key || that_present_check_sort_key) {
- if (!(this_present_check_sort_key && that_present_check_sort_key)) return false;
- if (!this.check_sort_key.equals(that.check_sort_key)) return false;
- }
-
- boolean this_present_check_type = true && this.isSetCheck_type();
- boolean that_present_check_type = true && that.isSetCheck_type();
- if (this_present_check_type || that_present_check_type) {
- if (!(this_present_check_type && that_present_check_type)) return false;
- if (!this.check_type.equals(that.check_type)) return false;
- }
-
- boolean this_present_check_operand = true && this.isSetCheck_operand();
- boolean that_present_check_operand = true && that.isSetCheck_operand();
- if (this_present_check_operand || that_present_check_operand) {
- if (!(this_present_check_operand && that_present_check_operand)) return false;
- if (!this.check_operand.equals(that.check_operand)) return false;
- }
-
- boolean this_present_mutate_list = true && this.isSetMutate_list();
- boolean that_present_mutate_list = true && that.isSetMutate_list();
- if (this_present_mutate_list || that_present_mutate_list) {
- if (!(this_present_mutate_list && that_present_mutate_list)) return false;
- if (!this.mutate_list.equals(that.mutate_list)) return false;
- }
-
- boolean this_present_return_check_value = true;
- boolean that_present_return_check_value = true;
- if (this_present_return_check_value || that_present_return_check_value) {
- if (!(this_present_return_check_value && that_present_return_check_value)) return false;
- if (this.return_check_value != that.return_check_value) return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 1;
-
- hashCode = hashCode * 8191 + ((isSetHash_key()) ? 131071 : 524287);
- if (isSetHash_key()) hashCode = hashCode * 8191 + hash_key.hashCode();
-
- hashCode = hashCode * 8191 + ((isSetCheck_sort_key()) ? 131071 : 524287);
- if (isSetCheck_sort_key()) hashCode = hashCode * 8191 + check_sort_key.hashCode();
-
- hashCode = hashCode * 8191 + ((isSetCheck_type()) ? 131071 : 524287);
- if (isSetCheck_type()) hashCode = hashCode * 8191 + check_type.getValue();
-
- hashCode = hashCode * 8191 + ((isSetCheck_operand()) ? 131071 : 524287);
- if (isSetCheck_operand()) hashCode = hashCode * 8191 + check_operand.hashCode();
-
- hashCode = hashCode * 8191 + ((isSetMutate_list()) ? 131071 : 524287);
- if (isSetMutate_list()) hashCode = hashCode * 8191 + mutate_list.hashCode();
-
- hashCode = hashCode * 8191 + ((return_check_value) ? 131071 : 524287);
-
- return hashCode;
- }
-
- @Override
- public int compareTo(check_and_mutate_request other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = java.lang.Boolean.valueOf(isSetHash_key()).compareTo(other.isSetHash_key());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetHash_key()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hash_key, other.hash_key);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetCheck_sort_key()).compareTo(other.isSetCheck_sort_key());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCheck_sort_key()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(this.check_sort_key, other.check_sort_key);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetCheck_type()).compareTo(other.isSetCheck_type());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCheck_type()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.check_type, other.check_type);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetCheck_operand()).compareTo(other.isSetCheck_operand());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCheck_operand()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(this.check_operand, other.check_operand);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetMutate_list()).compareTo(other.isSetMutate_list());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetMutate_list()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mutate_list, other.mutate_list);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetReturn_check_value())
- .compareTo(other.isSetReturn_check_value());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetReturn_check_value()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(
- this.return_check_value, other.return_check_value);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- scheme(iprot).read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- scheme(oprot).write(oprot, this);
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("check_and_mutate_request(");
- boolean first = true;
-
- sb.append("hash_key:");
- if (this.hash_key == null) {
- sb.append("null");
- } else {
- sb.append(this.hash_key);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("check_sort_key:");
- if (this.check_sort_key == null) {
- sb.append("null");
- } else {
- sb.append(this.check_sort_key);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("check_type:");
- if (this.check_type == null) {
- sb.append("null");
- } else {
- sb.append(this.check_type);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("check_operand:");
- if (this.check_operand == null) {
- sb.append("null");
- } else {
- sb.append(this.check_operand);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("mutate_list:");
- if (this.mutate_list == null) {
- sb.append("null");
- } else {
- sb.append(this.mutate_list);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("return_check_value:");
- sb.append(this.return_check_value);
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (hash_key != null) {
- hash_key.validate();
- }
- if (check_sort_key != null) {
- check_sort_key.validate();
- }
- if (check_operand != null) {
- check_operand.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, java.lang.ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and
- // doesn't call the default constructor.
- __isset_bitfield = 0;
- read(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class check_and_mutate_requestStandardSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public check_and_mutate_requestStandardScheme getScheme() {
- return new check_and_mutate_requestStandardScheme();
- }
- }
-
- private static class check_and_mutate_requestStandardScheme
- extends org.apache.thrift.scheme.StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, check_and_mutate_request struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true) {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // HASH_KEY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.hash_key = new blob();
- struct.hash_key.read(iprot);
- struct.setHash_keyIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // CHECK_SORT_KEY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.check_sort_key = new blob();
- struct.check_sort_key.read(iprot);
- struct.setCheck_sort_keyIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // CHECK_TYPE
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.check_type = cas_check_type.findByValue(iprot.readI32());
- struct.setCheck_typeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // CHECK_OPERAND
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.check_operand = new blob();
- struct.check_operand.read(iprot);
- struct.setCheck_operandIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // MUTATE_LIST
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
- struct.mutate_list = new java.util.ArrayList(_list32.size);
- mutate _elem33;
- for (int _i34 = 0; _i34 < _list32.size; ++_i34) {
- _elem33 = new mutate();
- _elem33.read(iprot);
- struct.mutate_list.add(_elem33);
- }
- iprot.readListEnd();
- }
- struct.setMutate_listIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // RETURN_CHECK_VALUE
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.return_check_value = iprot.readBool();
- struct.setReturn_check_valueIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, check_and_mutate_request struct)
- throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.hash_key != null) {
- oprot.writeFieldBegin(HASH_KEY_FIELD_DESC);
- struct.hash_key.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.check_sort_key != null) {
- oprot.writeFieldBegin(CHECK_SORT_KEY_FIELD_DESC);
- struct.check_sort_key.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.check_type != null) {
- oprot.writeFieldBegin(CHECK_TYPE_FIELD_DESC);
- oprot.writeI32(struct.check_type.getValue());
- oprot.writeFieldEnd();
- }
- if (struct.check_operand != null) {
- oprot.writeFieldBegin(CHECK_OPERAND_FIELD_DESC);
- struct.check_operand.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.mutate_list != null) {
- oprot.writeFieldBegin(MUTATE_LIST_FIELD_DESC);
- {
- oprot.writeListBegin(
- new org.apache.thrift.protocol.TList(
- org.apache.thrift.protocol.TType.STRUCT, struct.mutate_list.size()));
- for (mutate _iter35 : struct.mutate_list) {
- _iter35.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(RETURN_CHECK_VALUE_FIELD_DESC);
- oprot.writeBool(struct.return_check_value);
- oprot.writeFieldEnd();
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
- }
-
- private static class check_and_mutate_requestTupleSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public check_and_mutate_requestTupleScheme getScheme() {
- return new check_and_mutate_requestTupleScheme();
- }
- }
-
- private static class check_and_mutate_requestTupleScheme
- extends org.apache.thrift.scheme.TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, check_and_mutate_request struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol oprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet optionals = new java.util.BitSet();
- if (struct.isSetHash_key()) {
- optionals.set(0);
- }
- if (struct.isSetCheck_sort_key()) {
- optionals.set(1);
- }
- if (struct.isSetCheck_type()) {
- optionals.set(2);
- }
- if (struct.isSetCheck_operand()) {
- optionals.set(3);
- }
- if (struct.isSetMutate_list()) {
- optionals.set(4);
- }
- if (struct.isSetReturn_check_value()) {
- optionals.set(5);
- }
- oprot.writeBitSet(optionals, 6);
- if (struct.isSetHash_key()) {
- struct.hash_key.write(oprot);
- }
- if (struct.isSetCheck_sort_key()) {
- struct.check_sort_key.write(oprot);
- }
- if (struct.isSetCheck_type()) {
- oprot.writeI32(struct.check_type.getValue());
- }
- if (struct.isSetCheck_operand()) {
- struct.check_operand.write(oprot);
- }
- if (struct.isSetMutate_list()) {
- {
- oprot.writeI32(struct.mutate_list.size());
- for (mutate _iter36 : struct.mutate_list) {
- _iter36.write(oprot);
- }
- }
- }
- if (struct.isSetReturn_check_value()) {
- oprot.writeBool(struct.return_check_value);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, check_and_mutate_request struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol iprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(6);
- if (incoming.get(0)) {
- struct.hash_key = new blob();
- struct.hash_key.read(iprot);
- struct.setHash_keyIsSet(true);
- }
- if (incoming.get(1)) {
- struct.check_sort_key = new blob();
- struct.check_sort_key.read(iprot);
- struct.setCheck_sort_keyIsSet(true);
- }
- if (incoming.get(2)) {
- struct.check_type = cas_check_type.findByValue(iprot.readI32());
- struct.setCheck_typeIsSet(true);
- }
- if (incoming.get(3)) {
- struct.check_operand = new blob();
- struct.check_operand.read(iprot);
- struct.setCheck_operandIsSet(true);
- }
- if (incoming.get(4)) {
- {
- org.apache.thrift.protocol.TList _list37 =
- new org.apache.thrift.protocol.TList(
- org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.mutate_list = new java.util.ArrayList(_list37.size);
- mutate _elem38;
- for (int _i39 = 0; _i39 < _list37.size; ++_i39) {
- _elem38 = new mutate();
- _elem38.read(iprot);
- struct.mutate_list.add(_elem38);
- }
- }
- struct.setMutate_listIsSet(true);
- }
- if (incoming.get(5)) {
- struct.return_check_value = iprot.readBool();
- struct.setReturn_check_valueIsSet(true);
- }
- }
- }
-
- private static S scheme(
- org.apache.thrift.protocol.TProtocol proto) {
- return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
- ? STANDARD_SCHEME_FACTORY
- : TUPLE_SCHEME_FACTORY)
- .getScheme();
- }
-}
diff --git a/java-client/src/main/java/org/apache/pegasus/apps/check_and_mutate_response.java b/java-client/src/main/java/org/apache/pegasus/apps/check_and_mutate_response.java
deleted file mode 100644
index 2f4a0ead48..0000000000
--- a/java-client/src/main/java/org/apache/pegasus/apps/check_and_mutate_response.java
+++ /dev/null
@@ -1,1174 +0,0 @@
-/*
- * 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.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
- */
-package org.apache.pegasus.apps;
-
-import org.apache.pegasus.base.blob;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(
- value = "Autogenerated by Thrift Compiler (0.11.0)",
- date = "2020-04-13")
-public class check_and_mutate_response
- implements org.apache.thrift.TBase<
- check_and_mutate_response, check_and_mutate_response._Fields>,
- java.io.Serializable,
- Cloneable,
- Comparable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("check_and_mutate_response");
-
- private static final org.apache.thrift.protocol.TField ERROR_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "error", org.apache.thrift.protocol.TType.I32, (short) 1);
- private static final org.apache.thrift.protocol.TField CHECK_VALUE_RETURNED_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "check_value_returned", org.apache.thrift.protocol.TType.BOOL, (short) 2);
- private static final org.apache.thrift.protocol.TField CHECK_VALUE_EXIST_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "check_value_exist", org.apache.thrift.protocol.TType.BOOL, (short) 3);
- private static final org.apache.thrift.protocol.TField CHECK_VALUE_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "check_value", org.apache.thrift.protocol.TType.STRUCT, (short) 4);
- private static final org.apache.thrift.protocol.TField APP_ID_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "app_id", org.apache.thrift.protocol.TType.I32, (short) 5);
- private static final org.apache.thrift.protocol.TField PARTITION_INDEX_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "partition_index", org.apache.thrift.protocol.TType.I32, (short) 6);
- private static final org.apache.thrift.protocol.TField DECREE_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "decree", org.apache.thrift.protocol.TType.I64, (short) 7);
- private static final org.apache.thrift.protocol.TField SERVER_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "server", org.apache.thrift.protocol.TType.STRING, (short) 8);
-
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
- new check_and_mutate_responseStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
- new check_and_mutate_responseTupleSchemeFactory();
-
- public int error; // required
- public boolean check_value_returned; // required
- public boolean check_value_exist; // required
- public blob check_value; // required
- public int app_id; // required
- public int partition_index; // required
- public long decree; // required
- public java.lang.String server; // required
-
- /**
- * The set of fields this struct contains, along with convenience methods for finding and
- * manipulating them.
- */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- ERROR((short) 1, "error"),
- CHECK_VALUE_RETURNED((short) 2, "check_value_returned"),
- CHECK_VALUE_EXIST((short) 3, "check_value_exist"),
- CHECK_VALUE((short) 4, "check_value"),
- APP_ID((short) 5, "app_id"),
- PARTITION_INDEX((short) 6, "partition_index"),
- DECREE((short) 7, "decree"),
- SERVER((short) 8, "server");
-
- private static final java.util.Map byName =
- new java.util.HashMap();
-
- static {
- for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /** Find the _Fields constant that matches fieldId, or null if its not found. */
- public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
- case 1: // ERROR
- return ERROR;
- case 2: // CHECK_VALUE_RETURNED
- return CHECK_VALUE_RETURNED;
- case 3: // CHECK_VALUE_EXIST
- return CHECK_VALUE_EXIST;
- case 4: // CHECK_VALUE
- return CHECK_VALUE;
- case 5: // APP_ID
- return APP_ID;
- case 6: // PARTITION_INDEX
- return PARTITION_INDEX;
- case 7: // DECREE
- return DECREE;
- case 8: // SERVER
- return SERVER;
- default:
- return null;
- }
- }
-
- /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null)
- throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /** Find the _Fields constant that matches name, or null if its not found. */
- public static _Fields findByName(java.lang.String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final java.lang.String _fieldName;
-
- _Fields(short thriftId, java.lang.String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public java.lang.String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __ERROR_ISSET_ID = 0;
- private static final int __CHECK_VALUE_RETURNED_ISSET_ID = 1;
- private static final int __CHECK_VALUE_EXIST_ISSET_ID = 2;
- private static final int __APP_ID_ISSET_ID = 3;
- private static final int __PARTITION_INDEX_ISSET_ID = 4;
- private static final int __DECREE_ISSET_ID = 5;
- private byte __isset_bitfield = 0;
- public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
- static {
- java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(
- _Fields.ERROR,
- new org.apache.thrift.meta_data.FieldMetaData(
- "error",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(
- _Fields.CHECK_VALUE_RETURNED,
- new org.apache.thrift.meta_data.FieldMetaData(
- "check_value_returned",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(
- _Fields.CHECK_VALUE_EXIST,
- new org.apache.thrift.meta_data.FieldMetaData(
- "check_value_exist",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(
- _Fields.CHECK_VALUE,
- new org.apache.thrift.meta_data.FieldMetaData(
- "check_value",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- tmpMap.put(
- _Fields.APP_ID,
- new org.apache.thrift.meta_data.FieldMetaData(
- "app_id",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(
- _Fields.PARTITION_INDEX,
- new org.apache.thrift.meta_data.FieldMetaData(
- "partition_index",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(
- _Fields.DECREE,
- new org.apache.thrift.meta_data.FieldMetaData(
- "decree",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I64)));
- tmpMap.put(
- _Fields.SERVER,
- new org.apache.thrift.meta_data.FieldMetaData(
- "server",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
- check_and_mutate_response.class, metaDataMap);
- }
-
- public check_and_mutate_response() {}
-
- public check_and_mutate_response(
- int error,
- boolean check_value_returned,
- boolean check_value_exist,
- blob check_value,
- int app_id,
- int partition_index,
- long decree,
- java.lang.String server) {
- this();
- this.error = error;
- setErrorIsSet(true);
- this.check_value_returned = check_value_returned;
- setCheck_value_returnedIsSet(true);
- this.check_value_exist = check_value_exist;
- setCheck_value_existIsSet(true);
- this.check_value = check_value;
- this.app_id = app_id;
- setApp_idIsSet(true);
- this.partition_index = partition_index;
- setPartition_indexIsSet(true);
- this.decree = decree;
- setDecreeIsSet(true);
- this.server = server;
- }
-
- /** Performs a deep copy on other. */
- public check_and_mutate_response(check_and_mutate_response other) {
- __isset_bitfield = other.__isset_bitfield;
- this.error = other.error;
- this.check_value_returned = other.check_value_returned;
- this.check_value_exist = other.check_value_exist;
- if (other.isSetCheck_value()) {
- this.check_value = new blob(other.check_value);
- }
- this.app_id = other.app_id;
- this.partition_index = other.partition_index;
- this.decree = other.decree;
- if (other.isSetServer()) {
- this.server = other.server;
- }
- }
-
- public check_and_mutate_response deepCopy() {
- return new check_and_mutate_response(this);
- }
-
- @Override
- public void clear() {
- setErrorIsSet(false);
- this.error = 0;
- setCheck_value_returnedIsSet(false);
- this.check_value_returned = false;
- setCheck_value_existIsSet(false);
- this.check_value_exist = false;
- this.check_value = null;
- setApp_idIsSet(false);
- this.app_id = 0;
- setPartition_indexIsSet(false);
- this.partition_index = 0;
- setDecreeIsSet(false);
- this.decree = 0;
- this.server = null;
- }
-
- public int getError() {
- return this.error;
- }
-
- public check_and_mutate_response setError(int error) {
- this.error = error;
- setErrorIsSet(true);
- return this;
- }
-
- public void unsetError() {
- __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ERROR_ISSET_ID);
- }
-
- /** Returns true if field error is set (has been assigned a value) and false otherwise */
- public boolean isSetError() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ERROR_ISSET_ID);
- }
-
- public void setErrorIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ERROR_ISSET_ID, value);
- }
-
- public boolean isCheck_value_returned() {
- return this.check_value_returned;
- }
-
- public check_and_mutate_response setCheck_value_returned(boolean check_value_returned) {
- this.check_value_returned = check_value_returned;
- setCheck_value_returnedIsSet(true);
- return this;
- }
-
- public void unsetCheck_value_returned() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CHECK_VALUE_RETURNED_ISSET_ID);
- }
-
- /**
- * Returns true if field check_value_returned is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSetCheck_value_returned() {
- return org.apache.thrift.EncodingUtils.testBit(
- __isset_bitfield, __CHECK_VALUE_RETURNED_ISSET_ID);
- }
-
- public void setCheck_value_returnedIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(
- __isset_bitfield, __CHECK_VALUE_RETURNED_ISSET_ID, value);
- }
-
- public boolean isCheck_value_exist() {
- return this.check_value_exist;
- }
-
- public check_and_mutate_response setCheck_value_exist(boolean check_value_exist) {
- this.check_value_exist = check_value_exist;
- setCheck_value_existIsSet(true);
- return this;
- }
-
- public void unsetCheck_value_exist() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CHECK_VALUE_EXIST_ISSET_ID);
- }
-
- /**
- * Returns true if field check_value_exist is set (has been assigned a value) and false otherwise
- */
- public boolean isSetCheck_value_exist() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CHECK_VALUE_EXIST_ISSET_ID);
- }
-
- public void setCheck_value_existIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(
- __isset_bitfield, __CHECK_VALUE_EXIST_ISSET_ID, value);
- }
-
- public blob getCheck_value() {
- return this.check_value;
- }
-
- public check_and_mutate_response setCheck_value(blob check_value) {
- this.check_value = check_value;
- return this;
- }
-
- public void unsetCheck_value() {
- this.check_value = null;
- }
-
- /** Returns true if field check_value is set (has been assigned a value) and false otherwise */
- public boolean isSetCheck_value() {
- return this.check_value != null;
- }
-
- public void setCheck_valueIsSet(boolean value) {
- if (!value) {
- this.check_value = null;
- }
- }
-
- public int getApp_id() {
- return this.app_id;
- }
-
- public check_and_mutate_response setApp_id(int app_id) {
- this.app_id = app_id;
- setApp_idIsSet(true);
- return this;
- }
-
- public void unsetApp_id() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __APP_ID_ISSET_ID);
- }
-
- /** Returns true if field app_id is set (has been assigned a value) and false otherwise */
- public boolean isSetApp_id() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __APP_ID_ISSET_ID);
- }
-
- public void setApp_idIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __APP_ID_ISSET_ID, value);
- }
-
- public int getPartition_index() {
- return this.partition_index;
- }
-
- public check_and_mutate_response setPartition_index(int partition_index) {
- this.partition_index = partition_index;
- setPartition_indexIsSet(true);
- return this;
- }
-
- public void unsetPartition_index() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PARTITION_INDEX_ISSET_ID);
- }
-
- /**
- * Returns true if field partition_index is set (has been assigned a value) and false otherwise
- */
- public boolean isSetPartition_index() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PARTITION_INDEX_ISSET_ID);
- }
-
- public void setPartition_indexIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PARTITION_INDEX_ISSET_ID, value);
- }
-
- public long getDecree() {
- return this.decree;
- }
-
- public check_and_mutate_response setDecree(long decree) {
- this.decree = decree;
- setDecreeIsSet(true);
- return this;
- }
-
- public void unsetDecree() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DECREE_ISSET_ID);
- }
-
- /** Returns true if field decree is set (has been assigned a value) and false otherwise */
- public boolean isSetDecree() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DECREE_ISSET_ID);
- }
-
- public void setDecreeIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DECREE_ISSET_ID, value);
- }
-
- public java.lang.String getServer() {
- return this.server;
- }
-
- public check_and_mutate_response setServer(java.lang.String server) {
- this.server = server;
- return this;
- }
-
- public void unsetServer() {
- this.server = null;
- }
-
- /** Returns true if field server is set (has been assigned a value) and false otherwise */
- public boolean isSetServer() {
- return this.server != null;
- }
-
- public void setServerIsSet(boolean value) {
- if (!value) {
- this.server = null;
- }
- }
-
- public void setFieldValue(_Fields field, java.lang.Object value) {
- switch (field) {
- case ERROR:
- if (value == null) {
- unsetError();
- } else {
- setError((java.lang.Integer) value);
- }
- break;
-
- case CHECK_VALUE_RETURNED:
- if (value == null) {
- unsetCheck_value_returned();
- } else {
- setCheck_value_returned((java.lang.Boolean) value);
- }
- break;
-
- case CHECK_VALUE_EXIST:
- if (value == null) {
- unsetCheck_value_exist();
- } else {
- setCheck_value_exist((java.lang.Boolean) value);
- }
- break;
-
- case CHECK_VALUE:
- if (value == null) {
- unsetCheck_value();
- } else {
- setCheck_value((blob) value);
- }
- break;
-
- case APP_ID:
- if (value == null) {
- unsetApp_id();
- } else {
- setApp_id((java.lang.Integer) value);
- }
- break;
-
- case PARTITION_INDEX:
- if (value == null) {
- unsetPartition_index();
- } else {
- setPartition_index((java.lang.Integer) value);
- }
- break;
-
- case DECREE:
- if (value == null) {
- unsetDecree();
- } else {
- setDecree((java.lang.Long) value);
- }
- break;
-
- case SERVER:
- if (value == null) {
- unsetServer();
- } else {
- setServer((java.lang.String) value);
- }
- break;
- }
- }
-
- public java.lang.Object getFieldValue(_Fields field) {
- switch (field) {
- case ERROR:
- return getError();
-
- case CHECK_VALUE_RETURNED:
- return isCheck_value_returned();
-
- case CHECK_VALUE_EXIST:
- return isCheck_value_exist();
-
- case CHECK_VALUE:
- return getCheck_value();
-
- case APP_ID:
- return getApp_id();
-
- case PARTITION_INDEX:
- return getPartition_index();
-
- case DECREE:
- return getDecree();
-
- case SERVER:
- return getServer();
- }
- throw new java.lang.IllegalStateException();
- }
-
- /**
- * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new java.lang.IllegalArgumentException();
- }
-
- switch (field) {
- case ERROR:
- return isSetError();
- case CHECK_VALUE_RETURNED:
- return isSetCheck_value_returned();
- case CHECK_VALUE_EXIST:
- return isSetCheck_value_exist();
- case CHECK_VALUE:
- return isSetCheck_value();
- case APP_ID:
- return isSetApp_id();
- case PARTITION_INDEX:
- return isSetPartition_index();
- case DECREE:
- return isSetDecree();
- case SERVER:
- return isSetServer();
- }
- throw new java.lang.IllegalStateException();
- }
-
- @Override
- public boolean equals(java.lang.Object that) {
- if (that == null) return false;
- if (that instanceof check_and_mutate_response)
- return this.equals((check_and_mutate_response) that);
- return false;
- }
-
- public boolean equals(check_and_mutate_response that) {
- if (that == null) return false;
- if (this == that) return true;
-
- boolean this_present_error = true;
- boolean that_present_error = true;
- if (this_present_error || that_present_error) {
- if (!(this_present_error && that_present_error)) return false;
- if (this.error != that.error) return false;
- }
-
- boolean this_present_check_value_returned = true;
- boolean that_present_check_value_returned = true;
- if (this_present_check_value_returned || that_present_check_value_returned) {
- if (!(this_present_check_value_returned && that_present_check_value_returned)) return false;
- if (this.check_value_returned != that.check_value_returned) return false;
- }
-
- boolean this_present_check_value_exist = true;
- boolean that_present_check_value_exist = true;
- if (this_present_check_value_exist || that_present_check_value_exist) {
- if (!(this_present_check_value_exist && that_present_check_value_exist)) return false;
- if (this.check_value_exist != that.check_value_exist) return false;
- }
-
- boolean this_present_check_value = true && this.isSetCheck_value();
- boolean that_present_check_value = true && that.isSetCheck_value();
- if (this_present_check_value || that_present_check_value) {
- if (!(this_present_check_value && that_present_check_value)) return false;
- if (!this.check_value.equals(that.check_value)) return false;
- }
-
- boolean this_present_app_id = true;
- boolean that_present_app_id = true;
- if (this_present_app_id || that_present_app_id) {
- if (!(this_present_app_id && that_present_app_id)) return false;
- if (this.app_id != that.app_id) return false;
- }
-
- boolean this_present_partition_index = true;
- boolean that_present_partition_index = true;
- if (this_present_partition_index || that_present_partition_index) {
- if (!(this_present_partition_index && that_present_partition_index)) return false;
- if (this.partition_index != that.partition_index) return false;
- }
-
- boolean this_present_decree = true;
- boolean that_present_decree = true;
- if (this_present_decree || that_present_decree) {
- if (!(this_present_decree && that_present_decree)) return false;
- if (this.decree != that.decree) return false;
- }
-
- boolean this_present_server = true && this.isSetServer();
- boolean that_present_server = true && that.isSetServer();
- if (this_present_server || that_present_server) {
- if (!(this_present_server && that_present_server)) return false;
- if (!this.server.equals(that.server)) return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 1;
-
- hashCode = hashCode * 8191 + error;
-
- hashCode = hashCode * 8191 + ((check_value_returned) ? 131071 : 524287);
-
- hashCode = hashCode * 8191 + ((check_value_exist) ? 131071 : 524287);
-
- hashCode = hashCode * 8191 + ((isSetCheck_value()) ? 131071 : 524287);
- if (isSetCheck_value()) hashCode = hashCode * 8191 + check_value.hashCode();
-
- hashCode = hashCode * 8191 + app_id;
-
- hashCode = hashCode * 8191 + partition_index;
-
- hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(decree);
-
- hashCode = hashCode * 8191 + ((isSetServer()) ? 131071 : 524287);
- if (isSetServer()) hashCode = hashCode * 8191 + server.hashCode();
-
- return hashCode;
- }
-
- @Override
- public int compareTo(check_and_mutate_response other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = java.lang.Boolean.valueOf(isSetError()).compareTo(other.isSetError());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetError()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.error, other.error);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetCheck_value_returned())
- .compareTo(other.isSetCheck_value_returned());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCheck_value_returned()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(
- this.check_value_returned, other.check_value_returned);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetCheck_value_exist())
- .compareTo(other.isSetCheck_value_exist());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCheck_value_exist()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(this.check_value_exist, other.check_value_exist);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetCheck_value()).compareTo(other.isSetCheck_value());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCheck_value()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.check_value, other.check_value);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetApp_id()).compareTo(other.isSetApp_id());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetApp_id()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.app_id, other.app_id);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetPartition_index()).compareTo(other.isSetPartition_index());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPartition_index()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(this.partition_index, other.partition_index);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetDecree()).compareTo(other.isSetDecree());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDecree()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.decree, other.decree);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetServer()).compareTo(other.isSetServer());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetServer()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.server, other.server);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- scheme(iprot).read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- scheme(oprot).write(oprot, this);
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("check_and_mutate_response(");
- boolean first = true;
-
- sb.append("error:");
- sb.append(this.error);
- first = false;
- if (!first) sb.append(", ");
- sb.append("check_value_returned:");
- sb.append(this.check_value_returned);
- first = false;
- if (!first) sb.append(", ");
- sb.append("check_value_exist:");
- sb.append(this.check_value_exist);
- first = false;
- if (!first) sb.append(", ");
- sb.append("check_value:");
- if (this.check_value == null) {
- sb.append("null");
- } else {
- sb.append(this.check_value);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("app_id:");
- sb.append(this.app_id);
- first = false;
- if (!first) sb.append(", ");
- sb.append("partition_index:");
- sb.append(this.partition_index);
- first = false;
- if (!first) sb.append(", ");
- sb.append("decree:");
- sb.append(this.decree);
- first = false;
- if (!first) sb.append(", ");
- sb.append("server:");
- if (this.server == null) {
- sb.append("null");
- } else {
- sb.append(this.server);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (check_value != null) {
- check_value.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, java.lang.ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and
- // doesn't call the default constructor.
- __isset_bitfield = 0;
- read(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class check_and_mutate_responseStandardSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public check_and_mutate_responseStandardScheme getScheme() {
- return new check_and_mutate_responseStandardScheme();
- }
- }
-
- private static class check_and_mutate_responseStandardScheme
- extends org.apache.thrift.scheme.StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, check_and_mutate_response struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true) {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // ERROR
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.error = iprot.readI32();
- struct.setErrorIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // CHECK_VALUE_RETURNED
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.check_value_returned = iprot.readBool();
- struct.setCheck_value_returnedIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // CHECK_VALUE_EXIST
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.check_value_exist = iprot.readBool();
- struct.setCheck_value_existIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // CHECK_VALUE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.check_value = new blob();
- struct.check_value.read(iprot);
- struct.setCheck_valueIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // APP_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.app_id = iprot.readI32();
- struct.setApp_idIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // PARTITION_INDEX
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.partition_index = iprot.readI32();
- struct.setPartition_indexIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 7: // DECREE
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.decree = iprot.readI64();
- struct.setDecreeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 8: // SERVER
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.server = iprot.readString();
- struct.setServerIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, check_and_mutate_response struct)
- throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldBegin(ERROR_FIELD_DESC);
- oprot.writeI32(struct.error);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(CHECK_VALUE_RETURNED_FIELD_DESC);
- oprot.writeBool(struct.check_value_returned);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(CHECK_VALUE_EXIST_FIELD_DESC);
- oprot.writeBool(struct.check_value_exist);
- oprot.writeFieldEnd();
- if (struct.check_value != null) {
- oprot.writeFieldBegin(CHECK_VALUE_FIELD_DESC);
- struct.check_value.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(APP_ID_FIELD_DESC);
- oprot.writeI32(struct.app_id);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(PARTITION_INDEX_FIELD_DESC);
- oprot.writeI32(struct.partition_index);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(DECREE_FIELD_DESC);
- oprot.writeI64(struct.decree);
- oprot.writeFieldEnd();
- if (struct.server != null) {
- oprot.writeFieldBegin(SERVER_FIELD_DESC);
- oprot.writeString(struct.server);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
- }
-
- private static class check_and_mutate_responseTupleSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public check_and_mutate_responseTupleScheme getScheme() {
- return new check_and_mutate_responseTupleScheme();
- }
- }
-
- private static class check_and_mutate_responseTupleScheme
- extends org.apache.thrift.scheme.TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, check_and_mutate_response struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol oprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet optionals = new java.util.BitSet();
- if (struct.isSetError()) {
- optionals.set(0);
- }
- if (struct.isSetCheck_value_returned()) {
- optionals.set(1);
- }
- if (struct.isSetCheck_value_exist()) {
- optionals.set(2);
- }
- if (struct.isSetCheck_value()) {
- optionals.set(3);
- }
- if (struct.isSetApp_id()) {
- optionals.set(4);
- }
- if (struct.isSetPartition_index()) {
- optionals.set(5);
- }
- if (struct.isSetDecree()) {
- optionals.set(6);
- }
- if (struct.isSetServer()) {
- optionals.set(7);
- }
- oprot.writeBitSet(optionals, 8);
- if (struct.isSetError()) {
- oprot.writeI32(struct.error);
- }
- if (struct.isSetCheck_value_returned()) {
- oprot.writeBool(struct.check_value_returned);
- }
- if (struct.isSetCheck_value_exist()) {
- oprot.writeBool(struct.check_value_exist);
- }
- if (struct.isSetCheck_value()) {
- struct.check_value.write(oprot);
- }
- if (struct.isSetApp_id()) {
- oprot.writeI32(struct.app_id);
- }
- if (struct.isSetPartition_index()) {
- oprot.writeI32(struct.partition_index);
- }
- if (struct.isSetDecree()) {
- oprot.writeI64(struct.decree);
- }
- if (struct.isSetServer()) {
- oprot.writeString(struct.server);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, check_and_mutate_response struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol iprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(8);
- if (incoming.get(0)) {
- struct.error = iprot.readI32();
- struct.setErrorIsSet(true);
- }
- if (incoming.get(1)) {
- struct.check_value_returned = iprot.readBool();
- struct.setCheck_value_returnedIsSet(true);
- }
- if (incoming.get(2)) {
- struct.check_value_exist = iprot.readBool();
- struct.setCheck_value_existIsSet(true);
- }
- if (incoming.get(3)) {
- struct.check_value = new blob();
- struct.check_value.read(iprot);
- struct.setCheck_valueIsSet(true);
- }
- if (incoming.get(4)) {
- struct.app_id = iprot.readI32();
- struct.setApp_idIsSet(true);
- }
- if (incoming.get(5)) {
- struct.partition_index = iprot.readI32();
- struct.setPartition_indexIsSet(true);
- }
- if (incoming.get(6)) {
- struct.decree = iprot.readI64();
- struct.setDecreeIsSet(true);
- }
- if (incoming.get(7)) {
- struct.server = iprot.readString();
- struct.setServerIsSet(true);
- }
- }
- }
-
- private static S scheme(
- org.apache.thrift.protocol.TProtocol proto) {
- return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
- ? STANDARD_SCHEME_FACTORY
- : TUPLE_SCHEME_FACTORY)
- .getScheme();
- }
-}
diff --git a/java-client/src/main/java/org/apache/pegasus/apps/check_and_set_request.java b/java-client/src/main/java/org/apache/pegasus/apps/check_and_set_request.java
deleted file mode 100644
index 58b355a650..0000000000
--- a/java-client/src/main/java/org/apache/pegasus/apps/check_and_set_request.java
+++ /dev/null
@@ -1,1331 +0,0 @@
-/*
- * 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.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
- */
-package org.apache.pegasus.apps;
-
-import org.apache.pegasus.base.blob;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(
- value = "Autogenerated by Thrift Compiler (0.11.0)",
- date = "2020-04-13")
-public class check_and_set_request
- implements org.apache.thrift.TBase,
- java.io.Serializable,
- Cloneable,
- Comparable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("check_and_set_request");
-
- private static final org.apache.thrift.protocol.TField HASH_KEY_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "hash_key", org.apache.thrift.protocol.TType.STRUCT, (short) 1);
- private static final org.apache.thrift.protocol.TField CHECK_SORT_KEY_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "check_sort_key", org.apache.thrift.protocol.TType.STRUCT, (short) 2);
- private static final org.apache.thrift.protocol.TField CHECK_TYPE_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "check_type", org.apache.thrift.protocol.TType.I32, (short) 3);
- private static final org.apache.thrift.protocol.TField CHECK_OPERAND_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "check_operand", org.apache.thrift.protocol.TType.STRUCT, (short) 4);
- private static final org.apache.thrift.protocol.TField SET_DIFF_SORT_KEY_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "set_diff_sort_key", org.apache.thrift.protocol.TType.BOOL, (short) 5);
- private static final org.apache.thrift.protocol.TField SET_SORT_KEY_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "set_sort_key", org.apache.thrift.protocol.TType.STRUCT, (short) 6);
- private static final org.apache.thrift.protocol.TField SET_VALUE_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "set_value", org.apache.thrift.protocol.TType.STRUCT, (short) 7);
- private static final org.apache.thrift.protocol.TField SET_EXPIRE_TS_SECONDS_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "set_expire_ts_seconds", org.apache.thrift.protocol.TType.I32, (short) 8);
- private static final org.apache.thrift.protocol.TField RETURN_CHECK_VALUE_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "return_check_value", org.apache.thrift.protocol.TType.BOOL, (short) 9);
-
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
- new check_and_set_requestStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
- new check_and_set_requestTupleSchemeFactory();
-
- public blob hash_key; // required
- public blob check_sort_key; // required
- /** @see cas_check_type */
- public cas_check_type check_type; // required
-
- public blob check_operand; // required
- public boolean set_diff_sort_key; // required
- public blob set_sort_key; // required
- public blob set_value; // required
- public int set_expire_ts_seconds; // required
- public boolean return_check_value; // required
-
- /**
- * The set of fields this struct contains, along with convenience methods for finding and
- * manipulating them.
- */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- HASH_KEY((short) 1, "hash_key"),
- CHECK_SORT_KEY((short) 2, "check_sort_key"),
- /** @see cas_check_type */
- CHECK_TYPE((short) 3, "check_type"),
- CHECK_OPERAND((short) 4, "check_operand"),
- SET_DIFF_SORT_KEY((short) 5, "set_diff_sort_key"),
- SET_SORT_KEY((short) 6, "set_sort_key"),
- SET_VALUE((short) 7, "set_value"),
- SET_EXPIRE_TS_SECONDS((short) 8, "set_expire_ts_seconds"),
- RETURN_CHECK_VALUE((short) 9, "return_check_value");
-
- private static final java.util.Map byName =
- new java.util.HashMap();
-
- static {
- for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /** Find the _Fields constant that matches fieldId, or null if its not found. */
- public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
- case 1: // HASH_KEY
- return HASH_KEY;
- case 2: // CHECK_SORT_KEY
- return CHECK_SORT_KEY;
- case 3: // CHECK_TYPE
- return CHECK_TYPE;
- case 4: // CHECK_OPERAND
- return CHECK_OPERAND;
- case 5: // SET_DIFF_SORT_KEY
- return SET_DIFF_SORT_KEY;
- case 6: // SET_SORT_KEY
- return SET_SORT_KEY;
- case 7: // SET_VALUE
- return SET_VALUE;
- case 8: // SET_EXPIRE_TS_SECONDS
- return SET_EXPIRE_TS_SECONDS;
- case 9: // RETURN_CHECK_VALUE
- return RETURN_CHECK_VALUE;
- default:
- return null;
- }
- }
-
- /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null)
- throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /** Find the _Fields constant that matches name, or null if its not found. */
- public static _Fields findByName(java.lang.String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final java.lang.String _fieldName;
-
- _Fields(short thriftId, java.lang.String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public java.lang.String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SET_DIFF_SORT_KEY_ISSET_ID = 0;
- private static final int __SET_EXPIRE_TS_SECONDS_ISSET_ID = 1;
- private static final int __RETURN_CHECK_VALUE_ISSET_ID = 2;
- private byte __isset_bitfield = 0;
- public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
- static {
- java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(
- _Fields.HASH_KEY,
- new org.apache.thrift.meta_data.FieldMetaData(
- "hash_key",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- tmpMap.put(
- _Fields.CHECK_SORT_KEY,
- new org.apache.thrift.meta_data.FieldMetaData(
- "check_sort_key",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- tmpMap.put(
- _Fields.CHECK_TYPE,
- new org.apache.thrift.meta_data.FieldMetaData(
- "check_type",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.EnumMetaData(
- org.apache.thrift.protocol.TType.ENUM, cas_check_type.class)));
- tmpMap.put(
- _Fields.CHECK_OPERAND,
- new org.apache.thrift.meta_data.FieldMetaData(
- "check_operand",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- tmpMap.put(
- _Fields.SET_DIFF_SORT_KEY,
- new org.apache.thrift.meta_data.FieldMetaData(
- "set_diff_sort_key",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(
- _Fields.SET_SORT_KEY,
- new org.apache.thrift.meta_data.FieldMetaData(
- "set_sort_key",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- tmpMap.put(
- _Fields.SET_VALUE,
- new org.apache.thrift.meta_data.FieldMetaData(
- "set_value",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- tmpMap.put(
- _Fields.SET_EXPIRE_TS_SECONDS,
- new org.apache.thrift.meta_data.FieldMetaData(
- "set_expire_ts_seconds",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(
- _Fields.RETURN_CHECK_VALUE,
- new org.apache.thrift.meta_data.FieldMetaData(
- "return_check_value",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
- check_and_set_request.class, metaDataMap);
- }
-
- public check_and_set_request() {}
-
- public check_and_set_request(
- blob hash_key,
- blob check_sort_key,
- cas_check_type check_type,
- blob check_operand,
- boolean set_diff_sort_key,
- blob set_sort_key,
- blob set_value,
- int set_expire_ts_seconds,
- boolean return_check_value) {
- this();
- this.hash_key = hash_key;
- this.check_sort_key = check_sort_key;
- this.check_type = check_type;
- this.check_operand = check_operand;
- this.set_diff_sort_key = set_diff_sort_key;
- setSet_diff_sort_keyIsSet(true);
- this.set_sort_key = set_sort_key;
- this.set_value = set_value;
- this.set_expire_ts_seconds = set_expire_ts_seconds;
- setSet_expire_ts_secondsIsSet(true);
- this.return_check_value = return_check_value;
- setReturn_check_valueIsSet(true);
- }
-
- /** Performs a deep copy on other. */
- public check_and_set_request(check_and_set_request other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetHash_key()) {
- this.hash_key = new blob(other.hash_key);
- }
- if (other.isSetCheck_sort_key()) {
- this.check_sort_key = new blob(other.check_sort_key);
- }
- if (other.isSetCheck_type()) {
- this.check_type = other.check_type;
- }
- if (other.isSetCheck_operand()) {
- this.check_operand = new blob(other.check_operand);
- }
- this.set_diff_sort_key = other.set_diff_sort_key;
- if (other.isSetSet_sort_key()) {
- this.set_sort_key = new blob(other.set_sort_key);
- }
- if (other.isSetSet_value()) {
- this.set_value = new blob(other.set_value);
- }
- this.set_expire_ts_seconds = other.set_expire_ts_seconds;
- this.return_check_value = other.return_check_value;
- }
-
- public check_and_set_request deepCopy() {
- return new check_and_set_request(this);
- }
-
- @Override
- public void clear() {
- this.hash_key = null;
- this.check_sort_key = null;
- this.check_type = null;
- this.check_operand = null;
- setSet_diff_sort_keyIsSet(false);
- this.set_diff_sort_key = false;
- this.set_sort_key = null;
- this.set_value = null;
- setSet_expire_ts_secondsIsSet(false);
- this.set_expire_ts_seconds = 0;
- setReturn_check_valueIsSet(false);
- this.return_check_value = false;
- }
-
- public blob getHash_key() {
- return this.hash_key;
- }
-
- public check_and_set_request setHash_key(blob hash_key) {
- this.hash_key = hash_key;
- return this;
- }
-
- public void unsetHash_key() {
- this.hash_key = null;
- }
-
- /** Returns true if field hash_key is set (has been assigned a value) and false otherwise */
- public boolean isSetHash_key() {
- return this.hash_key != null;
- }
-
- public void setHash_keyIsSet(boolean value) {
- if (!value) {
- this.hash_key = null;
- }
- }
-
- public blob getCheck_sort_key() {
- return this.check_sort_key;
- }
-
- public check_and_set_request setCheck_sort_key(blob check_sort_key) {
- this.check_sort_key = check_sort_key;
- return this;
- }
-
- public void unsetCheck_sort_key() {
- this.check_sort_key = null;
- }
-
- /** Returns true if field check_sort_key is set (has been assigned a value) and false otherwise */
- public boolean isSetCheck_sort_key() {
- return this.check_sort_key != null;
- }
-
- public void setCheck_sort_keyIsSet(boolean value) {
- if (!value) {
- this.check_sort_key = null;
- }
- }
-
- /** @see cas_check_type */
- public cas_check_type getCheck_type() {
- return this.check_type;
- }
-
- /** @see cas_check_type */
- public check_and_set_request setCheck_type(cas_check_type check_type) {
- this.check_type = check_type;
- return this;
- }
-
- public void unsetCheck_type() {
- this.check_type = null;
- }
-
- /** Returns true if field check_type is set (has been assigned a value) and false otherwise */
- public boolean isSetCheck_type() {
- return this.check_type != null;
- }
-
- public void setCheck_typeIsSet(boolean value) {
- if (!value) {
- this.check_type = null;
- }
- }
-
- public blob getCheck_operand() {
- return this.check_operand;
- }
-
- public check_and_set_request setCheck_operand(blob check_operand) {
- this.check_operand = check_operand;
- return this;
- }
-
- public void unsetCheck_operand() {
- this.check_operand = null;
- }
-
- /** Returns true if field check_operand is set (has been assigned a value) and false otherwise */
- public boolean isSetCheck_operand() {
- return this.check_operand != null;
- }
-
- public void setCheck_operandIsSet(boolean value) {
- if (!value) {
- this.check_operand = null;
- }
- }
-
- public boolean isSet_diff_sort_key() {
- return this.set_diff_sort_key;
- }
-
- public check_and_set_request setSet_diff_sort_key(boolean set_diff_sort_key) {
- this.set_diff_sort_key = set_diff_sort_key;
- setSet_diff_sort_keyIsSet(true);
- return this;
- }
-
- public void unsetSet_diff_sort_key() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SET_DIFF_SORT_KEY_ISSET_ID);
- }
-
- /**
- * Returns true if field set_diff_sort_key is set (has been assigned a value) and false otherwise
- */
- public boolean isSetSet_diff_sort_key() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SET_DIFF_SORT_KEY_ISSET_ID);
- }
-
- public void setSet_diff_sort_keyIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(
- __isset_bitfield, __SET_DIFF_SORT_KEY_ISSET_ID, value);
- }
-
- public blob getSet_sort_key() {
- return this.set_sort_key;
- }
-
- public check_and_set_request setSet_sort_key(blob set_sort_key) {
- this.set_sort_key = set_sort_key;
- return this;
- }
-
- public void unsetSet_sort_key() {
- this.set_sort_key = null;
- }
-
- /** Returns true if field set_sort_key is set (has been assigned a value) and false otherwise */
- public boolean isSetSet_sort_key() {
- return this.set_sort_key != null;
- }
-
- public void setSet_sort_keyIsSet(boolean value) {
- if (!value) {
- this.set_sort_key = null;
- }
- }
-
- public blob getSet_value() {
- return this.set_value;
- }
-
- public check_and_set_request setSet_value(blob set_value) {
- this.set_value = set_value;
- return this;
- }
-
- public void unsetSet_value() {
- this.set_value = null;
- }
-
- /** Returns true if field set_value is set (has been assigned a value) and false otherwise */
- public boolean isSetSet_value() {
- return this.set_value != null;
- }
-
- public void setSet_valueIsSet(boolean value) {
- if (!value) {
- this.set_value = null;
- }
- }
-
- public int getSet_expire_ts_seconds() {
- return this.set_expire_ts_seconds;
- }
-
- public check_and_set_request setSet_expire_ts_seconds(int set_expire_ts_seconds) {
- this.set_expire_ts_seconds = set_expire_ts_seconds;
- setSet_expire_ts_secondsIsSet(true);
- return this;
- }
-
- public void unsetSet_expire_ts_seconds() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(
- __isset_bitfield, __SET_EXPIRE_TS_SECONDS_ISSET_ID);
- }
-
- /**
- * Returns true if field set_expire_ts_seconds is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSetSet_expire_ts_seconds() {
- return org.apache.thrift.EncodingUtils.testBit(
- __isset_bitfield, __SET_EXPIRE_TS_SECONDS_ISSET_ID);
- }
-
- public void setSet_expire_ts_secondsIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(
- __isset_bitfield, __SET_EXPIRE_TS_SECONDS_ISSET_ID, value);
- }
-
- public boolean isReturn_check_value() {
- return this.return_check_value;
- }
-
- public check_and_set_request setReturn_check_value(boolean return_check_value) {
- this.return_check_value = return_check_value;
- setReturn_check_valueIsSet(true);
- return this;
- }
-
- public void unsetReturn_check_value() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RETURN_CHECK_VALUE_ISSET_ID);
- }
-
- /**
- * Returns true if field return_check_value is set (has been assigned a value) and false otherwise
- */
- public boolean isSetReturn_check_value() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RETURN_CHECK_VALUE_ISSET_ID);
- }
-
- public void setReturn_check_valueIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(
- __isset_bitfield, __RETURN_CHECK_VALUE_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, java.lang.Object value) {
- switch (field) {
- case HASH_KEY:
- if (value == null) {
- unsetHash_key();
- } else {
- setHash_key((blob) value);
- }
- break;
-
- case CHECK_SORT_KEY:
- if (value == null) {
- unsetCheck_sort_key();
- } else {
- setCheck_sort_key((blob) value);
- }
- break;
-
- case CHECK_TYPE:
- if (value == null) {
- unsetCheck_type();
- } else {
- setCheck_type((cas_check_type) value);
- }
- break;
-
- case CHECK_OPERAND:
- if (value == null) {
- unsetCheck_operand();
- } else {
- setCheck_operand((blob) value);
- }
- break;
-
- case SET_DIFF_SORT_KEY:
- if (value == null) {
- unsetSet_diff_sort_key();
- } else {
- setSet_diff_sort_key((java.lang.Boolean) value);
- }
- break;
-
- case SET_SORT_KEY:
- if (value == null) {
- unsetSet_sort_key();
- } else {
- setSet_sort_key((blob) value);
- }
- break;
-
- case SET_VALUE:
- if (value == null) {
- unsetSet_value();
- } else {
- setSet_value((blob) value);
- }
- break;
-
- case SET_EXPIRE_TS_SECONDS:
- if (value == null) {
- unsetSet_expire_ts_seconds();
- } else {
- setSet_expire_ts_seconds((java.lang.Integer) value);
- }
- break;
-
- case RETURN_CHECK_VALUE:
- if (value == null) {
- unsetReturn_check_value();
- } else {
- setReturn_check_value((java.lang.Boolean) value);
- }
- break;
- }
- }
-
- public java.lang.Object getFieldValue(_Fields field) {
- switch (field) {
- case HASH_KEY:
- return getHash_key();
-
- case CHECK_SORT_KEY:
- return getCheck_sort_key();
-
- case CHECK_TYPE:
- return getCheck_type();
-
- case CHECK_OPERAND:
- return getCheck_operand();
-
- case SET_DIFF_SORT_KEY:
- return isSet_diff_sort_key();
-
- case SET_SORT_KEY:
- return getSet_sort_key();
-
- case SET_VALUE:
- return getSet_value();
-
- case SET_EXPIRE_TS_SECONDS:
- return getSet_expire_ts_seconds();
-
- case RETURN_CHECK_VALUE:
- return isReturn_check_value();
- }
- throw new java.lang.IllegalStateException();
- }
-
- /**
- * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new java.lang.IllegalArgumentException();
- }
-
- switch (field) {
- case HASH_KEY:
- return isSetHash_key();
- case CHECK_SORT_KEY:
- return isSetCheck_sort_key();
- case CHECK_TYPE:
- return isSetCheck_type();
- case CHECK_OPERAND:
- return isSetCheck_operand();
- case SET_DIFF_SORT_KEY:
- return isSetSet_diff_sort_key();
- case SET_SORT_KEY:
- return isSetSet_sort_key();
- case SET_VALUE:
- return isSetSet_value();
- case SET_EXPIRE_TS_SECONDS:
- return isSetSet_expire_ts_seconds();
- case RETURN_CHECK_VALUE:
- return isSetReturn_check_value();
- }
- throw new java.lang.IllegalStateException();
- }
-
- @Override
- public boolean equals(java.lang.Object that) {
- if (that == null) return false;
- if (that instanceof check_and_set_request) return this.equals((check_and_set_request) that);
- return false;
- }
-
- public boolean equals(check_and_set_request that) {
- if (that == null) return false;
- if (this == that) return true;
-
- boolean this_present_hash_key = true && this.isSetHash_key();
- boolean that_present_hash_key = true && that.isSetHash_key();
- if (this_present_hash_key || that_present_hash_key) {
- if (!(this_present_hash_key && that_present_hash_key)) return false;
- if (!this.hash_key.equals(that.hash_key)) return false;
- }
-
- boolean this_present_check_sort_key = true && this.isSetCheck_sort_key();
- boolean that_present_check_sort_key = true && that.isSetCheck_sort_key();
- if (this_present_check_sort_key || that_present_check_sort_key) {
- if (!(this_present_check_sort_key && that_present_check_sort_key)) return false;
- if (!this.check_sort_key.equals(that.check_sort_key)) return false;
- }
-
- boolean this_present_check_type = true && this.isSetCheck_type();
- boolean that_present_check_type = true && that.isSetCheck_type();
- if (this_present_check_type || that_present_check_type) {
- if (!(this_present_check_type && that_present_check_type)) return false;
- if (!this.check_type.equals(that.check_type)) return false;
- }
-
- boolean this_present_check_operand = true && this.isSetCheck_operand();
- boolean that_present_check_operand = true && that.isSetCheck_operand();
- if (this_present_check_operand || that_present_check_operand) {
- if (!(this_present_check_operand && that_present_check_operand)) return false;
- if (!this.check_operand.equals(that.check_operand)) return false;
- }
-
- boolean this_present_set_diff_sort_key = true;
- boolean that_present_set_diff_sort_key = true;
- if (this_present_set_diff_sort_key || that_present_set_diff_sort_key) {
- if (!(this_present_set_diff_sort_key && that_present_set_diff_sort_key)) return false;
- if (this.set_diff_sort_key != that.set_diff_sort_key) return false;
- }
-
- boolean this_present_set_sort_key = true && this.isSetSet_sort_key();
- boolean that_present_set_sort_key = true && that.isSetSet_sort_key();
- if (this_present_set_sort_key || that_present_set_sort_key) {
- if (!(this_present_set_sort_key && that_present_set_sort_key)) return false;
- if (!this.set_sort_key.equals(that.set_sort_key)) return false;
- }
-
- boolean this_present_set_value = true && this.isSetSet_value();
- boolean that_present_set_value = true && that.isSetSet_value();
- if (this_present_set_value || that_present_set_value) {
- if (!(this_present_set_value && that_present_set_value)) return false;
- if (!this.set_value.equals(that.set_value)) return false;
- }
-
- boolean this_present_set_expire_ts_seconds = true;
- boolean that_present_set_expire_ts_seconds = true;
- if (this_present_set_expire_ts_seconds || that_present_set_expire_ts_seconds) {
- if (!(this_present_set_expire_ts_seconds && that_present_set_expire_ts_seconds)) return false;
- if (this.set_expire_ts_seconds != that.set_expire_ts_seconds) return false;
- }
-
- boolean this_present_return_check_value = true;
- boolean that_present_return_check_value = true;
- if (this_present_return_check_value || that_present_return_check_value) {
- if (!(this_present_return_check_value && that_present_return_check_value)) return false;
- if (this.return_check_value != that.return_check_value) return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 1;
-
- hashCode = hashCode * 8191 + ((isSetHash_key()) ? 131071 : 524287);
- if (isSetHash_key()) hashCode = hashCode * 8191 + hash_key.hashCode();
-
- hashCode = hashCode * 8191 + ((isSetCheck_sort_key()) ? 131071 : 524287);
- if (isSetCheck_sort_key()) hashCode = hashCode * 8191 + check_sort_key.hashCode();
-
- hashCode = hashCode * 8191 + ((isSetCheck_type()) ? 131071 : 524287);
- if (isSetCheck_type()) hashCode = hashCode * 8191 + check_type.getValue();
-
- hashCode = hashCode * 8191 + ((isSetCheck_operand()) ? 131071 : 524287);
- if (isSetCheck_operand()) hashCode = hashCode * 8191 + check_operand.hashCode();
-
- hashCode = hashCode * 8191 + ((set_diff_sort_key) ? 131071 : 524287);
-
- hashCode = hashCode * 8191 + ((isSetSet_sort_key()) ? 131071 : 524287);
- if (isSetSet_sort_key()) hashCode = hashCode * 8191 + set_sort_key.hashCode();
-
- hashCode = hashCode * 8191 + ((isSetSet_value()) ? 131071 : 524287);
- if (isSetSet_value()) hashCode = hashCode * 8191 + set_value.hashCode();
-
- hashCode = hashCode * 8191 + set_expire_ts_seconds;
-
- hashCode = hashCode * 8191 + ((return_check_value) ? 131071 : 524287);
-
- return hashCode;
- }
-
- @Override
- public int compareTo(check_and_set_request other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = java.lang.Boolean.valueOf(isSetHash_key()).compareTo(other.isSetHash_key());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetHash_key()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hash_key, other.hash_key);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetCheck_sort_key()).compareTo(other.isSetCheck_sort_key());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCheck_sort_key()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(this.check_sort_key, other.check_sort_key);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetCheck_type()).compareTo(other.isSetCheck_type());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCheck_type()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.check_type, other.check_type);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetCheck_operand()).compareTo(other.isSetCheck_operand());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCheck_operand()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(this.check_operand, other.check_operand);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetSet_diff_sort_key())
- .compareTo(other.isSetSet_diff_sort_key());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSet_diff_sort_key()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(this.set_diff_sort_key, other.set_diff_sort_key);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetSet_sort_key()).compareTo(other.isSetSet_sort_key());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSet_sort_key()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(this.set_sort_key, other.set_sort_key);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetSet_value()).compareTo(other.isSetSet_value());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSet_value()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.set_value, other.set_value);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetSet_expire_ts_seconds())
- .compareTo(other.isSetSet_expire_ts_seconds());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSet_expire_ts_seconds()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(
- this.set_expire_ts_seconds, other.set_expire_ts_seconds);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetReturn_check_value())
- .compareTo(other.isSetReturn_check_value());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetReturn_check_value()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(
- this.return_check_value, other.return_check_value);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- scheme(iprot).read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- scheme(oprot).write(oprot, this);
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("check_and_set_request(");
- boolean first = true;
-
- sb.append("hash_key:");
- if (this.hash_key == null) {
- sb.append("null");
- } else {
- sb.append(this.hash_key);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("check_sort_key:");
- if (this.check_sort_key == null) {
- sb.append("null");
- } else {
- sb.append(this.check_sort_key);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("check_type:");
- if (this.check_type == null) {
- sb.append("null");
- } else {
- sb.append(this.check_type);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("check_operand:");
- if (this.check_operand == null) {
- sb.append("null");
- } else {
- sb.append(this.check_operand);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("set_diff_sort_key:");
- sb.append(this.set_diff_sort_key);
- first = false;
- if (!first) sb.append(", ");
- sb.append("set_sort_key:");
- if (this.set_sort_key == null) {
- sb.append("null");
- } else {
- sb.append(this.set_sort_key);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("set_value:");
- if (this.set_value == null) {
- sb.append("null");
- } else {
- sb.append(this.set_value);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("set_expire_ts_seconds:");
- sb.append(this.set_expire_ts_seconds);
- first = false;
- if (!first) sb.append(", ");
- sb.append("return_check_value:");
- sb.append(this.return_check_value);
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (hash_key != null) {
- hash_key.validate();
- }
- if (check_sort_key != null) {
- check_sort_key.validate();
- }
- if (check_operand != null) {
- check_operand.validate();
- }
- if (set_sort_key != null) {
- set_sort_key.validate();
- }
- if (set_value != null) {
- set_value.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, java.lang.ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and
- // doesn't call the default constructor.
- __isset_bitfield = 0;
- read(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class check_and_set_requestStandardSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public check_and_set_requestStandardScheme getScheme() {
- return new check_and_set_requestStandardScheme();
- }
- }
-
- private static class check_and_set_requestStandardScheme
- extends org.apache.thrift.scheme.StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, check_and_set_request struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true) {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // HASH_KEY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.hash_key = new blob();
- struct.hash_key.read(iprot);
- struct.setHash_keyIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // CHECK_SORT_KEY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.check_sort_key = new blob();
- struct.check_sort_key.read(iprot);
- struct.setCheck_sort_keyIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // CHECK_TYPE
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.check_type = cas_check_type.findByValue(iprot.readI32());
- struct.setCheck_typeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // CHECK_OPERAND
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.check_operand = new blob();
- struct.check_operand.read(iprot);
- struct.setCheck_operandIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // SET_DIFF_SORT_KEY
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.set_diff_sort_key = iprot.readBool();
- struct.setSet_diff_sort_keyIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // SET_SORT_KEY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.set_sort_key = new blob();
- struct.set_sort_key.read(iprot);
- struct.setSet_sort_keyIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 7: // SET_VALUE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.set_value = new blob();
- struct.set_value.read(iprot);
- struct.setSet_valueIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 8: // SET_EXPIRE_TS_SECONDS
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.set_expire_ts_seconds = iprot.readI32();
- struct.setSet_expire_ts_secondsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 9: // RETURN_CHECK_VALUE
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.return_check_value = iprot.readBool();
- struct.setReturn_check_valueIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, check_and_set_request struct)
- throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.hash_key != null) {
- oprot.writeFieldBegin(HASH_KEY_FIELD_DESC);
- struct.hash_key.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.check_sort_key != null) {
- oprot.writeFieldBegin(CHECK_SORT_KEY_FIELD_DESC);
- struct.check_sort_key.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.check_type != null) {
- oprot.writeFieldBegin(CHECK_TYPE_FIELD_DESC);
- oprot.writeI32(struct.check_type.getValue());
- oprot.writeFieldEnd();
- }
- if (struct.check_operand != null) {
- oprot.writeFieldBegin(CHECK_OPERAND_FIELD_DESC);
- struct.check_operand.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(SET_DIFF_SORT_KEY_FIELD_DESC);
- oprot.writeBool(struct.set_diff_sort_key);
- oprot.writeFieldEnd();
- if (struct.set_sort_key != null) {
- oprot.writeFieldBegin(SET_SORT_KEY_FIELD_DESC);
- struct.set_sort_key.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.set_value != null) {
- oprot.writeFieldBegin(SET_VALUE_FIELD_DESC);
- struct.set_value.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(SET_EXPIRE_TS_SECONDS_FIELD_DESC);
- oprot.writeI32(struct.set_expire_ts_seconds);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(RETURN_CHECK_VALUE_FIELD_DESC);
- oprot.writeBool(struct.return_check_value);
- oprot.writeFieldEnd();
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
- }
-
- private static class check_and_set_requestTupleSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public check_and_set_requestTupleScheme getScheme() {
- return new check_and_set_requestTupleScheme();
- }
- }
-
- private static class check_and_set_requestTupleScheme
- extends org.apache.thrift.scheme.TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, check_and_set_request struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol oprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet optionals = new java.util.BitSet();
- if (struct.isSetHash_key()) {
- optionals.set(0);
- }
- if (struct.isSetCheck_sort_key()) {
- optionals.set(1);
- }
- if (struct.isSetCheck_type()) {
- optionals.set(2);
- }
- if (struct.isSetCheck_operand()) {
- optionals.set(3);
- }
- if (struct.isSetSet_diff_sort_key()) {
- optionals.set(4);
- }
- if (struct.isSetSet_sort_key()) {
- optionals.set(5);
- }
- if (struct.isSetSet_value()) {
- optionals.set(6);
- }
- if (struct.isSetSet_expire_ts_seconds()) {
- optionals.set(7);
- }
- if (struct.isSetReturn_check_value()) {
- optionals.set(8);
- }
- oprot.writeBitSet(optionals, 9);
- if (struct.isSetHash_key()) {
- struct.hash_key.write(oprot);
- }
- if (struct.isSetCheck_sort_key()) {
- struct.check_sort_key.write(oprot);
- }
- if (struct.isSetCheck_type()) {
- oprot.writeI32(struct.check_type.getValue());
- }
- if (struct.isSetCheck_operand()) {
- struct.check_operand.write(oprot);
- }
- if (struct.isSetSet_diff_sort_key()) {
- oprot.writeBool(struct.set_diff_sort_key);
- }
- if (struct.isSetSet_sort_key()) {
- struct.set_sort_key.write(oprot);
- }
- if (struct.isSetSet_value()) {
- struct.set_value.write(oprot);
- }
- if (struct.isSetSet_expire_ts_seconds()) {
- oprot.writeI32(struct.set_expire_ts_seconds);
- }
- if (struct.isSetReturn_check_value()) {
- oprot.writeBool(struct.return_check_value);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, check_and_set_request struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol iprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(9);
- if (incoming.get(0)) {
- struct.hash_key = new blob();
- struct.hash_key.read(iprot);
- struct.setHash_keyIsSet(true);
- }
- if (incoming.get(1)) {
- struct.check_sort_key = new blob();
- struct.check_sort_key.read(iprot);
- struct.setCheck_sort_keyIsSet(true);
- }
- if (incoming.get(2)) {
- struct.check_type = cas_check_type.findByValue(iprot.readI32());
- struct.setCheck_typeIsSet(true);
- }
- if (incoming.get(3)) {
- struct.check_operand = new blob();
- struct.check_operand.read(iprot);
- struct.setCheck_operandIsSet(true);
- }
- if (incoming.get(4)) {
- struct.set_diff_sort_key = iprot.readBool();
- struct.setSet_diff_sort_keyIsSet(true);
- }
- if (incoming.get(5)) {
- struct.set_sort_key = new blob();
- struct.set_sort_key.read(iprot);
- struct.setSet_sort_keyIsSet(true);
- }
- if (incoming.get(6)) {
- struct.set_value = new blob();
- struct.set_value.read(iprot);
- struct.setSet_valueIsSet(true);
- }
- if (incoming.get(7)) {
- struct.set_expire_ts_seconds = iprot.readI32();
- struct.setSet_expire_ts_secondsIsSet(true);
- }
- if (incoming.get(8)) {
- struct.return_check_value = iprot.readBool();
- struct.setReturn_check_valueIsSet(true);
- }
- }
- }
-
- private static S scheme(
- org.apache.thrift.protocol.TProtocol proto) {
- return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
- ? STANDARD_SCHEME_FACTORY
- : TUPLE_SCHEME_FACTORY)
- .getScheme();
- }
-}
diff --git a/java-client/src/main/java/org/apache/pegasus/apps/check_and_set_response.java b/java-client/src/main/java/org/apache/pegasus/apps/check_and_set_response.java
deleted file mode 100644
index 9d33fed4e9..0000000000
--- a/java-client/src/main/java/org/apache/pegasus/apps/check_and_set_response.java
+++ /dev/null
@@ -1,1172 +0,0 @@
-/*
- * 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.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
- */
-package org.apache.pegasus.apps;
-
-import org.apache.pegasus.base.blob;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(
- value = "Autogenerated by Thrift Compiler (0.11.0)",
- date = "2020-04-13")
-public class check_and_set_response
- implements org.apache.thrift.TBase,
- java.io.Serializable,
- Cloneable,
- Comparable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("check_and_set_response");
-
- private static final org.apache.thrift.protocol.TField ERROR_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "error", org.apache.thrift.protocol.TType.I32, (short) 1);
- private static final org.apache.thrift.protocol.TField CHECK_VALUE_RETURNED_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "check_value_returned", org.apache.thrift.protocol.TType.BOOL, (short) 2);
- private static final org.apache.thrift.protocol.TField CHECK_VALUE_EXIST_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "check_value_exist", org.apache.thrift.protocol.TType.BOOL, (short) 3);
- private static final org.apache.thrift.protocol.TField CHECK_VALUE_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "check_value", org.apache.thrift.protocol.TType.STRUCT, (short) 4);
- private static final org.apache.thrift.protocol.TField APP_ID_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "app_id", org.apache.thrift.protocol.TType.I32, (short) 5);
- private static final org.apache.thrift.protocol.TField PARTITION_INDEX_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "partition_index", org.apache.thrift.protocol.TType.I32, (short) 6);
- private static final org.apache.thrift.protocol.TField DECREE_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "decree", org.apache.thrift.protocol.TType.I64, (short) 7);
- private static final org.apache.thrift.protocol.TField SERVER_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "server", org.apache.thrift.protocol.TType.STRING, (short) 8);
-
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
- new check_and_set_responseStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
- new check_and_set_responseTupleSchemeFactory();
-
- public int error; // required
- public boolean check_value_returned; // required
- public boolean check_value_exist; // required
- public blob check_value; // required
- public int app_id; // required
- public int partition_index; // required
- public long decree; // required
- public java.lang.String server; // required
-
- /**
- * The set of fields this struct contains, along with convenience methods for finding and
- * manipulating them.
- */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- ERROR((short) 1, "error"),
- CHECK_VALUE_RETURNED((short) 2, "check_value_returned"),
- CHECK_VALUE_EXIST((short) 3, "check_value_exist"),
- CHECK_VALUE((short) 4, "check_value"),
- APP_ID((short) 5, "app_id"),
- PARTITION_INDEX((short) 6, "partition_index"),
- DECREE((short) 7, "decree"),
- SERVER((short) 8, "server");
-
- private static final java.util.Map byName =
- new java.util.HashMap();
-
- static {
- for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /** Find the _Fields constant that matches fieldId, or null if its not found. */
- public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
- case 1: // ERROR
- return ERROR;
- case 2: // CHECK_VALUE_RETURNED
- return CHECK_VALUE_RETURNED;
- case 3: // CHECK_VALUE_EXIST
- return CHECK_VALUE_EXIST;
- case 4: // CHECK_VALUE
- return CHECK_VALUE;
- case 5: // APP_ID
- return APP_ID;
- case 6: // PARTITION_INDEX
- return PARTITION_INDEX;
- case 7: // DECREE
- return DECREE;
- case 8: // SERVER
- return SERVER;
- default:
- return null;
- }
- }
-
- /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null)
- throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /** Find the _Fields constant that matches name, or null if its not found. */
- public static _Fields findByName(java.lang.String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final java.lang.String _fieldName;
-
- _Fields(short thriftId, java.lang.String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public java.lang.String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __ERROR_ISSET_ID = 0;
- private static final int __CHECK_VALUE_RETURNED_ISSET_ID = 1;
- private static final int __CHECK_VALUE_EXIST_ISSET_ID = 2;
- private static final int __APP_ID_ISSET_ID = 3;
- private static final int __PARTITION_INDEX_ISSET_ID = 4;
- private static final int __DECREE_ISSET_ID = 5;
- private byte __isset_bitfield = 0;
- public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
- static {
- java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(
- _Fields.ERROR,
- new org.apache.thrift.meta_data.FieldMetaData(
- "error",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(
- _Fields.CHECK_VALUE_RETURNED,
- new org.apache.thrift.meta_data.FieldMetaData(
- "check_value_returned",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(
- _Fields.CHECK_VALUE_EXIST,
- new org.apache.thrift.meta_data.FieldMetaData(
- "check_value_exist",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(
- _Fields.CHECK_VALUE,
- new org.apache.thrift.meta_data.FieldMetaData(
- "check_value",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- tmpMap.put(
- _Fields.APP_ID,
- new org.apache.thrift.meta_data.FieldMetaData(
- "app_id",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(
- _Fields.PARTITION_INDEX,
- new org.apache.thrift.meta_data.FieldMetaData(
- "partition_index",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(
- _Fields.DECREE,
- new org.apache.thrift.meta_data.FieldMetaData(
- "decree",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I64)));
- tmpMap.put(
- _Fields.SERVER,
- new org.apache.thrift.meta_data.FieldMetaData(
- "server",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
- check_and_set_response.class, metaDataMap);
- }
-
- public check_and_set_response() {}
-
- public check_and_set_response(
- int error,
- boolean check_value_returned,
- boolean check_value_exist,
- blob check_value,
- int app_id,
- int partition_index,
- long decree,
- java.lang.String server) {
- this();
- this.error = error;
- setErrorIsSet(true);
- this.check_value_returned = check_value_returned;
- setCheck_value_returnedIsSet(true);
- this.check_value_exist = check_value_exist;
- setCheck_value_existIsSet(true);
- this.check_value = check_value;
- this.app_id = app_id;
- setApp_idIsSet(true);
- this.partition_index = partition_index;
- setPartition_indexIsSet(true);
- this.decree = decree;
- setDecreeIsSet(true);
- this.server = server;
- }
-
- /** Performs a deep copy on other. */
- public check_and_set_response(check_and_set_response other) {
- __isset_bitfield = other.__isset_bitfield;
- this.error = other.error;
- this.check_value_returned = other.check_value_returned;
- this.check_value_exist = other.check_value_exist;
- if (other.isSetCheck_value()) {
- this.check_value = new blob(other.check_value);
- }
- this.app_id = other.app_id;
- this.partition_index = other.partition_index;
- this.decree = other.decree;
- if (other.isSetServer()) {
- this.server = other.server;
- }
- }
-
- public check_and_set_response deepCopy() {
- return new check_and_set_response(this);
- }
-
- @Override
- public void clear() {
- setErrorIsSet(false);
- this.error = 0;
- setCheck_value_returnedIsSet(false);
- this.check_value_returned = false;
- setCheck_value_existIsSet(false);
- this.check_value_exist = false;
- this.check_value = null;
- setApp_idIsSet(false);
- this.app_id = 0;
- setPartition_indexIsSet(false);
- this.partition_index = 0;
- setDecreeIsSet(false);
- this.decree = 0;
- this.server = null;
- }
-
- public int getError() {
- return this.error;
- }
-
- public check_and_set_response setError(int error) {
- this.error = error;
- setErrorIsSet(true);
- return this;
- }
-
- public void unsetError() {
- __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ERROR_ISSET_ID);
- }
-
- /** Returns true if field error is set (has been assigned a value) and false otherwise */
- public boolean isSetError() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ERROR_ISSET_ID);
- }
-
- public void setErrorIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ERROR_ISSET_ID, value);
- }
-
- public boolean isCheck_value_returned() {
- return this.check_value_returned;
- }
-
- public check_and_set_response setCheck_value_returned(boolean check_value_returned) {
- this.check_value_returned = check_value_returned;
- setCheck_value_returnedIsSet(true);
- return this;
- }
-
- public void unsetCheck_value_returned() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CHECK_VALUE_RETURNED_ISSET_ID);
- }
-
- /**
- * Returns true if field check_value_returned is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSetCheck_value_returned() {
- return org.apache.thrift.EncodingUtils.testBit(
- __isset_bitfield, __CHECK_VALUE_RETURNED_ISSET_ID);
- }
-
- public void setCheck_value_returnedIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(
- __isset_bitfield, __CHECK_VALUE_RETURNED_ISSET_ID, value);
- }
-
- public boolean isCheck_value_exist() {
- return this.check_value_exist;
- }
-
- public check_and_set_response setCheck_value_exist(boolean check_value_exist) {
- this.check_value_exist = check_value_exist;
- setCheck_value_existIsSet(true);
- return this;
- }
-
- public void unsetCheck_value_exist() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CHECK_VALUE_EXIST_ISSET_ID);
- }
-
- /**
- * Returns true if field check_value_exist is set (has been assigned a value) and false otherwise
- */
- public boolean isSetCheck_value_exist() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CHECK_VALUE_EXIST_ISSET_ID);
- }
-
- public void setCheck_value_existIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(
- __isset_bitfield, __CHECK_VALUE_EXIST_ISSET_ID, value);
- }
-
- public blob getCheck_value() {
- return this.check_value;
- }
-
- public check_and_set_response setCheck_value(blob check_value) {
- this.check_value = check_value;
- return this;
- }
-
- public void unsetCheck_value() {
- this.check_value = null;
- }
-
- /** Returns true if field check_value is set (has been assigned a value) and false otherwise */
- public boolean isSetCheck_value() {
- return this.check_value != null;
- }
-
- public void setCheck_valueIsSet(boolean value) {
- if (!value) {
- this.check_value = null;
- }
- }
-
- public int getApp_id() {
- return this.app_id;
- }
-
- public check_and_set_response setApp_id(int app_id) {
- this.app_id = app_id;
- setApp_idIsSet(true);
- return this;
- }
-
- public void unsetApp_id() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __APP_ID_ISSET_ID);
- }
-
- /** Returns true if field app_id is set (has been assigned a value) and false otherwise */
- public boolean isSetApp_id() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __APP_ID_ISSET_ID);
- }
-
- public void setApp_idIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __APP_ID_ISSET_ID, value);
- }
-
- public int getPartition_index() {
- return this.partition_index;
- }
-
- public check_and_set_response setPartition_index(int partition_index) {
- this.partition_index = partition_index;
- setPartition_indexIsSet(true);
- return this;
- }
-
- public void unsetPartition_index() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PARTITION_INDEX_ISSET_ID);
- }
-
- /**
- * Returns true if field partition_index is set (has been assigned a value) and false otherwise
- */
- public boolean isSetPartition_index() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PARTITION_INDEX_ISSET_ID);
- }
-
- public void setPartition_indexIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PARTITION_INDEX_ISSET_ID, value);
- }
-
- public long getDecree() {
- return this.decree;
- }
-
- public check_and_set_response setDecree(long decree) {
- this.decree = decree;
- setDecreeIsSet(true);
- return this;
- }
-
- public void unsetDecree() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DECREE_ISSET_ID);
- }
-
- /** Returns true if field decree is set (has been assigned a value) and false otherwise */
- public boolean isSetDecree() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DECREE_ISSET_ID);
- }
-
- public void setDecreeIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DECREE_ISSET_ID, value);
- }
-
- public java.lang.String getServer() {
- return this.server;
- }
-
- public check_and_set_response setServer(java.lang.String server) {
- this.server = server;
- return this;
- }
-
- public void unsetServer() {
- this.server = null;
- }
-
- /** Returns true if field server is set (has been assigned a value) and false otherwise */
- public boolean isSetServer() {
- return this.server != null;
- }
-
- public void setServerIsSet(boolean value) {
- if (!value) {
- this.server = null;
- }
- }
-
- public void setFieldValue(_Fields field, java.lang.Object value) {
- switch (field) {
- case ERROR:
- if (value == null) {
- unsetError();
- } else {
- setError((java.lang.Integer) value);
- }
- break;
-
- case CHECK_VALUE_RETURNED:
- if (value == null) {
- unsetCheck_value_returned();
- } else {
- setCheck_value_returned((java.lang.Boolean) value);
- }
- break;
-
- case CHECK_VALUE_EXIST:
- if (value == null) {
- unsetCheck_value_exist();
- } else {
- setCheck_value_exist((java.lang.Boolean) value);
- }
- break;
-
- case CHECK_VALUE:
- if (value == null) {
- unsetCheck_value();
- } else {
- setCheck_value((blob) value);
- }
- break;
-
- case APP_ID:
- if (value == null) {
- unsetApp_id();
- } else {
- setApp_id((java.lang.Integer) value);
- }
- break;
-
- case PARTITION_INDEX:
- if (value == null) {
- unsetPartition_index();
- } else {
- setPartition_index((java.lang.Integer) value);
- }
- break;
-
- case DECREE:
- if (value == null) {
- unsetDecree();
- } else {
- setDecree((java.lang.Long) value);
- }
- break;
-
- case SERVER:
- if (value == null) {
- unsetServer();
- } else {
- setServer((java.lang.String) value);
- }
- break;
- }
- }
-
- public java.lang.Object getFieldValue(_Fields field) {
- switch (field) {
- case ERROR:
- return getError();
-
- case CHECK_VALUE_RETURNED:
- return isCheck_value_returned();
-
- case CHECK_VALUE_EXIST:
- return isCheck_value_exist();
-
- case CHECK_VALUE:
- return getCheck_value();
-
- case APP_ID:
- return getApp_id();
-
- case PARTITION_INDEX:
- return getPartition_index();
-
- case DECREE:
- return getDecree();
-
- case SERVER:
- return getServer();
- }
- throw new java.lang.IllegalStateException();
- }
-
- /**
- * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new java.lang.IllegalArgumentException();
- }
-
- switch (field) {
- case ERROR:
- return isSetError();
- case CHECK_VALUE_RETURNED:
- return isSetCheck_value_returned();
- case CHECK_VALUE_EXIST:
- return isSetCheck_value_exist();
- case CHECK_VALUE:
- return isSetCheck_value();
- case APP_ID:
- return isSetApp_id();
- case PARTITION_INDEX:
- return isSetPartition_index();
- case DECREE:
- return isSetDecree();
- case SERVER:
- return isSetServer();
- }
- throw new java.lang.IllegalStateException();
- }
-
- @Override
- public boolean equals(java.lang.Object that) {
- if (that == null) return false;
- if (that instanceof check_and_set_response) return this.equals((check_and_set_response) that);
- return false;
- }
-
- public boolean equals(check_and_set_response that) {
- if (that == null) return false;
- if (this == that) return true;
-
- boolean this_present_error = true;
- boolean that_present_error = true;
- if (this_present_error || that_present_error) {
- if (!(this_present_error && that_present_error)) return false;
- if (this.error != that.error) return false;
- }
-
- boolean this_present_check_value_returned = true;
- boolean that_present_check_value_returned = true;
- if (this_present_check_value_returned || that_present_check_value_returned) {
- if (!(this_present_check_value_returned && that_present_check_value_returned)) return false;
- if (this.check_value_returned != that.check_value_returned) return false;
- }
-
- boolean this_present_check_value_exist = true;
- boolean that_present_check_value_exist = true;
- if (this_present_check_value_exist || that_present_check_value_exist) {
- if (!(this_present_check_value_exist && that_present_check_value_exist)) return false;
- if (this.check_value_exist != that.check_value_exist) return false;
- }
-
- boolean this_present_check_value = true && this.isSetCheck_value();
- boolean that_present_check_value = true && that.isSetCheck_value();
- if (this_present_check_value || that_present_check_value) {
- if (!(this_present_check_value && that_present_check_value)) return false;
- if (!this.check_value.equals(that.check_value)) return false;
- }
-
- boolean this_present_app_id = true;
- boolean that_present_app_id = true;
- if (this_present_app_id || that_present_app_id) {
- if (!(this_present_app_id && that_present_app_id)) return false;
- if (this.app_id != that.app_id) return false;
- }
-
- boolean this_present_partition_index = true;
- boolean that_present_partition_index = true;
- if (this_present_partition_index || that_present_partition_index) {
- if (!(this_present_partition_index && that_present_partition_index)) return false;
- if (this.partition_index != that.partition_index) return false;
- }
-
- boolean this_present_decree = true;
- boolean that_present_decree = true;
- if (this_present_decree || that_present_decree) {
- if (!(this_present_decree && that_present_decree)) return false;
- if (this.decree != that.decree) return false;
- }
-
- boolean this_present_server = true && this.isSetServer();
- boolean that_present_server = true && that.isSetServer();
- if (this_present_server || that_present_server) {
- if (!(this_present_server && that_present_server)) return false;
- if (!this.server.equals(that.server)) return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 1;
-
- hashCode = hashCode * 8191 + error;
-
- hashCode = hashCode * 8191 + ((check_value_returned) ? 131071 : 524287);
-
- hashCode = hashCode * 8191 + ((check_value_exist) ? 131071 : 524287);
-
- hashCode = hashCode * 8191 + ((isSetCheck_value()) ? 131071 : 524287);
- if (isSetCheck_value()) hashCode = hashCode * 8191 + check_value.hashCode();
-
- hashCode = hashCode * 8191 + app_id;
-
- hashCode = hashCode * 8191 + partition_index;
-
- hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(decree);
-
- hashCode = hashCode * 8191 + ((isSetServer()) ? 131071 : 524287);
- if (isSetServer()) hashCode = hashCode * 8191 + server.hashCode();
-
- return hashCode;
- }
-
- @Override
- public int compareTo(check_and_set_response other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = java.lang.Boolean.valueOf(isSetError()).compareTo(other.isSetError());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetError()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.error, other.error);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetCheck_value_returned())
- .compareTo(other.isSetCheck_value_returned());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCheck_value_returned()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(
- this.check_value_returned, other.check_value_returned);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetCheck_value_exist())
- .compareTo(other.isSetCheck_value_exist());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCheck_value_exist()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(this.check_value_exist, other.check_value_exist);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetCheck_value()).compareTo(other.isSetCheck_value());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCheck_value()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.check_value, other.check_value);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetApp_id()).compareTo(other.isSetApp_id());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetApp_id()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.app_id, other.app_id);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetPartition_index()).compareTo(other.isSetPartition_index());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPartition_index()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(this.partition_index, other.partition_index);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetDecree()).compareTo(other.isSetDecree());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDecree()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.decree, other.decree);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetServer()).compareTo(other.isSetServer());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetServer()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.server, other.server);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- scheme(iprot).read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- scheme(oprot).write(oprot, this);
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("check_and_set_response(");
- boolean first = true;
-
- sb.append("error:");
- sb.append(this.error);
- first = false;
- if (!first) sb.append(", ");
- sb.append("check_value_returned:");
- sb.append(this.check_value_returned);
- first = false;
- if (!first) sb.append(", ");
- sb.append("check_value_exist:");
- sb.append(this.check_value_exist);
- first = false;
- if (!first) sb.append(", ");
- sb.append("check_value:");
- if (this.check_value == null) {
- sb.append("null");
- } else {
- sb.append(this.check_value);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("app_id:");
- sb.append(this.app_id);
- first = false;
- if (!first) sb.append(", ");
- sb.append("partition_index:");
- sb.append(this.partition_index);
- first = false;
- if (!first) sb.append(", ");
- sb.append("decree:");
- sb.append(this.decree);
- first = false;
- if (!first) sb.append(", ");
- sb.append("server:");
- if (this.server == null) {
- sb.append("null");
- } else {
- sb.append(this.server);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (check_value != null) {
- check_value.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, java.lang.ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and
- // doesn't call the default constructor.
- __isset_bitfield = 0;
- read(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class check_and_set_responseStandardSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public check_and_set_responseStandardScheme getScheme() {
- return new check_and_set_responseStandardScheme();
- }
- }
-
- private static class check_and_set_responseStandardScheme
- extends org.apache.thrift.scheme.StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, check_and_set_response struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true) {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // ERROR
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.error = iprot.readI32();
- struct.setErrorIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // CHECK_VALUE_RETURNED
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.check_value_returned = iprot.readBool();
- struct.setCheck_value_returnedIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // CHECK_VALUE_EXIST
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.check_value_exist = iprot.readBool();
- struct.setCheck_value_existIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // CHECK_VALUE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.check_value = new blob();
- struct.check_value.read(iprot);
- struct.setCheck_valueIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // APP_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.app_id = iprot.readI32();
- struct.setApp_idIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // PARTITION_INDEX
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.partition_index = iprot.readI32();
- struct.setPartition_indexIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 7: // DECREE
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.decree = iprot.readI64();
- struct.setDecreeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 8: // SERVER
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.server = iprot.readString();
- struct.setServerIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, check_and_set_response struct)
- throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldBegin(ERROR_FIELD_DESC);
- oprot.writeI32(struct.error);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(CHECK_VALUE_RETURNED_FIELD_DESC);
- oprot.writeBool(struct.check_value_returned);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(CHECK_VALUE_EXIST_FIELD_DESC);
- oprot.writeBool(struct.check_value_exist);
- oprot.writeFieldEnd();
- if (struct.check_value != null) {
- oprot.writeFieldBegin(CHECK_VALUE_FIELD_DESC);
- struct.check_value.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(APP_ID_FIELD_DESC);
- oprot.writeI32(struct.app_id);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(PARTITION_INDEX_FIELD_DESC);
- oprot.writeI32(struct.partition_index);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(DECREE_FIELD_DESC);
- oprot.writeI64(struct.decree);
- oprot.writeFieldEnd();
- if (struct.server != null) {
- oprot.writeFieldBegin(SERVER_FIELD_DESC);
- oprot.writeString(struct.server);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
- }
-
- private static class check_and_set_responseTupleSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public check_and_set_responseTupleScheme getScheme() {
- return new check_and_set_responseTupleScheme();
- }
- }
-
- private static class check_and_set_responseTupleScheme
- extends org.apache.thrift.scheme.TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, check_and_set_response struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol oprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet optionals = new java.util.BitSet();
- if (struct.isSetError()) {
- optionals.set(0);
- }
- if (struct.isSetCheck_value_returned()) {
- optionals.set(1);
- }
- if (struct.isSetCheck_value_exist()) {
- optionals.set(2);
- }
- if (struct.isSetCheck_value()) {
- optionals.set(3);
- }
- if (struct.isSetApp_id()) {
- optionals.set(4);
- }
- if (struct.isSetPartition_index()) {
- optionals.set(5);
- }
- if (struct.isSetDecree()) {
- optionals.set(6);
- }
- if (struct.isSetServer()) {
- optionals.set(7);
- }
- oprot.writeBitSet(optionals, 8);
- if (struct.isSetError()) {
- oprot.writeI32(struct.error);
- }
- if (struct.isSetCheck_value_returned()) {
- oprot.writeBool(struct.check_value_returned);
- }
- if (struct.isSetCheck_value_exist()) {
- oprot.writeBool(struct.check_value_exist);
- }
- if (struct.isSetCheck_value()) {
- struct.check_value.write(oprot);
- }
- if (struct.isSetApp_id()) {
- oprot.writeI32(struct.app_id);
- }
- if (struct.isSetPartition_index()) {
- oprot.writeI32(struct.partition_index);
- }
- if (struct.isSetDecree()) {
- oprot.writeI64(struct.decree);
- }
- if (struct.isSetServer()) {
- oprot.writeString(struct.server);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, check_and_set_response struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol iprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(8);
- if (incoming.get(0)) {
- struct.error = iprot.readI32();
- struct.setErrorIsSet(true);
- }
- if (incoming.get(1)) {
- struct.check_value_returned = iprot.readBool();
- struct.setCheck_value_returnedIsSet(true);
- }
- if (incoming.get(2)) {
- struct.check_value_exist = iprot.readBool();
- struct.setCheck_value_existIsSet(true);
- }
- if (incoming.get(3)) {
- struct.check_value = new blob();
- struct.check_value.read(iprot);
- struct.setCheck_valueIsSet(true);
- }
- if (incoming.get(4)) {
- struct.app_id = iprot.readI32();
- struct.setApp_idIsSet(true);
- }
- if (incoming.get(5)) {
- struct.partition_index = iprot.readI32();
- struct.setPartition_indexIsSet(true);
- }
- if (incoming.get(6)) {
- struct.decree = iprot.readI64();
- struct.setDecreeIsSet(true);
- }
- if (incoming.get(7)) {
- struct.server = iprot.readString();
- struct.setServerIsSet(true);
- }
- }
- }
-
- private static S scheme(
- org.apache.thrift.protocol.TProtocol proto) {
- return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
- ? STANDARD_SCHEME_FACTORY
- : TUPLE_SCHEME_FACTORY)
- .getScheme();
- }
-}
diff --git a/java-client/src/main/java/org/apache/pegasus/apps/count_response.java b/java-client/src/main/java/org/apache/pegasus/apps/count_response.java
deleted file mode 100644
index 429f2ff745..0000000000
--- a/java-client/src/main/java/org/apache/pegasus/apps/count_response.java
+++ /dev/null
@@ -1,830 +0,0 @@
-/*
- * 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.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
- */
-package org.apache.pegasus.apps;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(
- value = "Autogenerated by Thrift Compiler (0.11.0)",
- date = "2020-04-13")
-public class count_response
- implements org.apache.thrift.TBase,
- java.io.Serializable,
- Cloneable,
- Comparable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("count_response");
-
- private static final org.apache.thrift.protocol.TField ERROR_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "error", org.apache.thrift.protocol.TType.I32, (short) 1);
- private static final org.apache.thrift.protocol.TField COUNT_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "count", org.apache.thrift.protocol.TType.I64, (short) 2);
- private static final org.apache.thrift.protocol.TField APP_ID_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "app_id", org.apache.thrift.protocol.TType.I32, (short) 3);
- private static final org.apache.thrift.protocol.TField PARTITION_INDEX_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "partition_index", org.apache.thrift.protocol.TType.I32, (short) 4);
- private static final org.apache.thrift.protocol.TField SERVER_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "server", org.apache.thrift.protocol.TType.STRING, (short) 6);
-
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
- new count_responseStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
- new count_responseTupleSchemeFactory();
-
- public int error; // required
- public long count; // required
- public int app_id; // required
- public int partition_index; // required
- public java.lang.String server; // required
-
- /**
- * The set of fields this struct contains, along with convenience methods for finding and
- * manipulating them.
- */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- ERROR((short) 1, "error"),
- COUNT((short) 2, "count"),
- APP_ID((short) 3, "app_id"),
- PARTITION_INDEX((short) 4, "partition_index"),
- SERVER((short) 6, "server");
-
- private static final java.util.Map byName =
- new java.util.HashMap();
-
- static {
- for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /** Find the _Fields constant that matches fieldId, or null if its not found. */
- public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
- case 1: // ERROR
- return ERROR;
- case 2: // COUNT
- return COUNT;
- case 3: // APP_ID
- return APP_ID;
- case 4: // PARTITION_INDEX
- return PARTITION_INDEX;
- case 6: // SERVER
- return SERVER;
- default:
- return null;
- }
- }
-
- /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null)
- throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /** Find the _Fields constant that matches name, or null if its not found. */
- public static _Fields findByName(java.lang.String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final java.lang.String _fieldName;
-
- _Fields(short thriftId, java.lang.String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public java.lang.String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __ERROR_ISSET_ID = 0;
- private static final int __COUNT_ISSET_ID = 1;
- private static final int __APP_ID_ISSET_ID = 2;
- private static final int __PARTITION_INDEX_ISSET_ID = 3;
- private byte __isset_bitfield = 0;
- public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
- static {
- java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(
- _Fields.ERROR,
- new org.apache.thrift.meta_data.FieldMetaData(
- "error",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(
- _Fields.COUNT,
- new org.apache.thrift.meta_data.FieldMetaData(
- "count",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I64)));
- tmpMap.put(
- _Fields.APP_ID,
- new org.apache.thrift.meta_data.FieldMetaData(
- "app_id",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(
- _Fields.PARTITION_INDEX,
- new org.apache.thrift.meta_data.FieldMetaData(
- "partition_index",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(
- _Fields.SERVER,
- new org.apache.thrift.meta_data.FieldMetaData(
- "server",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
- count_response.class, metaDataMap);
- }
-
- public count_response() {}
-
- public count_response(
- int error, long count, int app_id, int partition_index, java.lang.String server) {
- this();
- this.error = error;
- setErrorIsSet(true);
- this.count = count;
- setCountIsSet(true);
- this.app_id = app_id;
- setApp_idIsSet(true);
- this.partition_index = partition_index;
- setPartition_indexIsSet(true);
- this.server = server;
- }
-
- /** Performs a deep copy on other. */
- public count_response(count_response other) {
- __isset_bitfield = other.__isset_bitfield;
- this.error = other.error;
- this.count = other.count;
- this.app_id = other.app_id;
- this.partition_index = other.partition_index;
- if (other.isSetServer()) {
- this.server = other.server;
- }
- }
-
- public count_response deepCopy() {
- return new count_response(this);
- }
-
- @Override
- public void clear() {
- setErrorIsSet(false);
- this.error = 0;
- setCountIsSet(false);
- this.count = 0;
- setApp_idIsSet(false);
- this.app_id = 0;
- setPartition_indexIsSet(false);
- this.partition_index = 0;
- this.server = null;
- }
-
- public int getError() {
- return this.error;
- }
-
- public count_response setError(int error) {
- this.error = error;
- setErrorIsSet(true);
- return this;
- }
-
- public void unsetError() {
- __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ERROR_ISSET_ID);
- }
-
- /** Returns true if field error is set (has been assigned a value) and false otherwise */
- public boolean isSetError() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ERROR_ISSET_ID);
- }
-
- public void setErrorIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ERROR_ISSET_ID, value);
- }
-
- public long getCount() {
- return this.count;
- }
-
- public count_response setCount(long count) {
- this.count = count;
- setCountIsSet(true);
- return this;
- }
-
- public void unsetCount() {
- __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COUNT_ISSET_ID);
- }
-
- /** Returns true if field count is set (has been assigned a value) and false otherwise */
- public boolean isSetCount() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COUNT_ISSET_ID);
- }
-
- public void setCountIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COUNT_ISSET_ID, value);
- }
-
- public int getApp_id() {
- return this.app_id;
- }
-
- public count_response setApp_id(int app_id) {
- this.app_id = app_id;
- setApp_idIsSet(true);
- return this;
- }
-
- public void unsetApp_id() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __APP_ID_ISSET_ID);
- }
-
- /** Returns true if field app_id is set (has been assigned a value) and false otherwise */
- public boolean isSetApp_id() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __APP_ID_ISSET_ID);
- }
-
- public void setApp_idIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __APP_ID_ISSET_ID, value);
- }
-
- public int getPartition_index() {
- return this.partition_index;
- }
-
- public count_response setPartition_index(int partition_index) {
- this.partition_index = partition_index;
- setPartition_indexIsSet(true);
- return this;
- }
-
- public void unsetPartition_index() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PARTITION_INDEX_ISSET_ID);
- }
-
- /**
- * Returns true if field partition_index is set (has been assigned a value) and false otherwise
- */
- public boolean isSetPartition_index() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PARTITION_INDEX_ISSET_ID);
- }
-
- public void setPartition_indexIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PARTITION_INDEX_ISSET_ID, value);
- }
-
- public java.lang.String getServer() {
- return this.server;
- }
-
- public count_response setServer(java.lang.String server) {
- this.server = server;
- return this;
- }
-
- public void unsetServer() {
- this.server = null;
- }
-
- /** Returns true if field server is set (has been assigned a value) and false otherwise */
- public boolean isSetServer() {
- return this.server != null;
- }
-
- public void setServerIsSet(boolean value) {
- if (!value) {
- this.server = null;
- }
- }
-
- public void setFieldValue(_Fields field, java.lang.Object value) {
- switch (field) {
- case ERROR:
- if (value == null) {
- unsetError();
- } else {
- setError((java.lang.Integer) value);
- }
- break;
-
- case COUNT:
- if (value == null) {
- unsetCount();
- } else {
- setCount((java.lang.Long) value);
- }
- break;
-
- case APP_ID:
- if (value == null) {
- unsetApp_id();
- } else {
- setApp_id((java.lang.Integer) value);
- }
- break;
-
- case PARTITION_INDEX:
- if (value == null) {
- unsetPartition_index();
- } else {
- setPartition_index((java.lang.Integer) value);
- }
- break;
-
- case SERVER:
- if (value == null) {
- unsetServer();
- } else {
- setServer((java.lang.String) value);
- }
- break;
- }
- }
-
- public java.lang.Object getFieldValue(_Fields field) {
- switch (field) {
- case ERROR:
- return getError();
-
- case COUNT:
- return getCount();
-
- case APP_ID:
- return getApp_id();
-
- case PARTITION_INDEX:
- return getPartition_index();
-
- case SERVER:
- return getServer();
- }
- throw new java.lang.IllegalStateException();
- }
-
- /**
- * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new java.lang.IllegalArgumentException();
- }
-
- switch (field) {
- case ERROR:
- return isSetError();
- case COUNT:
- return isSetCount();
- case APP_ID:
- return isSetApp_id();
- case PARTITION_INDEX:
- return isSetPartition_index();
- case SERVER:
- return isSetServer();
- }
- throw new java.lang.IllegalStateException();
- }
-
- @Override
- public boolean equals(java.lang.Object that) {
- if (that == null) return false;
- if (that instanceof count_response) return this.equals((count_response) that);
- return false;
- }
-
- public boolean equals(count_response that) {
- if (that == null) return false;
- if (this == that) return true;
-
- boolean this_present_error = true;
- boolean that_present_error = true;
- if (this_present_error || that_present_error) {
- if (!(this_present_error && that_present_error)) return false;
- if (this.error != that.error) return false;
- }
-
- boolean this_present_count = true;
- boolean that_present_count = true;
- if (this_present_count || that_present_count) {
- if (!(this_present_count && that_present_count)) return false;
- if (this.count != that.count) return false;
- }
-
- boolean this_present_app_id = true;
- boolean that_present_app_id = true;
- if (this_present_app_id || that_present_app_id) {
- if (!(this_present_app_id && that_present_app_id)) return false;
- if (this.app_id != that.app_id) return false;
- }
-
- boolean this_present_partition_index = true;
- boolean that_present_partition_index = true;
- if (this_present_partition_index || that_present_partition_index) {
- if (!(this_present_partition_index && that_present_partition_index)) return false;
- if (this.partition_index != that.partition_index) return false;
- }
-
- boolean this_present_server = true && this.isSetServer();
- boolean that_present_server = true && that.isSetServer();
- if (this_present_server || that_present_server) {
- if (!(this_present_server && that_present_server)) return false;
- if (!this.server.equals(that.server)) return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 1;
-
- hashCode = hashCode * 8191 + error;
-
- hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(count);
-
- hashCode = hashCode * 8191 + app_id;
-
- hashCode = hashCode * 8191 + partition_index;
-
- hashCode = hashCode * 8191 + ((isSetServer()) ? 131071 : 524287);
- if (isSetServer()) hashCode = hashCode * 8191 + server.hashCode();
-
- return hashCode;
- }
-
- @Override
- public int compareTo(count_response other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = java.lang.Boolean.valueOf(isSetError()).compareTo(other.isSetError());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetError()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.error, other.error);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetCount()).compareTo(other.isSetCount());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCount()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.count, other.count);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetApp_id()).compareTo(other.isSetApp_id());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetApp_id()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.app_id, other.app_id);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetPartition_index()).compareTo(other.isSetPartition_index());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPartition_index()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(this.partition_index, other.partition_index);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetServer()).compareTo(other.isSetServer());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetServer()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.server, other.server);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- scheme(iprot).read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- scheme(oprot).write(oprot, this);
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("count_response(");
- boolean first = true;
-
- sb.append("error:");
- sb.append(this.error);
- first = false;
- if (!first) sb.append(", ");
- sb.append("count:");
- sb.append(this.count);
- first = false;
- if (!first) sb.append(", ");
- sb.append("app_id:");
- sb.append(this.app_id);
- first = false;
- if (!first) sb.append(", ");
- sb.append("partition_index:");
- sb.append(this.partition_index);
- first = false;
- if (!first) sb.append(", ");
- sb.append("server:");
- if (this.server == null) {
- sb.append("null");
- } else {
- sb.append(this.server);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, java.lang.ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and
- // doesn't call the default constructor.
- __isset_bitfield = 0;
- read(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class count_responseStandardSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public count_responseStandardScheme getScheme() {
- return new count_responseStandardScheme();
- }
- }
-
- private static class count_responseStandardScheme
- extends org.apache.thrift.scheme.StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, count_response struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true) {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // ERROR
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.error = iprot.readI32();
- struct.setErrorIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // COUNT
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.count = iprot.readI64();
- struct.setCountIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // APP_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.app_id = iprot.readI32();
- struct.setApp_idIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // PARTITION_INDEX
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.partition_index = iprot.readI32();
- struct.setPartition_indexIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // SERVER
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.server = iprot.readString();
- struct.setServerIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, count_response struct)
- throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldBegin(ERROR_FIELD_DESC);
- oprot.writeI32(struct.error);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(COUNT_FIELD_DESC);
- oprot.writeI64(struct.count);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(APP_ID_FIELD_DESC);
- oprot.writeI32(struct.app_id);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(PARTITION_INDEX_FIELD_DESC);
- oprot.writeI32(struct.partition_index);
- oprot.writeFieldEnd();
- if (struct.server != null) {
- oprot.writeFieldBegin(SERVER_FIELD_DESC);
- oprot.writeString(struct.server);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
- }
-
- private static class count_responseTupleSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public count_responseTupleScheme getScheme() {
- return new count_responseTupleScheme();
- }
- }
-
- private static class count_responseTupleScheme
- extends org.apache.thrift.scheme.TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, count_response struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol oprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet optionals = new java.util.BitSet();
- if (struct.isSetError()) {
- optionals.set(0);
- }
- if (struct.isSetCount()) {
- optionals.set(1);
- }
- if (struct.isSetApp_id()) {
- optionals.set(2);
- }
- if (struct.isSetPartition_index()) {
- optionals.set(3);
- }
- if (struct.isSetServer()) {
- optionals.set(4);
- }
- oprot.writeBitSet(optionals, 5);
- if (struct.isSetError()) {
- oprot.writeI32(struct.error);
- }
- if (struct.isSetCount()) {
- oprot.writeI64(struct.count);
- }
- if (struct.isSetApp_id()) {
- oprot.writeI32(struct.app_id);
- }
- if (struct.isSetPartition_index()) {
- oprot.writeI32(struct.partition_index);
- }
- if (struct.isSetServer()) {
- oprot.writeString(struct.server);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, count_response struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol iprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(5);
- if (incoming.get(0)) {
- struct.error = iprot.readI32();
- struct.setErrorIsSet(true);
- }
- if (incoming.get(1)) {
- struct.count = iprot.readI64();
- struct.setCountIsSet(true);
- }
- if (incoming.get(2)) {
- struct.app_id = iprot.readI32();
- struct.setApp_idIsSet(true);
- }
- if (incoming.get(3)) {
- struct.partition_index = iprot.readI32();
- struct.setPartition_indexIsSet(true);
- }
- if (incoming.get(4)) {
- struct.server = iprot.readString();
- struct.setServerIsSet(true);
- }
- }
- }
-
- private static S scheme(
- org.apache.thrift.protocol.TProtocol proto) {
- return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
- ? STANDARD_SCHEME_FACTORY
- : TUPLE_SCHEME_FACTORY)
- .getScheme();
- }
-}
diff --git a/java-client/src/main/java/org/apache/pegasus/apps/filter_type.java b/java-client/src/main/java/org/apache/pegasus/apps/filter_type.java
deleted file mode 100644
index f17092888c..0000000000
--- a/java-client/src/main/java/org/apache/pegasus/apps/filter_type.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
- */
-package org.apache.pegasus.apps;
-
-public enum filter_type implements org.apache.thrift.TEnum {
- FT_NO_FILTER(0),
- FT_MATCH_ANYWHERE(1),
- FT_MATCH_PREFIX(2),
- FT_MATCH_POSTFIX(3);
-
- private final int value;
-
- private filter_type(int value) {
- this.value = value;
- }
-
- /** Get the integer value of this enum value, as defined in the Thrift IDL. */
- public int getValue() {
- return value;
- }
-
- /**
- * Find a the enum type by its integer value, as defined in the Thrift IDL.
- *
- * @return null if the value is not found.
- */
- public static filter_type findByValue(int value) {
- switch (value) {
- case 0:
- return FT_NO_FILTER;
- case 1:
- return FT_MATCH_ANYWHERE;
- case 2:
- return FT_MATCH_PREFIX;
- case 3:
- return FT_MATCH_POSTFIX;
- default:
- return null;
- }
- }
-}
diff --git a/java-client/src/main/java/org/apache/pegasus/apps/full_data.java b/java-client/src/main/java/org/apache/pegasus/apps/full_data.java
deleted file mode 100644
index 205b793713..0000000000
--- a/java-client/src/main/java/org/apache/pegasus/apps/full_data.java
+++ /dev/null
@@ -1,644 +0,0 @@
-/*
- * 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.11.0)
- *
- *
DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
- */
-package org.apache.pegasus.apps;
-
-import org.apache.pegasus.base.blob;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(
- value = "Autogenerated by Thrift Compiler (0.11.0)",
- date = "2022-02-12")
-public class full_data
- implements org.apache.thrift.TBase,
- java.io.Serializable,
- Cloneable,
- Comparable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("full_data");
-
- private static final org.apache.thrift.protocol.TField HASH_KEY_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "hash_key", org.apache.thrift.protocol.TType.STRUCT, (short) 1);
- private static final org.apache.thrift.protocol.TField SORT_KEY_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "sort_key", org.apache.thrift.protocol.TType.STRUCT, (short) 2);
- private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "value", org.apache.thrift.protocol.TType.STRUCT, (short) 3);
-
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
- new full_dataStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
- new full_dataTupleSchemeFactory();
-
- public blob hash_key; // required
- public blob sort_key; // required
- public blob value; // required
-
- /**
- * The set of fields this struct contains, along with convenience methods for finding and
- * manipulating them.
- */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- HASH_KEY((short) 1, "hash_key"),
- SORT_KEY((short) 2, "sort_key"),
- VALUE((short) 3, "value");
-
- private static final java.util.Map byName =
- new java.util.HashMap();
-
- static {
- for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /** Find the _Fields constant that matches fieldId, or null if its not found. */
- public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
- case 1: // HASH_KEY
- return HASH_KEY;
- case 2: // SORT_KEY
- return SORT_KEY;
- case 3: // VALUE
- return VALUE;
- default:
- return null;
- }
- }
-
- /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null)
- throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /** Find the _Fields constant that matches name, or null if its not found. */
- public static _Fields findByName(java.lang.String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final java.lang.String _fieldName;
-
- _Fields(short thriftId, java.lang.String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public java.lang.String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
- static {
- java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(
- _Fields.HASH_KEY,
- new org.apache.thrift.meta_data.FieldMetaData(
- "hash_key",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- tmpMap.put(
- _Fields.SORT_KEY,
- new org.apache.thrift.meta_data.FieldMetaData(
- "sort_key",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- tmpMap.put(
- _Fields.VALUE,
- new org.apache.thrift.meta_data.FieldMetaData(
- "value",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(full_data.class, metaDataMap);
- }
-
- public full_data() {}
-
- public full_data(blob hash_key, blob sort_key, blob value) {
- this();
- this.hash_key = hash_key;
- this.sort_key = sort_key;
- this.value = value;
- }
-
- /** Performs a deep copy on other. */
- public full_data(full_data other) {
- if (other.isSetHash_key()) {
- this.hash_key = new blob(other.hash_key);
- }
- if (other.isSetSort_key()) {
- this.sort_key = new blob(other.sort_key);
- }
- if (other.isSetValue()) {
- this.value = new blob(other.value);
- }
- }
-
- public full_data deepCopy() {
- return new full_data(this);
- }
-
- @Override
- public void clear() {
- this.hash_key = null;
- this.sort_key = null;
- this.value = null;
- }
-
- public blob getHash_key() {
- return this.hash_key;
- }
-
- public full_data setHash_key(blob hash_key) {
- this.hash_key = hash_key;
- return this;
- }
-
- public void unsetHash_key() {
- this.hash_key = null;
- }
-
- /** Returns true if field hash_key is set (has been assigned a value) and false otherwise */
- public boolean isSetHash_key() {
- return this.hash_key != null;
- }
-
- public void setHash_keyIsSet(boolean value) {
- if (!value) {
- this.hash_key = null;
- }
- }
-
- public blob getSort_key() {
- return this.sort_key;
- }
-
- public full_data setSort_key(blob sort_key) {
- this.sort_key = sort_key;
- return this;
- }
-
- public void unsetSort_key() {
- this.sort_key = null;
- }
-
- /** Returns true if field sort_key is set (has been assigned a value) and false otherwise */
- public boolean isSetSort_key() {
- return this.sort_key != null;
- }
-
- public void setSort_keyIsSet(boolean value) {
- if (!value) {
- this.sort_key = null;
- }
- }
-
- public blob getValue() {
- return this.value;
- }
-
- public full_data setValue(blob value) {
- this.value = value;
- return this;
- }
-
- public void unsetValue() {
- this.value = null;
- }
-
- /** Returns true if field value is set (has been assigned a value) and false otherwise */
- public boolean isSetValue() {
- return this.value != null;
- }
-
- public void setValueIsSet(boolean value) {
- if (!value) {
- this.value = null;
- }
- }
-
- public void setFieldValue(_Fields field, java.lang.Object value) {
- switch (field) {
- case HASH_KEY:
- if (value == null) {
- unsetHash_key();
- } else {
- setHash_key((blob) value);
- }
- break;
-
- case SORT_KEY:
- if (value == null) {
- unsetSort_key();
- } else {
- setSort_key((blob) value);
- }
- break;
-
- case VALUE:
- if (value == null) {
- unsetValue();
- } else {
- setValue((blob) value);
- }
- break;
- }
- }
-
- public java.lang.Object getFieldValue(_Fields field) {
- switch (field) {
- case HASH_KEY:
- return getHash_key();
-
- case SORT_KEY:
- return getSort_key();
-
- case VALUE:
- return getValue();
- }
- throw new java.lang.IllegalStateException();
- }
-
- /**
- * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new java.lang.IllegalArgumentException();
- }
-
- switch (field) {
- case HASH_KEY:
- return isSetHash_key();
- case SORT_KEY:
- return isSetSort_key();
- case VALUE:
- return isSetValue();
- }
- throw new java.lang.IllegalStateException();
- }
-
- @Override
- public boolean equals(java.lang.Object that) {
- if (that == null) return false;
- if (that instanceof full_data) return this.equals((full_data) that);
- return false;
- }
-
- public boolean equals(full_data that) {
- if (that == null) return false;
- if (this == that) return true;
-
- boolean this_present_hash_key = true && this.isSetHash_key();
- boolean that_present_hash_key = true && that.isSetHash_key();
- if (this_present_hash_key || that_present_hash_key) {
- if (!(this_present_hash_key && that_present_hash_key)) return false;
- if (!this.hash_key.equals(that.hash_key)) return false;
- }
-
- boolean this_present_sort_key = true && this.isSetSort_key();
- boolean that_present_sort_key = true && that.isSetSort_key();
- if (this_present_sort_key || that_present_sort_key) {
- if (!(this_present_sort_key && that_present_sort_key)) return false;
- if (!this.sort_key.equals(that.sort_key)) return false;
- }
-
- boolean this_present_value = true && this.isSetValue();
- boolean that_present_value = true && that.isSetValue();
- if (this_present_value || that_present_value) {
- if (!(this_present_value && that_present_value)) return false;
- if (!this.value.equals(that.value)) return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 1;
-
- hashCode = hashCode * 8191 + ((isSetHash_key()) ? 131071 : 524287);
- if (isSetHash_key()) hashCode = hashCode * 8191 + hash_key.hashCode();
-
- hashCode = hashCode * 8191 + ((isSetSort_key()) ? 131071 : 524287);
- if (isSetSort_key()) hashCode = hashCode * 8191 + sort_key.hashCode();
-
- hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287);
- if (isSetValue()) hashCode = hashCode * 8191 + value.hashCode();
-
- return hashCode;
- }
-
- @Override
- public int compareTo(full_data other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = java.lang.Boolean.valueOf(isSetHash_key()).compareTo(other.isSetHash_key());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetHash_key()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hash_key, other.hash_key);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetSort_key()).compareTo(other.isSetSort_key());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSort_key()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sort_key, other.sort_key);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetValue()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- scheme(iprot).read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- scheme(oprot).write(oprot, this);
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("full_data(");
- boolean first = true;
-
- sb.append("hash_key:");
- if (this.hash_key == null) {
- sb.append("null");
- } else {
- sb.append(this.hash_key);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("sort_key:");
- if (this.sort_key == null) {
- sb.append("null");
- } else {
- sb.append(this.sort_key);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("value:");
- if (this.value == null) {
- sb.append("null");
- } else {
- sb.append(this.value);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (hash_key != null) {
- hash_key.validate();
- }
- if (sort_key != null) {
- sort_key.validate();
- }
- if (value != null) {
- value.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, java.lang.ClassNotFoundException {
- try {
- read(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class full_dataStandardSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public full_dataStandardScheme getScheme() {
- return new full_dataStandardScheme();
- }
- }
-
- private static class full_dataStandardScheme
- extends org.apache.thrift.scheme.StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, full_data struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true) {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // HASH_KEY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.hash_key = new blob();
- struct.hash_key.read(iprot);
- struct.setHash_keyIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // SORT_KEY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.sort_key = new blob();
- struct.sort_key.read(iprot);
- struct.setSort_keyIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // VALUE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.value = new blob();
- struct.value.read(iprot);
- struct.setValueIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, full_data struct)
- throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.hash_key != null) {
- oprot.writeFieldBegin(HASH_KEY_FIELD_DESC);
- struct.hash_key.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.sort_key != null) {
- oprot.writeFieldBegin(SORT_KEY_FIELD_DESC);
- struct.sort_key.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.value != null) {
- oprot.writeFieldBegin(VALUE_FIELD_DESC);
- struct.value.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
- }
-
- private static class full_dataTupleSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public full_dataTupleScheme getScheme() {
- return new full_dataTupleScheme();
- }
- }
-
- private static class full_dataTupleScheme
- extends org.apache.thrift.scheme.TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, full_data struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol oprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet optionals = new java.util.BitSet();
- if (struct.isSetHash_key()) {
- optionals.set(0);
- }
- if (struct.isSetSort_key()) {
- optionals.set(1);
- }
- if (struct.isSetValue()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetHash_key()) {
- struct.hash_key.write(oprot);
- }
- if (struct.isSetSort_key()) {
- struct.sort_key.write(oprot);
- }
- if (struct.isSetValue()) {
- struct.value.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, full_data struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol iprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(3);
- if (incoming.get(0)) {
- struct.hash_key = new blob();
- struct.hash_key.read(iprot);
- struct.setHash_keyIsSet(true);
- }
- if (incoming.get(1)) {
- struct.sort_key = new blob();
- struct.sort_key.read(iprot);
- struct.setSort_keyIsSet(true);
- }
- if (incoming.get(2)) {
- struct.value = new blob();
- struct.value.read(iprot);
- struct.setValueIsSet(true);
- }
- }
- }
-
- private static S scheme(
- org.apache.thrift.protocol.TProtocol proto) {
- return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
- ? STANDARD_SCHEME_FACTORY
- : TUPLE_SCHEME_FACTORY)
- .getScheme();
- }
-}
diff --git a/java-client/src/main/java/org/apache/pegasus/apps/full_key.java b/java-client/src/main/java/org/apache/pegasus/apps/full_key.java
deleted file mode 100644
index cc8d0ab4ee..0000000000
--- a/java-client/src/main/java/org/apache/pegasus/apps/full_key.java
+++ /dev/null
@@ -1,531 +0,0 @@
-/*
- * 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.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
- */
-package org.apache.pegasus.apps;
-
-import org.apache.pegasus.base.blob;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(
- value = "Autogenerated by Thrift Compiler (0.11.0)",
- date = "2022-02-12")
-public class full_key
- implements org.apache.thrift.TBase,
- java.io.Serializable,
- Cloneable,
- Comparable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("full_key");
-
- private static final org.apache.thrift.protocol.TField HASH_KEY_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "hash_key", org.apache.thrift.protocol.TType.STRUCT, (short) 1);
- private static final org.apache.thrift.protocol.TField SORT_KEY_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "sort_key", org.apache.thrift.protocol.TType.STRUCT, (short) 2);
-
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
- new full_keyStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
- new full_keyTupleSchemeFactory();
-
- public blob hash_key; // required
- public blob sort_key; // required
-
- /**
- * The set of fields this struct contains, along with convenience methods for finding and
- * manipulating them.
- */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- HASH_KEY((short) 1, "hash_key"),
- SORT_KEY((short) 2, "sort_key");
-
- private static final java.util.Map byName =
- new java.util.HashMap();
-
- static {
- for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /** Find the _Fields constant that matches fieldId, or null if its not found. */
- public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
- case 1: // HASH_KEY
- return HASH_KEY;
- case 2: // SORT_KEY
- return SORT_KEY;
- default:
- return null;
- }
- }
-
- /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null)
- throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /** Find the _Fields constant that matches name, or null if its not found. */
- public static _Fields findByName(java.lang.String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final java.lang.String _fieldName;
-
- _Fields(short thriftId, java.lang.String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public java.lang.String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
- static {
- java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(
- _Fields.HASH_KEY,
- new org.apache.thrift.meta_data.FieldMetaData(
- "hash_key",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- tmpMap.put(
- _Fields.SORT_KEY,
- new org.apache.thrift.meta_data.FieldMetaData(
- "sort_key",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(full_key.class, metaDataMap);
- }
-
- public full_key() {}
-
- public full_key(blob hash_key, blob sort_key) {
- this();
- this.hash_key = hash_key;
- this.sort_key = sort_key;
- }
-
- /** Performs a deep copy on other. */
- public full_key(full_key other) {
- if (other.isSetHash_key()) {
- this.hash_key = new blob(other.hash_key);
- }
- if (other.isSetSort_key()) {
- this.sort_key = new blob(other.sort_key);
- }
- }
-
- public full_key deepCopy() {
- return new full_key(this);
- }
-
- @Override
- public void clear() {
- this.hash_key = null;
- this.sort_key = null;
- }
-
- public blob getHash_key() {
- return this.hash_key;
- }
-
- public full_key setHash_key(blob hash_key) {
- this.hash_key = hash_key;
- return this;
- }
-
- public void unsetHash_key() {
- this.hash_key = null;
- }
-
- /** Returns true if field hash_key is set (has been assigned a value) and false otherwise */
- public boolean isSetHash_key() {
- return this.hash_key != null;
- }
-
- public void setHash_keyIsSet(boolean value) {
- if (!value) {
- this.hash_key = null;
- }
- }
-
- public blob getSort_key() {
- return this.sort_key;
- }
-
- public full_key setSort_key(blob sort_key) {
- this.sort_key = sort_key;
- return this;
- }
-
- public void unsetSort_key() {
- this.sort_key = null;
- }
-
- /** Returns true if field sort_key is set (has been assigned a value) and false otherwise */
- public boolean isSetSort_key() {
- return this.sort_key != null;
- }
-
- public void setSort_keyIsSet(boolean value) {
- if (!value) {
- this.sort_key = null;
- }
- }
-
- public void setFieldValue(_Fields field, java.lang.Object value) {
- switch (field) {
- case HASH_KEY:
- if (value == null) {
- unsetHash_key();
- } else {
- setHash_key((blob) value);
- }
- break;
-
- case SORT_KEY:
- if (value == null) {
- unsetSort_key();
- } else {
- setSort_key((blob) value);
- }
- break;
- }
- }
-
- public java.lang.Object getFieldValue(_Fields field) {
- switch (field) {
- case HASH_KEY:
- return getHash_key();
-
- case SORT_KEY:
- return getSort_key();
- }
- throw new java.lang.IllegalStateException();
- }
-
- /**
- * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new java.lang.IllegalArgumentException();
- }
-
- switch (field) {
- case HASH_KEY:
- return isSetHash_key();
- case SORT_KEY:
- return isSetSort_key();
- }
- throw new java.lang.IllegalStateException();
- }
-
- @Override
- public boolean equals(java.lang.Object that) {
- if (that == null) return false;
- if (that instanceof full_key) return this.equals((full_key) that);
- return false;
- }
-
- public boolean equals(full_key that) {
- if (that == null) return false;
- if (this == that) return true;
-
- boolean this_present_hash_key = true && this.isSetHash_key();
- boolean that_present_hash_key = true && that.isSetHash_key();
- if (this_present_hash_key || that_present_hash_key) {
- if (!(this_present_hash_key && that_present_hash_key)) return false;
- if (!this.hash_key.equals(that.hash_key)) return false;
- }
-
- boolean this_present_sort_key = true && this.isSetSort_key();
- boolean that_present_sort_key = true && that.isSetSort_key();
- if (this_present_sort_key || that_present_sort_key) {
- if (!(this_present_sort_key && that_present_sort_key)) return false;
- if (!this.sort_key.equals(that.sort_key)) return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 1;
-
- hashCode = hashCode * 8191 + ((isSetHash_key()) ? 131071 : 524287);
- if (isSetHash_key()) hashCode = hashCode * 8191 + hash_key.hashCode();
-
- hashCode = hashCode * 8191 + ((isSetSort_key()) ? 131071 : 524287);
- if (isSetSort_key()) hashCode = hashCode * 8191 + sort_key.hashCode();
-
- return hashCode;
- }
-
- @Override
- public int compareTo(full_key other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = java.lang.Boolean.valueOf(isSetHash_key()).compareTo(other.isSetHash_key());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetHash_key()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hash_key, other.hash_key);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetSort_key()).compareTo(other.isSetSort_key());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSort_key()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sort_key, other.sort_key);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- scheme(iprot).read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- scheme(oprot).write(oprot, this);
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("full_key(");
- boolean first = true;
-
- sb.append("hash_key:");
- if (this.hash_key == null) {
- sb.append("null");
- } else {
- sb.append(this.hash_key);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("sort_key:");
- if (this.sort_key == null) {
- sb.append("null");
- } else {
- sb.append(this.sort_key);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (hash_key != null) {
- hash_key.validate();
- }
- if (sort_key != null) {
- sort_key.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, java.lang.ClassNotFoundException {
- try {
- read(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class full_keyStandardSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public full_keyStandardScheme getScheme() {
- return new full_keyStandardScheme();
- }
- }
-
- private static class full_keyStandardScheme
- extends org.apache.thrift.scheme.StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, full_key struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true) {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // HASH_KEY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.hash_key = new blob();
- struct.hash_key.read(iprot);
- struct.setHash_keyIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // SORT_KEY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.sort_key = new blob();
- struct.sort_key.read(iprot);
- struct.setSort_keyIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, full_key struct)
- throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.hash_key != null) {
- oprot.writeFieldBegin(HASH_KEY_FIELD_DESC);
- struct.hash_key.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.sort_key != null) {
- oprot.writeFieldBegin(SORT_KEY_FIELD_DESC);
- struct.sort_key.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
- }
-
- private static class full_keyTupleSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public full_keyTupleScheme getScheme() {
- return new full_keyTupleScheme();
- }
- }
-
- private static class full_keyTupleScheme extends org.apache.thrift.scheme.TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, full_key struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol oprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet optionals = new java.util.BitSet();
- if (struct.isSetHash_key()) {
- optionals.set(0);
- }
- if (struct.isSetSort_key()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetHash_key()) {
- struct.hash_key.write(oprot);
- }
- if (struct.isSetSort_key()) {
- struct.sort_key.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, full_key struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol iprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.hash_key = new blob();
- struct.hash_key.read(iprot);
- struct.setHash_keyIsSet(true);
- }
- if (incoming.get(1)) {
- struct.sort_key = new blob();
- struct.sort_key.read(iprot);
- struct.setSort_keyIsSet(true);
- }
- }
- }
-
- private static S scheme(
- org.apache.thrift.protocol.TProtocol proto) {
- return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
- ? STANDARD_SCHEME_FACTORY
- : TUPLE_SCHEME_FACTORY)
- .getScheme();
- }
-}
diff --git a/java-client/src/main/java/org/apache/pegasus/apps/get_scanner_request.java b/java-client/src/main/java/org/apache/pegasus/apps/get_scanner_request.java
deleted file mode 100644
index 078f1907a8..0000000000
--- a/java-client/src/main/java/org/apache/pegasus/apps/get_scanner_request.java
+++ /dev/null
@@ -1,1772 +0,0 @@
-/*
- * 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.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
- */
-package org.apache.pegasus.apps;
-
-import org.apache.pegasus.base.blob;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(
- value = "Autogenerated by Thrift Compiler (0.11.0)",
- date = "2021-10-15")
-public class get_scanner_request
- implements org.apache.thrift.TBase,
- java.io.Serializable,
- Cloneable,
- Comparable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("get_scanner_request");
-
- private static final org.apache.thrift.protocol.TField START_KEY_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "start_key", org.apache.thrift.protocol.TType.STRUCT, (short) 1);
- private static final org.apache.thrift.protocol.TField STOP_KEY_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "stop_key", org.apache.thrift.protocol.TType.STRUCT, (short) 2);
- private static final org.apache.thrift.protocol.TField START_INCLUSIVE_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "start_inclusive", org.apache.thrift.protocol.TType.BOOL, (short) 3);
- private static final org.apache.thrift.protocol.TField STOP_INCLUSIVE_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "stop_inclusive", org.apache.thrift.protocol.TType.BOOL, (short) 4);
- private static final org.apache.thrift.protocol.TField BATCH_SIZE_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "batch_size", org.apache.thrift.protocol.TType.I32, (short) 5);
- private static final org.apache.thrift.protocol.TField NO_VALUE_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "no_value", org.apache.thrift.protocol.TType.BOOL, (short) 6);
- private static final org.apache.thrift.protocol.TField HASH_KEY_FILTER_TYPE_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "hash_key_filter_type", org.apache.thrift.protocol.TType.I32, (short) 7);
- private static final org.apache.thrift.protocol.TField HASH_KEY_FILTER_PATTERN_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "hash_key_filter_pattern", org.apache.thrift.protocol.TType.STRUCT, (short) 8);
- private static final org.apache.thrift.protocol.TField SORT_KEY_FILTER_TYPE_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "sort_key_filter_type", org.apache.thrift.protocol.TType.I32, (short) 9);
- private static final org.apache.thrift.protocol.TField SORT_KEY_FILTER_PATTERN_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "sort_key_filter_pattern", org.apache.thrift.protocol.TType.STRUCT, (short) 10);
- private static final org.apache.thrift.protocol.TField NEED_CHECK_HASH_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "need_check_hash", org.apache.thrift.protocol.TType.BOOL, (short) 11);
- private static final org.apache.thrift.protocol.TField RETURN_EXPIRE_TS_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "return_expire_ts", org.apache.thrift.protocol.TType.BOOL, (short) 12);
- private static final org.apache.thrift.protocol.TField FULL_SCAN_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "full_scan", org.apache.thrift.protocol.TType.BOOL, (short) 13);
-
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
- new get_scanner_requestStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
- new get_scanner_requestTupleSchemeFactory();
-
- public blob start_key; // required
- public blob stop_key; // required
- public boolean start_inclusive; // required
- public boolean stop_inclusive; // required
- public int batch_size; // required
- public boolean no_value; // required
- /** @see filter_type */
- public filter_type hash_key_filter_type; // required
-
- public blob hash_key_filter_pattern; // required
- /** @see filter_type */
- public filter_type sort_key_filter_type; // required
-
- public blob sort_key_filter_pattern; // required
- public boolean need_check_hash; // optional
- public boolean return_expire_ts; // optional
- public boolean full_scan; // optional
-
- /**
- * The set of fields this struct contains, along with convenience methods for finding and
- * manipulating them.
- */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- START_KEY((short) 1, "start_key"),
- STOP_KEY((short) 2, "stop_key"),
- START_INCLUSIVE((short) 3, "start_inclusive"),
- STOP_INCLUSIVE((short) 4, "stop_inclusive"),
- BATCH_SIZE((short) 5, "batch_size"),
- NO_VALUE((short) 6, "no_value"),
- /** @see filter_type */
- HASH_KEY_FILTER_TYPE((short) 7, "hash_key_filter_type"),
- HASH_KEY_FILTER_PATTERN((short) 8, "hash_key_filter_pattern"),
- /** @see filter_type */
- SORT_KEY_FILTER_TYPE((short) 9, "sort_key_filter_type"),
- SORT_KEY_FILTER_PATTERN((short) 10, "sort_key_filter_pattern"),
- NEED_CHECK_HASH((short) 11, "need_check_hash"),
- RETURN_EXPIRE_TS((short) 12, "return_expire_ts"),
- FULL_SCAN((short) 13, "full_scan");
-
- private static final java.util.Map byName =
- new java.util.HashMap();
-
- static {
- for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /** Find the _Fields constant that matches fieldId, or null if its not found. */
- public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
- case 1: // START_KEY
- return START_KEY;
- case 2: // STOP_KEY
- return STOP_KEY;
- case 3: // START_INCLUSIVE
- return START_INCLUSIVE;
- case 4: // STOP_INCLUSIVE
- return STOP_INCLUSIVE;
- case 5: // BATCH_SIZE
- return BATCH_SIZE;
- case 6: // NO_VALUE
- return NO_VALUE;
- case 7: // HASH_KEY_FILTER_TYPE
- return HASH_KEY_FILTER_TYPE;
- case 8: // HASH_KEY_FILTER_PATTERN
- return HASH_KEY_FILTER_PATTERN;
- case 9: // SORT_KEY_FILTER_TYPE
- return SORT_KEY_FILTER_TYPE;
- case 10: // SORT_KEY_FILTER_PATTERN
- return SORT_KEY_FILTER_PATTERN;
- case 11: // NEED_CHECK_HASH
- return NEED_CHECK_HASH;
- case 12: // RETURN_EXPIRE_TS
- return RETURN_EXPIRE_TS;
- case 13: // FULL_SCAN
- return FULL_SCAN;
- default:
- return null;
- }
- }
-
- /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null)
- throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /** Find the _Fields constant that matches name, or null if its not found. */
- public static _Fields findByName(java.lang.String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final java.lang.String _fieldName;
-
- _Fields(short thriftId, java.lang.String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public java.lang.String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __START_INCLUSIVE_ISSET_ID = 0;
- private static final int __STOP_INCLUSIVE_ISSET_ID = 1;
- private static final int __BATCH_SIZE_ISSET_ID = 2;
- private static final int __NO_VALUE_ISSET_ID = 3;
- private static final int __NEED_CHECK_HASH_ISSET_ID = 4;
- private static final int __RETURN_EXPIRE_TS_ISSET_ID = 5;
- private static final int __FULL_SCAN_ISSET_ID = 6;
- private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {
- _Fields.NEED_CHECK_HASH, _Fields.RETURN_EXPIRE_TS, _Fields.FULL_SCAN
- };
- public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
- static {
- java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(
- _Fields.START_KEY,
- new org.apache.thrift.meta_data.FieldMetaData(
- "start_key",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- tmpMap.put(
- _Fields.STOP_KEY,
- new org.apache.thrift.meta_data.FieldMetaData(
- "stop_key",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- tmpMap.put(
- _Fields.START_INCLUSIVE,
- new org.apache.thrift.meta_data.FieldMetaData(
- "start_inclusive",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(
- _Fields.STOP_INCLUSIVE,
- new org.apache.thrift.meta_data.FieldMetaData(
- "stop_inclusive",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(
- _Fields.BATCH_SIZE,
- new org.apache.thrift.meta_data.FieldMetaData(
- "batch_size",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(
- _Fields.NO_VALUE,
- new org.apache.thrift.meta_data.FieldMetaData(
- "no_value",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(
- _Fields.HASH_KEY_FILTER_TYPE,
- new org.apache.thrift.meta_data.FieldMetaData(
- "hash_key_filter_type",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.EnumMetaData(
- org.apache.thrift.protocol.TType.ENUM, filter_type.class)));
- tmpMap.put(
- _Fields.HASH_KEY_FILTER_PATTERN,
- new org.apache.thrift.meta_data.FieldMetaData(
- "hash_key_filter_pattern",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- tmpMap.put(
- _Fields.SORT_KEY_FILTER_TYPE,
- new org.apache.thrift.meta_data.FieldMetaData(
- "sort_key_filter_type",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.EnumMetaData(
- org.apache.thrift.protocol.TType.ENUM, filter_type.class)));
- tmpMap.put(
- _Fields.SORT_KEY_FILTER_PATTERN,
- new org.apache.thrift.meta_data.FieldMetaData(
- "sort_key_filter_pattern",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- tmpMap.put(
- _Fields.NEED_CHECK_HASH,
- new org.apache.thrift.meta_data.FieldMetaData(
- "need_check_hash",
- org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(
- _Fields.RETURN_EXPIRE_TS,
- new org.apache.thrift.meta_data.FieldMetaData(
- "return_expire_ts",
- org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(
- _Fields.FULL_SCAN,
- new org.apache.thrift.meta_data.FieldMetaData(
- "full_scan",
- org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
- get_scanner_request.class, metaDataMap);
- }
-
- public get_scanner_request() {}
-
- public get_scanner_request(
- blob start_key,
- blob stop_key,
- boolean start_inclusive,
- boolean stop_inclusive,
- int batch_size,
- boolean no_value,
- filter_type hash_key_filter_type,
- blob hash_key_filter_pattern,
- filter_type sort_key_filter_type,
- blob sort_key_filter_pattern) {
- this();
- this.start_key = start_key;
- this.stop_key = stop_key;
- this.start_inclusive = start_inclusive;
- setStart_inclusiveIsSet(true);
- this.stop_inclusive = stop_inclusive;
- setStop_inclusiveIsSet(true);
- this.batch_size = batch_size;
- setBatch_sizeIsSet(true);
- this.no_value = no_value;
- setNo_valueIsSet(true);
- this.hash_key_filter_type = hash_key_filter_type;
- this.hash_key_filter_pattern = hash_key_filter_pattern;
- this.sort_key_filter_type = sort_key_filter_type;
- this.sort_key_filter_pattern = sort_key_filter_pattern;
- }
-
- /** Performs a deep copy on other. */
- public get_scanner_request(get_scanner_request other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetStart_key()) {
- this.start_key = new blob(other.start_key);
- }
- if (other.isSetStop_key()) {
- this.stop_key = new blob(other.stop_key);
- }
- this.start_inclusive = other.start_inclusive;
- this.stop_inclusive = other.stop_inclusive;
- this.batch_size = other.batch_size;
- this.no_value = other.no_value;
- if (other.isSetHash_key_filter_type()) {
- this.hash_key_filter_type = other.hash_key_filter_type;
- }
- if (other.isSetHash_key_filter_pattern()) {
- this.hash_key_filter_pattern = new blob(other.hash_key_filter_pattern);
- }
- if (other.isSetSort_key_filter_type()) {
- this.sort_key_filter_type = other.sort_key_filter_type;
- }
- if (other.isSetSort_key_filter_pattern()) {
- this.sort_key_filter_pattern = new blob(other.sort_key_filter_pattern);
- }
- this.need_check_hash = other.need_check_hash;
- this.return_expire_ts = other.return_expire_ts;
- this.full_scan = other.full_scan;
- }
-
- public get_scanner_request deepCopy() {
- return new get_scanner_request(this);
- }
-
- @Override
- public void clear() {
- this.start_key = null;
- this.stop_key = null;
- setStart_inclusiveIsSet(false);
- this.start_inclusive = false;
- setStop_inclusiveIsSet(false);
- this.stop_inclusive = false;
- setBatch_sizeIsSet(false);
- this.batch_size = 0;
- setNo_valueIsSet(false);
- this.no_value = false;
- this.hash_key_filter_type = null;
- this.hash_key_filter_pattern = null;
- this.sort_key_filter_type = null;
- this.sort_key_filter_pattern = null;
- setNeed_check_hashIsSet(false);
- this.need_check_hash = false;
- setReturn_expire_tsIsSet(false);
- this.return_expire_ts = false;
- setFull_scanIsSet(false);
- this.full_scan = false;
- }
-
- public blob getStart_key() {
- return this.start_key;
- }
-
- public get_scanner_request setStart_key(blob start_key) {
- this.start_key = start_key;
- return this;
- }
-
- public void unsetStart_key() {
- this.start_key = null;
- }
-
- /** Returns true if field start_key is set (has been assigned a value) and false otherwise */
- public boolean isSetStart_key() {
- return this.start_key != null;
- }
-
- public void setStart_keyIsSet(boolean value) {
- if (!value) {
- this.start_key = null;
- }
- }
-
- public blob getStop_key() {
- return this.stop_key;
- }
-
- public get_scanner_request setStop_key(blob stop_key) {
- this.stop_key = stop_key;
- return this;
- }
-
- public void unsetStop_key() {
- this.stop_key = null;
- }
-
- /** Returns true if field stop_key is set (has been assigned a value) and false otherwise */
- public boolean isSetStop_key() {
- return this.stop_key != null;
- }
-
- public void setStop_keyIsSet(boolean value) {
- if (!value) {
- this.stop_key = null;
- }
- }
-
- public boolean isStart_inclusive() {
- return this.start_inclusive;
- }
-
- public get_scanner_request setStart_inclusive(boolean start_inclusive) {
- this.start_inclusive = start_inclusive;
- setStart_inclusiveIsSet(true);
- return this;
- }
-
- public void unsetStart_inclusive() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __START_INCLUSIVE_ISSET_ID);
- }
-
- /**
- * Returns true if field start_inclusive is set (has been assigned a value) and false otherwise
- */
- public boolean isSetStart_inclusive() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __START_INCLUSIVE_ISSET_ID);
- }
-
- public void setStart_inclusiveIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __START_INCLUSIVE_ISSET_ID, value);
- }
-
- public boolean isStop_inclusive() {
- return this.stop_inclusive;
- }
-
- public get_scanner_request setStop_inclusive(boolean stop_inclusive) {
- this.stop_inclusive = stop_inclusive;
- setStop_inclusiveIsSet(true);
- return this;
- }
-
- public void unsetStop_inclusive() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STOP_INCLUSIVE_ISSET_ID);
- }
-
- /** Returns true if field stop_inclusive is set (has been assigned a value) and false otherwise */
- public boolean isSetStop_inclusive() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STOP_INCLUSIVE_ISSET_ID);
- }
-
- public void setStop_inclusiveIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STOP_INCLUSIVE_ISSET_ID, value);
- }
-
- public int getBatch_size() {
- return this.batch_size;
- }
-
- public get_scanner_request setBatch_size(int batch_size) {
- this.batch_size = batch_size;
- setBatch_sizeIsSet(true);
- return this;
- }
-
- public void unsetBatch_size() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BATCH_SIZE_ISSET_ID);
- }
-
- /** Returns true if field batch_size is set (has been assigned a value) and false otherwise */
- public boolean isSetBatch_size() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BATCH_SIZE_ISSET_ID);
- }
-
- public void setBatch_sizeIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BATCH_SIZE_ISSET_ID, value);
- }
-
- public boolean isNo_value() {
- return this.no_value;
- }
-
- public get_scanner_request setNo_value(boolean no_value) {
- this.no_value = no_value;
- setNo_valueIsSet(true);
- return this;
- }
-
- public void unsetNo_value() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NO_VALUE_ISSET_ID);
- }
-
- /** Returns true if field no_value is set (has been assigned a value) and false otherwise */
- public boolean isSetNo_value() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NO_VALUE_ISSET_ID);
- }
-
- public void setNo_valueIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NO_VALUE_ISSET_ID, value);
- }
-
- /** @see filter_type */
- public filter_type getHash_key_filter_type() {
- return this.hash_key_filter_type;
- }
-
- /** @see filter_type */
- public get_scanner_request setHash_key_filter_type(filter_type hash_key_filter_type) {
- this.hash_key_filter_type = hash_key_filter_type;
- return this;
- }
-
- public void unsetHash_key_filter_type() {
- this.hash_key_filter_type = null;
- }
-
- /**
- * Returns true if field hash_key_filter_type is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSetHash_key_filter_type() {
- return this.hash_key_filter_type != null;
- }
-
- public void setHash_key_filter_typeIsSet(boolean value) {
- if (!value) {
- this.hash_key_filter_type = null;
- }
- }
-
- public blob getHash_key_filter_pattern() {
- return this.hash_key_filter_pattern;
- }
-
- public get_scanner_request setHash_key_filter_pattern(blob hash_key_filter_pattern) {
- this.hash_key_filter_pattern = hash_key_filter_pattern;
- return this;
- }
-
- public void unsetHash_key_filter_pattern() {
- this.hash_key_filter_pattern = null;
- }
-
- /**
- * Returns true if field hash_key_filter_pattern is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSetHash_key_filter_pattern() {
- return this.hash_key_filter_pattern != null;
- }
-
- public void setHash_key_filter_patternIsSet(boolean value) {
- if (!value) {
- this.hash_key_filter_pattern = null;
- }
- }
-
- /** @see filter_type */
- public filter_type getSort_key_filter_type() {
- return this.sort_key_filter_type;
- }
-
- /** @see filter_type */
- public get_scanner_request setSort_key_filter_type(filter_type sort_key_filter_type) {
- this.sort_key_filter_type = sort_key_filter_type;
- return this;
- }
-
- public void unsetSort_key_filter_type() {
- this.sort_key_filter_type = null;
- }
-
- /**
- * Returns true if field sort_key_filter_type is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSetSort_key_filter_type() {
- return this.sort_key_filter_type != null;
- }
-
- public void setSort_key_filter_typeIsSet(boolean value) {
- if (!value) {
- this.sort_key_filter_type = null;
- }
- }
-
- public blob getSort_key_filter_pattern() {
- return this.sort_key_filter_pattern;
- }
-
- public get_scanner_request setSort_key_filter_pattern(blob sort_key_filter_pattern) {
- this.sort_key_filter_pattern = sort_key_filter_pattern;
- return this;
- }
-
- public void unsetSort_key_filter_pattern() {
- this.sort_key_filter_pattern = null;
- }
-
- /**
- * Returns true if field sort_key_filter_pattern is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSetSort_key_filter_pattern() {
- return this.sort_key_filter_pattern != null;
- }
-
- public void setSort_key_filter_patternIsSet(boolean value) {
- if (!value) {
- this.sort_key_filter_pattern = null;
- }
- }
-
- public boolean isNeed_check_hash() {
- return this.need_check_hash;
- }
-
- public get_scanner_request setNeed_check_hash(boolean need_check_hash) {
- this.need_check_hash = need_check_hash;
- setNeed_check_hashIsSet(true);
- return this;
- }
-
- public void unsetNeed_check_hash() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NEED_CHECK_HASH_ISSET_ID);
- }
-
- /**
- * Returns true if field need_check_hash is set (has been assigned a value) and false otherwise
- */
- public boolean isSetNeed_check_hash() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NEED_CHECK_HASH_ISSET_ID);
- }
-
- public void setNeed_check_hashIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NEED_CHECK_HASH_ISSET_ID, value);
- }
-
- public boolean isReturn_expire_ts() {
- return this.return_expire_ts;
- }
-
- public get_scanner_request setReturn_expire_ts(boolean return_expire_ts) {
- this.return_expire_ts = return_expire_ts;
- setReturn_expire_tsIsSet(true);
- return this;
- }
-
- public void unsetReturn_expire_ts() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RETURN_EXPIRE_TS_ISSET_ID);
- }
-
- /**
- * Returns true if field return_expire_ts is set (has been assigned a value) and false otherwise
- */
- public boolean isSetReturn_expire_ts() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RETURN_EXPIRE_TS_ISSET_ID);
- }
-
- public void setReturn_expire_tsIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(
- __isset_bitfield, __RETURN_EXPIRE_TS_ISSET_ID, value);
- }
-
- public boolean isFull_scan() {
- return this.full_scan;
- }
-
- public get_scanner_request setFull_scan(boolean full_scan) {
- this.full_scan = full_scan;
- setFull_scanIsSet(true);
- return this;
- }
-
- public void unsetFull_scan() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FULL_SCAN_ISSET_ID);
- }
-
- /** Returns true if field full_scan is set (has been assigned a value) and false otherwise */
- public boolean isSetFull_scan() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FULL_SCAN_ISSET_ID);
- }
-
- public void setFull_scanIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FULL_SCAN_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, java.lang.Object value) {
- switch (field) {
- case START_KEY:
- if (value == null) {
- unsetStart_key();
- } else {
- setStart_key((blob) value);
- }
- break;
-
- case STOP_KEY:
- if (value == null) {
- unsetStop_key();
- } else {
- setStop_key((blob) value);
- }
- break;
-
- case START_INCLUSIVE:
- if (value == null) {
- unsetStart_inclusive();
- } else {
- setStart_inclusive((java.lang.Boolean) value);
- }
- break;
-
- case STOP_INCLUSIVE:
- if (value == null) {
- unsetStop_inclusive();
- } else {
- setStop_inclusive((java.lang.Boolean) value);
- }
- break;
-
- case BATCH_SIZE:
- if (value == null) {
- unsetBatch_size();
- } else {
- setBatch_size((java.lang.Integer) value);
- }
- break;
-
- case NO_VALUE:
- if (value == null) {
- unsetNo_value();
- } else {
- setNo_value((java.lang.Boolean) value);
- }
- break;
-
- case HASH_KEY_FILTER_TYPE:
- if (value == null) {
- unsetHash_key_filter_type();
- } else {
- setHash_key_filter_type((filter_type) value);
- }
- break;
-
- case HASH_KEY_FILTER_PATTERN:
- if (value == null) {
- unsetHash_key_filter_pattern();
- } else {
- setHash_key_filter_pattern((blob) value);
- }
- break;
-
- case SORT_KEY_FILTER_TYPE:
- if (value == null) {
- unsetSort_key_filter_type();
- } else {
- setSort_key_filter_type((filter_type) value);
- }
- break;
-
- case SORT_KEY_FILTER_PATTERN:
- if (value == null) {
- unsetSort_key_filter_pattern();
- } else {
- setSort_key_filter_pattern((blob) value);
- }
- break;
-
- case NEED_CHECK_HASH:
- if (value == null) {
- unsetNeed_check_hash();
- } else {
- setNeed_check_hash((java.lang.Boolean) value);
- }
- break;
-
- case RETURN_EXPIRE_TS:
- if (value == null) {
- unsetReturn_expire_ts();
- } else {
- setReturn_expire_ts((java.lang.Boolean) value);
- }
- break;
-
- case FULL_SCAN:
- if (value == null) {
- unsetFull_scan();
- } else {
- setFull_scan((java.lang.Boolean) value);
- }
- break;
- }
- }
-
- public java.lang.Object getFieldValue(_Fields field) {
- switch (field) {
- case START_KEY:
- return getStart_key();
-
- case STOP_KEY:
- return getStop_key();
-
- case START_INCLUSIVE:
- return isStart_inclusive();
-
- case STOP_INCLUSIVE:
- return isStop_inclusive();
-
- case BATCH_SIZE:
- return getBatch_size();
-
- case NO_VALUE:
- return isNo_value();
-
- case HASH_KEY_FILTER_TYPE:
- return getHash_key_filter_type();
-
- case HASH_KEY_FILTER_PATTERN:
- return getHash_key_filter_pattern();
-
- case SORT_KEY_FILTER_TYPE:
- return getSort_key_filter_type();
-
- case SORT_KEY_FILTER_PATTERN:
- return getSort_key_filter_pattern();
-
- case NEED_CHECK_HASH:
- return isNeed_check_hash();
-
- case RETURN_EXPIRE_TS:
- return isReturn_expire_ts();
-
- case FULL_SCAN:
- return isFull_scan();
- }
- throw new java.lang.IllegalStateException();
- }
-
- /**
- * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new java.lang.IllegalArgumentException();
- }
-
- switch (field) {
- case START_KEY:
- return isSetStart_key();
- case STOP_KEY:
- return isSetStop_key();
- case START_INCLUSIVE:
- return isSetStart_inclusive();
- case STOP_INCLUSIVE:
- return isSetStop_inclusive();
- case BATCH_SIZE:
- return isSetBatch_size();
- case NO_VALUE:
- return isSetNo_value();
- case HASH_KEY_FILTER_TYPE:
- return isSetHash_key_filter_type();
- case HASH_KEY_FILTER_PATTERN:
- return isSetHash_key_filter_pattern();
- case SORT_KEY_FILTER_TYPE:
- return isSetSort_key_filter_type();
- case SORT_KEY_FILTER_PATTERN:
- return isSetSort_key_filter_pattern();
- case NEED_CHECK_HASH:
- return isSetNeed_check_hash();
- case RETURN_EXPIRE_TS:
- return isSetReturn_expire_ts();
- case FULL_SCAN:
- return isSetFull_scan();
- }
- throw new java.lang.IllegalStateException();
- }
-
- @Override
- public boolean equals(java.lang.Object that) {
- if (that == null) return false;
- if (that instanceof get_scanner_request) return this.equals((get_scanner_request) that);
- return false;
- }
-
- public boolean equals(get_scanner_request that) {
- if (that == null) return false;
- if (this == that) return true;
-
- boolean this_present_start_key = true && this.isSetStart_key();
- boolean that_present_start_key = true && that.isSetStart_key();
- if (this_present_start_key || that_present_start_key) {
- if (!(this_present_start_key && that_present_start_key)) return false;
- if (!this.start_key.equals(that.start_key)) return false;
- }
-
- boolean this_present_stop_key = true && this.isSetStop_key();
- boolean that_present_stop_key = true && that.isSetStop_key();
- if (this_present_stop_key || that_present_stop_key) {
- if (!(this_present_stop_key && that_present_stop_key)) return false;
- if (!this.stop_key.equals(that.stop_key)) return false;
- }
-
- boolean this_present_start_inclusive = true;
- boolean that_present_start_inclusive = true;
- if (this_present_start_inclusive || that_present_start_inclusive) {
- if (!(this_present_start_inclusive && that_present_start_inclusive)) return false;
- if (this.start_inclusive != that.start_inclusive) return false;
- }
-
- boolean this_present_stop_inclusive = true;
- boolean that_present_stop_inclusive = true;
- if (this_present_stop_inclusive || that_present_stop_inclusive) {
- if (!(this_present_stop_inclusive && that_present_stop_inclusive)) return false;
- if (this.stop_inclusive != that.stop_inclusive) return false;
- }
-
- boolean this_present_batch_size = true;
- boolean that_present_batch_size = true;
- if (this_present_batch_size || that_present_batch_size) {
- if (!(this_present_batch_size && that_present_batch_size)) return false;
- if (this.batch_size != that.batch_size) return false;
- }
-
- boolean this_present_no_value = true;
- boolean that_present_no_value = true;
- if (this_present_no_value || that_present_no_value) {
- if (!(this_present_no_value && that_present_no_value)) return false;
- if (this.no_value != that.no_value) return false;
- }
-
- boolean this_present_hash_key_filter_type = true && this.isSetHash_key_filter_type();
- boolean that_present_hash_key_filter_type = true && that.isSetHash_key_filter_type();
- if (this_present_hash_key_filter_type || that_present_hash_key_filter_type) {
- if (!(this_present_hash_key_filter_type && that_present_hash_key_filter_type)) return false;
- if (!this.hash_key_filter_type.equals(that.hash_key_filter_type)) return false;
- }
-
- boolean this_present_hash_key_filter_pattern = true && this.isSetHash_key_filter_pattern();
- boolean that_present_hash_key_filter_pattern = true && that.isSetHash_key_filter_pattern();
- if (this_present_hash_key_filter_pattern || that_present_hash_key_filter_pattern) {
- if (!(this_present_hash_key_filter_pattern && that_present_hash_key_filter_pattern))
- return false;
- if (!this.hash_key_filter_pattern.equals(that.hash_key_filter_pattern)) return false;
- }
-
- boolean this_present_sort_key_filter_type = true && this.isSetSort_key_filter_type();
- boolean that_present_sort_key_filter_type = true && that.isSetSort_key_filter_type();
- if (this_present_sort_key_filter_type || that_present_sort_key_filter_type) {
- if (!(this_present_sort_key_filter_type && that_present_sort_key_filter_type)) return false;
- if (!this.sort_key_filter_type.equals(that.sort_key_filter_type)) return false;
- }
-
- boolean this_present_sort_key_filter_pattern = true && this.isSetSort_key_filter_pattern();
- boolean that_present_sort_key_filter_pattern = true && that.isSetSort_key_filter_pattern();
- if (this_present_sort_key_filter_pattern || that_present_sort_key_filter_pattern) {
- if (!(this_present_sort_key_filter_pattern && that_present_sort_key_filter_pattern))
- return false;
- if (!this.sort_key_filter_pattern.equals(that.sort_key_filter_pattern)) return false;
- }
-
- boolean this_present_need_check_hash = true && this.isSetNeed_check_hash();
- boolean that_present_need_check_hash = true && that.isSetNeed_check_hash();
- if (this_present_need_check_hash || that_present_need_check_hash) {
- if (!(this_present_need_check_hash && that_present_need_check_hash)) return false;
- if (this.need_check_hash != that.need_check_hash) return false;
- }
-
- boolean this_present_return_expire_ts = true && this.isSetReturn_expire_ts();
- boolean that_present_return_expire_ts = true && that.isSetReturn_expire_ts();
- if (this_present_return_expire_ts || that_present_return_expire_ts) {
- if (!(this_present_return_expire_ts && that_present_return_expire_ts)) return false;
- if (this.return_expire_ts != that.return_expire_ts) return false;
- }
-
- boolean this_present_full_scan = true && this.isSetFull_scan();
- boolean that_present_full_scan = true && that.isSetFull_scan();
- if (this_present_full_scan || that_present_full_scan) {
- if (!(this_present_full_scan && that_present_full_scan)) return false;
- if (this.full_scan != that.full_scan) return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 1;
-
- hashCode = hashCode * 8191 + ((isSetStart_key()) ? 131071 : 524287);
- if (isSetStart_key()) hashCode = hashCode * 8191 + start_key.hashCode();
-
- hashCode = hashCode * 8191 + ((isSetStop_key()) ? 131071 : 524287);
- if (isSetStop_key()) hashCode = hashCode * 8191 + stop_key.hashCode();
-
- hashCode = hashCode * 8191 + ((start_inclusive) ? 131071 : 524287);
-
- hashCode = hashCode * 8191 + ((stop_inclusive) ? 131071 : 524287);
-
- hashCode = hashCode * 8191 + batch_size;
-
- hashCode = hashCode * 8191 + ((no_value) ? 131071 : 524287);
-
- hashCode = hashCode * 8191 + ((isSetHash_key_filter_type()) ? 131071 : 524287);
- if (isSetHash_key_filter_type()) hashCode = hashCode * 8191 + hash_key_filter_type.getValue();
-
- hashCode = hashCode * 8191 + ((isSetHash_key_filter_pattern()) ? 131071 : 524287);
- if (isSetHash_key_filter_pattern())
- hashCode = hashCode * 8191 + hash_key_filter_pattern.hashCode();
-
- hashCode = hashCode * 8191 + ((isSetSort_key_filter_type()) ? 131071 : 524287);
- if (isSetSort_key_filter_type()) hashCode = hashCode * 8191 + sort_key_filter_type.getValue();
-
- hashCode = hashCode * 8191 + ((isSetSort_key_filter_pattern()) ? 131071 : 524287);
- if (isSetSort_key_filter_pattern())
- hashCode = hashCode * 8191 + sort_key_filter_pattern.hashCode();
-
- hashCode = hashCode * 8191 + ((isSetNeed_check_hash()) ? 131071 : 524287);
- if (isSetNeed_check_hash()) hashCode = hashCode * 8191 + ((need_check_hash) ? 131071 : 524287);
-
- hashCode = hashCode * 8191 + ((isSetReturn_expire_ts()) ? 131071 : 524287);
- if (isSetReturn_expire_ts())
- hashCode = hashCode * 8191 + ((return_expire_ts) ? 131071 : 524287);
-
- hashCode = hashCode * 8191 + ((isSetFull_scan()) ? 131071 : 524287);
- if (isSetFull_scan()) hashCode = hashCode * 8191 + ((full_scan) ? 131071 : 524287);
-
- return hashCode;
- }
-
- @Override
- public int compareTo(get_scanner_request other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = java.lang.Boolean.valueOf(isSetStart_key()).compareTo(other.isSetStart_key());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetStart_key()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.start_key, other.start_key);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetStop_key()).compareTo(other.isSetStop_key());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetStop_key()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stop_key, other.stop_key);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetStart_inclusive()).compareTo(other.isSetStart_inclusive());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetStart_inclusive()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(this.start_inclusive, other.start_inclusive);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetStop_inclusive()).compareTo(other.isSetStop_inclusive());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetStop_inclusive()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(this.stop_inclusive, other.stop_inclusive);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetBatch_size()).compareTo(other.isSetBatch_size());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetBatch_size()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.batch_size, other.batch_size);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetNo_value()).compareTo(other.isSetNo_value());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetNo_value()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.no_value, other.no_value);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetHash_key_filter_type())
- .compareTo(other.isSetHash_key_filter_type());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetHash_key_filter_type()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(
- this.hash_key_filter_type, other.hash_key_filter_type);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetHash_key_filter_pattern())
- .compareTo(other.isSetHash_key_filter_pattern());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetHash_key_filter_pattern()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(
- this.hash_key_filter_pattern, other.hash_key_filter_pattern);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetSort_key_filter_type())
- .compareTo(other.isSetSort_key_filter_type());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSort_key_filter_type()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(
- this.sort_key_filter_type, other.sort_key_filter_type);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetSort_key_filter_pattern())
- .compareTo(other.isSetSort_key_filter_pattern());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSort_key_filter_pattern()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(
- this.sort_key_filter_pattern, other.sort_key_filter_pattern);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetNeed_check_hash()).compareTo(other.isSetNeed_check_hash());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetNeed_check_hash()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(this.need_check_hash, other.need_check_hash);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetReturn_expire_ts()).compareTo(other.isSetReturn_expire_ts());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetReturn_expire_ts()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(this.return_expire_ts, other.return_expire_ts);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetFull_scan()).compareTo(other.isSetFull_scan());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetFull_scan()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.full_scan, other.full_scan);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- scheme(iprot).read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- scheme(oprot).write(oprot, this);
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("get_scanner_request(");
- boolean first = true;
-
- sb.append("start_key:");
- if (this.start_key == null) {
- sb.append("null");
- } else {
- sb.append(this.start_key);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("stop_key:");
- if (this.stop_key == null) {
- sb.append("null");
- } else {
- sb.append(this.stop_key);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("start_inclusive:");
- sb.append(this.start_inclusive);
- first = false;
- if (!first) sb.append(", ");
- sb.append("stop_inclusive:");
- sb.append(this.stop_inclusive);
- first = false;
- if (!first) sb.append(", ");
- sb.append("batch_size:");
- sb.append(this.batch_size);
- first = false;
- if (!first) sb.append(", ");
- sb.append("no_value:");
- sb.append(this.no_value);
- first = false;
- if (!first) sb.append(", ");
- sb.append("hash_key_filter_type:");
- if (this.hash_key_filter_type == null) {
- sb.append("null");
- } else {
- sb.append(this.hash_key_filter_type);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("hash_key_filter_pattern:");
- if (this.hash_key_filter_pattern == null) {
- sb.append("null");
- } else {
- sb.append(this.hash_key_filter_pattern);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("sort_key_filter_type:");
- if (this.sort_key_filter_type == null) {
- sb.append("null");
- } else {
- sb.append(this.sort_key_filter_type);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("sort_key_filter_pattern:");
- if (this.sort_key_filter_pattern == null) {
- sb.append("null");
- } else {
- sb.append(this.sort_key_filter_pattern);
- }
- first = false;
- if (isSetNeed_check_hash()) {
- if (!first) sb.append(", ");
- sb.append("need_check_hash:");
- sb.append(this.need_check_hash);
- first = false;
- }
- if (isSetReturn_expire_ts()) {
- if (!first) sb.append(", ");
- sb.append("return_expire_ts:");
- sb.append(this.return_expire_ts);
- first = false;
- }
- if (isSetFull_scan()) {
- if (!first) sb.append(", ");
- sb.append("full_scan:");
- sb.append(this.full_scan);
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (start_key != null) {
- start_key.validate();
- }
- if (stop_key != null) {
- stop_key.validate();
- }
- if (hash_key_filter_pattern != null) {
- hash_key_filter_pattern.validate();
- }
- if (sort_key_filter_pattern != null) {
- sort_key_filter_pattern.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, java.lang.ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and
- // doesn't call the default constructor.
- __isset_bitfield = 0;
- read(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class get_scanner_requestStandardSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public get_scanner_requestStandardScheme getScheme() {
- return new get_scanner_requestStandardScheme();
- }
- }
-
- private static class get_scanner_requestStandardScheme
- extends org.apache.thrift.scheme.StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, get_scanner_request struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true) {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // START_KEY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.start_key = new blob();
- struct.start_key.read(iprot);
- struct.setStart_keyIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // STOP_KEY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.stop_key = new blob();
- struct.stop_key.read(iprot);
- struct.setStop_keyIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // START_INCLUSIVE
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.start_inclusive = iprot.readBool();
- struct.setStart_inclusiveIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // STOP_INCLUSIVE
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.stop_inclusive = iprot.readBool();
- struct.setStop_inclusiveIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // BATCH_SIZE
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.batch_size = iprot.readI32();
- struct.setBatch_sizeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // NO_VALUE
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.no_value = iprot.readBool();
- struct.setNo_valueIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 7: // HASH_KEY_FILTER_TYPE
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.hash_key_filter_type = filter_type.findByValue(iprot.readI32());
- struct.setHash_key_filter_typeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 8: // HASH_KEY_FILTER_PATTERN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.hash_key_filter_pattern = new blob();
- struct.hash_key_filter_pattern.read(iprot);
- struct.setHash_key_filter_patternIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 9: // SORT_KEY_FILTER_TYPE
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.sort_key_filter_type = filter_type.findByValue(iprot.readI32());
- struct.setSort_key_filter_typeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 10: // SORT_KEY_FILTER_PATTERN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.sort_key_filter_pattern = new blob();
- struct.sort_key_filter_pattern.read(iprot);
- struct.setSort_key_filter_patternIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 11: // NEED_CHECK_HASH
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.need_check_hash = iprot.readBool();
- struct.setNeed_check_hashIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 12: // RETURN_EXPIRE_TS
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.return_expire_ts = iprot.readBool();
- struct.setReturn_expire_tsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 13: // FULL_SCAN
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.full_scan = iprot.readBool();
- struct.setFull_scanIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, get_scanner_request struct)
- throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.start_key != null) {
- oprot.writeFieldBegin(START_KEY_FIELD_DESC);
- struct.start_key.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.stop_key != null) {
- oprot.writeFieldBegin(STOP_KEY_FIELD_DESC);
- struct.stop_key.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(START_INCLUSIVE_FIELD_DESC);
- oprot.writeBool(struct.start_inclusive);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(STOP_INCLUSIVE_FIELD_DESC);
- oprot.writeBool(struct.stop_inclusive);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(BATCH_SIZE_FIELD_DESC);
- oprot.writeI32(struct.batch_size);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(NO_VALUE_FIELD_DESC);
- oprot.writeBool(struct.no_value);
- oprot.writeFieldEnd();
- if (struct.hash_key_filter_type != null) {
- oprot.writeFieldBegin(HASH_KEY_FILTER_TYPE_FIELD_DESC);
- oprot.writeI32(struct.hash_key_filter_type.getValue());
- oprot.writeFieldEnd();
- }
- if (struct.hash_key_filter_pattern != null) {
- oprot.writeFieldBegin(HASH_KEY_FILTER_PATTERN_FIELD_DESC);
- struct.hash_key_filter_pattern.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.sort_key_filter_type != null) {
- oprot.writeFieldBegin(SORT_KEY_FILTER_TYPE_FIELD_DESC);
- oprot.writeI32(struct.sort_key_filter_type.getValue());
- oprot.writeFieldEnd();
- }
- if (struct.sort_key_filter_pattern != null) {
- oprot.writeFieldBegin(SORT_KEY_FILTER_PATTERN_FIELD_DESC);
- struct.sort_key_filter_pattern.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.isSetNeed_check_hash()) {
- oprot.writeFieldBegin(NEED_CHECK_HASH_FIELD_DESC);
- oprot.writeBool(struct.need_check_hash);
- oprot.writeFieldEnd();
- }
- if (struct.isSetReturn_expire_ts()) {
- oprot.writeFieldBegin(RETURN_EXPIRE_TS_FIELD_DESC);
- oprot.writeBool(struct.return_expire_ts);
- oprot.writeFieldEnd();
- }
- if (struct.isSetFull_scan()) {
- oprot.writeFieldBegin(FULL_SCAN_FIELD_DESC);
- oprot.writeBool(struct.full_scan);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
- }
-
- private static class get_scanner_requestTupleSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public get_scanner_requestTupleScheme getScheme() {
- return new get_scanner_requestTupleScheme();
- }
- }
-
- private static class get_scanner_requestTupleScheme
- extends org.apache.thrift.scheme.TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, get_scanner_request struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol oprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet optionals = new java.util.BitSet();
- if (struct.isSetStart_key()) {
- optionals.set(0);
- }
- if (struct.isSetStop_key()) {
- optionals.set(1);
- }
- if (struct.isSetStart_inclusive()) {
- optionals.set(2);
- }
- if (struct.isSetStop_inclusive()) {
- optionals.set(3);
- }
- if (struct.isSetBatch_size()) {
- optionals.set(4);
- }
- if (struct.isSetNo_value()) {
- optionals.set(5);
- }
- if (struct.isSetHash_key_filter_type()) {
- optionals.set(6);
- }
- if (struct.isSetHash_key_filter_pattern()) {
- optionals.set(7);
- }
- if (struct.isSetSort_key_filter_type()) {
- optionals.set(8);
- }
- if (struct.isSetSort_key_filter_pattern()) {
- optionals.set(9);
- }
- if (struct.isSetNeed_check_hash()) {
- optionals.set(10);
- }
- if (struct.isSetReturn_expire_ts()) {
- optionals.set(11);
- }
- if (struct.isSetFull_scan()) {
- optionals.set(12);
- }
- oprot.writeBitSet(optionals, 13);
- if (struct.isSetStart_key()) {
- struct.start_key.write(oprot);
- }
- if (struct.isSetStop_key()) {
- struct.stop_key.write(oprot);
- }
- if (struct.isSetStart_inclusive()) {
- oprot.writeBool(struct.start_inclusive);
- }
- if (struct.isSetStop_inclusive()) {
- oprot.writeBool(struct.stop_inclusive);
- }
- if (struct.isSetBatch_size()) {
- oprot.writeI32(struct.batch_size);
- }
- if (struct.isSetNo_value()) {
- oprot.writeBool(struct.no_value);
- }
- if (struct.isSetHash_key_filter_type()) {
- oprot.writeI32(struct.hash_key_filter_type.getValue());
- }
- if (struct.isSetHash_key_filter_pattern()) {
- struct.hash_key_filter_pattern.write(oprot);
- }
- if (struct.isSetSort_key_filter_type()) {
- oprot.writeI32(struct.sort_key_filter_type.getValue());
- }
- if (struct.isSetSort_key_filter_pattern()) {
- struct.sort_key_filter_pattern.write(oprot);
- }
- if (struct.isSetNeed_check_hash()) {
- oprot.writeBool(struct.need_check_hash);
- }
- if (struct.isSetReturn_expire_ts()) {
- oprot.writeBool(struct.return_expire_ts);
- }
- if (struct.isSetFull_scan()) {
- oprot.writeBool(struct.full_scan);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, get_scanner_request struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol iprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(13);
- if (incoming.get(0)) {
- struct.start_key = new blob();
- struct.start_key.read(iprot);
- struct.setStart_keyIsSet(true);
- }
- if (incoming.get(1)) {
- struct.stop_key = new blob();
- struct.stop_key.read(iprot);
- struct.setStop_keyIsSet(true);
- }
- if (incoming.get(2)) {
- struct.start_inclusive = iprot.readBool();
- struct.setStart_inclusiveIsSet(true);
- }
- if (incoming.get(3)) {
- struct.stop_inclusive = iprot.readBool();
- struct.setStop_inclusiveIsSet(true);
- }
- if (incoming.get(4)) {
- struct.batch_size = iprot.readI32();
- struct.setBatch_sizeIsSet(true);
- }
- if (incoming.get(5)) {
- struct.no_value = iprot.readBool();
- struct.setNo_valueIsSet(true);
- }
- if (incoming.get(6)) {
- struct.hash_key_filter_type = filter_type.findByValue(iprot.readI32());
- struct.setHash_key_filter_typeIsSet(true);
- }
- if (incoming.get(7)) {
- struct.hash_key_filter_pattern = new blob();
- struct.hash_key_filter_pattern.read(iprot);
- struct.setHash_key_filter_patternIsSet(true);
- }
- if (incoming.get(8)) {
- struct.sort_key_filter_type = filter_type.findByValue(iprot.readI32());
- struct.setSort_key_filter_typeIsSet(true);
- }
- if (incoming.get(9)) {
- struct.sort_key_filter_pattern = new blob();
- struct.sort_key_filter_pattern.read(iprot);
- struct.setSort_key_filter_patternIsSet(true);
- }
- if (incoming.get(10)) {
- struct.need_check_hash = iprot.readBool();
- struct.setNeed_check_hashIsSet(true);
- }
- if (incoming.get(11)) {
- struct.return_expire_ts = iprot.readBool();
- struct.setReturn_expire_tsIsSet(true);
- }
- if (incoming.get(12)) {
- struct.full_scan = iprot.readBool();
- struct.setFull_scanIsSet(true);
- }
- }
- }
-
- private static S scheme(
- org.apache.thrift.protocol.TProtocol proto) {
- return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
- ? STANDARD_SCHEME_FACTORY
- : TUPLE_SCHEME_FACTORY)
- .getScheme();
- }
-}
diff --git a/java-client/src/main/java/org/apache/pegasus/apps/incr_request.java b/java-client/src/main/java/org/apache/pegasus/apps/incr_request.java
deleted file mode 100644
index dc8b6504a3..0000000000
--- a/java-client/src/main/java/org/apache/pegasus/apps/incr_request.java
+++ /dev/null
@@ -1,635 +0,0 @@
-/*
- * 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.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
- */
-package org.apache.pegasus.apps;
-
-import org.apache.pegasus.base.blob;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(
- value = "Autogenerated by Thrift Compiler (0.11.0)",
- date = "2020-04-13")
-public class incr_request
- implements org.apache.thrift.TBase,
- java.io.Serializable,
- Cloneable,
- Comparable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("incr_request");
-
- private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "key", org.apache.thrift.protocol.TType.STRUCT, (short) 1);
- private static final org.apache.thrift.protocol.TField INCREMENT_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "increment", org.apache.thrift.protocol.TType.I64, (short) 2);
- private static final org.apache.thrift.protocol.TField EXPIRE_TS_SECONDS_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "expire_ts_seconds", org.apache.thrift.protocol.TType.I32, (short) 3);
-
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
- new incr_requestStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
- new incr_requestTupleSchemeFactory();
-
- public blob key; // required
- public long increment; // required
- public int expire_ts_seconds; // required
-
- /**
- * The set of fields this struct contains, along with convenience methods for finding and
- * manipulating them.
- */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- KEY((short) 1, "key"),
- INCREMENT((short) 2, "increment"),
- EXPIRE_TS_SECONDS((short) 3, "expire_ts_seconds");
-
- private static final java.util.Map byName =
- new java.util.HashMap();
-
- static {
- for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /** Find the _Fields constant that matches fieldId, or null if its not found. */
- public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
- case 1: // KEY
- return KEY;
- case 2: // INCREMENT
- return INCREMENT;
- case 3: // EXPIRE_TS_SECONDS
- return EXPIRE_TS_SECONDS;
- default:
- return null;
- }
- }
-
- /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null)
- throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /** Find the _Fields constant that matches name, or null if its not found. */
- public static _Fields findByName(java.lang.String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final java.lang.String _fieldName;
-
- _Fields(short thriftId, java.lang.String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public java.lang.String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __INCREMENT_ISSET_ID = 0;
- private static final int __EXPIRE_TS_SECONDS_ISSET_ID = 1;
- private byte __isset_bitfield = 0;
- public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
- static {
- java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(
- _Fields.KEY,
- new org.apache.thrift.meta_data.FieldMetaData(
- "key",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- tmpMap.put(
- _Fields.INCREMENT,
- new org.apache.thrift.meta_data.FieldMetaData(
- "increment",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I64)));
- tmpMap.put(
- _Fields.EXPIRE_TS_SECONDS,
- new org.apache.thrift.meta_data.FieldMetaData(
- "expire_ts_seconds",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I32)));
- metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(incr_request.class, metaDataMap);
- }
-
- public incr_request() {}
-
- public incr_request(blob key, long increment, int expire_ts_seconds) {
- this();
- this.key = key;
- this.increment = increment;
- setIncrementIsSet(true);
- this.expire_ts_seconds = expire_ts_seconds;
- setExpire_ts_secondsIsSet(true);
- }
-
- /** Performs a deep copy on other. */
- public incr_request(incr_request other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetKey()) {
- this.key = new blob(other.key);
- }
- this.increment = other.increment;
- this.expire_ts_seconds = other.expire_ts_seconds;
- }
-
- public incr_request deepCopy() {
- return new incr_request(this);
- }
-
- @Override
- public void clear() {
- this.key = null;
- setIncrementIsSet(false);
- this.increment = 0;
- setExpire_ts_secondsIsSet(false);
- this.expire_ts_seconds = 0;
- }
-
- public blob getKey() {
- return this.key;
- }
-
- public incr_request setKey(blob key) {
- this.key = key;
- return this;
- }
-
- public void unsetKey() {
- this.key = null;
- }
-
- /** Returns true if field key is set (has been assigned a value) and false otherwise */
- public boolean isSetKey() {
- return this.key != null;
- }
-
- public void setKeyIsSet(boolean value) {
- if (!value) {
- this.key = null;
- }
- }
-
- public long getIncrement() {
- return this.increment;
- }
-
- public incr_request setIncrement(long increment) {
- this.increment = increment;
- setIncrementIsSet(true);
- return this;
- }
-
- public void unsetIncrement() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INCREMENT_ISSET_ID);
- }
-
- /** Returns true if field increment is set (has been assigned a value) and false otherwise */
- public boolean isSetIncrement() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INCREMENT_ISSET_ID);
- }
-
- public void setIncrementIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INCREMENT_ISSET_ID, value);
- }
-
- public int getExpire_ts_seconds() {
- return this.expire_ts_seconds;
- }
-
- public incr_request setExpire_ts_seconds(int expire_ts_seconds) {
- this.expire_ts_seconds = expire_ts_seconds;
- setExpire_ts_secondsIsSet(true);
- return this;
- }
-
- public void unsetExpire_ts_seconds() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __EXPIRE_TS_SECONDS_ISSET_ID);
- }
-
- /**
- * Returns true if field expire_ts_seconds is set (has been assigned a value) and false otherwise
- */
- public boolean isSetExpire_ts_seconds() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EXPIRE_TS_SECONDS_ISSET_ID);
- }
-
- public void setExpire_ts_secondsIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(
- __isset_bitfield, __EXPIRE_TS_SECONDS_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, java.lang.Object value) {
- switch (field) {
- case KEY:
- if (value == null) {
- unsetKey();
- } else {
- setKey((blob) value);
- }
- break;
-
- case INCREMENT:
- if (value == null) {
- unsetIncrement();
- } else {
- setIncrement((java.lang.Long) value);
- }
- break;
-
- case EXPIRE_TS_SECONDS:
- if (value == null) {
- unsetExpire_ts_seconds();
- } else {
- setExpire_ts_seconds((java.lang.Integer) value);
- }
- break;
- }
- }
-
- public java.lang.Object getFieldValue(_Fields field) {
- switch (field) {
- case KEY:
- return getKey();
-
- case INCREMENT:
- return getIncrement();
-
- case EXPIRE_TS_SECONDS:
- return getExpire_ts_seconds();
- }
- throw new java.lang.IllegalStateException();
- }
-
- /**
- * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new java.lang.IllegalArgumentException();
- }
-
- switch (field) {
- case KEY:
- return isSetKey();
- case INCREMENT:
- return isSetIncrement();
- case EXPIRE_TS_SECONDS:
- return isSetExpire_ts_seconds();
- }
- throw new java.lang.IllegalStateException();
- }
-
- @Override
- public boolean equals(java.lang.Object that) {
- if (that == null) return false;
- if (that instanceof incr_request) return this.equals((incr_request) that);
- return false;
- }
-
- public boolean equals(incr_request that) {
- if (that == null) return false;
- if (this == that) return true;
-
- boolean this_present_key = true && this.isSetKey();
- boolean that_present_key = true && that.isSetKey();
- if (this_present_key || that_present_key) {
- if (!(this_present_key && that_present_key)) return false;
- if (!this.key.equals(that.key)) return false;
- }
-
- boolean this_present_increment = true;
- boolean that_present_increment = true;
- if (this_present_increment || that_present_increment) {
- if (!(this_present_increment && that_present_increment)) return false;
- if (this.increment != that.increment) return false;
- }
-
- boolean this_present_expire_ts_seconds = true;
- boolean that_present_expire_ts_seconds = true;
- if (this_present_expire_ts_seconds || that_present_expire_ts_seconds) {
- if (!(this_present_expire_ts_seconds && that_present_expire_ts_seconds)) return false;
- if (this.expire_ts_seconds != that.expire_ts_seconds) return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 1;
-
- hashCode = hashCode * 8191 + ((isSetKey()) ? 131071 : 524287);
- if (isSetKey()) hashCode = hashCode * 8191 + key.hashCode();
-
- hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(increment);
-
- hashCode = hashCode * 8191 + expire_ts_seconds;
-
- return hashCode;
- }
-
- @Override
- public int compareTo(incr_request other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = java.lang.Boolean.valueOf(isSetKey()).compareTo(other.isSetKey());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetKey()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, other.key);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetIncrement()).compareTo(other.isSetIncrement());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetIncrement()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.increment, other.increment);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetExpire_ts_seconds())
- .compareTo(other.isSetExpire_ts_seconds());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetExpire_ts_seconds()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(this.expire_ts_seconds, other.expire_ts_seconds);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- scheme(iprot).read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- scheme(oprot).write(oprot, this);
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("incr_request(");
- boolean first = true;
-
- sb.append("key:");
- if (this.key == null) {
- sb.append("null");
- } else {
- sb.append(this.key);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("increment:");
- sb.append(this.increment);
- first = false;
- if (!first) sb.append(", ");
- sb.append("expire_ts_seconds:");
- sb.append(this.expire_ts_seconds);
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (key != null) {
- key.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, java.lang.ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and
- // doesn't call the default constructor.
- __isset_bitfield = 0;
- read(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class incr_requestStandardSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public incr_requestStandardScheme getScheme() {
- return new incr_requestStandardScheme();
- }
- }
-
- private static class incr_requestStandardScheme
- extends org.apache.thrift.scheme.StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, incr_request struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true) {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // KEY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.key = new blob();
- struct.key.read(iprot);
- struct.setKeyIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // INCREMENT
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.increment = iprot.readI64();
- struct.setIncrementIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // EXPIRE_TS_SECONDS
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.expire_ts_seconds = iprot.readI32();
- struct.setExpire_ts_secondsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, incr_request struct)
- throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.key != null) {
- oprot.writeFieldBegin(KEY_FIELD_DESC);
- struct.key.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(INCREMENT_FIELD_DESC);
- oprot.writeI64(struct.increment);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(EXPIRE_TS_SECONDS_FIELD_DESC);
- oprot.writeI32(struct.expire_ts_seconds);
- oprot.writeFieldEnd();
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
- }
-
- private static class incr_requestTupleSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public incr_requestTupleScheme getScheme() {
- return new incr_requestTupleScheme();
- }
- }
-
- private static class incr_requestTupleScheme
- extends org.apache.thrift.scheme.TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, incr_request struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol oprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet optionals = new java.util.BitSet();
- if (struct.isSetKey()) {
- optionals.set(0);
- }
- if (struct.isSetIncrement()) {
- optionals.set(1);
- }
- if (struct.isSetExpire_ts_seconds()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetKey()) {
- struct.key.write(oprot);
- }
- if (struct.isSetIncrement()) {
- oprot.writeI64(struct.increment);
- }
- if (struct.isSetExpire_ts_seconds()) {
- oprot.writeI32(struct.expire_ts_seconds);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, incr_request struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol iprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(3);
- if (incoming.get(0)) {
- struct.key = new blob();
- struct.key.read(iprot);
- struct.setKeyIsSet(true);
- }
- if (incoming.get(1)) {
- struct.increment = iprot.readI64();
- struct.setIncrementIsSet(true);
- }
- if (incoming.get(2)) {
- struct.expire_ts_seconds = iprot.readI32();
- struct.setExpire_ts_secondsIsSet(true);
- }
- }
- }
-
- private static S scheme(
- org.apache.thrift.protocol.TProtocol proto) {
- return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
- ? STANDARD_SCHEME_FACTORY
- : TUPLE_SCHEME_FACTORY)
- .getScheme();
- }
-}
diff --git a/java-client/src/main/java/org/apache/pegasus/apps/incr_response.java b/java-client/src/main/java/org/apache/pegasus/apps/incr_response.java
deleted file mode 100644
index 7b67f8d12c..0000000000
--- a/java-client/src/main/java/org/apache/pegasus/apps/incr_response.java
+++ /dev/null
@@ -1,938 +0,0 @@
-/*
- * 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.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
- */
-package org.apache.pegasus.apps;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(
- value = "Autogenerated by Thrift Compiler (0.11.0)",
- date = "2020-04-13")
-public class incr_response
- implements org.apache.thrift.TBase,
- java.io.Serializable,
- Cloneable,
- Comparable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("incr_response");
-
- private static final org.apache.thrift.protocol.TField ERROR_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "error", org.apache.thrift.protocol.TType.I32, (short) 1);
- private static final org.apache.thrift.protocol.TField NEW_VALUE_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "new_value", org.apache.thrift.protocol.TType.I64, (short) 2);
- private static final org.apache.thrift.protocol.TField APP_ID_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "app_id", org.apache.thrift.protocol.TType.I32, (short) 3);
- private static final org.apache.thrift.protocol.TField PARTITION_INDEX_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "partition_index", org.apache.thrift.protocol.TType.I32, (short) 4);
- private static final org.apache.thrift.protocol.TField DECREE_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "decree", org.apache.thrift.protocol.TType.I64, (short) 5);
- private static final org.apache.thrift.protocol.TField SERVER_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "server", org.apache.thrift.protocol.TType.STRING, (short) 6);
-
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
- new incr_responseStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
- new incr_responseTupleSchemeFactory();
-
- public int error; // required
- public long new_value; // required
- public int app_id; // required
- public int partition_index; // required
- public long decree; // required
- public java.lang.String server; // required
-
- /**
- * The set of fields this struct contains, along with convenience methods for finding and
- * manipulating them.
- */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- ERROR((short) 1, "error"),
- NEW_VALUE((short) 2, "new_value"),
- APP_ID((short) 3, "app_id"),
- PARTITION_INDEX((short) 4, "partition_index"),
- DECREE((short) 5, "decree"),
- SERVER((short) 6, "server");
-
- private static final java.util.Map byName =
- new java.util.HashMap();
-
- static {
- for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /** Find the _Fields constant that matches fieldId, or null if its not found. */
- public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
- case 1: // ERROR
- return ERROR;
- case 2: // NEW_VALUE
- return NEW_VALUE;
- case 3: // APP_ID
- return APP_ID;
- case 4: // PARTITION_INDEX
- return PARTITION_INDEX;
- case 5: // DECREE
- return DECREE;
- case 6: // SERVER
- return SERVER;
- default:
- return null;
- }
- }
-
- /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null)
- throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /** Find the _Fields constant that matches name, or null if its not found. */
- public static _Fields findByName(java.lang.String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final java.lang.String _fieldName;
-
- _Fields(short thriftId, java.lang.String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public java.lang.String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __ERROR_ISSET_ID = 0;
- private static final int __NEW_VALUE_ISSET_ID = 1;
- private static final int __APP_ID_ISSET_ID = 2;
- private static final int __PARTITION_INDEX_ISSET_ID = 3;
- private static final int __DECREE_ISSET_ID = 4;
- private byte __isset_bitfield = 0;
- public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
- static {
- java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(
- _Fields.ERROR,
- new org.apache.thrift.meta_data.FieldMetaData(
- "error",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(
- _Fields.NEW_VALUE,
- new org.apache.thrift.meta_data.FieldMetaData(
- "new_value",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I64)));
- tmpMap.put(
- _Fields.APP_ID,
- new org.apache.thrift.meta_data.FieldMetaData(
- "app_id",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(
- _Fields.PARTITION_INDEX,
- new org.apache.thrift.meta_data.FieldMetaData(
- "partition_index",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(
- _Fields.DECREE,
- new org.apache.thrift.meta_data.FieldMetaData(
- "decree",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I64)));
- tmpMap.put(
- _Fields.SERVER,
- new org.apache.thrift.meta_data.FieldMetaData(
- "server",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
- incr_response.class, metaDataMap);
- }
-
- public incr_response() {}
-
- public incr_response(
- int error,
- long new_value,
- int app_id,
- int partition_index,
- long decree,
- java.lang.String server) {
- this();
- this.error = error;
- setErrorIsSet(true);
- this.new_value = new_value;
- setNew_valueIsSet(true);
- this.app_id = app_id;
- setApp_idIsSet(true);
- this.partition_index = partition_index;
- setPartition_indexIsSet(true);
- this.decree = decree;
- setDecreeIsSet(true);
- this.server = server;
- }
-
- /** Performs a deep copy on other. */
- public incr_response(incr_response other) {
- __isset_bitfield = other.__isset_bitfield;
- this.error = other.error;
- this.new_value = other.new_value;
- this.app_id = other.app_id;
- this.partition_index = other.partition_index;
- this.decree = other.decree;
- if (other.isSetServer()) {
- this.server = other.server;
- }
- }
-
- public incr_response deepCopy() {
- return new incr_response(this);
- }
-
- @Override
- public void clear() {
- setErrorIsSet(false);
- this.error = 0;
- setNew_valueIsSet(false);
- this.new_value = 0;
- setApp_idIsSet(false);
- this.app_id = 0;
- setPartition_indexIsSet(false);
- this.partition_index = 0;
- setDecreeIsSet(false);
- this.decree = 0;
- this.server = null;
- }
-
- public int getError() {
- return this.error;
- }
-
- public incr_response setError(int error) {
- this.error = error;
- setErrorIsSet(true);
- return this;
- }
-
- public void unsetError() {
- __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ERROR_ISSET_ID);
- }
-
- /** Returns true if field error is set (has been assigned a value) and false otherwise */
- public boolean isSetError() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ERROR_ISSET_ID);
- }
-
- public void setErrorIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ERROR_ISSET_ID, value);
- }
-
- public long getNew_value() {
- return this.new_value;
- }
-
- public incr_response setNew_value(long new_value) {
- this.new_value = new_value;
- setNew_valueIsSet(true);
- return this;
- }
-
- public void unsetNew_value() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NEW_VALUE_ISSET_ID);
- }
-
- /** Returns true if field new_value is set (has been assigned a value) and false otherwise */
- public boolean isSetNew_value() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NEW_VALUE_ISSET_ID);
- }
-
- public void setNew_valueIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NEW_VALUE_ISSET_ID, value);
- }
-
- public int getApp_id() {
- return this.app_id;
- }
-
- public incr_response setApp_id(int app_id) {
- this.app_id = app_id;
- setApp_idIsSet(true);
- return this;
- }
-
- public void unsetApp_id() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __APP_ID_ISSET_ID);
- }
-
- /** Returns true if field app_id is set (has been assigned a value) and false otherwise */
- public boolean isSetApp_id() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __APP_ID_ISSET_ID);
- }
-
- public void setApp_idIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __APP_ID_ISSET_ID, value);
- }
-
- public int getPartition_index() {
- return this.partition_index;
- }
-
- public incr_response setPartition_index(int partition_index) {
- this.partition_index = partition_index;
- setPartition_indexIsSet(true);
- return this;
- }
-
- public void unsetPartition_index() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PARTITION_INDEX_ISSET_ID);
- }
-
- /**
- * Returns true if field partition_index is set (has been assigned a value) and false otherwise
- */
- public boolean isSetPartition_index() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PARTITION_INDEX_ISSET_ID);
- }
-
- public void setPartition_indexIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PARTITION_INDEX_ISSET_ID, value);
- }
-
- public long getDecree() {
- return this.decree;
- }
-
- public incr_response setDecree(long decree) {
- this.decree = decree;
- setDecreeIsSet(true);
- return this;
- }
-
- public void unsetDecree() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DECREE_ISSET_ID);
- }
-
- /** Returns true if field decree is set (has been assigned a value) and false otherwise */
- public boolean isSetDecree() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DECREE_ISSET_ID);
- }
-
- public void setDecreeIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DECREE_ISSET_ID, value);
- }
-
- public java.lang.String getServer() {
- return this.server;
- }
-
- public incr_response setServer(java.lang.String server) {
- this.server = server;
- return this;
- }
-
- public void unsetServer() {
- this.server = null;
- }
-
- /** Returns true if field server is set (has been assigned a value) and false otherwise */
- public boolean isSetServer() {
- return this.server != null;
- }
-
- public void setServerIsSet(boolean value) {
- if (!value) {
- this.server = null;
- }
- }
-
- public void setFieldValue(_Fields field, java.lang.Object value) {
- switch (field) {
- case ERROR:
- if (value == null) {
- unsetError();
- } else {
- setError((java.lang.Integer) value);
- }
- break;
-
- case NEW_VALUE:
- if (value == null) {
- unsetNew_value();
- } else {
- setNew_value((java.lang.Long) value);
- }
- break;
-
- case APP_ID:
- if (value == null) {
- unsetApp_id();
- } else {
- setApp_id((java.lang.Integer) value);
- }
- break;
-
- case PARTITION_INDEX:
- if (value == null) {
- unsetPartition_index();
- } else {
- setPartition_index((java.lang.Integer) value);
- }
- break;
-
- case DECREE:
- if (value == null) {
- unsetDecree();
- } else {
- setDecree((java.lang.Long) value);
- }
- break;
-
- case SERVER:
- if (value == null) {
- unsetServer();
- } else {
- setServer((java.lang.String) value);
- }
- break;
- }
- }
-
- public java.lang.Object getFieldValue(_Fields field) {
- switch (field) {
- case ERROR:
- return getError();
-
- case NEW_VALUE:
- return getNew_value();
-
- case APP_ID:
- return getApp_id();
-
- case PARTITION_INDEX:
- return getPartition_index();
-
- case DECREE:
- return getDecree();
-
- case SERVER:
- return getServer();
- }
- throw new java.lang.IllegalStateException();
- }
-
- /**
- * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new java.lang.IllegalArgumentException();
- }
-
- switch (field) {
- case ERROR:
- return isSetError();
- case NEW_VALUE:
- return isSetNew_value();
- case APP_ID:
- return isSetApp_id();
- case PARTITION_INDEX:
- return isSetPartition_index();
- case DECREE:
- return isSetDecree();
- case SERVER:
- return isSetServer();
- }
- throw new java.lang.IllegalStateException();
- }
-
- @Override
- public boolean equals(java.lang.Object that) {
- if (that == null) return false;
- if (that instanceof incr_response) return this.equals((incr_response) that);
- return false;
- }
-
- public boolean equals(incr_response that) {
- if (that == null) return false;
- if (this == that) return true;
-
- boolean this_present_error = true;
- boolean that_present_error = true;
- if (this_present_error || that_present_error) {
- if (!(this_present_error && that_present_error)) return false;
- if (this.error != that.error) return false;
- }
-
- boolean this_present_new_value = true;
- boolean that_present_new_value = true;
- if (this_present_new_value || that_present_new_value) {
- if (!(this_present_new_value && that_present_new_value)) return false;
- if (this.new_value != that.new_value) return false;
- }
-
- boolean this_present_app_id = true;
- boolean that_present_app_id = true;
- if (this_present_app_id || that_present_app_id) {
- if (!(this_present_app_id && that_present_app_id)) return false;
- if (this.app_id != that.app_id) return false;
- }
-
- boolean this_present_partition_index = true;
- boolean that_present_partition_index = true;
- if (this_present_partition_index || that_present_partition_index) {
- if (!(this_present_partition_index && that_present_partition_index)) return false;
- if (this.partition_index != that.partition_index) return false;
- }
-
- boolean this_present_decree = true;
- boolean that_present_decree = true;
- if (this_present_decree || that_present_decree) {
- if (!(this_present_decree && that_present_decree)) return false;
- if (this.decree != that.decree) return false;
- }
-
- boolean this_present_server = true && this.isSetServer();
- boolean that_present_server = true && that.isSetServer();
- if (this_present_server || that_present_server) {
- if (!(this_present_server && that_present_server)) return false;
- if (!this.server.equals(that.server)) return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 1;
-
- hashCode = hashCode * 8191 + error;
-
- hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(new_value);
-
- hashCode = hashCode * 8191 + app_id;
-
- hashCode = hashCode * 8191 + partition_index;
-
- hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(decree);
-
- hashCode = hashCode * 8191 + ((isSetServer()) ? 131071 : 524287);
- if (isSetServer()) hashCode = hashCode * 8191 + server.hashCode();
-
- return hashCode;
- }
-
- @Override
- public int compareTo(incr_response other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = java.lang.Boolean.valueOf(isSetError()).compareTo(other.isSetError());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetError()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.error, other.error);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetNew_value()).compareTo(other.isSetNew_value());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetNew_value()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_value, other.new_value);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetApp_id()).compareTo(other.isSetApp_id());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetApp_id()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.app_id, other.app_id);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetPartition_index()).compareTo(other.isSetPartition_index());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPartition_index()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(this.partition_index, other.partition_index);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetDecree()).compareTo(other.isSetDecree());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDecree()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.decree, other.decree);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetServer()).compareTo(other.isSetServer());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetServer()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.server, other.server);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- scheme(iprot).read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- scheme(oprot).write(oprot, this);
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("incr_response(");
- boolean first = true;
-
- sb.append("error:");
- sb.append(this.error);
- first = false;
- if (!first) sb.append(", ");
- sb.append("new_value:");
- sb.append(this.new_value);
- first = false;
- if (!first) sb.append(", ");
- sb.append("app_id:");
- sb.append(this.app_id);
- first = false;
- if (!first) sb.append(", ");
- sb.append("partition_index:");
- sb.append(this.partition_index);
- first = false;
- if (!first) sb.append(", ");
- sb.append("decree:");
- sb.append(this.decree);
- first = false;
- if (!first) sb.append(", ");
- sb.append("server:");
- if (this.server == null) {
- sb.append("null");
- } else {
- sb.append(this.server);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, java.lang.ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and
- // doesn't call the default constructor.
- __isset_bitfield = 0;
- read(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class incr_responseStandardSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public incr_responseStandardScheme getScheme() {
- return new incr_responseStandardScheme();
- }
- }
-
- private static class incr_responseStandardScheme
- extends org.apache.thrift.scheme.StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, incr_response struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true) {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // ERROR
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.error = iprot.readI32();
- struct.setErrorIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // NEW_VALUE
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.new_value = iprot.readI64();
- struct.setNew_valueIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // APP_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.app_id = iprot.readI32();
- struct.setApp_idIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // PARTITION_INDEX
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.partition_index = iprot.readI32();
- struct.setPartition_indexIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // DECREE
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.decree = iprot.readI64();
- struct.setDecreeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // SERVER
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.server = iprot.readString();
- struct.setServerIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, incr_response struct)
- throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldBegin(ERROR_FIELD_DESC);
- oprot.writeI32(struct.error);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(NEW_VALUE_FIELD_DESC);
- oprot.writeI64(struct.new_value);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(APP_ID_FIELD_DESC);
- oprot.writeI32(struct.app_id);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(PARTITION_INDEX_FIELD_DESC);
- oprot.writeI32(struct.partition_index);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(DECREE_FIELD_DESC);
- oprot.writeI64(struct.decree);
- oprot.writeFieldEnd();
- if (struct.server != null) {
- oprot.writeFieldBegin(SERVER_FIELD_DESC);
- oprot.writeString(struct.server);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
- }
-
- private static class incr_responseTupleSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public incr_responseTupleScheme getScheme() {
- return new incr_responseTupleScheme();
- }
- }
-
- private static class incr_responseTupleScheme
- extends org.apache.thrift.scheme.TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, incr_response struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol oprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet optionals = new java.util.BitSet();
- if (struct.isSetError()) {
- optionals.set(0);
- }
- if (struct.isSetNew_value()) {
- optionals.set(1);
- }
- if (struct.isSetApp_id()) {
- optionals.set(2);
- }
- if (struct.isSetPartition_index()) {
- optionals.set(3);
- }
- if (struct.isSetDecree()) {
- optionals.set(4);
- }
- if (struct.isSetServer()) {
- optionals.set(5);
- }
- oprot.writeBitSet(optionals, 6);
- if (struct.isSetError()) {
- oprot.writeI32(struct.error);
- }
- if (struct.isSetNew_value()) {
- oprot.writeI64(struct.new_value);
- }
- if (struct.isSetApp_id()) {
- oprot.writeI32(struct.app_id);
- }
- if (struct.isSetPartition_index()) {
- oprot.writeI32(struct.partition_index);
- }
- if (struct.isSetDecree()) {
- oprot.writeI64(struct.decree);
- }
- if (struct.isSetServer()) {
- oprot.writeString(struct.server);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, incr_response struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol iprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(6);
- if (incoming.get(0)) {
- struct.error = iprot.readI32();
- struct.setErrorIsSet(true);
- }
- if (incoming.get(1)) {
- struct.new_value = iprot.readI64();
- struct.setNew_valueIsSet(true);
- }
- if (incoming.get(2)) {
- struct.app_id = iprot.readI32();
- struct.setApp_idIsSet(true);
- }
- if (incoming.get(3)) {
- struct.partition_index = iprot.readI32();
- struct.setPartition_indexIsSet(true);
- }
- if (incoming.get(4)) {
- struct.decree = iprot.readI64();
- struct.setDecreeIsSet(true);
- }
- if (incoming.get(5)) {
- struct.server = iprot.readString();
- struct.setServerIsSet(true);
- }
- }
- }
-
- private static S scheme(
- org.apache.thrift.protocol.TProtocol proto) {
- return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
- ? STANDARD_SCHEME_FACTORY
- : TUPLE_SCHEME_FACTORY)
- .getScheme();
- }
-}
diff --git a/java-client/src/main/java/org/apache/pegasus/apps/key_value.java b/java-client/src/main/java/org/apache/pegasus/apps/key_value.java
deleted file mode 100644
index ed778f8c88..0000000000
--- a/java-client/src/main/java/org/apache/pegasus/apps/key_value.java
+++ /dev/null
@@ -1,532 +0,0 @@
-/*
- * 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.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
- */
-package org.apache.pegasus.apps;
-
-import org.apache.pegasus.base.blob;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(
- value = "Autogenerated by Thrift Compiler (0.11.0)",
- date = "2020-04-13")
-public class key_value
- implements org.apache.thrift.TBase,
- java.io.Serializable,
- Cloneable,
- Comparable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("key_value");
-
- private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "key", org.apache.thrift.protocol.TType.STRUCT, (short) 1);
- private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "value", org.apache.thrift.protocol.TType.STRUCT, (short) 2);
-
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
- new key_valueStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
- new key_valueTupleSchemeFactory();
-
- public blob key; // required
- public blob value; // required
-
- /**
- * The set of fields this struct contains, along with convenience methods for finding and
- * manipulating them.
- */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- KEY((short) 1, "key"),
- VALUE((short) 2, "value");
-
- private static final java.util.Map byName =
- new java.util.HashMap();
-
- static {
- for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /** Find the _Fields constant that matches fieldId, or null if its not found. */
- public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
- case 1: // KEY
- return KEY;
- case 2: // VALUE
- return VALUE;
- default:
- return null;
- }
- }
-
- /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null)
- throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /** Find the _Fields constant that matches name, or null if its not found. */
- public static _Fields findByName(java.lang.String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final java.lang.String _fieldName;
-
- _Fields(short thriftId, java.lang.String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public java.lang.String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
- static {
- java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(
- _Fields.KEY,
- new org.apache.thrift.meta_data.FieldMetaData(
- "key",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- tmpMap.put(
- _Fields.VALUE,
- new org.apache.thrift.meta_data.FieldMetaData(
- "value",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(key_value.class, metaDataMap);
- }
-
- public key_value() {}
-
- public key_value(blob key, blob value) {
- this();
- this.key = key;
- this.value = value;
- }
-
- /** Performs a deep copy on other. */
- public key_value(key_value other) {
- if (other.isSetKey()) {
- this.key = new blob(other.key);
- }
- if (other.isSetValue()) {
- this.value = new blob(other.value);
- }
- }
-
- public key_value deepCopy() {
- return new key_value(this);
- }
-
- @Override
- public void clear() {
- this.key = null;
- this.value = null;
- }
-
- public blob getKey() {
- return this.key;
- }
-
- public key_value setKey(blob key) {
- this.key = key;
- return this;
- }
-
- public void unsetKey() {
- this.key = null;
- }
-
- /** Returns true if field key is set (has been assigned a value) and false otherwise */
- public boolean isSetKey() {
- return this.key != null;
- }
-
- public void setKeyIsSet(boolean value) {
- if (!value) {
- this.key = null;
- }
- }
-
- public blob getValue() {
- return this.value;
- }
-
- public key_value setValue(blob value) {
- this.value = value;
- return this;
- }
-
- public void unsetValue() {
- this.value = null;
- }
-
- /** Returns true if field value is set (has been assigned a value) and false otherwise */
- public boolean isSetValue() {
- return this.value != null;
- }
-
- public void setValueIsSet(boolean value) {
- if (!value) {
- this.value = null;
- }
- }
-
- public void setFieldValue(_Fields field, java.lang.Object value) {
- switch (field) {
- case KEY:
- if (value == null) {
- unsetKey();
- } else {
- setKey((blob) value);
- }
- break;
-
- case VALUE:
- if (value == null) {
- unsetValue();
- } else {
- setValue((blob) value);
- }
- break;
- }
- }
-
- public java.lang.Object getFieldValue(_Fields field) {
- switch (field) {
- case KEY:
- return getKey();
-
- case VALUE:
- return getValue();
- }
- throw new java.lang.IllegalStateException();
- }
-
- /**
- * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new java.lang.IllegalArgumentException();
- }
-
- switch (field) {
- case KEY:
- return isSetKey();
- case VALUE:
- return isSetValue();
- }
- throw new java.lang.IllegalStateException();
- }
-
- @Override
- public boolean equals(java.lang.Object that) {
- if (that == null) return false;
- if (that instanceof key_value) return this.equals((key_value) that);
- return false;
- }
-
- public boolean equals(key_value that) {
- if (that == null) return false;
- if (this == that) return true;
-
- boolean this_present_key = true && this.isSetKey();
- boolean that_present_key = true && that.isSetKey();
- if (this_present_key || that_present_key) {
- if (!(this_present_key && that_present_key)) return false;
- if (!this.key.equals(that.key)) return false;
- }
-
- boolean this_present_value = true && this.isSetValue();
- boolean that_present_value = true && that.isSetValue();
- if (this_present_value || that_present_value) {
- if (!(this_present_value && that_present_value)) return false;
- if (!this.value.equals(that.value)) return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 1;
-
- hashCode = hashCode * 8191 + ((isSetKey()) ? 131071 : 524287);
- if (isSetKey()) hashCode = hashCode * 8191 + key.hashCode();
-
- hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287);
- if (isSetValue()) hashCode = hashCode * 8191 + value.hashCode();
-
- return hashCode;
- }
-
- @Override
- public int compareTo(key_value other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = java.lang.Boolean.valueOf(isSetKey()).compareTo(other.isSetKey());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetKey()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, other.key);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetValue()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- scheme(iprot).read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- scheme(oprot).write(oprot, this);
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("key_value(");
- boolean first = true;
-
- sb.append("key:");
- if (this.key == null) {
- sb.append("null");
- } else {
- sb.append(this.key);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("value:");
- if (this.value == null) {
- sb.append("null");
- } else {
- sb.append(this.value);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (key != null) {
- key.validate();
- }
- if (value != null) {
- value.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, java.lang.ClassNotFoundException {
- try {
- read(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class key_valueStandardSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public key_valueStandardScheme getScheme() {
- return new key_valueStandardScheme();
- }
- }
-
- private static class key_valueStandardScheme
- extends org.apache.thrift.scheme.StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, key_value struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true) {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // KEY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.key = new blob();
- struct.key.read(iprot);
- struct.setKeyIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // VALUE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.value = new blob();
- struct.value.read(iprot);
- struct.setValueIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, key_value struct)
- throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.key != null) {
- oprot.writeFieldBegin(KEY_FIELD_DESC);
- struct.key.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.value != null) {
- oprot.writeFieldBegin(VALUE_FIELD_DESC);
- struct.value.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
- }
-
- private static class key_valueTupleSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public key_valueTupleScheme getScheme() {
- return new key_valueTupleScheme();
- }
- }
-
- private static class key_valueTupleScheme
- extends org.apache.thrift.scheme.TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, key_value struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol oprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet optionals = new java.util.BitSet();
- if (struct.isSetKey()) {
- optionals.set(0);
- }
- if (struct.isSetValue()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetKey()) {
- struct.key.write(oprot);
- }
- if (struct.isSetValue()) {
- struct.value.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, key_value struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol iprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.key = new blob();
- struct.key.read(iprot);
- struct.setKeyIsSet(true);
- }
- if (incoming.get(1)) {
- struct.value = new blob();
- struct.value.read(iprot);
- struct.setValueIsSet(true);
- }
- }
- }
-
- private static S scheme(
- org.apache.thrift.protocol.TProtocol proto) {
- return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
- ? STANDARD_SCHEME_FACTORY
- : TUPLE_SCHEME_FACTORY)
- .getScheme();
- }
-}
diff --git a/java-client/src/main/java/org/apache/pegasus/apps/meta.java b/java-client/src/main/java/org/apache/pegasus/apps/meta.java
deleted file mode 100644
index cb51bd8513..0000000000
--- a/java-client/src/main/java/org/apache/pegasus/apps/meta.java
+++ /dev/null
@@ -1,3144 +0,0 @@
-/*
- * 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.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
- */
-package org.apache.pegasus.apps;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(
- value = "Autogenerated by Thrift Compiler (0.11.0)",
- date = "2022-05-17")
-public class meta {
-
- public interface Iface {
-
- public org.apache.pegasus.replication.query_cfg_response query_cfg(
- org.apache.pegasus.replication.query_cfg_request query) throws org.apache.thrift.TException;
-
- public org.apache.pegasus.replication.configuration_create_app_response create_app(
- org.apache.pegasus.replication.configuration_create_app_request request)
- throws org.apache.thrift.TException;
-
- public org.apache.pegasus.replication.configuration_drop_app_response drop_app(
- org.apache.pegasus.replication.configuration_drop_app_request request)
- throws org.apache.thrift.TException;
- }
-
- public interface AsyncIface {
-
- public void query_cfg(
- org.apache.pegasus.replication.query_cfg_request query,
- org.apache.thrift.async.AsyncMethodCallback<
- org.apache.pegasus.replication.query_cfg_response>
- resultHandler)
- throws org.apache.thrift.TException;
-
- public void create_app(
- org.apache.pegasus.replication.configuration_create_app_request request,
- org.apache.thrift.async.AsyncMethodCallback<
- org.apache.pegasus.replication.configuration_create_app_response>
- resultHandler)
- throws org.apache.thrift.TException;
-
- public void drop_app(
- org.apache.pegasus.replication.configuration_drop_app_request request,
- org.apache.thrift.async.AsyncMethodCallback<
- org.apache.pegasus.replication.configuration_drop_app_response>
- resultHandler)
- throws org.apache.thrift.TException;
- }
-
- public static class Client extends org.apache.thrift.TServiceClient implements Iface {
- public static class Factory implements org.apache.thrift.TServiceClientFactory {
- public Factory() {}
-
- public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
- return new Client(prot);
- }
-
- public Client getClient(
- org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
- return new Client(iprot, oprot);
- }
- }
-
- public Client(org.apache.thrift.protocol.TProtocol prot) {
- super(prot, prot);
- }
-
- public Client(
- org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
- super(iprot, oprot);
- }
-
- public org.apache.pegasus.replication.query_cfg_response query_cfg(
- org.apache.pegasus.replication.query_cfg_request query)
- throws org.apache.thrift.TException {
- send_query_cfg(query);
- return recv_query_cfg();
- }
-
- public void send_query_cfg(org.apache.pegasus.replication.query_cfg_request query)
- throws org.apache.thrift.TException {
- query_cfg_args args = new query_cfg_args();
- args.setQuery(query);
- sendBase("query_cfg", args);
- }
-
- public org.apache.pegasus.replication.query_cfg_response recv_query_cfg()
- throws org.apache.thrift.TException {
- query_cfg_result result = new query_cfg_result();
- receiveBase(result, "query_cfg");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(
- org.apache.thrift.TApplicationException.MISSING_RESULT,
- "query_cfg failed: unknown result");
- }
-
- public org.apache.pegasus.replication.configuration_create_app_response create_app(
- org.apache.pegasus.replication.configuration_create_app_request request)
- throws org.apache.thrift.TException {
- send_create_app(request);
- return recv_create_app();
- }
-
- public void send_create_app(
- org.apache.pegasus.replication.configuration_create_app_request request)
- throws org.apache.thrift.TException {
- create_app_args args = new create_app_args();
- args.setRequest(request);
- sendBase("create_app", args);
- }
-
- public org.apache.pegasus.replication.configuration_create_app_response recv_create_app()
- throws org.apache.thrift.TException {
- create_app_result result = new create_app_result();
- receiveBase(result, "create_app");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(
- org.apache.thrift.TApplicationException.MISSING_RESULT,
- "create_app failed: unknown result");
- }
-
- public org.apache.pegasus.replication.configuration_drop_app_response drop_app(
- org.apache.pegasus.replication.configuration_drop_app_request request)
- throws org.apache.thrift.TException {
- send_drop_app(request);
- return recv_drop_app();
- }
-
- public void send_drop_app(org.apache.pegasus.replication.configuration_drop_app_request request)
- throws org.apache.thrift.TException {
- drop_app_args args = new drop_app_args();
- args.setRequest(request);
- sendBase("drop_app", args);
- }
-
- public org.apache.pegasus.replication.configuration_drop_app_response recv_drop_app()
- throws org.apache.thrift.TException {
- drop_app_result result = new drop_app_result();
- receiveBase(result, "drop_app");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(
- org.apache.thrift.TApplicationException.MISSING_RESULT,
- "drop_app failed: unknown result");
- }
- }
-
- public static class AsyncClient extends org.apache.thrift.async.TAsyncClient
- implements AsyncIface {
- public static class Factory
- implements org.apache.thrift.async.TAsyncClientFactory {
- private org.apache.thrift.async.TAsyncClientManager clientManager;
- private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
-
- public Factory(
- org.apache.thrift.async.TAsyncClientManager clientManager,
- org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
- this.clientManager = clientManager;
- this.protocolFactory = protocolFactory;
- }
-
- public AsyncClient getAsyncClient(
- org.apache.thrift.transport.TNonblockingTransport transport) {
- return new AsyncClient(protocolFactory, clientManager, transport);
- }
- }
-
- public AsyncClient(
- org.apache.thrift.protocol.TProtocolFactory protocolFactory,
- org.apache.thrift.async.TAsyncClientManager clientManager,
- org.apache.thrift.transport.TNonblockingTransport transport) {
- super(protocolFactory, clientManager, transport);
- }
-
- public void query_cfg(
- org.apache.pegasus.replication.query_cfg_request query,
- org.apache.thrift.async.AsyncMethodCallback<
- org.apache.pegasus.replication.query_cfg_response>
- resultHandler)
- throws org.apache.thrift.TException {
- checkReady();
- query_cfg_call method_call =
- new query_cfg_call(query, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class query_cfg_call
- extends org.apache.thrift.async.TAsyncMethodCall<
- org.apache.pegasus.replication.query_cfg_response> {
- private org.apache.pegasus.replication.query_cfg_request query;
-
- public query_cfg_call(
- org.apache.pegasus.replication.query_cfg_request query,
- org.apache.thrift.async.AsyncMethodCallback<
- org.apache.pegasus.replication.query_cfg_response>
- resultHandler,
- org.apache.thrift.async.TAsyncClient client,
- org.apache.thrift.protocol.TProtocolFactory protocolFactory,
- org.apache.thrift.transport.TNonblockingTransport transport)
- throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.query = query;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot)
- throws org.apache.thrift.TException {
- prot.writeMessageBegin(
- new org.apache.thrift.protocol.TMessage(
- "query_cfg", org.apache.thrift.protocol.TMessageType.CALL, 0));
- query_cfg_args args = new query_cfg_args();
- args.setQuery(query);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public org.apache.pegasus.replication.query_cfg_response getResult()
- throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new java.lang.IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
- new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot =
- client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_query_cfg();
- }
- }
-
- public void create_app(
- org.apache.pegasus.replication.configuration_create_app_request request,
- org.apache.thrift.async.AsyncMethodCallback<
- org.apache.pegasus.replication.configuration_create_app_response>
- resultHandler)
- throws org.apache.thrift.TException {
- checkReady();
- create_app_call method_call =
- new create_app_call(request, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class create_app_call
- extends org.apache.thrift.async.TAsyncMethodCall<
- org.apache.pegasus.replication.configuration_create_app_response> {
- private org.apache.pegasus.replication.configuration_create_app_request request;
-
- public create_app_call(
- org.apache.pegasus.replication.configuration_create_app_request request,
- org.apache.thrift.async.AsyncMethodCallback<
- org.apache.pegasus.replication.configuration_create_app_response>
- resultHandler,
- org.apache.thrift.async.TAsyncClient client,
- org.apache.thrift.protocol.TProtocolFactory protocolFactory,
- org.apache.thrift.transport.TNonblockingTransport transport)
- throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.request = request;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot)
- throws org.apache.thrift.TException {
- prot.writeMessageBegin(
- new org.apache.thrift.protocol.TMessage(
- "create_app", org.apache.thrift.protocol.TMessageType.CALL, 0));
- create_app_args args = new create_app_args();
- args.setRequest(request);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public org.apache.pegasus.replication.configuration_create_app_response getResult()
- throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new java.lang.IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
- new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot =
- client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_create_app();
- }
- }
-
- public void drop_app(
- org.apache.pegasus.replication.configuration_drop_app_request request,
- org.apache.thrift.async.AsyncMethodCallback<
- org.apache.pegasus.replication.configuration_drop_app_response>
- resultHandler)
- throws org.apache.thrift.TException {
- checkReady();
- drop_app_call method_call =
- new drop_app_call(request, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class drop_app_call
- extends org.apache.thrift.async.TAsyncMethodCall<
- org.apache.pegasus.replication.configuration_drop_app_response> {
- private org.apache.pegasus.replication.configuration_drop_app_request request;
-
- public drop_app_call(
- org.apache.pegasus.replication.configuration_drop_app_request request,
- org.apache.thrift.async.AsyncMethodCallback<
- org.apache.pegasus.replication.configuration_drop_app_response>
- resultHandler,
- org.apache.thrift.async.TAsyncClient client,
- org.apache.thrift.protocol.TProtocolFactory protocolFactory,
- org.apache.thrift.transport.TNonblockingTransport transport)
- throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.request = request;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot)
- throws org.apache.thrift.TException {
- prot.writeMessageBegin(
- new org.apache.thrift.protocol.TMessage(
- "drop_app", org.apache.thrift.protocol.TMessageType.CALL, 0));
- drop_app_args args = new drop_app_args();
- args.setRequest(request);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public org.apache.pegasus.replication.configuration_drop_app_response getResult()
- throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new java.lang.IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
- new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot =
- client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_drop_app();
- }
- }
- }
-
- public static class Processor extends org.apache.thrift.TBaseProcessor
- implements org.apache.thrift.TProcessor {
- private static final org.slf4j.Logger _LOGGER =
- org.slf4j.LoggerFactory.getLogger(Processor.class.getName());
-
- public Processor(I iface) {
- super(
- iface,
- getProcessMap(
- new java.util.HashMap<
- java.lang.String,
- org.apache.thrift.ProcessFunction>()));
- }
-
- protected Processor(
- I iface,
- java.util.Map<
- java.lang.String,
- org.apache.thrift.ProcessFunction>
- processMap) {
- super(iface, getProcessMap(processMap));
- }
-
- private static
- java.util.Map<
- java.lang.String,
- org.apache.thrift.ProcessFunction>
- getProcessMap(
- java.util.Map<
- java.lang.String,
- org.apache.thrift.ProcessFunction>
- processMap) {
- processMap.put("query_cfg", new query_cfg());
- processMap.put("create_app", new create_app());
- processMap.put("drop_app", new drop_app());
- return processMap;
- }
-
- public static class query_cfg
- extends org.apache.thrift.ProcessFunction {
- public query_cfg() {
- super("query_cfg");
- }
-
- public query_cfg_args getEmptyArgsInstance() {
- return new query_cfg_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- @Override
- protected boolean handleRuntimeExceptions() {
- return false;
- }
-
- public query_cfg_result getResult(I iface, query_cfg_args args)
- throws org.apache.thrift.TException {
- query_cfg_result result = new query_cfg_result();
- result.success = iface.query_cfg(args.query);
- return result;
- }
- }
-
- public static class create_app
- extends org.apache.thrift.ProcessFunction {
- public create_app() {
- super("create_app");
- }
-
- public create_app_args getEmptyArgsInstance() {
- return new create_app_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- @Override
- protected boolean handleRuntimeExceptions() {
- return false;
- }
-
- public create_app_result getResult(I iface, create_app_args args)
- throws org.apache.thrift.TException {
- create_app_result result = new create_app_result();
- result.success = iface.create_app(args.request);
- return result;
- }
- }
-
- public static class drop_app
- extends org.apache.thrift.ProcessFunction {
- public drop_app() {
- super("drop_app");
- }
-
- public drop_app_args getEmptyArgsInstance() {
- return new drop_app_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- @Override
- protected boolean handleRuntimeExceptions() {
- return false;
- }
-
- public drop_app_result getResult(I iface, drop_app_args args)
- throws org.apache.thrift.TException {
- drop_app_result result = new drop_app_result();
- result.success = iface.drop_app(args.request);
- return result;
- }
- }
- }
-
- public static class AsyncProcessor
- extends org.apache.thrift.TBaseAsyncProcessor {
- private static final org.slf4j.Logger _LOGGER =
- org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName());
-
- public AsyncProcessor(I iface) {
- super(
- iface,
- getProcessMap(
- new java.util.HashMap<
- java.lang.String,
- org.apache.thrift.AsyncProcessFunction<
- I, ? extends org.apache.thrift.TBase, ?>>()));
- }
-
- protected AsyncProcessor(
- I iface,
- java.util.Map<
- java.lang.String,
- org.apache.thrift.AsyncProcessFunction>
- processMap) {
- super(iface, getProcessMap(processMap));
- }
-
- private static
- java.util.Map<
- java.lang.String,
- org.apache.thrift.AsyncProcessFunction>
- getProcessMap(
- java.util.Map<
- java.lang.String,
- org.apache.thrift.AsyncProcessFunction<
- I, ? extends org.apache.thrift.TBase, ?>>
- processMap) {
- processMap.put("query_cfg", new query_cfg());
- processMap.put("create_app", new create_app());
- processMap.put("drop_app", new drop_app());
- return processMap;
- }
-
- public static class query_cfg
- extends org.apache.thrift.AsyncProcessFunction<
- I, query_cfg_args, org.apache.pegasus.replication.query_cfg_response> {
- public query_cfg() {
- super("query_cfg");
- }
-
- public query_cfg_args getEmptyArgsInstance() {
- return new query_cfg_args();
- }
-
- public org.apache.thrift.async.AsyncMethodCallback<
- org.apache.pegasus.replication.query_cfg_response>
- getResultHandler(
- final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb,
- final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new org.apache.thrift.async.AsyncMethodCallback<
- org.apache.pegasus.replication.query_cfg_response>() {
- public void onComplete(org.apache.pegasus.replication.query_cfg_response o) {
- query_cfg_result result = new query_cfg_result();
- result.success = o;
- try {
- fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY, seqid);
- } catch (org.apache.thrift.transport.TTransportException e) {
- _LOGGER.error("TTransportException writing to internal frame buffer", e);
- fb.close();
- } catch (java.lang.Exception e) {
- _LOGGER.error("Exception writing to internal frame buffer", e);
- onError(e);
- }
- }
-
- public void onError(java.lang.Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TSerializable msg;
- query_cfg_result result = new query_cfg_result();
- if (e instanceof org.apache.thrift.transport.TTransportException) {
- _LOGGER.error("TTransportException inside handler", e);
- fb.close();
- return;
- } else if (e instanceof org.apache.thrift.TApplicationException) {
- _LOGGER.error("TApplicationException inside handler", e);
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TApplicationException) e;
- } else {
- _LOGGER.error("Exception inside handler", e);
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg =
- new org.apache.thrift.TApplicationException(
- org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb, msg, msgType, seqid);
- } catch (java.lang.Exception ex) {
- _LOGGER.error("Exception writing to internal frame buffer", ex);
- fb.close();
- }
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(
- I iface,
- query_cfg_args args,
- org.apache.thrift.async.AsyncMethodCallback<
- org.apache.pegasus.replication.query_cfg_response>
- resultHandler)
- throws org.apache.thrift.TException {
- iface.query_cfg(args.query, resultHandler);
- }
- }
-
- public static class create_app
- extends org.apache.thrift.AsyncProcessFunction<
- I, create_app_args, org.apache.pegasus.replication.configuration_create_app_response> {
- public create_app() {
- super("create_app");
- }
-
- public create_app_args getEmptyArgsInstance() {
- return new create_app_args();
- }
-
- public org.apache.thrift.async.AsyncMethodCallback<
- org.apache.pegasus.replication.configuration_create_app_response>
- getResultHandler(
- final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb,
- final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new org.apache.thrift.async.AsyncMethodCallback<
- org.apache.pegasus.replication.configuration_create_app_response>() {
- public void onComplete(
- org.apache.pegasus.replication.configuration_create_app_response o) {
- create_app_result result = new create_app_result();
- result.success = o;
- try {
- fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY, seqid);
- } catch (org.apache.thrift.transport.TTransportException e) {
- _LOGGER.error("TTransportException writing to internal frame buffer", e);
- fb.close();
- } catch (java.lang.Exception e) {
- _LOGGER.error("Exception writing to internal frame buffer", e);
- onError(e);
- }
- }
-
- public void onError(java.lang.Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TSerializable msg;
- create_app_result result = new create_app_result();
- if (e instanceof org.apache.thrift.transport.TTransportException) {
- _LOGGER.error("TTransportException inside handler", e);
- fb.close();
- return;
- } else if (e instanceof org.apache.thrift.TApplicationException) {
- _LOGGER.error("TApplicationException inside handler", e);
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TApplicationException) e;
- } else {
- _LOGGER.error("Exception inside handler", e);
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg =
- new org.apache.thrift.TApplicationException(
- org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb, msg, msgType, seqid);
- } catch (java.lang.Exception ex) {
- _LOGGER.error("Exception writing to internal frame buffer", ex);
- fb.close();
- }
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(
- I iface,
- create_app_args args,
- org.apache.thrift.async.AsyncMethodCallback<
- org.apache.pegasus.replication.configuration_create_app_response>
- resultHandler)
- throws org.apache.thrift.TException {
- iface.create_app(args.request, resultHandler);
- }
- }
-
- public static class drop_app
- extends org.apache.thrift.AsyncProcessFunction<
- I, drop_app_args, org.apache.pegasus.replication.configuration_drop_app_response> {
- public drop_app() {
- super("drop_app");
- }
-
- public drop_app_args getEmptyArgsInstance() {
- return new drop_app_args();
- }
-
- public org.apache.thrift.async.AsyncMethodCallback<
- org.apache.pegasus.replication.configuration_drop_app_response>
- getResultHandler(
- final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb,
- final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new org.apache.thrift.async.AsyncMethodCallback<
- org.apache.pegasus.replication.configuration_drop_app_response>() {
- public void onComplete(org.apache.pegasus.replication.configuration_drop_app_response o) {
- drop_app_result result = new drop_app_result();
- result.success = o;
- try {
- fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY, seqid);
- } catch (org.apache.thrift.transport.TTransportException e) {
- _LOGGER.error("TTransportException writing to internal frame buffer", e);
- fb.close();
- } catch (java.lang.Exception e) {
- _LOGGER.error("Exception writing to internal frame buffer", e);
- onError(e);
- }
- }
-
- public void onError(java.lang.Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TSerializable msg;
- drop_app_result result = new drop_app_result();
- if (e instanceof org.apache.thrift.transport.TTransportException) {
- _LOGGER.error("TTransportException inside handler", e);
- fb.close();
- return;
- } else if (e instanceof org.apache.thrift.TApplicationException) {
- _LOGGER.error("TApplicationException inside handler", e);
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TApplicationException) e;
- } else {
- _LOGGER.error("Exception inside handler", e);
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg =
- new org.apache.thrift.TApplicationException(
- org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb, msg, msgType, seqid);
- } catch (java.lang.Exception ex) {
- _LOGGER.error("Exception writing to internal frame buffer", ex);
- fb.close();
- }
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(
- I iface,
- drop_app_args args,
- org.apache.thrift.async.AsyncMethodCallback<
- org.apache.pegasus.replication.configuration_drop_app_response>
- resultHandler)
- throws org.apache.thrift.TException {
- iface.drop_app(args.request, resultHandler);
- }
- }
- }
-
- public static class query_cfg_args
- implements org.apache.thrift.TBase,
- java.io.Serializable,
- Cloneable,
- Comparable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("query_cfg_args");
-
- private static final org.apache.thrift.protocol.TField QUERY_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "query", org.apache.thrift.protocol.TType.STRUCT, (short) 1);
-
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
- new query_cfg_argsStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
- new query_cfg_argsTupleSchemeFactory();
-
- public org.apache.pegasus.replication.query_cfg_request query; // required
-
- /**
- * The set of fields this struct contains, along with convenience methods for finding and
- * manipulating them.
- */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- QUERY((short) 1, "query");
-
- private static final java.util.Map byName =
- new java.util.HashMap();
-
- static {
- for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /** Find the _Fields constant that matches fieldId, or null if its not found. */
- public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
- case 1: // QUERY
- return QUERY;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null)
- throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /** Find the _Fields constant that matches name, or null if its not found. */
- public static _Fields findByName(java.lang.String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final java.lang.String _fieldName;
-
- _Fields(short thriftId, java.lang.String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public java.lang.String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
- metaDataMap;
-
- static {
- java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(
- _Fields.QUERY,
- new org.apache.thrift.meta_data.FieldMetaData(
- "query",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT,
- org.apache.pegasus.replication.query_cfg_request.class)));
- metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
- query_cfg_args.class, metaDataMap);
- }
-
- public query_cfg_args() {}
-
- public query_cfg_args(org.apache.pegasus.replication.query_cfg_request query) {
- this();
- this.query = query;
- }
-
- /** Performs a deep copy on other. */
- public query_cfg_args(query_cfg_args other) {
- if (other.isSetQuery()) {
- this.query = new org.apache.pegasus.replication.query_cfg_request(other.query);
- }
- }
-
- public query_cfg_args deepCopy() {
- return new query_cfg_args(this);
- }
-
- @Override
- public void clear() {
- this.query = null;
- }
-
- public org.apache.pegasus.replication.query_cfg_request getQuery() {
- return this.query;
- }
-
- public query_cfg_args setQuery(org.apache.pegasus.replication.query_cfg_request query) {
- this.query = query;
- return this;
- }
-
- public void unsetQuery() {
- this.query = null;
- }
-
- /** Returns true if field query is set (has been assigned a value) and false otherwise */
- public boolean isSetQuery() {
- return this.query != null;
- }
-
- public void setQueryIsSet(boolean value) {
- if (!value) {
- this.query = null;
- }
- }
-
- public void setFieldValue(_Fields field, java.lang.Object value) {
- switch (field) {
- case QUERY:
- if (value == null) {
- unsetQuery();
- } else {
- setQuery((org.apache.pegasus.replication.query_cfg_request) value);
- }
- break;
- }
- }
-
- public java.lang.Object getFieldValue(_Fields field) {
- switch (field) {
- case QUERY:
- return getQuery();
- }
- throw new java.lang.IllegalStateException();
- }
-
- /**
- * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new java.lang.IllegalArgumentException();
- }
-
- switch (field) {
- case QUERY:
- return isSetQuery();
- }
- throw new java.lang.IllegalStateException();
- }
-
- @Override
- public boolean equals(java.lang.Object that) {
- if (that == null) return false;
- if (that instanceof query_cfg_args) return this.equals((query_cfg_args) that);
- return false;
- }
-
- public boolean equals(query_cfg_args that) {
- if (that == null) return false;
- if (this == that) return true;
-
- boolean this_present_query = true && this.isSetQuery();
- boolean that_present_query = true && that.isSetQuery();
- if (this_present_query || that_present_query) {
- if (!(this_present_query && that_present_query)) return false;
- if (!this.query.equals(that.query)) return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 1;
-
- hashCode = hashCode * 8191 + ((isSetQuery()) ? 131071 : 524287);
- if (isSetQuery()) hashCode = hashCode * 8191 + query.hashCode();
-
- return hashCode;
- }
-
- @Override
- public int compareTo(query_cfg_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = java.lang.Boolean.valueOf(isSetQuery()).compareTo(other.isSetQuery());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetQuery()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.query, other.query);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot)
- throws org.apache.thrift.TException {
- scheme(iprot).read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- scheme(oprot).write(oprot, this);
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("query_cfg_args(");
- boolean first = true;
-
- sb.append("query:");
- if (this.query == null) {
- sb.append("null");
- } else {
- sb.append(this.query);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (query != null) {
- query.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, java.lang.ClassNotFoundException {
- try {
- read(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class query_cfg_argsStandardSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public query_cfg_argsStandardScheme getScheme() {
- return new query_cfg_argsStandardScheme();
- }
- }
-
- private static class query_cfg_argsStandardScheme
- extends org.apache.thrift.scheme.StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, query_cfg_args struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true) {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // QUERY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.query = new org.apache.pegasus.replication.query_cfg_request();
- struct.query.read(iprot);
- struct.setQueryIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate
- // method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, query_cfg_args struct)
- throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.query != null) {
- oprot.writeFieldBegin(QUERY_FIELD_DESC);
- struct.query.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
- }
-
- private static class query_cfg_argsTupleSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public query_cfg_argsTupleScheme getScheme() {
- return new query_cfg_argsTupleScheme();
- }
- }
-
- private static class query_cfg_argsTupleScheme
- extends org.apache.thrift.scheme.TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, query_cfg_args struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol oprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet optionals = new java.util.BitSet();
- if (struct.isSetQuery()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetQuery()) {
- struct.query.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, query_cfg_args struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol iprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.query = new org.apache.pegasus.replication.query_cfg_request();
- struct.query.read(iprot);
- struct.setQueryIsSet(true);
- }
- }
- }
-
- private static S scheme(
- org.apache.thrift.protocol.TProtocol proto) {
- return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
- ? STANDARD_SCHEME_FACTORY
- : TUPLE_SCHEME_FACTORY)
- .getScheme();
- }
- }
-
- public static class query_cfg_result
- implements org.apache.thrift.TBase,
- java.io.Serializable,
- Cloneable,
- Comparable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("query_cfg_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "success", org.apache.thrift.protocol.TType.STRUCT, (short) 0);
-
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
- new query_cfg_resultStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
- new query_cfg_resultTupleSchemeFactory();
-
- public org.apache.pegasus.replication.query_cfg_response success; // required
-
- /**
- * The set of fields this struct contains, along with convenience methods for finding and
- * manipulating them.
- */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short) 0, "success");
-
- private static final java.util.Map byName =
- new java.util.HashMap();
-
- static {
- for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /** Find the _Fields constant that matches fieldId, or null if its not found. */
- public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null)
- throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /** Find the _Fields constant that matches name, or null if its not found. */
- public static _Fields findByName(java.lang.String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final java.lang.String _fieldName;
-
- _Fields(short thriftId, java.lang.String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public java.lang.String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
- metaDataMap;
-
- static {
- java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(
- _Fields.SUCCESS,
- new org.apache.thrift.meta_data.FieldMetaData(
- "success",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT,
- org.apache.pegasus.replication.query_cfg_response.class)));
- metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
- query_cfg_result.class, metaDataMap);
- }
-
- public query_cfg_result() {}
-
- public query_cfg_result(org.apache.pegasus.replication.query_cfg_response success) {
- this();
- this.success = success;
- }
-
- /** Performs a deep copy on other. */
- public query_cfg_result(query_cfg_result other) {
- if (other.isSetSuccess()) {
- this.success = new org.apache.pegasus.replication.query_cfg_response(other.success);
- }
- }
-
- public query_cfg_result deepCopy() {
- return new query_cfg_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public org.apache.pegasus.replication.query_cfg_response getSuccess() {
- return this.success;
- }
-
- public query_cfg_result setSuccess(org.apache.pegasus.replication.query_cfg_response success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, java.lang.Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((org.apache.pegasus.replication.query_cfg_response) value);
- }
- break;
- }
- }
-
- public java.lang.Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
- }
- throw new java.lang.IllegalStateException();
- }
-
- /**
- * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new java.lang.IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new java.lang.IllegalStateException();
- }
-
- @Override
- public boolean equals(java.lang.Object that) {
- if (that == null) return false;
- if (that instanceof query_cfg_result) return this.equals((query_cfg_result) that);
- return false;
- }
-
- public boolean equals(query_cfg_result that) {
- if (that == null) return false;
- if (this == that) return true;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success)) return false;
- if (!this.success.equals(that.success)) return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 1;
-
- hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
- if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode();
-
- return hashCode;
- }
-
- @Override
- public int compareTo(query_cfg_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuccess()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot)
- throws org.apache.thrift.TException {
- scheme(iprot).read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- scheme(oprot).write(oprot, this);
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("query_cfg_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (success != null) {
- success.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, java.lang.ClassNotFoundException {
- try {
- read(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class query_cfg_resultStandardSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public query_cfg_resultStandardScheme getScheme() {
- return new query_cfg_resultStandardScheme();
- }
- }
-
- private static class query_cfg_resultStandardScheme
- extends org.apache.thrift.scheme.StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, query_cfg_result struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true) {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.success = new org.apache.pegasus.replication.query_cfg_response();
- struct.success.read(iprot);
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate
- // method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, query_cfg_result struct)
- throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- struct.success.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
- }
-
- private static class query_cfg_resultTupleSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public query_cfg_resultTupleScheme getScheme() {
- return new query_cfg_resultTupleScheme();
- }
- }
-
- private static class query_cfg_resultTupleScheme
- extends org.apache.thrift.scheme.TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, query_cfg_result struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol oprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet optionals = new java.util.BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- struct.success.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, query_cfg_result struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol iprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = new org.apache.pegasus.replication.query_cfg_response();
- struct.success.read(iprot);
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- private static S scheme(
- org.apache.thrift.protocol.TProtocol proto) {
- return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
- ? STANDARD_SCHEME_FACTORY
- : TUPLE_SCHEME_FACTORY)
- .getScheme();
- }
- }
-
- public static class create_app_args
- implements org.apache.thrift.TBase,
- java.io.Serializable,
- Cloneable,
- Comparable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("create_app_args");
-
- private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "request", org.apache.thrift.protocol.TType.STRUCT, (short) 1);
-
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
- new create_app_argsStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
- new create_app_argsTupleSchemeFactory();
-
- public org.apache.pegasus.replication.configuration_create_app_request request; // required
-
- /**
- * The set of fields this struct contains, along with convenience methods for finding and
- * manipulating them.
- */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- REQUEST((short) 1, "request");
-
- private static final java.util.Map byName =
- new java.util.HashMap();
-
- static {
- for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /** Find the _Fields constant that matches fieldId, or null if its not found. */
- public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
- case 1: // REQUEST
- return REQUEST;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null)
- throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /** Find the _Fields constant that matches name, or null if its not found. */
- public static _Fields findByName(java.lang.String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final java.lang.String _fieldName;
-
- _Fields(short thriftId, java.lang.String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public java.lang.String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
- metaDataMap;
-
- static {
- java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(
- _Fields.REQUEST,
- new org.apache.thrift.meta_data.FieldMetaData(
- "request",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT,
- org.apache.pegasus.replication.configuration_create_app_request.class)));
- metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
- create_app_args.class, metaDataMap);
- }
-
- public create_app_args() {}
-
- public create_app_args(
- org.apache.pegasus.replication.configuration_create_app_request request) {
- this();
- this.request = request;
- }
-
- /** Performs a deep copy on other. */
- public create_app_args(create_app_args other) {
- if (other.isSetRequest()) {
- this.request =
- new org.apache.pegasus.replication.configuration_create_app_request(other.request);
- }
- }
-
- public create_app_args deepCopy() {
- return new create_app_args(this);
- }
-
- @Override
- public void clear() {
- this.request = null;
- }
-
- public org.apache.pegasus.replication.configuration_create_app_request getRequest() {
- return this.request;
- }
-
- public create_app_args setRequest(
- org.apache.pegasus.replication.configuration_create_app_request request) {
- this.request = request;
- return this;
- }
-
- public void unsetRequest() {
- this.request = null;
- }
-
- /** Returns true if field request is set (has been assigned a value) and false otherwise */
- public boolean isSetRequest() {
- return this.request != null;
- }
-
- public void setRequestIsSet(boolean value) {
- if (!value) {
- this.request = null;
- }
- }
-
- public void setFieldValue(_Fields field, java.lang.Object value) {
- switch (field) {
- case REQUEST:
- if (value == null) {
- unsetRequest();
- } else {
- setRequest((org.apache.pegasus.replication.configuration_create_app_request) value);
- }
- break;
- }
- }
-
- public java.lang.Object getFieldValue(_Fields field) {
- switch (field) {
- case REQUEST:
- return getRequest();
- }
- throw new java.lang.IllegalStateException();
- }
-
- /**
- * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new java.lang.IllegalArgumentException();
- }
-
- switch (field) {
- case REQUEST:
- return isSetRequest();
- }
- throw new java.lang.IllegalStateException();
- }
-
- @Override
- public boolean equals(java.lang.Object that) {
- if (that == null) return false;
- if (that instanceof create_app_args) return this.equals((create_app_args) that);
- return false;
- }
-
- public boolean equals(create_app_args that) {
- if (that == null) return false;
- if (this == that) return true;
-
- boolean this_present_request = true && this.isSetRequest();
- boolean that_present_request = true && that.isSetRequest();
- if (this_present_request || that_present_request) {
- if (!(this_present_request && that_present_request)) return false;
- if (!this.request.equals(that.request)) return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 1;
-
- hashCode = hashCode * 8191 + ((isSetRequest()) ? 131071 : 524287);
- if (isSetRequest()) hashCode = hashCode * 8191 + request.hashCode();
-
- return hashCode;
- }
-
- @Override
- public int compareTo(create_app_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = java.lang.Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetRequest()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot)
- throws org.apache.thrift.TException {
- scheme(iprot).read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- scheme(oprot).write(oprot, this);
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("create_app_args(");
- boolean first = true;
-
- sb.append("request:");
- if (this.request == null) {
- sb.append("null");
- } else {
- sb.append(this.request);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (request != null) {
- request.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, java.lang.ClassNotFoundException {
- try {
- read(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class create_app_argsStandardSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public create_app_argsStandardScheme getScheme() {
- return new create_app_argsStandardScheme();
- }
- }
-
- private static class create_app_argsStandardScheme
- extends org.apache.thrift.scheme.StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, create_app_args struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true) {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // REQUEST
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.request =
- new org.apache.pegasus.replication.configuration_create_app_request();
- struct.request.read(iprot);
- struct.setRequestIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate
- // method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, create_app_args struct)
- throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.request != null) {
- oprot.writeFieldBegin(REQUEST_FIELD_DESC);
- struct.request.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
- }
-
- private static class create_app_argsTupleSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public create_app_argsTupleScheme getScheme() {
- return new create_app_argsTupleScheme();
- }
- }
-
- private static class create_app_argsTupleScheme
- extends org.apache.thrift.scheme.TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, create_app_args struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol oprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet optionals = new java.util.BitSet();
- if (struct.isSetRequest()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetRequest()) {
- struct.request.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, create_app_args struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol iprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.request = new org.apache.pegasus.replication.configuration_create_app_request();
- struct.request.read(iprot);
- struct.setRequestIsSet(true);
- }
- }
- }
-
- private static S scheme(
- org.apache.thrift.protocol.TProtocol proto) {
- return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
- ? STANDARD_SCHEME_FACTORY
- : TUPLE_SCHEME_FACTORY)
- .getScheme();
- }
- }
-
- public static class create_app_result
- implements org.apache.thrift.TBase,
- java.io.Serializable,
- Cloneable,
- Comparable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("create_app_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "success", org.apache.thrift.protocol.TType.STRUCT, (short) 0);
-
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
- new create_app_resultStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
- new create_app_resultTupleSchemeFactory();
-
- public org.apache.pegasus.replication.configuration_create_app_response success; // required
-
- /**
- * The set of fields this struct contains, along with convenience methods for finding and
- * manipulating them.
- */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short) 0, "success");
-
- private static final java.util.Map byName =
- new java.util.HashMap();
-
- static {
- for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /** Find the _Fields constant that matches fieldId, or null if its not found. */
- public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null)
- throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /** Find the _Fields constant that matches name, or null if its not found. */
- public static _Fields findByName(java.lang.String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final java.lang.String _fieldName;
-
- _Fields(short thriftId, java.lang.String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public java.lang.String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
- metaDataMap;
-
- static {
- java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(
- _Fields.SUCCESS,
- new org.apache.thrift.meta_data.FieldMetaData(
- "success",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT,
- org.apache.pegasus.replication.configuration_create_app_response.class)));
- metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
- create_app_result.class, metaDataMap);
- }
-
- public create_app_result() {}
-
- public create_app_result(
- org.apache.pegasus.replication.configuration_create_app_response success) {
- this();
- this.success = success;
- }
-
- /** Performs a deep copy on other. */
- public create_app_result(create_app_result other) {
- if (other.isSetSuccess()) {
- this.success =
- new org.apache.pegasus.replication.configuration_create_app_response(other.success);
- }
- }
-
- public create_app_result deepCopy() {
- return new create_app_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public org.apache.pegasus.replication.configuration_create_app_response getSuccess() {
- return this.success;
- }
-
- public create_app_result setSuccess(
- org.apache.pegasus.replication.configuration_create_app_response success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, java.lang.Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((org.apache.pegasus.replication.configuration_create_app_response) value);
- }
- break;
- }
- }
-
- public java.lang.Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
- }
- throw new java.lang.IllegalStateException();
- }
-
- /**
- * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new java.lang.IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new java.lang.IllegalStateException();
- }
-
- @Override
- public boolean equals(java.lang.Object that) {
- if (that == null) return false;
- if (that instanceof create_app_result) return this.equals((create_app_result) that);
- return false;
- }
-
- public boolean equals(create_app_result that) {
- if (that == null) return false;
- if (this == that) return true;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success)) return false;
- if (!this.success.equals(that.success)) return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 1;
-
- hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
- if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode();
-
- return hashCode;
- }
-
- @Override
- public int compareTo(create_app_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuccess()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot)
- throws org.apache.thrift.TException {
- scheme(iprot).read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- scheme(oprot).write(oprot, this);
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("create_app_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (success != null) {
- success.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, java.lang.ClassNotFoundException {
- try {
- read(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class create_app_resultStandardSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public create_app_resultStandardScheme getScheme() {
- return new create_app_resultStandardScheme();
- }
- }
-
- private static class create_app_resultStandardScheme
- extends org.apache.thrift.scheme.StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, create_app_result struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true) {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.success =
- new org.apache.pegasus.replication.configuration_create_app_response();
- struct.success.read(iprot);
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate
- // method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, create_app_result struct)
- throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- struct.success.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
- }
-
- private static class create_app_resultTupleSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public create_app_resultTupleScheme getScheme() {
- return new create_app_resultTupleScheme();
- }
- }
-
- private static class create_app_resultTupleScheme
- extends org.apache.thrift.scheme.TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, create_app_result struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol oprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet optionals = new java.util.BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- struct.success.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, create_app_result struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol iprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = new org.apache.pegasus.replication.configuration_create_app_response();
- struct.success.read(iprot);
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- private static S scheme(
- org.apache.thrift.protocol.TProtocol proto) {
- return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
- ? STANDARD_SCHEME_FACTORY
- : TUPLE_SCHEME_FACTORY)
- .getScheme();
- }
- }
-
- public static class drop_app_args
- implements org.apache.thrift.TBase,
- java.io.Serializable,
- Cloneable,
- Comparable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("drop_app_args");
-
- private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "request", org.apache.thrift.protocol.TType.STRUCT, (short) 1);
-
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
- new drop_app_argsStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
- new drop_app_argsTupleSchemeFactory();
-
- public org.apache.pegasus.replication.configuration_drop_app_request request; // required
-
- /**
- * The set of fields this struct contains, along with convenience methods for finding and
- * manipulating them.
- */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- REQUEST((short) 1, "request");
-
- private static final java.util.Map byName =
- new java.util.HashMap();
-
- static {
- for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /** Find the _Fields constant that matches fieldId, or null if its not found. */
- public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
- case 1: // REQUEST
- return REQUEST;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null)
- throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /** Find the _Fields constant that matches name, or null if its not found. */
- public static _Fields findByName(java.lang.String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final java.lang.String _fieldName;
-
- _Fields(short thriftId, java.lang.String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public java.lang.String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
- metaDataMap;
-
- static {
- java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(
- _Fields.REQUEST,
- new org.apache.thrift.meta_data.FieldMetaData(
- "request",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT,
- org.apache.pegasus.replication.configuration_drop_app_request.class)));
- metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
- drop_app_args.class, metaDataMap);
- }
-
- public drop_app_args() {}
-
- public drop_app_args(org.apache.pegasus.replication.configuration_drop_app_request request) {
- this();
- this.request = request;
- }
-
- /** Performs a deep copy on other. */
- public drop_app_args(drop_app_args other) {
- if (other.isSetRequest()) {
- this.request =
- new org.apache.pegasus.replication.configuration_drop_app_request(other.request);
- }
- }
-
- public drop_app_args deepCopy() {
- return new drop_app_args(this);
- }
-
- @Override
- public void clear() {
- this.request = null;
- }
-
- public org.apache.pegasus.replication.configuration_drop_app_request getRequest() {
- return this.request;
- }
-
- public drop_app_args setRequest(
- org.apache.pegasus.replication.configuration_drop_app_request request) {
- this.request = request;
- return this;
- }
-
- public void unsetRequest() {
- this.request = null;
- }
-
- /** Returns true if field request is set (has been assigned a value) and false otherwise */
- public boolean isSetRequest() {
- return this.request != null;
- }
-
- public void setRequestIsSet(boolean value) {
- if (!value) {
- this.request = null;
- }
- }
-
- public void setFieldValue(_Fields field, java.lang.Object value) {
- switch (field) {
- case REQUEST:
- if (value == null) {
- unsetRequest();
- } else {
- setRequest((org.apache.pegasus.replication.configuration_drop_app_request) value);
- }
- break;
- }
- }
-
- public java.lang.Object getFieldValue(_Fields field) {
- switch (field) {
- case REQUEST:
- return getRequest();
- }
- throw new java.lang.IllegalStateException();
- }
-
- /**
- * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new java.lang.IllegalArgumentException();
- }
-
- switch (field) {
- case REQUEST:
- return isSetRequest();
- }
- throw new java.lang.IllegalStateException();
- }
-
- @Override
- public boolean equals(java.lang.Object that) {
- if (that == null) return false;
- if (that instanceof drop_app_args) return this.equals((drop_app_args) that);
- return false;
- }
-
- public boolean equals(drop_app_args that) {
- if (that == null) return false;
- if (this == that) return true;
-
- boolean this_present_request = true && this.isSetRequest();
- boolean that_present_request = true && that.isSetRequest();
- if (this_present_request || that_present_request) {
- if (!(this_present_request && that_present_request)) return false;
- if (!this.request.equals(that.request)) return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 1;
-
- hashCode = hashCode * 8191 + ((isSetRequest()) ? 131071 : 524287);
- if (isSetRequest()) hashCode = hashCode * 8191 + request.hashCode();
-
- return hashCode;
- }
-
- @Override
- public int compareTo(drop_app_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = java.lang.Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetRequest()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot)
- throws org.apache.thrift.TException {
- scheme(iprot).read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- scheme(oprot).write(oprot, this);
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("drop_app_args(");
- boolean first = true;
-
- sb.append("request:");
- if (this.request == null) {
- sb.append("null");
- } else {
- sb.append(this.request);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (request != null) {
- request.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, java.lang.ClassNotFoundException {
- try {
- read(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class drop_app_argsStandardSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public drop_app_argsStandardScheme getScheme() {
- return new drop_app_argsStandardScheme();
- }
- }
-
- private static class drop_app_argsStandardScheme
- extends org.apache.thrift.scheme.StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, drop_app_args struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true) {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // REQUEST
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.request =
- new org.apache.pegasus.replication.configuration_drop_app_request();
- struct.request.read(iprot);
- struct.setRequestIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate
- // method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, drop_app_args struct)
- throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.request != null) {
- oprot.writeFieldBegin(REQUEST_FIELD_DESC);
- struct.request.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
- }
-
- private static class drop_app_argsTupleSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public drop_app_argsTupleScheme getScheme() {
- return new drop_app_argsTupleScheme();
- }
- }
-
- private static class drop_app_argsTupleScheme
- extends org.apache.thrift.scheme.TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, drop_app_args struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol oprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet optionals = new java.util.BitSet();
- if (struct.isSetRequest()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetRequest()) {
- struct.request.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, drop_app_args struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol iprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.request = new org.apache.pegasus.replication.configuration_drop_app_request();
- struct.request.read(iprot);
- struct.setRequestIsSet(true);
- }
- }
- }
-
- private static S scheme(
- org.apache.thrift.protocol.TProtocol proto) {
- return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
- ? STANDARD_SCHEME_FACTORY
- : TUPLE_SCHEME_FACTORY)
- .getScheme();
- }
- }
-
- public static class drop_app_result
- implements org.apache.thrift.TBase,
- java.io.Serializable,
- Cloneable,
- Comparable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("drop_app_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "success", org.apache.thrift.protocol.TType.STRUCT, (short) 0);
-
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
- new drop_app_resultStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
- new drop_app_resultTupleSchemeFactory();
-
- public org.apache.pegasus.replication.configuration_drop_app_response success; // required
-
- /**
- * The set of fields this struct contains, along with convenience methods for finding and
- * manipulating them.
- */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short) 0, "success");
-
- private static final java.util.Map byName =
- new java.util.HashMap();
-
- static {
- for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /** Find the _Fields constant that matches fieldId, or null if its not found. */
- public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null)
- throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /** Find the _Fields constant that matches name, or null if its not found. */
- public static _Fields findByName(java.lang.String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final java.lang.String _fieldName;
-
- _Fields(short thriftId, java.lang.String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public java.lang.String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
- metaDataMap;
-
- static {
- java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(
- _Fields.SUCCESS,
- new org.apache.thrift.meta_data.FieldMetaData(
- "success",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT,
- org.apache.pegasus.replication.configuration_drop_app_response.class)));
- metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
- drop_app_result.class, metaDataMap);
- }
-
- public drop_app_result() {}
-
- public drop_app_result(org.apache.pegasus.replication.configuration_drop_app_response success) {
- this();
- this.success = success;
- }
-
- /** Performs a deep copy on other. */
- public drop_app_result(drop_app_result other) {
- if (other.isSetSuccess()) {
- this.success =
- new org.apache.pegasus.replication.configuration_drop_app_response(other.success);
- }
- }
-
- public drop_app_result deepCopy() {
- return new drop_app_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public org.apache.pegasus.replication.configuration_drop_app_response getSuccess() {
- return this.success;
- }
-
- public drop_app_result setSuccess(
- org.apache.pegasus.replication.configuration_drop_app_response success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, java.lang.Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((org.apache.pegasus.replication.configuration_drop_app_response) value);
- }
- break;
- }
- }
-
- public java.lang.Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
- }
- throw new java.lang.IllegalStateException();
- }
-
- /**
- * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new java.lang.IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new java.lang.IllegalStateException();
- }
-
- @Override
- public boolean equals(java.lang.Object that) {
- if (that == null) return false;
- if (that instanceof drop_app_result) return this.equals((drop_app_result) that);
- return false;
- }
-
- public boolean equals(drop_app_result that) {
- if (that == null) return false;
- if (this == that) return true;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success)) return false;
- if (!this.success.equals(that.success)) return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 1;
-
- hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
- if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode();
-
- return hashCode;
- }
-
- @Override
- public int compareTo(drop_app_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuccess()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot)
- throws org.apache.thrift.TException {
- scheme(iprot).read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- scheme(oprot).write(oprot, this);
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("drop_app_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (success != null) {
- success.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, java.lang.ClassNotFoundException {
- try {
- read(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class drop_app_resultStandardSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public drop_app_resultStandardScheme getScheme() {
- return new drop_app_resultStandardScheme();
- }
- }
-
- private static class drop_app_resultStandardScheme
- extends org.apache.thrift.scheme.StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, drop_app_result struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true) {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.success =
- new org.apache.pegasus.replication.configuration_drop_app_response();
- struct.success.read(iprot);
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate
- // method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, drop_app_result struct)
- throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- struct.success.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
- }
-
- private static class drop_app_resultTupleSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public drop_app_resultTupleScheme getScheme() {
- return new drop_app_resultTupleScheme();
- }
- }
-
- private static class drop_app_resultTupleScheme
- extends org.apache.thrift.scheme.TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, drop_app_result struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol oprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet optionals = new java.util.BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- struct.success.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, drop_app_result struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol iprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = new org.apache.pegasus.replication.configuration_drop_app_response();
- struct.success.read(iprot);
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- private static S scheme(
- org.apache.thrift.protocol.TProtocol proto) {
- return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
- ? STANDARD_SCHEME_FACTORY
- : TUPLE_SCHEME_FACTORY)
- .getScheme();
- }
- }
-}
diff --git a/java-client/src/main/java/org/apache/pegasus/apps/multi_get_request.java b/java-client/src/main/java/org/apache/pegasus/apps/multi_get_request.java
deleted file mode 100644
index 8b5c3cdf25..0000000000
--- a/java-client/src/main/java/org/apache/pegasus/apps/multi_get_request.java
+++ /dev/null
@@ -1,1690 +0,0 @@
-/*
- * 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.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
- */
-package org.apache.pegasus.apps;
-
-import org.apache.pegasus.base.blob;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(
- value = "Autogenerated by Thrift Compiler (0.11.0)",
- date = "2020-04-13")
-public class multi_get_request
- implements org.apache.thrift.TBase,
- java.io.Serializable,
- Cloneable,
- Comparable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("multi_get_request");
-
- private static final org.apache.thrift.protocol.TField HASH_KEY_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "hash_key", org.apache.thrift.protocol.TType.STRUCT, (short) 1);
- private static final org.apache.thrift.protocol.TField SORK_KEYS_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "sork_keys", org.apache.thrift.protocol.TType.LIST, (short) 2);
- private static final org.apache.thrift.protocol.TField MAX_KV_COUNT_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "max_kv_count", org.apache.thrift.protocol.TType.I32, (short) 3);
- private static final org.apache.thrift.protocol.TField MAX_KV_SIZE_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "max_kv_size", org.apache.thrift.protocol.TType.I32, (short) 4);
- private static final org.apache.thrift.protocol.TField NO_VALUE_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "no_value", org.apache.thrift.protocol.TType.BOOL, (short) 5);
- private static final org.apache.thrift.protocol.TField START_SORTKEY_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "start_sortkey", org.apache.thrift.protocol.TType.STRUCT, (short) 6);
- private static final org.apache.thrift.protocol.TField STOP_SORTKEY_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "stop_sortkey", org.apache.thrift.protocol.TType.STRUCT, (short) 7);
- private static final org.apache.thrift.protocol.TField START_INCLUSIVE_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "start_inclusive", org.apache.thrift.protocol.TType.BOOL, (short) 8);
- private static final org.apache.thrift.protocol.TField STOP_INCLUSIVE_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "stop_inclusive", org.apache.thrift.protocol.TType.BOOL, (short) 9);
- private static final org.apache.thrift.protocol.TField SORT_KEY_FILTER_TYPE_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "sort_key_filter_type", org.apache.thrift.protocol.TType.I32, (short) 10);
- private static final org.apache.thrift.protocol.TField SORT_KEY_FILTER_PATTERN_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "sort_key_filter_pattern", org.apache.thrift.protocol.TType.STRUCT, (short) 11);
- private static final org.apache.thrift.protocol.TField REVERSE_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "reverse", org.apache.thrift.protocol.TType.BOOL, (short) 12);
-
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
- new multi_get_requestStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
- new multi_get_requestTupleSchemeFactory();
-
- public blob hash_key; // required
- public java.util.List sork_keys; // required
- public int max_kv_count; // required
- public int max_kv_size; // required
- public boolean no_value; // required
- public blob start_sortkey; // required
- public blob stop_sortkey; // required
- public boolean start_inclusive; // required
- public boolean stop_inclusive; // required
- /** @see filter_type */
- public filter_type sort_key_filter_type; // required
-
- public blob sort_key_filter_pattern; // required
- public boolean reverse; // required
-
- /**
- * The set of fields this struct contains, along with convenience methods for finding and
- * manipulating them.
- */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- HASH_KEY((short) 1, "hash_key"),
- SORK_KEYS((short) 2, "sork_keys"),
- MAX_KV_COUNT((short) 3, "max_kv_count"),
- MAX_KV_SIZE((short) 4, "max_kv_size"),
- NO_VALUE((short) 5, "no_value"),
- START_SORTKEY((short) 6, "start_sortkey"),
- STOP_SORTKEY((short) 7, "stop_sortkey"),
- START_INCLUSIVE((short) 8, "start_inclusive"),
- STOP_INCLUSIVE((short) 9, "stop_inclusive"),
- /** @see filter_type */
- SORT_KEY_FILTER_TYPE((short) 10, "sort_key_filter_type"),
- SORT_KEY_FILTER_PATTERN((short) 11, "sort_key_filter_pattern"),
- REVERSE((short) 12, "reverse");
-
- private static final java.util.Map byName =
- new java.util.HashMap();
-
- static {
- for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /** Find the _Fields constant that matches fieldId, or null if its not found. */
- public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
- case 1: // HASH_KEY
- return HASH_KEY;
- case 2: // SORK_KEYS
- return SORK_KEYS;
- case 3: // MAX_KV_COUNT
- return MAX_KV_COUNT;
- case 4: // MAX_KV_SIZE
- return MAX_KV_SIZE;
- case 5: // NO_VALUE
- return NO_VALUE;
- case 6: // START_SORTKEY
- return START_SORTKEY;
- case 7: // STOP_SORTKEY
- return STOP_SORTKEY;
- case 8: // START_INCLUSIVE
- return START_INCLUSIVE;
- case 9: // STOP_INCLUSIVE
- return STOP_INCLUSIVE;
- case 10: // SORT_KEY_FILTER_TYPE
- return SORT_KEY_FILTER_TYPE;
- case 11: // SORT_KEY_FILTER_PATTERN
- return SORT_KEY_FILTER_PATTERN;
- case 12: // REVERSE
- return REVERSE;
- default:
- return null;
- }
- }
-
- /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null)
- throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /** Find the _Fields constant that matches name, or null if its not found. */
- public static _Fields findByName(java.lang.String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final java.lang.String _fieldName;
-
- _Fields(short thriftId, java.lang.String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public java.lang.String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __MAX_KV_COUNT_ISSET_ID = 0;
- private static final int __MAX_KV_SIZE_ISSET_ID = 1;
- private static final int __NO_VALUE_ISSET_ID = 2;
- private static final int __START_INCLUSIVE_ISSET_ID = 3;
- private static final int __STOP_INCLUSIVE_ISSET_ID = 4;
- private static final int __REVERSE_ISSET_ID = 5;
- private byte __isset_bitfield = 0;
- public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
- static {
- java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(
- _Fields.HASH_KEY,
- new org.apache.thrift.meta_data.FieldMetaData(
- "hash_key",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- tmpMap.put(
- _Fields.SORK_KEYS,
- new org.apache.thrift.meta_data.FieldMetaData(
- "sork_keys",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(
- org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class))));
- tmpMap.put(
- _Fields.MAX_KV_COUNT,
- new org.apache.thrift.meta_data.FieldMetaData(
- "max_kv_count",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(
- _Fields.MAX_KV_SIZE,
- new org.apache.thrift.meta_data.FieldMetaData(
- "max_kv_size",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(
- _Fields.NO_VALUE,
- new org.apache.thrift.meta_data.FieldMetaData(
- "no_value",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(
- _Fields.START_SORTKEY,
- new org.apache.thrift.meta_data.FieldMetaData(
- "start_sortkey",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- tmpMap.put(
- _Fields.STOP_SORTKEY,
- new org.apache.thrift.meta_data.FieldMetaData(
- "stop_sortkey",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- tmpMap.put(
- _Fields.START_INCLUSIVE,
- new org.apache.thrift.meta_data.FieldMetaData(
- "start_inclusive",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(
- _Fields.STOP_INCLUSIVE,
- new org.apache.thrift.meta_data.FieldMetaData(
- "stop_inclusive",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(
- _Fields.SORT_KEY_FILTER_TYPE,
- new org.apache.thrift.meta_data.FieldMetaData(
- "sort_key_filter_type",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.EnumMetaData(
- org.apache.thrift.protocol.TType.ENUM, filter_type.class)));
- tmpMap.put(
- _Fields.SORT_KEY_FILTER_PATTERN,
- new org.apache.thrift.meta_data.FieldMetaData(
- "sort_key_filter_pattern",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- tmpMap.put(
- _Fields.REVERSE,
- new org.apache.thrift.meta_data.FieldMetaData(
- "reverse",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
- multi_get_request.class, metaDataMap);
- }
-
- public multi_get_request() {}
-
- public multi_get_request(
- blob hash_key,
- java.util.List sork_keys,
- int max_kv_count,
- int max_kv_size,
- boolean no_value,
- blob start_sortkey,
- blob stop_sortkey,
- boolean start_inclusive,
- boolean stop_inclusive,
- filter_type sort_key_filter_type,
- blob sort_key_filter_pattern,
- boolean reverse) {
- this();
- this.hash_key = hash_key;
- this.sork_keys = sork_keys;
- this.max_kv_count = max_kv_count;
- setMax_kv_countIsSet(true);
- this.max_kv_size = max_kv_size;
- setMax_kv_sizeIsSet(true);
- this.no_value = no_value;
- setNo_valueIsSet(true);
- this.start_sortkey = start_sortkey;
- this.stop_sortkey = stop_sortkey;
- this.start_inclusive = start_inclusive;
- setStart_inclusiveIsSet(true);
- this.stop_inclusive = stop_inclusive;
- setStop_inclusiveIsSet(true);
- this.sort_key_filter_type = sort_key_filter_type;
- this.sort_key_filter_pattern = sort_key_filter_pattern;
- this.reverse = reverse;
- setReverseIsSet(true);
- }
-
- /** Performs a deep copy on other. */
- public multi_get_request(multi_get_request other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetHash_key()) {
- this.hash_key = new blob(other.hash_key);
- }
- if (other.isSetSork_keys()) {
- java.util.List __this__sork_keys =
- new java.util.ArrayList(other.sork_keys.size());
- for (blob other_element : other.sork_keys) {
- __this__sork_keys.add(new blob(other_element));
- }
- this.sork_keys = __this__sork_keys;
- }
- this.max_kv_count = other.max_kv_count;
- this.max_kv_size = other.max_kv_size;
- this.no_value = other.no_value;
- if (other.isSetStart_sortkey()) {
- this.start_sortkey = new blob(other.start_sortkey);
- }
- if (other.isSetStop_sortkey()) {
- this.stop_sortkey = new blob(other.stop_sortkey);
- }
- this.start_inclusive = other.start_inclusive;
- this.stop_inclusive = other.stop_inclusive;
- if (other.isSetSort_key_filter_type()) {
- this.sort_key_filter_type = other.sort_key_filter_type;
- }
- if (other.isSetSort_key_filter_pattern()) {
- this.sort_key_filter_pattern = new blob(other.sort_key_filter_pattern);
- }
- this.reverse = other.reverse;
- }
-
- public multi_get_request deepCopy() {
- return new multi_get_request(this);
- }
-
- @Override
- public void clear() {
- this.hash_key = null;
- this.sork_keys = null;
- setMax_kv_countIsSet(false);
- this.max_kv_count = 0;
- setMax_kv_sizeIsSet(false);
- this.max_kv_size = 0;
- setNo_valueIsSet(false);
- this.no_value = false;
- this.start_sortkey = null;
- this.stop_sortkey = null;
- setStart_inclusiveIsSet(false);
- this.start_inclusive = false;
- setStop_inclusiveIsSet(false);
- this.stop_inclusive = false;
- this.sort_key_filter_type = null;
- this.sort_key_filter_pattern = null;
- setReverseIsSet(false);
- this.reverse = false;
- }
-
- public blob getHash_key() {
- return this.hash_key;
- }
-
- public multi_get_request setHash_key(blob hash_key) {
- this.hash_key = hash_key;
- return this;
- }
-
- public void unsetHash_key() {
- this.hash_key = null;
- }
-
- /** Returns true if field hash_key is set (has been assigned a value) and false otherwise */
- public boolean isSetHash_key() {
- return this.hash_key != null;
- }
-
- public void setHash_keyIsSet(boolean value) {
- if (!value) {
- this.hash_key = null;
- }
- }
-
- public int getSork_keysSize() {
- return (this.sork_keys == null) ? 0 : this.sork_keys.size();
- }
-
- public java.util.Iterator getSork_keysIterator() {
- return (this.sork_keys == null) ? null : this.sork_keys.iterator();
- }
-
- public void addToSork_keys(blob elem) {
- if (this.sork_keys == null) {
- this.sork_keys = new java.util.ArrayList();
- }
- this.sork_keys.add(elem);
- }
-
- public java.util.List getSork_keys() {
- return this.sork_keys;
- }
-
- public multi_get_request setSork_keys(java.util.List sork_keys) {
- this.sork_keys = sork_keys;
- return this;
- }
-
- public void unsetSork_keys() {
- this.sork_keys = null;
- }
-
- /** Returns true if field sork_keys is set (has been assigned a value) and false otherwise */
- public boolean isSetSork_keys() {
- return this.sork_keys != null;
- }
-
- public void setSork_keysIsSet(boolean value) {
- if (!value) {
- this.sork_keys = null;
- }
- }
-
- public int getMax_kv_count() {
- return this.max_kv_count;
- }
-
- public multi_get_request setMax_kv_count(int max_kv_count) {
- this.max_kv_count = max_kv_count;
- setMax_kv_countIsSet(true);
- return this;
- }
-
- public void unsetMax_kv_count() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAX_KV_COUNT_ISSET_ID);
- }
-
- /** Returns true if field max_kv_count is set (has been assigned a value) and false otherwise */
- public boolean isSetMax_kv_count() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAX_KV_COUNT_ISSET_ID);
- }
-
- public void setMax_kv_countIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAX_KV_COUNT_ISSET_ID, value);
- }
-
- public int getMax_kv_size() {
- return this.max_kv_size;
- }
-
- public multi_get_request setMax_kv_size(int max_kv_size) {
- this.max_kv_size = max_kv_size;
- setMax_kv_sizeIsSet(true);
- return this;
- }
-
- public void unsetMax_kv_size() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAX_KV_SIZE_ISSET_ID);
- }
-
- /** Returns true if field max_kv_size is set (has been assigned a value) and false otherwise */
- public boolean isSetMax_kv_size() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAX_KV_SIZE_ISSET_ID);
- }
-
- public void setMax_kv_sizeIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAX_KV_SIZE_ISSET_ID, value);
- }
-
- public boolean isNo_value() {
- return this.no_value;
- }
-
- public multi_get_request setNo_value(boolean no_value) {
- this.no_value = no_value;
- setNo_valueIsSet(true);
- return this;
- }
-
- public void unsetNo_value() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NO_VALUE_ISSET_ID);
- }
-
- /** Returns true if field no_value is set (has been assigned a value) and false otherwise */
- public boolean isSetNo_value() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NO_VALUE_ISSET_ID);
- }
-
- public void setNo_valueIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NO_VALUE_ISSET_ID, value);
- }
-
- public blob getStart_sortkey() {
- return this.start_sortkey;
- }
-
- public multi_get_request setStart_sortkey(blob start_sortkey) {
- this.start_sortkey = start_sortkey;
- return this;
- }
-
- public void unsetStart_sortkey() {
- this.start_sortkey = null;
- }
-
- /** Returns true if field start_sortkey is set (has been assigned a value) and false otherwise */
- public boolean isSetStart_sortkey() {
- return this.start_sortkey != null;
- }
-
- public void setStart_sortkeyIsSet(boolean value) {
- if (!value) {
- this.start_sortkey = null;
- }
- }
-
- public blob getStop_sortkey() {
- return this.stop_sortkey;
- }
-
- public multi_get_request setStop_sortkey(blob stop_sortkey) {
- this.stop_sortkey = stop_sortkey;
- return this;
- }
-
- public void unsetStop_sortkey() {
- this.stop_sortkey = null;
- }
-
- /** Returns true if field stop_sortkey is set (has been assigned a value) and false otherwise */
- public boolean isSetStop_sortkey() {
- return this.stop_sortkey != null;
- }
-
- public void setStop_sortkeyIsSet(boolean value) {
- if (!value) {
- this.stop_sortkey = null;
- }
- }
-
- public boolean isStart_inclusive() {
- return this.start_inclusive;
- }
-
- public multi_get_request setStart_inclusive(boolean start_inclusive) {
- this.start_inclusive = start_inclusive;
- setStart_inclusiveIsSet(true);
- return this;
- }
-
- public void unsetStart_inclusive() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __START_INCLUSIVE_ISSET_ID);
- }
-
- /**
- * Returns true if field start_inclusive is set (has been assigned a value) and false otherwise
- */
- public boolean isSetStart_inclusive() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __START_INCLUSIVE_ISSET_ID);
- }
-
- public void setStart_inclusiveIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __START_INCLUSIVE_ISSET_ID, value);
- }
-
- public boolean isStop_inclusive() {
- return this.stop_inclusive;
- }
-
- public multi_get_request setStop_inclusive(boolean stop_inclusive) {
- this.stop_inclusive = stop_inclusive;
- setStop_inclusiveIsSet(true);
- return this;
- }
-
- public void unsetStop_inclusive() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STOP_INCLUSIVE_ISSET_ID);
- }
-
- /** Returns true if field stop_inclusive is set (has been assigned a value) and false otherwise */
- public boolean isSetStop_inclusive() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STOP_INCLUSIVE_ISSET_ID);
- }
-
- public void setStop_inclusiveIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STOP_INCLUSIVE_ISSET_ID, value);
- }
-
- /** @see filter_type */
- public filter_type getSort_key_filter_type() {
- return this.sort_key_filter_type;
- }
-
- /** @see filter_type */
- public multi_get_request setSort_key_filter_type(filter_type sort_key_filter_type) {
- this.sort_key_filter_type = sort_key_filter_type;
- return this;
- }
-
- public void unsetSort_key_filter_type() {
- this.sort_key_filter_type = null;
- }
-
- /**
- * Returns true if field sort_key_filter_type is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSetSort_key_filter_type() {
- return this.sort_key_filter_type != null;
- }
-
- public void setSort_key_filter_typeIsSet(boolean value) {
- if (!value) {
- this.sort_key_filter_type = null;
- }
- }
-
- public blob getSort_key_filter_pattern() {
- return this.sort_key_filter_pattern;
- }
-
- public multi_get_request setSort_key_filter_pattern(blob sort_key_filter_pattern) {
- this.sort_key_filter_pattern = sort_key_filter_pattern;
- return this;
- }
-
- public void unsetSort_key_filter_pattern() {
- this.sort_key_filter_pattern = null;
- }
-
- /**
- * Returns true if field sort_key_filter_pattern is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSetSort_key_filter_pattern() {
- return this.sort_key_filter_pattern != null;
- }
-
- public void setSort_key_filter_patternIsSet(boolean value) {
- if (!value) {
- this.sort_key_filter_pattern = null;
- }
- }
-
- public boolean isReverse() {
- return this.reverse;
- }
-
- public multi_get_request setReverse(boolean reverse) {
- this.reverse = reverse;
- setReverseIsSet(true);
- return this;
- }
-
- public void unsetReverse() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REVERSE_ISSET_ID);
- }
-
- /** Returns true if field reverse is set (has been assigned a value) and false otherwise */
- public boolean isSetReverse() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REVERSE_ISSET_ID);
- }
-
- public void setReverseIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REVERSE_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, java.lang.Object value) {
- switch (field) {
- case HASH_KEY:
- if (value == null) {
- unsetHash_key();
- } else {
- setHash_key((blob) value);
- }
- break;
-
- case SORK_KEYS:
- if (value == null) {
- unsetSork_keys();
- } else {
- setSork_keys((java.util.List) value);
- }
- break;
-
- case MAX_KV_COUNT:
- if (value == null) {
- unsetMax_kv_count();
- } else {
- setMax_kv_count((java.lang.Integer) value);
- }
- break;
-
- case MAX_KV_SIZE:
- if (value == null) {
- unsetMax_kv_size();
- } else {
- setMax_kv_size((java.lang.Integer) value);
- }
- break;
-
- case NO_VALUE:
- if (value == null) {
- unsetNo_value();
- } else {
- setNo_value((java.lang.Boolean) value);
- }
- break;
-
- case START_SORTKEY:
- if (value == null) {
- unsetStart_sortkey();
- } else {
- setStart_sortkey((blob) value);
- }
- break;
-
- case STOP_SORTKEY:
- if (value == null) {
- unsetStop_sortkey();
- } else {
- setStop_sortkey((blob) value);
- }
- break;
-
- case START_INCLUSIVE:
- if (value == null) {
- unsetStart_inclusive();
- } else {
- setStart_inclusive((java.lang.Boolean) value);
- }
- break;
-
- case STOP_INCLUSIVE:
- if (value == null) {
- unsetStop_inclusive();
- } else {
- setStop_inclusive((java.lang.Boolean) value);
- }
- break;
-
- case SORT_KEY_FILTER_TYPE:
- if (value == null) {
- unsetSort_key_filter_type();
- } else {
- setSort_key_filter_type((filter_type) value);
- }
- break;
-
- case SORT_KEY_FILTER_PATTERN:
- if (value == null) {
- unsetSort_key_filter_pattern();
- } else {
- setSort_key_filter_pattern((blob) value);
- }
- break;
-
- case REVERSE:
- if (value == null) {
- unsetReverse();
- } else {
- setReverse((java.lang.Boolean) value);
- }
- break;
- }
- }
-
- public java.lang.Object getFieldValue(_Fields field) {
- switch (field) {
- case HASH_KEY:
- return getHash_key();
-
- case SORK_KEYS:
- return getSork_keys();
-
- case MAX_KV_COUNT:
- return getMax_kv_count();
-
- case MAX_KV_SIZE:
- return getMax_kv_size();
-
- case NO_VALUE:
- return isNo_value();
-
- case START_SORTKEY:
- return getStart_sortkey();
-
- case STOP_SORTKEY:
- return getStop_sortkey();
-
- case START_INCLUSIVE:
- return isStart_inclusive();
-
- case STOP_INCLUSIVE:
- return isStop_inclusive();
-
- case SORT_KEY_FILTER_TYPE:
- return getSort_key_filter_type();
-
- case SORT_KEY_FILTER_PATTERN:
- return getSort_key_filter_pattern();
-
- case REVERSE:
- return isReverse();
- }
- throw new java.lang.IllegalStateException();
- }
-
- /**
- * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new java.lang.IllegalArgumentException();
- }
-
- switch (field) {
- case HASH_KEY:
- return isSetHash_key();
- case SORK_KEYS:
- return isSetSork_keys();
- case MAX_KV_COUNT:
- return isSetMax_kv_count();
- case MAX_KV_SIZE:
- return isSetMax_kv_size();
- case NO_VALUE:
- return isSetNo_value();
- case START_SORTKEY:
- return isSetStart_sortkey();
- case STOP_SORTKEY:
- return isSetStop_sortkey();
- case START_INCLUSIVE:
- return isSetStart_inclusive();
- case STOP_INCLUSIVE:
- return isSetStop_inclusive();
- case SORT_KEY_FILTER_TYPE:
- return isSetSort_key_filter_type();
- case SORT_KEY_FILTER_PATTERN:
- return isSetSort_key_filter_pattern();
- case REVERSE:
- return isSetReverse();
- }
- throw new java.lang.IllegalStateException();
- }
-
- @Override
- public boolean equals(java.lang.Object that) {
- if (that == null) return false;
- if (that instanceof multi_get_request) return this.equals((multi_get_request) that);
- return false;
- }
-
- public boolean equals(multi_get_request that) {
- if (that == null) return false;
- if (this == that) return true;
-
- boolean this_present_hash_key = true && this.isSetHash_key();
- boolean that_present_hash_key = true && that.isSetHash_key();
- if (this_present_hash_key || that_present_hash_key) {
- if (!(this_present_hash_key && that_present_hash_key)) return false;
- if (!this.hash_key.equals(that.hash_key)) return false;
- }
-
- boolean this_present_sork_keys = true && this.isSetSork_keys();
- boolean that_present_sork_keys = true && that.isSetSork_keys();
- if (this_present_sork_keys || that_present_sork_keys) {
- if (!(this_present_sork_keys && that_present_sork_keys)) return false;
- if (!this.sork_keys.equals(that.sork_keys)) return false;
- }
-
- boolean this_present_max_kv_count = true;
- boolean that_present_max_kv_count = true;
- if (this_present_max_kv_count || that_present_max_kv_count) {
- if (!(this_present_max_kv_count && that_present_max_kv_count)) return false;
- if (this.max_kv_count != that.max_kv_count) return false;
- }
-
- boolean this_present_max_kv_size = true;
- boolean that_present_max_kv_size = true;
- if (this_present_max_kv_size || that_present_max_kv_size) {
- if (!(this_present_max_kv_size && that_present_max_kv_size)) return false;
- if (this.max_kv_size != that.max_kv_size) return false;
- }
-
- boolean this_present_no_value = true;
- boolean that_present_no_value = true;
- if (this_present_no_value || that_present_no_value) {
- if (!(this_present_no_value && that_present_no_value)) return false;
- if (this.no_value != that.no_value) return false;
- }
-
- boolean this_present_start_sortkey = true && this.isSetStart_sortkey();
- boolean that_present_start_sortkey = true && that.isSetStart_sortkey();
- if (this_present_start_sortkey || that_present_start_sortkey) {
- if (!(this_present_start_sortkey && that_present_start_sortkey)) return false;
- if (!this.start_sortkey.equals(that.start_sortkey)) return false;
- }
-
- boolean this_present_stop_sortkey = true && this.isSetStop_sortkey();
- boolean that_present_stop_sortkey = true && that.isSetStop_sortkey();
- if (this_present_stop_sortkey || that_present_stop_sortkey) {
- if (!(this_present_stop_sortkey && that_present_stop_sortkey)) return false;
- if (!this.stop_sortkey.equals(that.stop_sortkey)) return false;
- }
-
- boolean this_present_start_inclusive = true;
- boolean that_present_start_inclusive = true;
- if (this_present_start_inclusive || that_present_start_inclusive) {
- if (!(this_present_start_inclusive && that_present_start_inclusive)) return false;
- if (this.start_inclusive != that.start_inclusive) return false;
- }
-
- boolean this_present_stop_inclusive = true;
- boolean that_present_stop_inclusive = true;
- if (this_present_stop_inclusive || that_present_stop_inclusive) {
- if (!(this_present_stop_inclusive && that_present_stop_inclusive)) return false;
- if (this.stop_inclusive != that.stop_inclusive) return false;
- }
-
- boolean this_present_sort_key_filter_type = true && this.isSetSort_key_filter_type();
- boolean that_present_sort_key_filter_type = true && that.isSetSort_key_filter_type();
- if (this_present_sort_key_filter_type || that_present_sort_key_filter_type) {
- if (!(this_present_sort_key_filter_type && that_present_sort_key_filter_type)) return false;
- if (!this.sort_key_filter_type.equals(that.sort_key_filter_type)) return false;
- }
-
- boolean this_present_sort_key_filter_pattern = true && this.isSetSort_key_filter_pattern();
- boolean that_present_sort_key_filter_pattern = true && that.isSetSort_key_filter_pattern();
- if (this_present_sort_key_filter_pattern || that_present_sort_key_filter_pattern) {
- if (!(this_present_sort_key_filter_pattern && that_present_sort_key_filter_pattern))
- return false;
- if (!this.sort_key_filter_pattern.equals(that.sort_key_filter_pattern)) return false;
- }
-
- boolean this_present_reverse = true;
- boolean that_present_reverse = true;
- if (this_present_reverse || that_present_reverse) {
- if (!(this_present_reverse && that_present_reverse)) return false;
- if (this.reverse != that.reverse) return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 1;
-
- hashCode = hashCode * 8191 + ((isSetHash_key()) ? 131071 : 524287);
- if (isSetHash_key()) hashCode = hashCode * 8191 + hash_key.hashCode();
-
- hashCode = hashCode * 8191 + ((isSetSork_keys()) ? 131071 : 524287);
- if (isSetSork_keys()) hashCode = hashCode * 8191 + sork_keys.hashCode();
-
- hashCode = hashCode * 8191 + max_kv_count;
-
- hashCode = hashCode * 8191 + max_kv_size;
-
- hashCode = hashCode * 8191 + ((no_value) ? 131071 : 524287);
-
- hashCode = hashCode * 8191 + ((isSetStart_sortkey()) ? 131071 : 524287);
- if (isSetStart_sortkey()) hashCode = hashCode * 8191 + start_sortkey.hashCode();
-
- hashCode = hashCode * 8191 + ((isSetStop_sortkey()) ? 131071 : 524287);
- if (isSetStop_sortkey()) hashCode = hashCode * 8191 + stop_sortkey.hashCode();
-
- hashCode = hashCode * 8191 + ((start_inclusive) ? 131071 : 524287);
-
- hashCode = hashCode * 8191 + ((stop_inclusive) ? 131071 : 524287);
-
- hashCode = hashCode * 8191 + ((isSetSort_key_filter_type()) ? 131071 : 524287);
- if (isSetSort_key_filter_type()) hashCode = hashCode * 8191 + sort_key_filter_type.getValue();
-
- hashCode = hashCode * 8191 + ((isSetSort_key_filter_pattern()) ? 131071 : 524287);
- if (isSetSort_key_filter_pattern())
- hashCode = hashCode * 8191 + sort_key_filter_pattern.hashCode();
-
- hashCode = hashCode * 8191 + ((reverse) ? 131071 : 524287);
-
- return hashCode;
- }
-
- @Override
- public int compareTo(multi_get_request other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = java.lang.Boolean.valueOf(isSetHash_key()).compareTo(other.isSetHash_key());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetHash_key()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hash_key, other.hash_key);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetSork_keys()).compareTo(other.isSetSork_keys());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSork_keys()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sork_keys, other.sork_keys);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetMax_kv_count()).compareTo(other.isSetMax_kv_count());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetMax_kv_count()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(this.max_kv_count, other.max_kv_count);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetMax_kv_size()).compareTo(other.isSetMax_kv_size());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetMax_kv_size()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_kv_size, other.max_kv_size);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetNo_value()).compareTo(other.isSetNo_value());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetNo_value()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.no_value, other.no_value);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetStart_sortkey()).compareTo(other.isSetStart_sortkey());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetStart_sortkey()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(this.start_sortkey, other.start_sortkey);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetStop_sortkey()).compareTo(other.isSetStop_sortkey());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetStop_sortkey()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(this.stop_sortkey, other.stop_sortkey);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetStart_inclusive()).compareTo(other.isSetStart_inclusive());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetStart_inclusive()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(this.start_inclusive, other.start_inclusive);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetStop_inclusive()).compareTo(other.isSetStop_inclusive());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetStop_inclusive()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(this.stop_inclusive, other.stop_inclusive);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetSort_key_filter_type())
- .compareTo(other.isSetSort_key_filter_type());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSort_key_filter_type()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(
- this.sort_key_filter_type, other.sort_key_filter_type);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetSort_key_filter_pattern())
- .compareTo(other.isSetSort_key_filter_pattern());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSort_key_filter_pattern()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(
- this.sort_key_filter_pattern, other.sort_key_filter_pattern);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetReverse()).compareTo(other.isSetReverse());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetReverse()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reverse, other.reverse);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- scheme(iprot).read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- scheme(oprot).write(oprot, this);
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("multi_get_request(");
- boolean first = true;
-
- sb.append("hash_key:");
- if (this.hash_key == null) {
- sb.append("null");
- } else {
- sb.append(this.hash_key);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("sork_keys:");
- if (this.sork_keys == null) {
- sb.append("null");
- } else {
- sb.append(this.sork_keys);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("max_kv_count:");
- sb.append(this.max_kv_count);
- first = false;
- if (!first) sb.append(", ");
- sb.append("max_kv_size:");
- sb.append(this.max_kv_size);
- first = false;
- if (!first) sb.append(", ");
- sb.append("no_value:");
- sb.append(this.no_value);
- first = false;
- if (!first) sb.append(", ");
- sb.append("start_sortkey:");
- if (this.start_sortkey == null) {
- sb.append("null");
- } else {
- sb.append(this.start_sortkey);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("stop_sortkey:");
- if (this.stop_sortkey == null) {
- sb.append("null");
- } else {
- sb.append(this.stop_sortkey);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("start_inclusive:");
- sb.append(this.start_inclusive);
- first = false;
- if (!first) sb.append(", ");
- sb.append("stop_inclusive:");
- sb.append(this.stop_inclusive);
- first = false;
- if (!first) sb.append(", ");
- sb.append("sort_key_filter_type:");
- if (this.sort_key_filter_type == null) {
- sb.append("null");
- } else {
- sb.append(this.sort_key_filter_type);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("sort_key_filter_pattern:");
- if (this.sort_key_filter_pattern == null) {
- sb.append("null");
- } else {
- sb.append(this.sort_key_filter_pattern);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("reverse:");
- sb.append(this.reverse);
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (hash_key != null) {
- hash_key.validate();
- }
- if (start_sortkey != null) {
- start_sortkey.validate();
- }
- if (stop_sortkey != null) {
- stop_sortkey.validate();
- }
- if (sort_key_filter_pattern != null) {
- sort_key_filter_pattern.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, java.lang.ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and
- // doesn't call the default constructor.
- __isset_bitfield = 0;
- read(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class multi_get_requestStandardSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public multi_get_requestStandardScheme getScheme() {
- return new multi_get_requestStandardScheme();
- }
- }
-
- private static class multi_get_requestStandardScheme
- extends org.apache.thrift.scheme.StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, multi_get_request struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true) {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // HASH_KEY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.hash_key = new blob();
- struct.hash_key.read(iprot);
- struct.setHash_keyIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // SORK_KEYS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
- struct.sork_keys = new java.util.ArrayList(_list16.size);
- blob _elem17;
- for (int _i18 = 0; _i18 < _list16.size; ++_i18) {
- _elem17 = new blob();
- _elem17.read(iprot);
- struct.sork_keys.add(_elem17);
- }
- iprot.readListEnd();
- }
- struct.setSork_keysIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // MAX_KV_COUNT
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.max_kv_count = iprot.readI32();
- struct.setMax_kv_countIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // MAX_KV_SIZE
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.max_kv_size = iprot.readI32();
- struct.setMax_kv_sizeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // NO_VALUE
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.no_value = iprot.readBool();
- struct.setNo_valueIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // START_SORTKEY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.start_sortkey = new blob();
- struct.start_sortkey.read(iprot);
- struct.setStart_sortkeyIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 7: // STOP_SORTKEY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.stop_sortkey = new blob();
- struct.stop_sortkey.read(iprot);
- struct.setStop_sortkeyIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 8: // START_INCLUSIVE
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.start_inclusive = iprot.readBool();
- struct.setStart_inclusiveIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 9: // STOP_INCLUSIVE
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.stop_inclusive = iprot.readBool();
- struct.setStop_inclusiveIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 10: // SORT_KEY_FILTER_TYPE
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.sort_key_filter_type = filter_type.findByValue(iprot.readI32());
- struct.setSort_key_filter_typeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 11: // SORT_KEY_FILTER_PATTERN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.sort_key_filter_pattern = new blob();
- struct.sort_key_filter_pattern.read(iprot);
- struct.setSort_key_filter_patternIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 12: // REVERSE
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.reverse = iprot.readBool();
- struct.setReverseIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, multi_get_request struct)
- throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.hash_key != null) {
- oprot.writeFieldBegin(HASH_KEY_FIELD_DESC);
- struct.hash_key.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.sork_keys != null) {
- oprot.writeFieldBegin(SORK_KEYS_FIELD_DESC);
- {
- oprot.writeListBegin(
- new org.apache.thrift.protocol.TList(
- org.apache.thrift.protocol.TType.STRUCT, struct.sork_keys.size()));
- for (blob _iter19 : struct.sork_keys) {
- _iter19.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(MAX_KV_COUNT_FIELD_DESC);
- oprot.writeI32(struct.max_kv_count);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(MAX_KV_SIZE_FIELD_DESC);
- oprot.writeI32(struct.max_kv_size);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(NO_VALUE_FIELD_DESC);
- oprot.writeBool(struct.no_value);
- oprot.writeFieldEnd();
- if (struct.start_sortkey != null) {
- oprot.writeFieldBegin(START_SORTKEY_FIELD_DESC);
- struct.start_sortkey.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.stop_sortkey != null) {
- oprot.writeFieldBegin(STOP_SORTKEY_FIELD_DESC);
- struct.stop_sortkey.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(START_INCLUSIVE_FIELD_DESC);
- oprot.writeBool(struct.start_inclusive);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(STOP_INCLUSIVE_FIELD_DESC);
- oprot.writeBool(struct.stop_inclusive);
- oprot.writeFieldEnd();
- if (struct.sort_key_filter_type != null) {
- oprot.writeFieldBegin(SORT_KEY_FILTER_TYPE_FIELD_DESC);
- oprot.writeI32(struct.sort_key_filter_type.getValue());
- oprot.writeFieldEnd();
- }
- if (struct.sort_key_filter_pattern != null) {
- oprot.writeFieldBegin(SORT_KEY_FILTER_PATTERN_FIELD_DESC);
- struct.sort_key_filter_pattern.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(REVERSE_FIELD_DESC);
- oprot.writeBool(struct.reverse);
- oprot.writeFieldEnd();
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
- }
-
- private static class multi_get_requestTupleSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public multi_get_requestTupleScheme getScheme() {
- return new multi_get_requestTupleScheme();
- }
- }
-
- private static class multi_get_requestTupleScheme
- extends org.apache.thrift.scheme.TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, multi_get_request struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol oprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet optionals = new java.util.BitSet();
- if (struct.isSetHash_key()) {
- optionals.set(0);
- }
- if (struct.isSetSork_keys()) {
- optionals.set(1);
- }
- if (struct.isSetMax_kv_count()) {
- optionals.set(2);
- }
- if (struct.isSetMax_kv_size()) {
- optionals.set(3);
- }
- if (struct.isSetNo_value()) {
- optionals.set(4);
- }
- if (struct.isSetStart_sortkey()) {
- optionals.set(5);
- }
- if (struct.isSetStop_sortkey()) {
- optionals.set(6);
- }
- if (struct.isSetStart_inclusive()) {
- optionals.set(7);
- }
- if (struct.isSetStop_inclusive()) {
- optionals.set(8);
- }
- if (struct.isSetSort_key_filter_type()) {
- optionals.set(9);
- }
- if (struct.isSetSort_key_filter_pattern()) {
- optionals.set(10);
- }
- if (struct.isSetReverse()) {
- optionals.set(11);
- }
- oprot.writeBitSet(optionals, 12);
- if (struct.isSetHash_key()) {
- struct.hash_key.write(oprot);
- }
- if (struct.isSetSork_keys()) {
- {
- oprot.writeI32(struct.sork_keys.size());
- for (blob _iter20 : struct.sork_keys) {
- _iter20.write(oprot);
- }
- }
- }
- if (struct.isSetMax_kv_count()) {
- oprot.writeI32(struct.max_kv_count);
- }
- if (struct.isSetMax_kv_size()) {
- oprot.writeI32(struct.max_kv_size);
- }
- if (struct.isSetNo_value()) {
- oprot.writeBool(struct.no_value);
- }
- if (struct.isSetStart_sortkey()) {
- struct.start_sortkey.write(oprot);
- }
- if (struct.isSetStop_sortkey()) {
- struct.stop_sortkey.write(oprot);
- }
- if (struct.isSetStart_inclusive()) {
- oprot.writeBool(struct.start_inclusive);
- }
- if (struct.isSetStop_inclusive()) {
- oprot.writeBool(struct.stop_inclusive);
- }
- if (struct.isSetSort_key_filter_type()) {
- oprot.writeI32(struct.sort_key_filter_type.getValue());
- }
- if (struct.isSetSort_key_filter_pattern()) {
- struct.sort_key_filter_pattern.write(oprot);
- }
- if (struct.isSetReverse()) {
- oprot.writeBool(struct.reverse);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, multi_get_request struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol iprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(12);
- if (incoming.get(0)) {
- struct.hash_key = new blob();
- struct.hash_key.read(iprot);
- struct.setHash_keyIsSet(true);
- }
- if (incoming.get(1)) {
- {
- org.apache.thrift.protocol.TList _list21 =
- new org.apache.thrift.protocol.TList(
- org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.sork_keys = new java.util.ArrayList(_list21.size);
- blob _elem22;
- for (int _i23 = 0; _i23 < _list21.size; ++_i23) {
- _elem22 = new blob();
- _elem22.read(iprot);
- struct.sork_keys.add(_elem22);
- }
- }
- struct.setSork_keysIsSet(true);
- }
- if (incoming.get(2)) {
- struct.max_kv_count = iprot.readI32();
- struct.setMax_kv_countIsSet(true);
- }
- if (incoming.get(3)) {
- struct.max_kv_size = iprot.readI32();
- struct.setMax_kv_sizeIsSet(true);
- }
- if (incoming.get(4)) {
- struct.no_value = iprot.readBool();
- struct.setNo_valueIsSet(true);
- }
- if (incoming.get(5)) {
- struct.start_sortkey = new blob();
- struct.start_sortkey.read(iprot);
- struct.setStart_sortkeyIsSet(true);
- }
- if (incoming.get(6)) {
- struct.stop_sortkey = new blob();
- struct.stop_sortkey.read(iprot);
- struct.setStop_sortkeyIsSet(true);
- }
- if (incoming.get(7)) {
- struct.start_inclusive = iprot.readBool();
- struct.setStart_inclusiveIsSet(true);
- }
- if (incoming.get(8)) {
- struct.stop_inclusive = iprot.readBool();
- struct.setStop_inclusiveIsSet(true);
- }
- if (incoming.get(9)) {
- struct.sort_key_filter_type = filter_type.findByValue(iprot.readI32());
- struct.setSort_key_filter_typeIsSet(true);
- }
- if (incoming.get(10)) {
- struct.sort_key_filter_pattern = new blob();
- struct.sort_key_filter_pattern.read(iprot);
- struct.setSort_key_filter_patternIsSet(true);
- }
- if (incoming.get(11)) {
- struct.reverse = iprot.readBool();
- struct.setReverseIsSet(true);
- }
- }
- }
-
- private static S scheme(
- org.apache.thrift.protocol.TProtocol proto) {
- return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
- ? STANDARD_SCHEME_FACTORY
- : TUPLE_SCHEME_FACTORY)
- .getScheme();
- }
-}
diff --git a/java-client/src/main/java/org/apache/pegasus/apps/multi_get_response.java b/java-client/src/main/java/org/apache/pegasus/apps/multi_get_response.java
deleted file mode 100644
index 70a2456495..0000000000
--- a/java-client/src/main/java/org/apache/pegasus/apps/multi_get_response.java
+++ /dev/null
@@ -1,895 +0,0 @@
-/*
- * 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.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
- */
-package org.apache.pegasus.apps;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(
- value = "Autogenerated by Thrift Compiler (0.11.0)",
- date = "2020-04-13")
-public class multi_get_response
- implements org.apache.thrift.TBase,
- java.io.Serializable,
- Cloneable,
- Comparable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("multi_get_response");
-
- private static final org.apache.thrift.protocol.TField ERROR_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "error", org.apache.thrift.protocol.TType.I32, (short) 1);
- private static final org.apache.thrift.protocol.TField KVS_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "kvs", org.apache.thrift.protocol.TType.LIST, (short) 2);
- private static final org.apache.thrift.protocol.TField APP_ID_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "app_id", org.apache.thrift.protocol.TType.I32, (short) 3);
- private static final org.apache.thrift.protocol.TField PARTITION_INDEX_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "partition_index", org.apache.thrift.protocol.TType.I32, (short) 4);
- private static final org.apache.thrift.protocol.TField SERVER_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "server", org.apache.thrift.protocol.TType.STRING, (short) 6);
-
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
- new multi_get_responseStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
- new multi_get_responseTupleSchemeFactory();
-
- public int error; // required
- public java.util.List kvs; // required
- public int app_id; // required
- public int partition_index; // required
- public java.lang.String server; // required
-
- /**
- * The set of fields this struct contains, along with convenience methods for finding and
- * manipulating them.
- */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- ERROR((short) 1, "error"),
- KVS((short) 2, "kvs"),
- APP_ID((short) 3, "app_id"),
- PARTITION_INDEX((short) 4, "partition_index"),
- SERVER((short) 6, "server");
-
- private static final java.util.Map byName =
- new java.util.HashMap();
-
- static {
- for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /** Find the _Fields constant that matches fieldId, or null if its not found. */
- public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
- case 1: // ERROR
- return ERROR;
- case 2: // KVS
- return KVS;
- case 3: // APP_ID
- return APP_ID;
- case 4: // PARTITION_INDEX
- return PARTITION_INDEX;
- case 6: // SERVER
- return SERVER;
- default:
- return null;
- }
- }
-
- /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null)
- throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /** Find the _Fields constant that matches name, or null if its not found. */
- public static _Fields findByName(java.lang.String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final java.lang.String _fieldName;
-
- _Fields(short thriftId, java.lang.String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public java.lang.String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __ERROR_ISSET_ID = 0;
- private static final int __APP_ID_ISSET_ID = 1;
- private static final int __PARTITION_INDEX_ISSET_ID = 2;
- private byte __isset_bitfield = 0;
- public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
- static {
- java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(
- _Fields.ERROR,
- new org.apache.thrift.meta_data.FieldMetaData(
- "error",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(
- _Fields.KVS,
- new org.apache.thrift.meta_data.FieldMetaData(
- "kvs",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(
- org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, key_value.class))));
- tmpMap.put(
- _Fields.APP_ID,
- new org.apache.thrift.meta_data.FieldMetaData(
- "app_id",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(
- _Fields.PARTITION_INDEX,
- new org.apache.thrift.meta_data.FieldMetaData(
- "partition_index",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(
- _Fields.SERVER,
- new org.apache.thrift.meta_data.FieldMetaData(
- "server",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
- multi_get_response.class, metaDataMap);
- }
-
- public multi_get_response() {}
-
- public multi_get_response(
- int error,
- java.util.List kvs,
- int app_id,
- int partition_index,
- java.lang.String server) {
- this();
- this.error = error;
- setErrorIsSet(true);
- this.kvs = kvs;
- this.app_id = app_id;
- setApp_idIsSet(true);
- this.partition_index = partition_index;
- setPartition_indexIsSet(true);
- this.server = server;
- }
-
- /** Performs a deep copy on other. */
- public multi_get_response(multi_get_response other) {
- __isset_bitfield = other.__isset_bitfield;
- this.error = other.error;
- if (other.isSetKvs()) {
- java.util.List __this__kvs = new java.util.ArrayList(other.kvs.size());
- for (key_value other_element : other.kvs) {
- __this__kvs.add(new key_value(other_element));
- }
- this.kvs = __this__kvs;
- }
- this.app_id = other.app_id;
- this.partition_index = other.partition_index;
- if (other.isSetServer()) {
- this.server = other.server;
- }
- }
-
- public multi_get_response deepCopy() {
- return new multi_get_response(this);
- }
-
- @Override
- public void clear() {
- setErrorIsSet(false);
- this.error = 0;
- this.kvs = null;
- setApp_idIsSet(false);
- this.app_id = 0;
- setPartition_indexIsSet(false);
- this.partition_index = 0;
- this.server = null;
- }
-
- public int getError() {
- return this.error;
- }
-
- public multi_get_response setError(int error) {
- this.error = error;
- setErrorIsSet(true);
- return this;
- }
-
- public void unsetError() {
- __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ERROR_ISSET_ID);
- }
-
- /** Returns true if field error is set (has been assigned a value) and false otherwise */
- public boolean isSetError() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ERROR_ISSET_ID);
- }
-
- public void setErrorIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ERROR_ISSET_ID, value);
- }
-
- public int getKvsSize() {
- return (this.kvs == null) ? 0 : this.kvs.size();
- }
-
- public java.util.Iterator getKvsIterator() {
- return (this.kvs == null) ? null : this.kvs.iterator();
- }
-
- public void addToKvs(key_value elem) {
- if (this.kvs == null) {
- this.kvs = new java.util.ArrayList();
- }
- this.kvs.add(elem);
- }
-
- public java.util.List getKvs() {
- return this.kvs;
- }
-
- public multi_get_response setKvs(java.util.List kvs) {
- this.kvs = kvs;
- return this;
- }
-
- public void unsetKvs() {
- this.kvs = null;
- }
-
- /** Returns true if field kvs is set (has been assigned a value) and false otherwise */
- public boolean isSetKvs() {
- return this.kvs != null;
- }
-
- public void setKvsIsSet(boolean value) {
- if (!value) {
- this.kvs = null;
- }
- }
-
- public int getApp_id() {
- return this.app_id;
- }
-
- public multi_get_response setApp_id(int app_id) {
- this.app_id = app_id;
- setApp_idIsSet(true);
- return this;
- }
-
- public void unsetApp_id() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __APP_ID_ISSET_ID);
- }
-
- /** Returns true if field app_id is set (has been assigned a value) and false otherwise */
- public boolean isSetApp_id() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __APP_ID_ISSET_ID);
- }
-
- public void setApp_idIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __APP_ID_ISSET_ID, value);
- }
-
- public int getPartition_index() {
- return this.partition_index;
- }
-
- public multi_get_response setPartition_index(int partition_index) {
- this.partition_index = partition_index;
- setPartition_indexIsSet(true);
- return this;
- }
-
- public void unsetPartition_index() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PARTITION_INDEX_ISSET_ID);
- }
-
- /**
- * Returns true if field partition_index is set (has been assigned a value) and false otherwise
- */
- public boolean isSetPartition_index() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PARTITION_INDEX_ISSET_ID);
- }
-
- public void setPartition_indexIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PARTITION_INDEX_ISSET_ID, value);
- }
-
- public java.lang.String getServer() {
- return this.server;
- }
-
- public multi_get_response setServer(java.lang.String server) {
- this.server = server;
- return this;
- }
-
- public void unsetServer() {
- this.server = null;
- }
-
- /** Returns true if field server is set (has been assigned a value) and false otherwise */
- public boolean isSetServer() {
- return this.server != null;
- }
-
- public void setServerIsSet(boolean value) {
- if (!value) {
- this.server = null;
- }
- }
-
- public void setFieldValue(_Fields field, java.lang.Object value) {
- switch (field) {
- case ERROR:
- if (value == null) {
- unsetError();
- } else {
- setError((java.lang.Integer) value);
- }
- break;
-
- case KVS:
- if (value == null) {
- unsetKvs();
- } else {
- setKvs((java.util.List) value);
- }
- break;
-
- case APP_ID:
- if (value == null) {
- unsetApp_id();
- } else {
- setApp_id((java.lang.Integer) value);
- }
- break;
-
- case PARTITION_INDEX:
- if (value == null) {
- unsetPartition_index();
- } else {
- setPartition_index((java.lang.Integer) value);
- }
- break;
-
- case SERVER:
- if (value == null) {
- unsetServer();
- } else {
- setServer((java.lang.String) value);
- }
- break;
- }
- }
-
- public java.lang.Object getFieldValue(_Fields field) {
- switch (field) {
- case ERROR:
- return getError();
-
- case KVS:
- return getKvs();
-
- case APP_ID:
- return getApp_id();
-
- case PARTITION_INDEX:
- return getPartition_index();
-
- case SERVER:
- return getServer();
- }
- throw new java.lang.IllegalStateException();
- }
-
- /**
- * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new java.lang.IllegalArgumentException();
- }
-
- switch (field) {
- case ERROR:
- return isSetError();
- case KVS:
- return isSetKvs();
- case APP_ID:
- return isSetApp_id();
- case PARTITION_INDEX:
- return isSetPartition_index();
- case SERVER:
- return isSetServer();
- }
- throw new java.lang.IllegalStateException();
- }
-
- @Override
- public boolean equals(java.lang.Object that) {
- if (that == null) return false;
- if (that instanceof multi_get_response) return this.equals((multi_get_response) that);
- return false;
- }
-
- public boolean equals(multi_get_response that) {
- if (that == null) return false;
- if (this == that) return true;
-
- boolean this_present_error = true;
- boolean that_present_error = true;
- if (this_present_error || that_present_error) {
- if (!(this_present_error && that_present_error)) return false;
- if (this.error != that.error) return false;
- }
-
- boolean this_present_kvs = true && this.isSetKvs();
- boolean that_present_kvs = true && that.isSetKvs();
- if (this_present_kvs || that_present_kvs) {
- if (!(this_present_kvs && that_present_kvs)) return false;
- if (!this.kvs.equals(that.kvs)) return false;
- }
-
- boolean this_present_app_id = true;
- boolean that_present_app_id = true;
- if (this_present_app_id || that_present_app_id) {
- if (!(this_present_app_id && that_present_app_id)) return false;
- if (this.app_id != that.app_id) return false;
- }
-
- boolean this_present_partition_index = true;
- boolean that_present_partition_index = true;
- if (this_present_partition_index || that_present_partition_index) {
- if (!(this_present_partition_index && that_present_partition_index)) return false;
- if (this.partition_index != that.partition_index) return false;
- }
-
- boolean this_present_server = true && this.isSetServer();
- boolean that_present_server = true && that.isSetServer();
- if (this_present_server || that_present_server) {
- if (!(this_present_server && that_present_server)) return false;
- if (!this.server.equals(that.server)) return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 1;
-
- hashCode = hashCode * 8191 + error;
-
- hashCode = hashCode * 8191 + ((isSetKvs()) ? 131071 : 524287);
- if (isSetKvs()) hashCode = hashCode * 8191 + kvs.hashCode();
-
- hashCode = hashCode * 8191 + app_id;
-
- hashCode = hashCode * 8191 + partition_index;
-
- hashCode = hashCode * 8191 + ((isSetServer()) ? 131071 : 524287);
- if (isSetServer()) hashCode = hashCode * 8191 + server.hashCode();
-
- return hashCode;
- }
-
- @Override
- public int compareTo(multi_get_response other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = java.lang.Boolean.valueOf(isSetError()).compareTo(other.isSetError());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetError()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.error, other.error);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetKvs()).compareTo(other.isSetKvs());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetKvs()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.kvs, other.kvs);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetApp_id()).compareTo(other.isSetApp_id());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetApp_id()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.app_id, other.app_id);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetPartition_index()).compareTo(other.isSetPartition_index());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPartition_index()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(this.partition_index, other.partition_index);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetServer()).compareTo(other.isSetServer());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetServer()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.server, other.server);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- scheme(iprot).read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- scheme(oprot).write(oprot, this);
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("multi_get_response(");
- boolean first = true;
-
- sb.append("error:");
- sb.append(this.error);
- first = false;
- if (!first) sb.append(", ");
- sb.append("kvs:");
- if (this.kvs == null) {
- sb.append("null");
- } else {
- sb.append(this.kvs);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("app_id:");
- sb.append(this.app_id);
- first = false;
- if (!first) sb.append(", ");
- sb.append("partition_index:");
- sb.append(this.partition_index);
- first = false;
- if (!first) sb.append(", ");
- sb.append("server:");
- if (this.server == null) {
- sb.append("null");
- } else {
- sb.append(this.server);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, java.lang.ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and
- // doesn't call the default constructor.
- __isset_bitfield = 0;
- read(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class multi_get_responseStandardSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public multi_get_responseStandardScheme getScheme() {
- return new multi_get_responseStandardScheme();
- }
- }
-
- private static class multi_get_responseStandardScheme
- extends org.apache.thrift.scheme.StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, multi_get_response struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true) {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // ERROR
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.error = iprot.readI32();
- struct.setErrorIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // KVS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
- struct.kvs = new java.util.ArrayList(_list24.size);
- key_value _elem25;
- for (int _i26 = 0; _i26 < _list24.size; ++_i26) {
- _elem25 = new key_value();
- _elem25.read(iprot);
- struct.kvs.add(_elem25);
- }
- iprot.readListEnd();
- }
- struct.setKvsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // APP_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.app_id = iprot.readI32();
- struct.setApp_idIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // PARTITION_INDEX
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.partition_index = iprot.readI32();
- struct.setPartition_indexIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // SERVER
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.server = iprot.readString();
- struct.setServerIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, multi_get_response struct)
- throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldBegin(ERROR_FIELD_DESC);
- oprot.writeI32(struct.error);
- oprot.writeFieldEnd();
- if (struct.kvs != null) {
- oprot.writeFieldBegin(KVS_FIELD_DESC);
- {
- oprot.writeListBegin(
- new org.apache.thrift.protocol.TList(
- org.apache.thrift.protocol.TType.STRUCT, struct.kvs.size()));
- for (key_value _iter27 : struct.kvs) {
- _iter27.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(APP_ID_FIELD_DESC);
- oprot.writeI32(struct.app_id);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(PARTITION_INDEX_FIELD_DESC);
- oprot.writeI32(struct.partition_index);
- oprot.writeFieldEnd();
- if (struct.server != null) {
- oprot.writeFieldBegin(SERVER_FIELD_DESC);
- oprot.writeString(struct.server);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
- }
-
- private static class multi_get_responseTupleSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public multi_get_responseTupleScheme getScheme() {
- return new multi_get_responseTupleScheme();
- }
- }
-
- private static class multi_get_responseTupleScheme
- extends org.apache.thrift.scheme.TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, multi_get_response struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol oprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet optionals = new java.util.BitSet();
- if (struct.isSetError()) {
- optionals.set(0);
- }
- if (struct.isSetKvs()) {
- optionals.set(1);
- }
- if (struct.isSetApp_id()) {
- optionals.set(2);
- }
- if (struct.isSetPartition_index()) {
- optionals.set(3);
- }
- if (struct.isSetServer()) {
- optionals.set(4);
- }
- oprot.writeBitSet(optionals, 5);
- if (struct.isSetError()) {
- oprot.writeI32(struct.error);
- }
- if (struct.isSetKvs()) {
- {
- oprot.writeI32(struct.kvs.size());
- for (key_value _iter28 : struct.kvs) {
- _iter28.write(oprot);
- }
- }
- }
- if (struct.isSetApp_id()) {
- oprot.writeI32(struct.app_id);
- }
- if (struct.isSetPartition_index()) {
- oprot.writeI32(struct.partition_index);
- }
- if (struct.isSetServer()) {
- oprot.writeString(struct.server);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, multi_get_response struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol iprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(5);
- if (incoming.get(0)) {
- struct.error = iprot.readI32();
- struct.setErrorIsSet(true);
- }
- if (incoming.get(1)) {
- {
- org.apache.thrift.protocol.TList _list29 =
- new org.apache.thrift.protocol.TList(
- org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.kvs = new java.util.ArrayList(_list29.size);
- key_value _elem30;
- for (int _i31 = 0; _i31 < _list29.size; ++_i31) {
- _elem30 = new key_value();
- _elem30.read(iprot);
- struct.kvs.add(_elem30);
- }
- }
- struct.setKvsIsSet(true);
- }
- if (incoming.get(2)) {
- struct.app_id = iprot.readI32();
- struct.setApp_idIsSet(true);
- }
- if (incoming.get(3)) {
- struct.partition_index = iprot.readI32();
- struct.setPartition_indexIsSet(true);
- }
- if (incoming.get(4)) {
- struct.server = iprot.readString();
- struct.setServerIsSet(true);
- }
- }
- }
-
- private static S scheme(
- org.apache.thrift.protocol.TProtocol proto) {
- return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
- ? STANDARD_SCHEME_FACTORY
- : TUPLE_SCHEME_FACTORY)
- .getScheme();
- }
-}
diff --git a/java-client/src/main/java/org/apache/pegasus/apps/multi_put_request.java b/java-client/src/main/java/org/apache/pegasus/apps/multi_put_request.java
deleted file mode 100644
index 965e374a2d..0000000000
--- a/java-client/src/main/java/org/apache/pegasus/apps/multi_put_request.java
+++ /dev/null
@@ -1,696 +0,0 @@
-/*
- * 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.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
- */
-package org.apache.pegasus.apps;
-
-import org.apache.pegasus.base.blob;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(
- value = "Autogenerated by Thrift Compiler (0.11.0)",
- date = "2020-04-13")
-public class multi_put_request
- implements org.apache.thrift.TBase,
- java.io.Serializable,
- Cloneable,
- Comparable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("multi_put_request");
-
- private static final org.apache.thrift.protocol.TField HASH_KEY_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "hash_key", org.apache.thrift.protocol.TType.STRUCT, (short) 1);
- private static final org.apache.thrift.protocol.TField KVS_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "kvs", org.apache.thrift.protocol.TType.LIST, (short) 2);
- private static final org.apache.thrift.protocol.TField EXPIRE_TS_SECONDS_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "expire_ts_seconds", org.apache.thrift.protocol.TType.I32, (short) 3);
-
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
- new multi_put_requestStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
- new multi_put_requestTupleSchemeFactory();
-
- public blob hash_key; // required
- public java.util.List kvs; // required
- public int expire_ts_seconds; // required
-
- /**
- * The set of fields this struct contains, along with convenience methods for finding and
- * manipulating them.
- */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- HASH_KEY((short) 1, "hash_key"),
- KVS((short) 2, "kvs"),
- EXPIRE_TS_SECONDS((short) 3, "expire_ts_seconds");
-
- private static final java.util.Map byName =
- new java.util.HashMap();
-
- static {
- for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /** Find the _Fields constant that matches fieldId, or null if its not found. */
- public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
- case 1: // HASH_KEY
- return HASH_KEY;
- case 2: // KVS
- return KVS;
- case 3: // EXPIRE_TS_SECONDS
- return EXPIRE_TS_SECONDS;
- default:
- return null;
- }
- }
-
- /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null)
- throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /** Find the _Fields constant that matches name, or null if its not found. */
- public static _Fields findByName(java.lang.String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final java.lang.String _fieldName;
-
- _Fields(short thriftId, java.lang.String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public java.lang.String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __EXPIRE_TS_SECONDS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
- static {
- java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(
- _Fields.HASH_KEY,
- new org.apache.thrift.meta_data.FieldMetaData(
- "hash_key",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- tmpMap.put(
- _Fields.KVS,
- new org.apache.thrift.meta_data.FieldMetaData(
- "kvs",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(
- org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, key_value.class))));
- tmpMap.put(
- _Fields.EXPIRE_TS_SECONDS,
- new org.apache.thrift.meta_data.FieldMetaData(
- "expire_ts_seconds",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I32)));
- metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
- multi_put_request.class, metaDataMap);
- }
-
- public multi_put_request() {}
-
- public multi_put_request(blob hash_key, java.util.List kvs, int expire_ts_seconds) {
- this();
- this.hash_key = hash_key;
- this.kvs = kvs;
- this.expire_ts_seconds = expire_ts_seconds;
- setExpire_ts_secondsIsSet(true);
- }
-
- /** Performs a deep copy on other. */
- public multi_put_request(multi_put_request other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetHash_key()) {
- this.hash_key = new blob(other.hash_key);
- }
- if (other.isSetKvs()) {
- java.util.List __this__kvs = new java.util.ArrayList(other.kvs.size());
- for (key_value other_element : other.kvs) {
- __this__kvs.add(new key_value(other_element));
- }
- this.kvs = __this__kvs;
- }
- this.expire_ts_seconds = other.expire_ts_seconds;
- }
-
- public multi_put_request deepCopy() {
- return new multi_put_request(this);
- }
-
- @Override
- public void clear() {
- this.hash_key = null;
- this.kvs = null;
- setExpire_ts_secondsIsSet(false);
- this.expire_ts_seconds = 0;
- }
-
- public blob getHash_key() {
- return this.hash_key;
- }
-
- public multi_put_request setHash_key(blob hash_key) {
- this.hash_key = hash_key;
- return this;
- }
-
- public void unsetHash_key() {
- this.hash_key = null;
- }
-
- /** Returns true if field hash_key is set (has been assigned a value) and false otherwise */
- public boolean isSetHash_key() {
- return this.hash_key != null;
- }
-
- public void setHash_keyIsSet(boolean value) {
- if (!value) {
- this.hash_key = null;
- }
- }
-
- public int getKvsSize() {
- return (this.kvs == null) ? 0 : this.kvs.size();
- }
-
- public java.util.Iterator getKvsIterator() {
- return (this.kvs == null) ? null : this.kvs.iterator();
- }
-
- public void addToKvs(key_value elem) {
- if (this.kvs == null) {
- this.kvs = new java.util.ArrayList();
- }
- this.kvs.add(elem);
- }
-
- public java.util.List getKvs() {
- return this.kvs;
- }
-
- public multi_put_request setKvs(java.util.List kvs) {
- this.kvs = kvs;
- return this;
- }
-
- public void unsetKvs() {
- this.kvs = null;
- }
-
- /** Returns true if field kvs is set (has been assigned a value) and false otherwise */
- public boolean isSetKvs() {
- return this.kvs != null;
- }
-
- public void setKvsIsSet(boolean value) {
- if (!value) {
- this.kvs = null;
- }
- }
-
- public int getExpire_ts_seconds() {
- return this.expire_ts_seconds;
- }
-
- public multi_put_request setExpire_ts_seconds(int expire_ts_seconds) {
- this.expire_ts_seconds = expire_ts_seconds;
- setExpire_ts_secondsIsSet(true);
- return this;
- }
-
- public void unsetExpire_ts_seconds() {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __EXPIRE_TS_SECONDS_ISSET_ID);
- }
-
- /**
- * Returns true if field expire_ts_seconds is set (has been assigned a value) and false otherwise
- */
- public boolean isSetExpire_ts_seconds() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EXPIRE_TS_SECONDS_ISSET_ID);
- }
-
- public void setExpire_ts_secondsIsSet(boolean value) {
- __isset_bitfield =
- org.apache.thrift.EncodingUtils.setBit(
- __isset_bitfield, __EXPIRE_TS_SECONDS_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, java.lang.Object value) {
- switch (field) {
- case HASH_KEY:
- if (value == null) {
- unsetHash_key();
- } else {
- setHash_key((blob) value);
- }
- break;
-
- case KVS:
- if (value == null) {
- unsetKvs();
- } else {
- setKvs((java.util.List) value);
- }
- break;
-
- case EXPIRE_TS_SECONDS:
- if (value == null) {
- unsetExpire_ts_seconds();
- } else {
- setExpire_ts_seconds((java.lang.Integer) value);
- }
- break;
- }
- }
-
- public java.lang.Object getFieldValue(_Fields field) {
- switch (field) {
- case HASH_KEY:
- return getHash_key();
-
- case KVS:
- return getKvs();
-
- case EXPIRE_TS_SECONDS:
- return getExpire_ts_seconds();
- }
- throw new java.lang.IllegalStateException();
- }
-
- /**
- * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
- * otherwise
- */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new java.lang.IllegalArgumentException();
- }
-
- switch (field) {
- case HASH_KEY:
- return isSetHash_key();
- case KVS:
- return isSetKvs();
- case EXPIRE_TS_SECONDS:
- return isSetExpire_ts_seconds();
- }
- throw new java.lang.IllegalStateException();
- }
-
- @Override
- public boolean equals(java.lang.Object that) {
- if (that == null) return false;
- if (that instanceof multi_put_request) return this.equals((multi_put_request) that);
- return false;
- }
-
- public boolean equals(multi_put_request that) {
- if (that == null) return false;
- if (this == that) return true;
-
- boolean this_present_hash_key = true && this.isSetHash_key();
- boolean that_present_hash_key = true && that.isSetHash_key();
- if (this_present_hash_key || that_present_hash_key) {
- if (!(this_present_hash_key && that_present_hash_key)) return false;
- if (!this.hash_key.equals(that.hash_key)) return false;
- }
-
- boolean this_present_kvs = true && this.isSetKvs();
- boolean that_present_kvs = true && that.isSetKvs();
- if (this_present_kvs || that_present_kvs) {
- if (!(this_present_kvs && that_present_kvs)) return false;
- if (!this.kvs.equals(that.kvs)) return false;
- }
-
- boolean this_present_expire_ts_seconds = true;
- boolean that_present_expire_ts_seconds = true;
- if (this_present_expire_ts_seconds || that_present_expire_ts_seconds) {
- if (!(this_present_expire_ts_seconds && that_present_expire_ts_seconds)) return false;
- if (this.expire_ts_seconds != that.expire_ts_seconds) return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 1;
-
- hashCode = hashCode * 8191 + ((isSetHash_key()) ? 131071 : 524287);
- if (isSetHash_key()) hashCode = hashCode * 8191 + hash_key.hashCode();
-
- hashCode = hashCode * 8191 + ((isSetKvs()) ? 131071 : 524287);
- if (isSetKvs()) hashCode = hashCode * 8191 + kvs.hashCode();
-
- hashCode = hashCode * 8191 + expire_ts_seconds;
-
- return hashCode;
- }
-
- @Override
- public int compareTo(multi_put_request other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = java.lang.Boolean.valueOf(isSetHash_key()).compareTo(other.isSetHash_key());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetHash_key()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hash_key, other.hash_key);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetKvs()).compareTo(other.isSetKvs());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetKvs()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.kvs, other.kvs);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison =
- java.lang.Boolean.valueOf(isSetExpire_ts_seconds())
- .compareTo(other.isSetExpire_ts_seconds());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetExpire_ts_seconds()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(this.expire_ts_seconds, other.expire_ts_seconds);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- scheme(iprot).read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- scheme(oprot).write(oprot, this);
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("multi_put_request(");
- boolean first = true;
-
- sb.append("hash_key:");
- if (this.hash_key == null) {
- sb.append("null");
- } else {
- sb.append(this.hash_key);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("kvs:");
- if (this.kvs == null) {
- sb.append("null");
- } else {
- sb.append(this.kvs);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("expire_ts_seconds:");
- sb.append(this.expire_ts_seconds);
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (hash_key != null) {
- hash_key.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, java.lang.ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and
- // doesn't call the default constructor.
- __isset_bitfield = 0;
- read(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class multi_put_requestStandardSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public multi_put_requestStandardScheme getScheme() {
- return new multi_put_requestStandardScheme();
- }
- }
-
- private static class multi_put_requestStandardScheme
- extends org.apache.thrift.scheme.StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, multi_put_request struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true) {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // HASH_KEY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.hash_key = new blob();
- struct.hash_key.read(iprot);
- struct.setHash_keyIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // KVS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
- struct.kvs = new java.util.ArrayList(_list0.size);
- key_value _elem1;
- for (int _i2 = 0; _i2 < _list0.size; ++_i2) {
- _elem1 = new key_value();
- _elem1.read(iprot);
- struct.kvs.add(_elem1);
- }
- iprot.readListEnd();
- }
- struct.setKvsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // EXPIRE_TS_SECONDS
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.expire_ts_seconds = iprot.readI32();
- struct.setExpire_ts_secondsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, multi_put_request struct)
- throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.hash_key != null) {
- oprot.writeFieldBegin(HASH_KEY_FIELD_DESC);
- struct.hash_key.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.kvs != null) {
- oprot.writeFieldBegin(KVS_FIELD_DESC);
- {
- oprot.writeListBegin(
- new org.apache.thrift.protocol.TList(
- org.apache.thrift.protocol.TType.STRUCT, struct.kvs.size()));
- for (key_value _iter3 : struct.kvs) {
- _iter3.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(EXPIRE_TS_SECONDS_FIELD_DESC);
- oprot.writeI32(struct.expire_ts_seconds);
- oprot.writeFieldEnd();
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
- }
-
- private static class multi_put_requestTupleSchemeFactory
- implements org.apache.thrift.scheme.SchemeFactory {
- public multi_put_requestTupleScheme getScheme() {
- return new multi_put_requestTupleScheme();
- }
- }
-
- private static class multi_put_requestTupleScheme
- extends org.apache.thrift.scheme.TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, multi_put_request struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol oprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet optionals = new java.util.BitSet();
- if (struct.isSetHash_key()) {
- optionals.set(0);
- }
- if (struct.isSetKvs()) {
- optionals.set(1);
- }
- if (struct.isSetExpire_ts_seconds()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetHash_key()) {
- struct.hash_key.write(oprot);
- }
- if (struct.isSetKvs()) {
- {
- oprot.writeI32(struct.kvs.size());
- for (key_value _iter4 : struct.kvs) {
- _iter4.write(oprot);
- }
- }
- }
- if (struct.isSetExpire_ts_seconds()) {
- oprot.writeI32(struct.expire_ts_seconds);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, multi_put_request struct)
- throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol iprot =
- (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(3);
- if (incoming.get(0)) {
- struct.hash_key = new blob();
- struct.hash_key.read(iprot);
- struct.setHash_keyIsSet(true);
- }
- if (incoming.get(1)) {
- {
- org.apache.thrift.protocol.TList _list5 =
- new org.apache.thrift.protocol.TList(
- org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.kvs = new java.util.ArrayList(_list5.size);
- key_value _elem6;
- for (int _i7 = 0; _i7 < _list5.size; ++_i7) {
- _elem6 = new key_value();
- _elem6.read(iprot);
- struct.kvs.add(_elem6);
- }
- }
- struct.setKvsIsSet(true);
- }
- if (incoming.get(2)) {
- struct.expire_ts_seconds = iprot.readI32();
- struct.setExpire_ts_secondsIsSet(true);
- }
- }
- }
-
- private static S scheme(
- org.apache.thrift.protocol.TProtocol proto) {
- return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
- ? STANDARD_SCHEME_FACTORY
- : TUPLE_SCHEME_FACTORY)
- .getScheme();
- }
-}
diff --git a/java-client/src/main/java/org/apache/pegasus/apps/multi_remove_request.java b/java-client/src/main/java/org/apache/pegasus/apps/multi_remove_request.java
deleted file mode 100644
index 3f570ec0e8..0000000000
--- a/java-client/src/main/java/org/apache/pegasus/apps/multi_remove_request.java
+++ /dev/null
@@ -1,691 +0,0 @@
-/*
- * 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.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
- */
-package org.apache.pegasus.apps;
-
-import org.apache.pegasus.base.blob;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(
- value = "Autogenerated by Thrift Compiler (0.11.0)",
- date = "2020-04-13")
-public class multi_remove_request
- implements org.apache.thrift.TBase,
- java.io.Serializable,
- Cloneable,
- Comparable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("multi_remove_request");
-
- private static final org.apache.thrift.protocol.TField HASH_KEY_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "hash_key", org.apache.thrift.protocol.TType.STRUCT, (short) 1);
- private static final org.apache.thrift.protocol.TField SORK_KEYS_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "sork_keys", org.apache.thrift.protocol.TType.LIST, (short) 2);
- private static final org.apache.thrift.protocol.TField MAX_COUNT_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "max_count", org.apache.thrift.protocol.TType.I64, (short) 3);
-
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
- new multi_remove_requestStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
- new multi_remove_requestTupleSchemeFactory();
-
- public blob hash_key; // required
- public java.util.List sork_keys; // required
- public long max_count; // required
-
- /**
- * The set of fields this struct contains, along with convenience methods for finding and
- * manipulating them.
- */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- HASH_KEY((short) 1, "hash_key"),
- SORK_KEYS((short) 2, "sork_keys"),
- MAX_COUNT((short) 3, "max_count");
-
- private static final java.util.Map byName =
- new java.util.HashMap();
-
- static {
- for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /** Find the _Fields constant that matches fieldId, or null if its not found. */
- public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
- case 1: // HASH_KEY
- return HASH_KEY;
- case 2: // SORK_KEYS
- return SORK_KEYS;
- case 3: // MAX_COUNT
- return MAX_COUNT;
- default:
- return null;
- }
- }
-
- /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null)
- throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /** Find the _Fields constant that matches name, or null if its not found. */
- public static _Fields findByName(java.lang.String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final java.lang.String _fieldName;
-
- _Fields(short thriftId, java.lang.String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public java.lang.String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __MAX_COUNT_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
- static {
- java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(
- _Fields.HASH_KEY,
- new org.apache.thrift.meta_data.FieldMetaData(
- "hash_key",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class)));
- tmpMap.put(
- _Fields.SORK_KEYS,
- new org.apache.thrift.meta_data.FieldMetaData(
- "sork_keys",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(
- org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(
- org.apache.thrift.protocol.TType.STRUCT, blob.class))));
- tmpMap.put(
- _Fields.MAX_COUNT,
- new org.apache.thrift.meta_data.FieldMetaData(
- "max_count",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I64)));
- metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
- multi_remove_request.class, metaDataMap);
- }
-
- public multi_remove_request() {}
-
- public multi_remove_request(blob hash_key, java.util.List sork_keys, long max_count) {
- this();
- this.hash_key = hash_key;
- this.sork_keys = sork_keys;
- this.max_count = max_count;
- setMax_countIsSet(true);
- }
-
- /** Performs a deep copy on other. */
- public multi_remove_request(multi_remove_request other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetHash_key()) {
- this.hash_key = new blob(other.hash_key);
- }
- if (other.isSetSork_keys()) {
- java.util.List __this__sork_keys =
- new java.util.ArrayList(other.sork_keys.size());
- for (blob other_element : other.sork_keys) {
- __this__sork_keys.add(new blob(other_element));
- }
- this.sork_keys = __this__sork_keys;
- }
- this.max_count = other.max_count;
- }
-
- public multi_remove_request deepCopy() {
- return new multi_remove_request(this);
- }
-
- @Override
- public void clear() {
- this.hash_key = null;
- this.sork_keys = null;
- setMax_countIsSet(false);
- this.max_count = 0;
- }
-
- public blob getHash_key() {
- return this.hash_key;
- }
-
- public multi_remove_request setHash_key(blob hash_key) {
- this.hash_key = hash_key;
- return this;
- }
-
- public void unsetHash_key() {
- this.hash_key = null;
- }
-
- /** Returns true if field hash_key is set (has been assigned a value) and false otherwise */
- public boolean isSetHash_key() {
- return this.hash_key != null;
- }
-
- public void setHash_keyIsSet(boolean value) {
- if (!value) {
- this.hash_key = null;
- }
- }
-
- public int getSork_keysSize() {
- return (this.sork_keys == null) ? 0 : this.sork_keys.size();
- }
-
- public java.util.Iterator getSork_keysIterator() {
- return (this.sork_keys == null) ? null : this.sork_keys.iterator();
- }
-
- public void addToSork_keys(blob elem) {
- if (this.sork_keys == null) {
- this.sork_keys = new java.util.ArrayList();
- }
- this.sork_keys.add(elem);
- }
-
- public java.util.List