Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: Hbase.thrift
- ===================================================================
- --- Hbase.thrift (revision 771922)
- +++ Hbase.thrift (working copy)
- @@ -523,6 +523,9 @@
- list<TRowResult> scannerGet(1:ScannerID id)
- throws (1:IOError io, 2:IllegalArgument ia)
- + list<TRowResult> scannerGetList(1:ScannerID id,2:i32 nbRows)
- + throws (1:IOError io, 2:IllegalArgument ia)
- +
- /**
- * Closes the server-state associated with an open scanner.
- *
- Index: ThriftServer.java
- ===================================================================
- --- ThriftServer.java (revision 771922)
- +++ ThriftServer.java (working copy)
- @@ -440,6 +440,25 @@
- removeScanner(id);
- }
- + public List<TRowResult> scannerGetList(int id, int nbRows) throws IllegalArgument, IOError {
- + LOG.debug("scannerGet: id=" + id);
- + Scanner scanner = getScanner(id);
- + if (scanner == null) {
- + throw new IllegalArgument("scanner ID is invalid");
- + }
- +
- + RowResult [] results = null;
- +
- + try {
- + results = scanner.next(nbRows);
- + if (results == null) {
- + return new ArrayList<TRowResult>();
- + }
- + } catch (IOException e) {
- + throw new IOError(e.getMessage());
- + }
- + return ThriftUtilities.rowResultFromHBase(results);
- + }
- public List<TRowResult> scannerGet(int id) throws IllegalArgument,
- IOError {
- LOG.debug("scannerGet: id=" + id);
- Index: ThriftUtilities.java
- ===================================================================
- --- ThriftUtilities.java (revision 771922)
- +++ ThriftUtilities.java (working copy)
- @@ -123,6 +123,28 @@
- * Hbase RowResult object
- * @return Thrift TRowResult array
- */
- + static public List<TRowResult> rowResultFromHBase(RowResult[] in) {
- + List<TRowResult> results = new ArrayList<TRowResult>();
- + for ( RowResult result_ : in) {
- + if(null == result_) {
- + continue;
- + }
- + TRowResult result = new TRowResult();
- + result.row = result_.getRow();
- + result.columns = new TreeMap<byte[], TCell>(Bytes.BYTES_COMPARATOR);
- + for (Map.Entry<byte[], Cell> entry : result_.entrySet()){
- + Cell cell = entry.getValue();
- + result.columns.put(entry.getKey(),
- + new TCell(cell.getValue(), cell.getTimestamp()));
- +
- + }
- + results.add(result);
- + }
- + if (0 == results.size() ) {
- + return null;
- + }
- + return results;
- + }
- static public List<TRowResult> rowResultFromHBase(RowResult in) {
- List<TRowResult> list = new ArrayList<TRowResult>();
- if(in == null) {
- Index: generated/Mutation.java
- ===================================================================
- --- generated/Mutation.java (revision 771922)
- +++ generated/Mutation.java (working copy)
- @@ -1,21 +1,4 @@
- /**
- - * 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
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- Index: generated/AlreadyExists.java
- ===================================================================
- --- generated/AlreadyExists.java (revision 771922)
- +++ generated/AlreadyExists.java (working copy)
- @@ -1,21 +1,4 @@
- /**
- - * 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
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- Index: generated/IOError.java
- ===================================================================
- --- generated/IOError.java (revision 771922)
- +++ generated/IOError.java (working copy)
- @@ -1,21 +1,4 @@
- /**
- - * 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
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- Index: generated/BatchMutation.java
- ===================================================================
- --- generated/BatchMutation.java (revision 771922)
- +++ generated/BatchMutation.java (working copy)
- @@ -1,21 +1,4 @@
- /**
- - * 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
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- Index: generated/Hbase.java
- ===================================================================
- --- generated/Hbase.java (revision 771922)
- +++ generated/Hbase.java (working copy)
- @@ -1,21 +1,4 @@
- /**
- - * 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
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- @@ -466,6 +449,8 @@
- */
- public List<TRowResult> scannerGet(int id) throws IOError, IllegalArgument, TException;
- + public List<TRowResult> scannerGetList(int id, int nbRows) throws IOError, IllegalArgument, TException;
- +
- /**
- * Closes the server-state associated with an open scanner.
- *
- @@ -1651,6 +1636,46 @@
- throw new TApplicationException(TApplicationException.MISSING_RESULT, "scannerGet failed: unknown result");
- }
- + public List<TRowResult> scannerGetList(int id, int nbRows) throws IOError, IllegalArgument, TException
- + {
- + send_scannerGetList(id, nbRows);
- + return recv_scannerGetList();
- + }
- +
- + public void send_scannerGetList(int id, int nbRows) throws TException
- + {
- + oprot_.writeMessageBegin(new TMessage("scannerGetList", TMessageType.CALL, seqid_));
- + scannerGetList_args args = new scannerGetList_args();
- + args.id = id;
- + args.nbRows = nbRows;
- + args.write(oprot_);
- + oprot_.writeMessageEnd();
- + oprot_.getTransport().flush();
- + }
- +
- + public List<TRowResult> recv_scannerGetList() throws IOError, IllegalArgument, TException
- + {
- + TMessage msg = iprot_.readMessageBegin();
- + if (msg.type == TMessageType.EXCEPTION) {
- + TApplicationException x = TApplicationException.read(iprot_);
- + iprot_.readMessageEnd();
- + throw x;
- + }
- + scannerGetList_result result = new scannerGetList_result();
- + result.read(iprot_);
- + iprot_.readMessageEnd();
- + if (result.isSetSuccess()) {
- + return result.success;
- + }
- + if (result.io != null) {
- + throw result.io;
- + }
- + if (result.ia != null) {
- + throw result.ia;
- + }
- + throw new TApplicationException(TApplicationException.MISSING_RESULT, "scannerGetList failed: unknown result");
- + }
- +
- public void scannerClose(int id) throws IOError, IllegalArgument, TException
- {
- send_scannerClose(id);
- @@ -1723,6 +1748,7 @@
- processMap_.put("scannerOpenTs", new scannerOpenTs());
- processMap_.put("scannerOpenWithStopTs", new scannerOpenWithStopTs());
- processMap_.put("scannerGet", new scannerGet());
- + processMap_.put("scannerGetList", new scannerGetList());
- processMap_.put("scannerClose", new scannerClose());
- }
- @@ -2393,6 +2419,28 @@
- }
- + private class scannerGetList implements ProcessFunction {
- + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
- + {
- + scannerGetList_args args = new scannerGetList_args();
- + args.read(iprot);
- + iprot.readMessageEnd();
- + scannerGetList_result result = new scannerGetList_result();
- + try {
- + result.success = iface_.scannerGetList(args.id, args.nbRows);
- + } catch (IOError io) {
- + result.io = io;
- + } catch (IllegalArgument ia) {
- + result.ia = ia;
- + }
- + oprot.writeMessageBegin(new TMessage("scannerGetList", TMessageType.REPLY, seqid));
- + result.write(oprot);
- + oprot.writeMessageEnd();
- + oprot.getTransport().flush();
- + }
- +
- + }
- +
- private class scannerClose implements ProcessFunction {
- public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
- {
- @@ -20936,6 +20984,655 @@
- }
- + public static class scannerGetList_args implements TBase, java.io.Serializable, Cloneable {
- + private static final TStruct STRUCT_DESC = new TStruct("scannerGetList_args");
- + private static final TField ID_FIELD_DESC = new TField("id", TType.I32, (short)1);
- + private static final TField NB_ROWS_FIELD_DESC = new TField("nbRows", TType.I32, (short)2);
- +
- + public int id;
- + public static final int ID = 1;
- + public int nbRows;
- + public static final int NBROWS = 2;
- +
- + private final Isset __isset = new Isset();
- + private static final class Isset implements java.io.Serializable {
- + public boolean id = false;
- + public boolean nbRows = false;
- + }
- +
- + public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
- + put(ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT,
- + new FieldValueMetaData(TType.I32)));
- + put(NBROWS, new FieldMetaData("nbRows", TFieldRequirementType.DEFAULT,
- + new FieldValueMetaData(TType.I32)));
- + }});
- +
- + static {
- + FieldMetaData.addStructMetaDataMap(scannerGetList_args.class, metaDataMap);
- + }
- +
- + public scannerGetList_args() {
- + }
- +
- + public scannerGetList_args(
- + int id,
- + int nbRows)
- + {
- + this();
- + this.id = id;
- + this.__isset.id = true;
- + this.nbRows = nbRows;
- + this.__isset.nbRows = true;
- + }
- +
- + /**
- + * Performs a deep copy on <i>other</i>.
- + */
- + public scannerGetList_args(scannerGetList_args other) {
- + __isset.id = other.__isset.id;
- + this.id = other.id;
- + __isset.nbRows = other.__isset.nbRows;
- + this.nbRows = other.nbRows;
- + }
- +
- + @Override
- + public scannerGetList_args clone() {
- + return new scannerGetList_args(this);
- + }
- +
- + public int getId() {
- + return this.id;
- + }
- +
- + public void setId(int id) {
- + this.id = id;
- + this.__isset.id = true;
- + }
- +
- + public void unsetId() {
- + this.__isset.id = false;
- + }
- +
- + // Returns true if field id is set (has been asigned a value) and false otherwise
- + public boolean isSetId() {
- + return this.__isset.id;
- + }
- +
- + public void setIdIsSet(boolean value) {
- + this.__isset.id = value;
- + }
- +
- + public int getNbRows() {
- + return this.nbRows;
- + }
- +
- + public void setNbRows(int nbRows) {
- + this.nbRows = nbRows;
- + this.__isset.nbRows = true;
- + }
- +
- + public void unsetNbRows() {
- + this.__isset.nbRows = false;
- + }
- +
- + // Returns true if field nbRows is set (has been asigned a value) and false otherwise
- + public boolean isSetNbRows() {
- + return this.__isset.nbRows;
- + }
- +
- + public void setNbRowsIsSet(boolean value) {
- + this.__isset.nbRows = value;
- + }
- +
- + public void setFieldValue(int fieldID, Object value) {
- + switch (fieldID) {
- + case ID:
- + if (value == null) {
- + unsetId();
- + } else {
- + setId((Integer)value);
- + }
- + break;
- +
- + case NBROWS:
- + if (value == null) {
- + unsetNbRows();
- + } else {
- + setNbRows((Integer)value);
- + }
- + break;
- +
- + default:
- + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
- + }
- + }
- +
- + public Object getFieldValue(int fieldID) {
- + switch (fieldID) {
- + case ID:
- + return new Integer(getId());
- +
- + case NBROWS:
- + return new Integer(getNbRows());
- +
- + default:
- + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
- + }
- + }
- +
- + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
- + public boolean isSet(int fieldID) {
- + switch (fieldID) {
- + case ID:
- + return isSetId();
- + case NBROWS:
- + return isSetNbRows();
- + default:
- + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
- + }
- + }
- +
- + @Override
- + public boolean equals(Object that) {
- + if (that == null)
- + return false;
- + if (that instanceof scannerGetList_args)
- + return this.equals((scannerGetList_args)that);
- + return false;
- + }
- +
- + public boolean equals(scannerGetList_args that) {
- + if (that == null)
- + return false;
- +
- + boolean this_present_id = true;
- + boolean that_present_id = true;
- + if (this_present_id || that_present_id) {
- + if (!(this_present_id && that_present_id))
- + return false;
- + if (this.id != that.id)
- + return false;
- + }
- +
- + boolean this_present_nbRows = true;
- + boolean that_present_nbRows = true;
- + if (this_present_nbRows || that_present_nbRows) {
- + if (!(this_present_nbRows && that_present_nbRows))
- + return false;
- + if (this.nbRows != that.nbRows)
- + return false;
- + }
- +
- + return true;
- + }
- +
- + @Override
- + public int hashCode() {
- + return 0;
- + }
- +
- + public void read(TProtocol iprot) throws TException {
- + TField field;
- + iprot.readStructBegin();
- + while (true)
- + {
- + field = iprot.readFieldBegin();
- + if (field.type == TType.STOP) {
- + break;
- + }
- + switch (field.id)
- + {
- + case ID:
- + if (field.type == TType.I32) {
- + this.id = iprot.readI32();
- + this.__isset.id = true;
- + } else {
- + TProtocolUtil.skip(iprot, field.type);
- + }
- + break;
- + case NBROWS:
- + if (field.type == TType.I32) {
- + this.nbRows = iprot.readI32();
- + this.__isset.nbRows = true;
- + } else {
- + TProtocolUtil.skip(iprot, field.type);
- + }
- + break;
- + default:
- + TProtocolUtil.skip(iprot, field.type);
- + break;
- + }
- + iprot.readFieldEnd();
- + }
- + iprot.readStructEnd();
- +
- +
- + // check for required fields of primitive type, which can't be checked in the validate method
- + validate();
- + }
- +
- + public void write(TProtocol oprot) throws TException {
- + validate();
- +
- + oprot.writeStructBegin(STRUCT_DESC);
- + oprot.writeFieldBegin(ID_FIELD_DESC);
- + oprot.writeI32(this.id);
- + oprot.writeFieldEnd();
- + oprot.writeFieldBegin(NB_ROWS_FIELD_DESC);
- + oprot.writeI32(this.nbRows);
- + oprot.writeFieldEnd();
- + oprot.writeFieldStop();
- + oprot.writeStructEnd();
- + }
- +
- + @Override
- + public String toString() {
- + StringBuilder sb = new StringBuilder("scannerGetList_args(");
- + boolean first = true;
- +
- + sb.append("id:");
- + sb.append(this.id);
- + first = false;
- + if (!first) sb.append(", ");
- + sb.append("nbRows:");
- + sb.append(this.nbRows);
- + first = false;
- + sb.append(")");
- + return sb.toString();
- + }
- +
- + public void validate() throws TException {
- + // check for required fields
- + // check that fields of type enum have valid values
- + }
- +
- + }
- +
- + public static class scannerGetList_result implements TBase, java.io.Serializable, Cloneable {
- + private static final TStruct STRUCT_DESC = new TStruct("scannerGetList_result");
- + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
- + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1);
- + private static final TField IA_FIELD_DESC = new TField("ia", TType.STRUCT, (short)2);
- +
- + public List<TRowResult> success;
- + public static final int SUCCESS = 0;
- + public IOError io;
- + public static final int IO = 1;
- + public IllegalArgument ia;
- + public static final int IA = 2;
- +
- + private final Isset __isset = new Isset();
- + private static final class Isset implements java.io.Serializable {
- + }
- +
- + public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
- + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
- + new ListMetaData(TType.LIST,
- + new StructMetaData(TType.STRUCT, TRowResult.class))));
- + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT,
- + new FieldValueMetaData(TType.STRUCT)));
- + put(IA, new FieldMetaData("ia", TFieldRequirementType.DEFAULT,
- + new FieldValueMetaData(TType.STRUCT)));
- + }});
- +
- + static {
- + FieldMetaData.addStructMetaDataMap(scannerGetList_result.class, metaDataMap);
- + }
- +
- + public scannerGetList_result() {
- + }
- +
- + public scannerGetList_result(
- + List<TRowResult> success,
- + IOError io,
- + IllegalArgument ia)
- + {
- + this();
- + this.success = success;
- + this.io = io;
- + this.ia = ia;
- + }
- +
- + /**
- + * Performs a deep copy on <i>other</i>.
- + */
- + public scannerGetList_result(scannerGetList_result other) {
- + if (other.isSetSuccess()) {
- + List<TRowResult> __this__success = new ArrayList<TRowResult>();
- + for (TRowResult other_element : other.success) {
- + __this__success.add(new TRowResult(other_element));
- + }
- + this.success = __this__success;
- + }
- + if (other.isSetIo()) {
- + this.io = new IOError(other.io);
- + }
- + if (other.isSetIa()) {
- + this.ia = new IllegalArgument(other.ia);
- + }
- + }
- +
- + @Override
- + public scannerGetList_result clone() {
- + return new scannerGetList_result(this);
- + }
- +
- + public int getSuccessSize() {
- + return (this.success == null) ? 0 : this.success.size();
- + }
- +
- + public java.util.Iterator<TRowResult> getSuccessIterator() {
- + return (this.success == null) ? null : this.success.iterator();
- + }
- +
- + public void addToSuccess(TRowResult elem) {
- + if (this.success == null) {
- + this.success = new ArrayList<TRowResult>();
- + }
- + this.success.add(elem);
- + }
- +
- + public List<TRowResult> getSuccess() {
- + return this.success;
- + }
- +
- + public void setSuccess(List<TRowResult> success) {
- + this.success = success;
- + }
- +
- + public void unsetSuccess() {
- + this.success = null;
- + }
- +
- + // Returns true if field success is set (has been asigned a value) and false otherwise
- + public boolean isSetSuccess() {
- + return this.success != null;
- + }
- +
- + public void setSuccessIsSet(boolean value) {
- + if (!value) {
- + this.success = null;
- + }
- + }
- +
- + public IOError getIo() {
- + return this.io;
- + }
- +
- + public void setIo(IOError io) {
- + this.io = io;
- + }
- +
- + public void unsetIo() {
- + this.io = null;
- + }
- +
- + // Returns true if field io is set (has been asigned a value) and false otherwise
- + public boolean isSetIo() {
- + return this.io != null;
- + }
- +
- + public void setIoIsSet(boolean value) {
- + if (!value) {
- + this.io = null;
- + }
- + }
- +
- + public IllegalArgument getIa() {
- + return this.ia;
- + }
- +
- + public void setIa(IllegalArgument ia) {
- + this.ia = ia;
- + }
- +
- + public void unsetIa() {
- + this.ia = null;
- + }
- +
- + // Returns true if field ia is set (has been asigned a value) and false otherwise
- + public boolean isSetIa() {
- + return this.ia != null;
- + }
- +
- + public void setIaIsSet(boolean value) {
- + if (!value) {
- + this.ia = null;
- + }
- + }
- +
- + public void setFieldValue(int fieldID, Object value) {
- + switch (fieldID) {
- + case SUCCESS:
- + if (value == null) {
- + unsetSuccess();
- + } else {
- + setSuccess((List<TRowResult>)value);
- + }
- + break;
- +
- + case IO:
- + if (value == null) {
- + unsetIo();
- + } else {
- + setIo((IOError)value);
- + }
- + break;
- +
- + case IA:
- + if (value == null) {
- + unsetIa();
- + } else {
- + setIa((IllegalArgument)value);
- + }
- + break;
- +
- + default:
- + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
- + }
- + }
- +
- + public Object getFieldValue(int fieldID) {
- + switch (fieldID) {
- + case SUCCESS:
- + return getSuccess();
- +
- + case IO:
- + return getIo();
- +
- + case IA:
- + return getIa();
- +
- + default:
- + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
- + }
- + }
- +
- + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
- + public boolean isSet(int fieldID) {
- + switch (fieldID) {
- + case SUCCESS:
- + return isSetSuccess();
- + case IO:
- + return isSetIo();
- + case IA:
- + return isSetIa();
- + default:
- + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
- + }
- + }
- +
- + @Override
- + public boolean equals(Object that) {
- + if (that == null)
- + return false;
- + if (that instanceof scannerGetList_result)
- + return this.equals((scannerGetList_result)that);
- + return false;
- + }
- +
- + public boolean equals(scannerGetList_result that) {
- + if (that == null)
- + return false;
- +
- + 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;
- + }
- +
- + boolean this_present_io = true && this.isSetIo();
- + boolean that_present_io = true && that.isSetIo();
- + if (this_present_io || that_present_io) {
- + if (!(this_present_io && that_present_io))
- + return false;
- + if (!this.io.equals(that.io))
- + return false;
- + }
- +
- + boolean this_present_ia = true && this.isSetIa();
- + boolean that_present_ia = true && that.isSetIa();
- + if (this_present_ia || that_present_ia) {
- + if (!(this_present_ia && that_present_ia))
- + return false;
- + if (!this.ia.equals(that.ia))
- + return false;
- + }
- +
- + return true;
- + }
- +
- + @Override
- + public int hashCode() {
- + return 0;
- + }
- +
- + public void read(TProtocol iprot) throws TException {
- + TField field;
- + iprot.readStructBegin();
- + while (true)
- + {
- + field = iprot.readFieldBegin();
- + if (field.type == TType.STOP) {
- + break;
- + }
- + switch (field.id)
- + {
- + case SUCCESS:
- + if (field.type == TType.LIST) {
- + {
- + TList _list98 = iprot.readListBegin();
- + this.success = new ArrayList<TRowResult>(_list98.size);
- + for (int _i99 = 0; _i99 < _list98.size; ++_i99)
- + {
- + TRowResult _elem100;
- + _elem100 = new TRowResult();
- + _elem100.read(iprot);
- + this.success.add(_elem100);
- + }
- + iprot.readListEnd();
- + }
- + } else {
- + TProtocolUtil.skip(iprot, field.type);
- + }
- + break;
- + case IO:
- + if (field.type == TType.STRUCT) {
- + this.io = new IOError();
- + this.io.read(iprot);
- + } else {
- + TProtocolUtil.skip(iprot, field.type);
- + }
- + break;
- + case IA:
- + if (field.type == TType.STRUCT) {
- + this.ia = new IllegalArgument();
- + this.ia.read(iprot);
- + } else {
- + TProtocolUtil.skip(iprot, field.type);
- + }
- + break;
- + default:
- + TProtocolUtil.skip(iprot, field.type);
- + break;
- + }
- + iprot.readFieldEnd();
- + }
- + iprot.readStructEnd();
- +
- +
- + // check for required fields of primitive type, which can't be checked in the validate method
- + validate();
- + }
- +
- + public void write(TProtocol oprot) throws TException {
- + oprot.writeStructBegin(STRUCT_DESC);
- +
- + if (this.isSetSuccess()) {
- + oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- + {
- + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
- + for (TRowResult _iter101 : this.success) {
- + _iter101.write(oprot);
- + }
- + oprot.writeListEnd();
- + }
- + oprot.writeFieldEnd();
- + } else if (this.isSetIo()) {
- + oprot.writeFieldBegin(IO_FIELD_DESC);
- + this.io.write(oprot);
- + oprot.writeFieldEnd();
- + } else if (this.isSetIa()) {
- + oprot.writeFieldBegin(IA_FIELD_DESC);
- + this.ia.write(oprot);
- + oprot.writeFieldEnd();
- + }
- + oprot.writeFieldStop();
- + oprot.writeStructEnd();
- + }
- +
- + @Override
- + public String toString() {
- + StringBuilder sb = new StringBuilder("scannerGetList_result(");
- + boolean first = true;
- +
- + sb.append("success:");
- + if (this.success == null) {
- + sb.append("null");
- + } else {
- + sb.append(this.success);
- + }
- + first = false;
- + if (!first) sb.append(", ");
- + sb.append("io:");
- + if (this.io == null) {
- + sb.append("null");
- + } else {
- + sb.append(this.io);
- + }
- + first = false;
- + if (!first) sb.append(", ");
- + sb.append("ia:");
- + if (this.ia == null) {
- + sb.append("null");
- + } else {
- + sb.append(this.ia);
- + }
- + first = false;
- + sb.append(")");
- + return sb.toString();
- + }
- +
- + public void validate() throws TException {
- + // check for required fields
- + // check that fields of type enum have valid values
- + }
- +
- + }
- +
- public static class scannerClose_args implements TBase, java.io.Serializable, Cloneable {
- private static final TStruct STRUCT_DESC = new TStruct("scannerClose_args");
- private static final TField ID_FIELD_DESC = new TField("id", TType.I32, (short)1);
- Index: generated/TCell.java
- ===================================================================
- --- generated/TCell.java (revision 771922)
- +++ generated/TCell.java (working copy)
- @@ -1,21 +1,4 @@
- /**
- - * 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
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- Index: generated/TRegionInfo.java
- ===================================================================
- --- generated/TRegionInfo.java (revision 771922)
- +++ generated/TRegionInfo.java (working copy)
- @@ -1,21 +1,4 @@
- /**
- - * 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
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- Index: generated/TRowResult.java
- ===================================================================
- --- generated/TRowResult.java (revision 771922)
- +++ generated/TRowResult.java (working copy)
- @@ -1,21 +1,4 @@
- /**
- - * 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
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- Index: generated/ColumnDescriptor.java
- ===================================================================
- --- generated/ColumnDescriptor.java (revision 771922)
- +++ generated/ColumnDescriptor.java (working copy)
- @@ -1,21 +1,4 @@
- /**
- - * 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
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- Index: generated/IllegalArgument.java
- ===================================================================
- --- generated/IllegalArgument.java (revision 771922)
- +++ generated/IllegalArgument.java (working copy)
- @@ -1,21 +1,4 @@
- /**
- - * 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
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
Advertisement
Add Comment
Please, Sign In to add comment