diff --git a/RELNOTES.md b/RELNOTES.md index 17e88d8d0..4ad32b602 100644 --- a/RELNOTES.md +++ b/RELNOTES.md @@ -1,6 +1,12 @@ Release Notes ============= +### 2.1.1 + +Following issues / PRs addressed: + +* [Added TS 1.5 Feature Support](https://github.com/basho/riak-java-client/pull/691) + ### 2.1.0 **Notes** diff --git a/riak_pb b/riak_pb index f5af9ffe0..cb15cc477 160000 --- a/riak_pb +++ b/riak_pb @@ -1 +1 @@ -Subproject commit f5af9ffe04eb27689d483509de26574bdf70343f +Subproject commit cb15cc4770f3748289ba56245d62b1c0d07c33f7 diff --git a/src/main/java/com/basho/riak/client/core/codec/TermToBinaryCodec.java b/src/main/java/com/basho/riak/client/core/codec/TermToBinaryCodec.java index b5e9668b7..aee57760e 100644 --- a/src/main/java/com/basho/riak/client/core/codec/TermToBinaryCodec.java +++ b/src/main/java/com/basho/riak/client/core/codec/TermToBinaryCodec.java @@ -64,7 +64,7 @@ public static OtpOutputStream encodeTsQueryRequest(String queryText, byte[] cove final OtpOutputStream os = new OtpOutputStream(); os.write(OtpExternal.versionTag); // NB: this is the reqired 0x83 (131) value - // TsQueryReq is a 4-tuple: {'tsqueryreq', TsInt, boolIsStreaming, bytesCoverContext} + // TsQueryReq is a 4-tuple: {'tsqueryreq', TsInterpolation, boolIsStreaming, bytesCoverContext} os.write_tuple_head(4); os.write_atom(TS_QUERY_REQ); @@ -171,6 +171,10 @@ else if (cell.hasDouble()) { stream.write_double(cell.getDouble()); } + else if(cell.hasBlob()) + { + stream.write_binary(cell.getBlob()); + } else { logger.error("Unknown TS cell type encountered."); @@ -181,11 +185,9 @@ else if (cell.hasDouble()) private static QueryResult decodeTsResponse(byte[] response) throws OtpErlangDecodeException, InvalidTermToBinaryException { - QueryResult result = null; - - OtpInputStream is = new OtpInputStream(response); + final OtpInputStream is = new OtpInputStream(response); - int firstByte = is.read1skip_version(); + final int firstByte = is.read1skip_version(); is.reset(); if (firstByte != OtpExternal.smallTupleTag && firstByte != OtpExternal.largeTupleTag) @@ -213,7 +215,7 @@ private static QueryResult parseAtomResult(OtpInputStream is) private static QueryResult parseTupleResult(OtpInputStream is) throws OtpErlangDecodeException, InvalidTermToBinaryException { - QueryResult result; + final QueryResult result; final int msgArity = is.read_tuple_head(); // Response is: // {'rpberrorresp', ErrMsg, ErrCode} @@ -322,30 +324,55 @@ private static Cell parseCell(List columnDescripti { if (cell instanceof OtpErlangBinary) { - OtpErlangBinary v = (OtpErlangBinary) cell; - String s = new String(v.binaryValue(), StandardCharsets.UTF_8); - return new Cell(s); + final OtpErlangBinary v = (OtpErlangBinary) cell; + final RiakTsPB.TsColumnType type = columnDescriptions.get(j).getType(); + switch (type) + { + case VARCHAR: + final String s = new String(v.binaryValue(), StandardCharsets.UTF_8); + return new Cell(s); + + case BLOB: + return new Cell(v.binaryValue()); + + default: + throw new IllegalStateException( + String.format( + "Type '%s' from the provided ColumnDescription contradicts to the actual OtpErlangBinary value", + type.name() + ) + ); + } } else if (cell instanceof OtpErlangLong) { - OtpErlangLong v = (OtpErlangLong) cell; - if (columnDescriptions.get(j).getType() == RiakTsPB.TsColumnType.TIMESTAMP) + final OtpErlangLong v = (OtpErlangLong) cell; + final RiakTsPB.TsColumnType type = columnDescriptions.get(j).getType(); + switch (type) { - return Cell.newTimestamp(v.longValue()); - } - else - { - return new Cell(v.longValue()); + case TIMESTAMP: + return Cell.newTimestamp(v.longValue()); + + case SINT64: + return new Cell(v.longValue()); + + default: + throw new IllegalStateException( + String.format( + "Type '%s' from the provided ColumnDescription contradicts to the actual OtpErlangLong value", + type.name() + ) + ); } } else if (cell instanceof OtpErlangDouble) { - OtpErlangDouble v = (OtpErlangDouble) cell; + final OtpErlangDouble v = (OtpErlangDouble) cell; return new Cell(v.doubleValue()); } else if (cell instanceof OtpErlangAtom) { - OtpErlangAtom v = (OtpErlangAtom) cell; + final OtpErlangAtom v = (OtpErlangAtom) cell; return new Cell(v.booleanValue()); } else if (cell instanceof OtpErlangList) @@ -354,10 +381,8 @@ else if (cell instanceof OtpErlangList) assert (l.arity() == 0); return null; } - else - { - throw new InvalidTermToBinaryException("Unknown cell type encountered: " + cell.toString() + ", unable to" + - " continue parsing."); - } + + throw new InvalidTermToBinaryException("Unknown cell type encountered: " + cell.toString() + + ", unable to continue parsing."); } } diff --git a/src/main/java/com/basho/riak/client/core/operations/ts/CreateTableOperation.java b/src/main/java/com/basho/riak/client/core/operations/ts/CreateTableOperation.java index b72763849..86d36a8a0 100644 --- a/src/main/java/com/basho/riak/client/core/operations/ts/CreateTableOperation.java +++ b/src/main/java/com/basho/riak/client/core/operations/ts/CreateTableOperation.java @@ -36,7 +36,6 @@ */ public class CreateTableOperation extends PBFutureOperation { - private final RiakTsPB.TsQueryReq.Builder reqBuilder; private final String queryText; private CreateTableOperation(AbstractBuilder builder) @@ -46,7 +45,6 @@ private CreateTableOperation(AbstractBuilder builder) builder.reqBuilder, RiakTsPB.TsQueryResp.PARSER); - this.reqBuilder = builder.reqBuilder; this.queryText = builder.queryText; } @@ -205,6 +203,12 @@ private static StringBuilder generateKeys(TableDefinition tableDefinition, int q { sb.append(", ") .append(lk.getName()); + + if (lk.hasKeyOrder()) + { + sb.append(" "); + sb.append(lk.getKeyOrder().toString()); + } } return sb; diff --git a/src/main/java/com/basho/riak/client/core/query/ConvertibleIterator.java b/src/main/java/com/basho/riak/client/core/query/ConvertibleIterator.java index 7a93c349b..7ced3a094 100644 --- a/src/main/java/com/basho/riak/client/core/query/ConvertibleIterator.java +++ b/src/main/java/com/basho/riak/client/core/query/ConvertibleIterator.java @@ -1,7 +1,5 @@ package com.basho.riak.client.core.query; -import com.basho.riak.protobuf.RiakTsPB; - import java.util.Iterator; /** @@ -9,8 +7,9 @@ * @author Alex Moore * @since 2.0.3 */ -public abstract class ConvertibleIterator implements Iterator { - private final Iterator iterator; +public abstract class ConvertibleIterator implements Iterator +{ + protected final Iterator iterator; public ConvertibleIterator(Iterator iterator) { this.iterator = iterator; @@ -19,12 +18,12 @@ public ConvertibleIterator(Iterator iterator) { abstract protected D convert(S source); @Override - public final boolean hasNext() { + public boolean hasNext() { return iterator.hasNext(); } @Override - public final D next() { + public D next() { return convert(iterator.next()); } @@ -32,4 +31,4 @@ public final D next() { public final void remove() { throw new UnsupportedOperationException(); } -} \ No newline at end of file +} diff --git a/src/main/java/com/basho/riak/client/core/query/timeseries/Cell.java b/src/main/java/com/basho/riak/client/core/query/timeseries/Cell.java index a7e723433..53d704bee 100644 --- a/src/main/java/com/basho/riak/client/core/query/timeseries/Cell.java +++ b/src/main/java/com/basho/riak/client/core/query/timeseries/Cell.java @@ -5,18 +5,21 @@ import com.basho.riak.protobuf.RiakTsPB; import com.google.protobuf.ByteString; +import javax.xml.bind.DatatypeConverter; +import java.util.Arrays; import java.util.Calendar; import java.util.Date; /** * Holds a piece of data for a Time Series @{link Row}. - * A cell can hold 5 different types of raw data: + * A cell can hold 6 different types of raw data: *
    *
  1. Varchars, which can hold byte arrays. Commonly used to store encoded strings.
  2. *
  3. SInt64s, which can hold any signed 64-bit integers.
  4. *
  5. Doubles, which can hold any 64-bit floating point numbers.
  6. *
  7. Timestamps, which can hold any unix/epoch timestamp. Millisecond resolution is required.
  8. *
  9. Booleans, which can hold a true/false value.
  10. + *
  11. Blobs, which can hold any binary data.
  12. *
* Immutable once created. * @@ -32,6 +35,7 @@ public class Cell private static final int DOUBLE_MASK = 0x00000004; private static final int TIMESTAMP_MASK = 0x00000008; private static final int BOOLEAN_MASK = 0x00000010; + private static final int BLOB_MASK = 0x00000011; private int typeBitfield = 0x0; private String varcharValue = ""; @@ -39,6 +43,7 @@ public class Cell private double doubleValue = 0.0; private long timestampValue = 0L; private boolean booleanValue = false; + private byte[] blobValue = {}; /** * Creates a new "Varchar" Cell, based on the UTF8 binary encoding of the provided String. @@ -130,7 +135,22 @@ public Cell(Date timestampValue) initTimestamp(timestampValue.getTime()); } - Cell(RiakTsPB.TsCell pbCell) + /** + * Creates a new "Blob" Cell from the provided byte array. + * + * @param blobValue The blob to store. + */ + public Cell(byte[] blobValue) + { + if (blobValue == null) + { + throw new IllegalArgumentException("Value for BLOB value cannot be NULL."); + } + + initBlob(blobValue); + } + + Cell(RiakTsPB.TsCell pbCell, RiakTsPB.TsColumnDescription columnDescription) { if (pbCell.hasBooleanValue()) { @@ -148,9 +168,29 @@ else if (pbCell.hasTimestampValue()) { initTimestamp(pbCell.getTimestampValue()); } - else if (pbCell.hasVarcharValue()) + else if (pbCell.hasVarcharValue() ) { - initVarchar(pbCell.getVarcharValue().toStringUtf8()); + // If there is no column description provided, VARCHAR will be used by default + final RiakTsPB.TsColumnType type = columnDescription == null ? RiakTsPB.TsColumnType.VARCHAR : columnDescription.getType(); + + switch (type) + { + case VARCHAR: + initVarchar(pbCell.getVarcharValue().toStringUtf8()); + break; + + case BLOB: + initBlob(pbCell.getVarcharValue().toByteArray()); + break; + + default: + throw new IllegalStateException( + String.format( + "Type '%s' from the provided ColumnDefinition contradicts to the actual VARCHAR value", + type.name() + ) + ); + } } else { @@ -205,6 +245,12 @@ private void initVarchar(String stringValue) this.varcharValue = stringValue; } + private void initBlob(byte[] blobValue) + { + setBitfieldType(BLOB_MASK); + this.blobValue = blobValue; + } + private void setBitfieldType(int mask) { typeBitfield |= mask; @@ -212,7 +258,7 @@ private void setBitfieldType(int mask) private boolean bitfieldHasType(int mask) { - return (typeBitfield & mask) == mask; + return typeBitfield == mask; } public boolean hasVarcharValue() @@ -240,6 +286,11 @@ public boolean hasBoolean() return bitfieldHasType(BOOLEAN_MASK); } + public boolean hasBlob() + { + return bitfieldHasType(BLOB_MASK); + } + public String getVarcharAsUTF8String() { return varcharValue; @@ -270,6 +321,11 @@ public boolean getBoolean() return booleanValue; } + public byte[] getBlob() + { + return blobValue; + } + RiakTsPB.TsCell getPbCell() { final RiakTsPB.TsCell.Builder builder = RiakTsPB.TsCell.newBuilder(); @@ -294,6 +350,10 @@ else if (hasDouble()) { builder.setDoubleValue(doubleValue); } + else if(hasBlob()) + { + builder.setVarcharValue(ByteString.copyFrom(blobValue)); + } return builder.build(); } @@ -332,6 +392,13 @@ else if (this.hasBoolean()) { sb.append(this.getBoolean()); } + else if (this.hasBlob()) + { + final int length = blobValue.length > 8 ? 8 : blobValue.length; + final byte[] blobBlurb = Arrays.copyOfRange(blobValue, 0, length); + sb.append("0x"); + sb.append(DatatypeConverter.printHexBinary(blobBlurb)); + } sb.append(" }"); return sb.toString(); @@ -351,6 +418,10 @@ public boolean equals(Object o) Cell cell = (Cell) o; + if (typeBitfield != cell.typeBitfield) + { + return false; + } if (sint64Value != cell.sint64Value) { return false; @@ -367,11 +438,12 @@ public boolean equals(Object o) { return false; } - if (typeBitfield != cell.typeBitfield) + if (varcharValue != null ? !varcharValue.equals(cell.varcharValue) : cell.varcharValue != null) { return false; } - return varcharValue.equals(cell.varcharValue); + return Arrays.equals(blobValue, cell.blobValue); + } @Override @@ -379,13 +451,14 @@ public int hashCode() { int result; long temp; - result = varcharValue.hashCode(); + result = typeBitfield; + result = 31 * result + (varcharValue != null ? varcharValue.hashCode() : 0); result = 31 * result + (int) (sint64Value ^ (sint64Value >>> 32)); temp = Double.doubleToLongBits(doubleValue); result = 31 * result + (int) (temp ^ (temp >>> 32)); result = 31 * result + (int) (timestampValue ^ (timestampValue >>> 32)); result = 31 * result + (booleanValue ? 1 : 0); - result = 31 * result + typeBitfield; + result = 31 * result + Arrays.hashCode(blobValue); return result; } } diff --git a/src/main/java/com/basho/riak/client/core/query/timeseries/ColumnDescription.java b/src/main/java/com/basho/riak/client/core/query/timeseries/ColumnDescription.java index 12339ed62..2d05d87c3 100644 --- a/src/main/java/com/basho/riak/client/core/query/timeseries/ColumnDescription.java +++ b/src/main/java/com/basho/riak/client/core/query/timeseries/ColumnDescription.java @@ -62,7 +62,8 @@ public enum ColumnType SINT64, DOUBLE, TIMESTAMP, - BOOLEAN + BOOLEAN, + BLOB } @Override diff --git a/src/main/java/com/basho/riak/client/core/query/timeseries/ConvertibleIterable.java b/src/main/java/com/basho/riak/client/core/query/timeseries/ConvertibleIterable.java index 0edd900a3..855a15798 100644 --- a/src/main/java/com/basho/riak/client/core/query/timeseries/ConvertibleIterable.java +++ b/src/main/java/com/basho/riak/client/core/query/timeseries/ConvertibleIterable.java @@ -32,65 +32,8 @@ public Iterator iterator() } } - private static class ImmutableIterablePBRow extends ConvertibleIterable - { - public ImmutableIterablePBRow(Iterable source) - { - super(source); - } - - @Override - public Iterator iterator() - { - return ConvertibleIteratorUtils.iterateAsPbRow(this.source.iterator()); - } - } - - private static class ImmutableIterableRow extends ConvertibleIterable - { - public ImmutableIterableRow(Iterable source) - { - super(source); - } - - @Override - public Iterator iterator() - { - return ConvertibleIteratorUtils.iterateAsRow(this.source.iterator()); - } - } - - private static class ImmutableIterableCell extends ConvertibleIterable - { - public ImmutableIterableCell(Iterable source) - { - super(source); - } - - @Override - public Iterator iterator() - { - return ConvertibleIteratorUtils.iterateAsCell(this.source.iterator()); - } - } - - public static ConvertibleIterable asIterablePbRow(Iterable iterable) - { - return new ImmutableIterablePBRow(iterable); - } - - public static ConvertibleIterable asIterableRow(Iterable iterable) - { - return new ImmutableIterableRow(iterable); - } - public static ConvertibleIterable asIterablePbCell(Iterable iterable) { return new ImmutableIterablePBCell(iterable); } - - public static ConvertibleIterable asIterableCell(Iterable iterable) - { - return new ImmutableIterableCell(iterable); - } } diff --git a/src/main/java/com/basho/riak/client/core/query/timeseries/ConvertibleIteratorUtils.java b/src/main/java/com/basho/riak/client/core/query/timeseries/ConvertibleIteratorUtils.java index df861d69b..c013f586a 100644 --- a/src/main/java/com/basho/riak/client/core/query/timeseries/ConvertibleIteratorUtils.java +++ b/src/main/java/com/basho/riak/client/core/query/timeseries/ConvertibleIteratorUtils.java @@ -35,61 +35,88 @@ protected RiakTsPB.TsCell convert(Cell cell) } } - private static class ImmutablePBRowIterator extends ConvertibleIterator + private abstract static class ConvertibleZipperator implements Iterator { - public ImmutablePBRowIterator(Iterator iterator) + protected final Iterator iterator1; + protected final Iterator iterator2; + + public ConvertibleZipperator(Iterator iterator, Iterator iterator2) { - super(iterator); + this.iterator1 = iterator; + this.iterator2 = iterator2; } + abstract protected D convert(S source, S2 source2); + @Override - protected RiakTsPB.TsRow convert(Row row) - { - return row.getPbRow(); + public boolean hasNext() { + return iterator1.hasNext() && iterator2.hasNext(); + } + + @Override + public D next() { + return convert(iterator1.next(), iterator2.next()); + } + + @Override + public final void remove() { + throw new UnsupportedOperationException(); } } - private static class ImmutableCellIterator extends ConvertibleIterator + private static class ImmutableCellIterator extends ConvertibleZipperator { - public ImmutableCellIterator(Iterator iterator) + public ImmutableCellIterator(Iterator cellIterator, + Iterator descriptionIterator ) { - super(iterator); + super(cellIterator, descriptionIterator); } @Override - protected Cell convert(RiakTsPB.TsCell pbCell) + protected Cell convert(RiakTsPB.TsCell pbCell, RiakTsPB.TsColumnDescription columnDescription) { if (pbCell.equals(NullTSCell)) { return null; } - return new Cell(pbCell); + return new Cell(pbCell, columnDescription); + } + + @Override + public boolean hasNext() { + return iterator1.hasNext(); + } + + @Override + public Cell next() { + final RiakTsPB.TsColumnDescription description = iterator2.hasNext() ? iterator2.next() : null; + return convert(iterator1.next(), description); } } - private static class ImmutableRowIterator extends ConvertibleIterator + private static class ImmutableRowIterator extends ConvertibleIterator { - public ImmutableRowIterator(Iterator iterator) + private final Iterable columnDescriptions; + + public ImmutableRowIterator(Iterator iterator, + Iterable columnDescriptions) { super(iterator); + this.columnDescriptions = columnDescriptions; } @Override protected Row convert(RiakTsPB.TsRow source) { - return new Row(source); + return new Row(source, columnDescriptions); } } - public static ConvertibleIterator iterateAsPbRow(Iterator iterator) - { - return new ImmutablePBRowIterator(iterator); - } - - public static ConvertibleIterator iterateAsRow(Iterator iterator) + public static ConvertibleIterator iterateAsRow(Iterator iterator, + Iterable columnDescriptions) { - return new ImmutableRowIterator(iterator); + return new ImmutableRowIterator(iterator, columnDescriptions); } public static ConvertibleIterator iterateAsPbCell(Iterator iterator) @@ -97,8 +124,10 @@ public static ConvertibleIterator iterateAsPbCell(Iterato return new ImmutablePBCellIterator(iterator); } - public static ConvertibleIterator iterateAsCell(Iterator iterator) + public static ConvertibleZipperator + iterateAsCell(Iterator cellIterator, + Iterator columnDescriptionIterator) { - return new ImmutableCellIterator(iterator); + return new ImmutableCellIterator(cellIterator, columnDescriptionIterator); } } diff --git a/src/main/java/com/basho/riak/client/core/query/timeseries/DescribeQueryResultParser.java b/src/main/java/com/basho/riak/client/core/query/timeseries/DescribeQueryResultParser.java index cc9e79191..9e3d96c9f 100644 --- a/src/main/java/com/basho/riak/client/core/query/timeseries/DescribeQueryResultParser.java +++ b/src/main/java/com/basho/riak/client/core/query/timeseries/DescribeQueryResultParser.java @@ -49,6 +49,7 @@ class DescribeQueryResultParser private final static int LOCAL_KEY_IDX = 4; private final static int QUANTUM_INTERVAL_IDX = 5; private final static int QUANTUM_UNIT_IDX = 6; + private final static int SORT_ORDER_IDX = 7; static List ConvertToColumnDescriptions(QueryResult queryResult) { @@ -80,7 +81,10 @@ private static FullColumnDescription convertDescribeResultRowToFullColumnDescrip final Quantum quantum = parseQuantumCells(cells); - return new FullColumnDescription(name, type, isNullable, partitionKeyOrdinal, localKeyOrdinal, quantum); + final FullColumnDescription.KeyOrder keyOrder = parseSortOrder(cells); + + return new FullColumnDescription(name, type, isNullable, partitionKeyOrdinal, localKeyOrdinal, quantum, + keyOrder); } private static Integer parseKeyCell(Cell keyCell) @@ -112,6 +116,33 @@ private static Quantum parseQuantumCells(List cells) return new Quantum(quantumInterval.intValue(), quantumUnit); } + private static FullColumnDescription.KeyOrder parseSortOrder(List cells) + { + if (cells.size() < 8) + { + return null; + } + + final Cell sortCell = cells.get(SORT_ORDER_IDX); + + if(sortCell == null || !sortCell.hasVarcharValue()) + { + return null; + } + + if(sortCell.getVarcharAsUTF8String().equalsIgnoreCase("ASC")) + { + return FullColumnDescription.KeyOrder.ASC; + } + + if(sortCell.getVarcharAsUTF8String().equalsIgnoreCase("DESC")) + { + return FullColumnDescription.KeyOrder.DESC; + } + + return null; + } + private static boolean DescribeFnRowResultIsValid(List cells) { final boolean describeBaseIsValid = DescribeRowV1ChunkIsValid(cells); @@ -119,7 +150,10 @@ private static boolean DescribeFnRowResultIsValid(List cells) final boolean isValidV2Description = describeBaseIsValid && cells.size() == 7 && DescribeRowV2ChunkIsValid(cells); - return isValidV1Description || isValidV2Description; + final boolean isValidV3Description = + describeBaseIsValid && cells.size() == 8 && DescribeRowV3ChunkIsValid(cells); + + return isValidV1Description || isValidV2Description || isValidV3Description; } private static boolean DescribeRowV1ChunkIsValid(List cells) @@ -152,4 +186,16 @@ private static boolean DescribeRowV2ChunkIsValid(List cells) return quantumIntervalCell != null ? quantumIntervalCell.hasLong() : true && quantumUnitCell != null ? quantumUnitCell.hasVarcharValue() : true; } + + private static boolean DescribeRowV3ChunkIsValid(List cells) + { + if (cells.size() < 8) + { + return false; + } + + final Cell sortOrderCell = cells.get(SORT_ORDER_IDX); + + return sortOrderCell != null ? sortOrderCell.hasVarcharValue() : true; + } } diff --git a/src/main/java/com/basho/riak/client/core/query/timeseries/FullColumnDescription.java b/src/main/java/com/basho/riak/client/core/query/timeseries/FullColumnDescription.java index b56b1f794..53d840ce3 100644 --- a/src/main/java/com/basho/riak/client/core/query/timeseries/FullColumnDescription.java +++ b/src/main/java/com/basho/riak/client/core/query/timeseries/FullColumnDescription.java @@ -13,6 +13,7 @@ public class FullColumnDescription extends ColumnDescription private final Integer partitionKeyOrdinal; private final Integer localKeyOrdinal; private final Quantum quantum; + private final KeyOrder keyOrder; /** * Creates a basic FullColumnDescription, for non-key columns. @@ -25,7 +26,7 @@ public FullColumnDescription(String name, ColumnDescription.ColumnType type, boolean isNullable) { - this(name, type, isNullable, null, null, null); + this(name, type, isNullable, null, null, null, null); } /** @@ -45,6 +46,27 @@ public FullColumnDescription(String name, this(name, type, isNullable, keyOrdinal, keyOrdinal); } + /** + * Creates a FullColumnDescription. Useful for key columns where the partition and local key oridinals are the same. + * @param name The name of the column. Required - must not be null or an empty string. + * @param type The type of the column. Required - must not be null. + * @param isNullable The nullability of the column. + * @param keyOrdinal The ordinal number of where this column appears in the ordered Local Key column set. + * Use null if not a key column. + * @param keyOrder The order in which this key column will be sorted on disk as part of the local key. + * Default is ASC. + * Use null if not a key column. + * @throws IllegalArgumentException if Column Name or Column Type are null or empty. + */ + public FullColumnDescription(String name, + ColumnDescription.ColumnType type, + boolean isNullable, + Integer keyOrdinal, + KeyOrder keyOrder) + { + this(name, type, isNullable, keyOrdinal, keyOrdinal, null, keyOrder); + } + /** * Creates a FullColumnDescription. Useful for key columns where the partition and local key oridinals are the same. * @param name The name of the column. Required - must not be null or an empty string. @@ -67,7 +89,7 @@ public FullColumnDescription(String name, Integer keyOrdinal, Quantum quantum) { - this(name, type, isNullable, keyOrdinal, keyOrdinal, quantum); + this(name, type, isNullable, keyOrdinal, keyOrdinal, quantum, null); } /** @@ -90,7 +112,34 @@ public FullColumnDescription(String name, Integer partitionKeyOrdinal, Integer localKeyOrdinal) { - this(name, type, isNullable, partitionKeyOrdinal, localKeyOrdinal, null); + this(name, type, isNullable, partitionKeyOrdinal, localKeyOrdinal, null, null); + } + + /** + * Creates a FullColumnDescription. + * Useful for automating creation of FullColumnDescriptions where the values can vary. + * @param name The name of the column. Required - must not be null or an empty string. + * @param type The type of the column. Required - must not be null. + * @param isNullable The nullability of the column. + * @param partitionKeyOrdinal The ordinal number of where this column appears in + * the ordered Partition Key column set. + * Use null if not a key column. + * @param localKeyOrdinal The ordinal number of where this column appears in + * the ordered Local Key column set. + * Use null if not a key column. + * @param keyOrder The order in which this key column will be sorted on disk as part of the local key. + * Default is ASC. + * Use null if not a key column. + * @throws IllegalArgumentException if Column Name or Column Type are null or empty. + */ + public FullColumnDescription(String name, + ColumnDescription.ColumnType type, + boolean isNullable, + Integer partitionKeyOrdinal, + Integer localKeyOrdinal, + KeyOrder keyOrder) + { + this(name, type, isNullable, partitionKeyOrdinal, localKeyOrdinal, null, keyOrder); } /** @@ -120,6 +169,41 @@ public FullColumnDescription(String name, Integer partitionKeyOrdinal, Integer localKeyOrdinal, Quantum quantum) + { + this(name, type, isNullable, partitionKeyOrdinal, localKeyOrdinal, quantum, null); + } + + /** + * Creates a FullColumnDescription. + * Useful for automating creation of FullColumnDescriptions where the values can vary. + * @param name The name of the column. Required - must not be null or an empty string. + * @param type The type of the column. Required - must not be null. + * @param isNullable The nullability of the column. + * @param partitionKeyOrdinal The ordinal number of where this column appears in + * the ordered Partition Key column set. + * Use null if not a key column. + * @param localKeyOrdinal The ordinal number of where this column appears in + * the ordered Local Key column set. + * Use null if not a key column. + * @param quantum The {@link Quantum} setting if this column + * is used in partition key time quantization. + * Use + * {@link #FullColumnDescription(String, ColumnDescription.ColumnType, boolean, Integer, Integer)} + * if the quantum is not needed. + * @param keyOrder The order in which this key column will be sorted on disk as part of the local key. + * Default is ASC. + * Use null if not a key column. + * @throws IllegalArgumentException if the Column Name or Column Type are null or empty, + * or if the quantum is set on a non-Timestamp column, + * or the quantum is set on a non-partition key column. + */ + public FullColumnDescription(String name, + ColumnDescription.ColumnType type, + boolean isNullable, + Integer partitionKeyOrdinal, + Integer localKeyOrdinal, + Quantum quantum, + KeyOrder keyOrder) { super(name, type); this.isNullable = isNullable; @@ -127,6 +211,7 @@ public FullColumnDescription(String name, this.localKeyOrdinal = localKeyOrdinal; validateQuantumUsage(type, partitionKeyOrdinal, quantum); this.quantum = quantum; + this.keyOrder = keyOrder; } private void validateQuantumUsage(ColumnType type, Integer partitionKeyOrdinal, Quantum quantum) @@ -146,6 +231,13 @@ private void validateQuantumUsage(ColumnType type, Integer partitionKeyOrdinal, } } + + public enum KeyOrder + { + ASC, + DESC + } + /** * Whether this column's values are nullable. * @return boolean @@ -211,4 +303,14 @@ public boolean hasQuantum() { return quantum != null; } + + public KeyOrder getKeyOrder() + { + return keyOrder; + } + + public boolean hasKeyOrder() + { + return keyOrder != null; + } } diff --git a/src/main/java/com/basho/riak/client/core/query/timeseries/QueryResult.java b/src/main/java/com/basho/riak/client/core/query/timeseries/QueryResult.java index 9eea203bc..26646ca49 100644 --- a/src/main/java/com/basho/riak/client/core/query/timeseries/QueryResult.java +++ b/src/main/java/com/basho/riak/client/core/query/timeseries/QueryResult.java @@ -81,7 +81,7 @@ public Iterator iterator() } else { - return ConvertibleIteratorUtils.iterateAsRow(this.pbRows.iterator()); + return ConvertibleIteratorUtils.iterateAsRow(this.pbRows.iterator(), this.pbColumnDescriptions); } } diff --git a/src/main/java/com/basho/riak/client/core/query/timeseries/Row.java b/src/main/java/com/basho/riak/client/core/query/timeseries/Row.java index 340ae4aca..fce6da23a 100644 --- a/src/main/java/com/basho/riak/client/core/query/timeseries/Row.java +++ b/src/main/java/com/basho/riak/client/core/query/timeseries/Row.java @@ -14,6 +14,7 @@ public class Row implements Iterable { private final RiakTsPB.TsRow pbRow; + private final Iterable pbColumnDescriptions; private final Iterable cells; private final int cellCount; @@ -23,7 +24,8 @@ public class Row implements Iterable */ public Row(Iterable cells) { - pbRow = null; + this.pbRow = null; + this.pbColumnDescriptions = null; this.cells = cells; int cellCount = 0; @@ -41,14 +43,16 @@ public Row(Iterable cells) */ public Row(Cell... cells) { - pbRow = null; + this.pbRow = null; + this.pbColumnDescriptions = null; this.cells = Arrays.asList(cells); cellCount = cells.length; } - Row(RiakTsPB.TsRow pbRow) + Row(RiakTsPB.TsRow pbRow, Iterable pbColumnDescriptions) { this.pbRow = pbRow; + this.pbColumnDescriptions = pbColumnDescriptions; cells = null; cellCount = pbRow.getCellsCount(); } @@ -102,7 +106,11 @@ public Iterator iterator() } else // if (pbRow != null) { - return ConvertibleIteratorUtils.iterateAsCell(pbRow.getCellsList().iterator()); + assert pbRow != null; + + return ConvertibleIteratorUtils.iterateAsCell(pbRow.getCellsList().iterator(), + // if there is no ColumnDescription what else we could do with that? + pbColumnDescriptions == null ? Collections.emptyIterator() : pbColumnDescriptions.iterator()); } } diff --git a/src/main/java/com/basho/riak/protobuf/RiakDtPB.java b/src/main/java/com/basho/riak/protobuf/RiakDtPB.java index 4c098e016..49477fa15 100644 --- a/src/main/java/com/basho/riak/protobuf/RiakDtPB.java +++ b/src/main/java/com/basho/riak/protobuf/RiakDtPB.java @@ -11,6 +11,7 @@ public static void registerAllExtensions( public interface MapFieldOrBuilder extends // @@protoc_insertion_point(interface_extends:MapField) com.google.protobuf.MessageOrBuilder { + /** * required bytes name = 1; */ @@ -195,6 +196,7 @@ public enum MapFieldType */ public static final int MAP_VALUE = 5; + public final int getNumber() { return value; } public static MapFieldType valueOf(int value) { @@ -525,9 +527,11 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakDtPB.MapField other) { public final boolean isInitialized() { if (!hasName()) { + return false; } if (!hasType()) { + return false; } return true; @@ -636,6 +640,7 @@ public Builder clearType() { public interface MapEntryOrBuilder extends // @@protoc_insertion_point(interface_extends:MapEntry) com.google.protobuf.MessageOrBuilder { + /** * required .MapField field = 1; */ @@ -692,7 +697,7 @@ public interface MapEntryOrBuilder extends /** * repeated .MapEntry map_value = 6; */ - java.util.List + java.util.List getMapValueList(); /** * repeated .MapEntry map_value = 6; @@ -705,7 +710,7 @@ public interface MapEntryOrBuilder extends /** * repeated .MapEntry map_value = 6; */ - java.util.List + java.util.List getMapValueOrBuilderList(); /** * repeated .MapEntry map_value = 6; @@ -959,7 +964,7 @@ public java.util.List getMapValueList /** * repeated .MapEntry map_value = 6; */ - public java.util.List + public java.util.List getMapValueOrBuilderList() { return mapValue_; } @@ -1336,7 +1341,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakDtPB.MapEntry other) { mapValueBuilder_ = null; mapValue_ = other.mapValue_; bitField0_ = (bitField0_ & ~0x00000020); - mapValueBuilder_ = + mapValueBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getMapValueFieldBuilder() : null; } else { @@ -1350,13 +1355,16 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakDtPB.MapEntry other) { public final boolean isInitialized() { if (!hasField()) { + return false; } if (!getField().isInitialized()) { + return false; } for (int i = 0; i < getMapValueCount(); i++) { if (!getMapValue(i).isInitialized()) { + return false; } } @@ -1485,7 +1493,7 @@ public com.basho.riak.protobuf.RiakDtPB.MapFieldOrBuilder getFieldOrBuilder() { * required .MapField field = 1; */ private com.google.protobuf.SingleFieldBuilder< - com.basho.riak.protobuf.RiakDtPB.MapField, com.basho.riak.protobuf.RiakDtPB.MapField.Builder, com.basho.riak.protobuf.RiakDtPB.MapFieldOrBuilder> + com.basho.riak.protobuf.RiakDtPB.MapField, com.basho.riak.protobuf.RiakDtPB.MapField.Builder, com.basho.riak.protobuf.RiakDtPB.MapFieldOrBuilder> getFieldFieldBuilder() { if (fieldBuilder_ == null) { fieldBuilder_ = new com.google.protobuf.SingleFieldBuilder< @@ -1864,7 +1872,7 @@ public com.basho.riak.protobuf.RiakDtPB.MapEntryOrBuilder getMapValueOrBuilder( /** * repeated .MapEntry map_value = 6; */ - public java.util.List + public java.util.List getMapValueOrBuilderList() { if (mapValueBuilder_ != null) { return mapValueBuilder_.getMessageOrBuilderList(); @@ -1890,12 +1898,12 @@ public com.basho.riak.protobuf.RiakDtPB.MapEntry.Builder addMapValueBuilder( /** * repeated .MapEntry map_value = 6; */ - public java.util.List + public java.util.List getMapValueBuilderList() { return getMapValueFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakDtPB.MapEntry, com.basho.riak.protobuf.RiakDtPB.MapEntry.Builder, com.basho.riak.protobuf.RiakDtPB.MapEntryOrBuilder> + com.basho.riak.protobuf.RiakDtPB.MapEntry, com.basho.riak.protobuf.RiakDtPB.MapEntry.Builder, com.basho.riak.protobuf.RiakDtPB.MapEntryOrBuilder> getMapValueFieldBuilder() { if (mapValueBuilder_ == null) { mapValueBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -1923,6 +1931,7 @@ public com.basho.riak.protobuf.RiakDtPB.MapEntry.Builder addMapValueBuilder( public interface DtFetchReqOrBuilder extends // @@protoc_insertion_point(interface_extends:DtFetchReq) com.google.protobuf.MessageOrBuilder { + /** * required bytes bucket = 1; * @@ -2820,12 +2829,15 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakDtPB.DtFetchReq other) { public final boolean isInitialized() { if (!hasBucket()) { + return false; } if (!hasKey()) { + return false; } if (!hasType()) { + return false; } return true; @@ -3309,6 +3321,7 @@ public Builder clearIncludeContext() { public interface DtValueOrBuilder extends // @@protoc_insertion_point(interface_extends:DtValue) com.google.protobuf.MessageOrBuilder { + /** * optional sint64 counter_value = 1; */ @@ -3334,7 +3347,7 @@ public interface DtValueOrBuilder extends /** * repeated .MapEntry map_value = 3; */ - java.util.List + java.util.List getMapValueList(); /** * repeated .MapEntry map_value = 3; @@ -3347,7 +3360,7 @@ public interface DtValueOrBuilder extends /** * repeated .MapEntry map_value = 3; */ - java.util.List + java.util.List getMapValueOrBuilderList(); /** * repeated .MapEntry map_value = 3; @@ -3373,6 +3386,19 @@ com.basho.riak.protobuf.RiakDtPB.MapEntryOrBuilder getMapValueOrBuilder( * */ long getHllValue(); + + /** + * repeated bytes gset_value = 5; + */ + java.util.List getGsetValueList(); + /** + * repeated bytes gset_value = 5; + */ + int getGsetValueCount(); + /** + * repeated bytes gset_value = 5; + */ + com.google.protobuf.ByteString getGsetValue(int index); } /** * Protobuf type {@code DtValue} @@ -3457,6 +3483,14 @@ private DtValue( hllValue_ = input.readUInt64(); break; } + case 42: { + if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + gsetValue_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + gsetValue_.add(input.readBytes()); + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -3471,6 +3505,9 @@ private DtValue( if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { mapValue_ = java.util.Collections.unmodifiableList(mapValue_); } + if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + gsetValue_ = java.util.Collections.unmodifiableList(gsetValue_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -3551,7 +3588,7 @@ public java.util.List getMapValueList /** * repeated .MapEntry map_value = 3; */ - public java.util.List + public java.util.List getMapValueOrBuilderList() { return mapValue_; } @@ -3600,11 +3637,34 @@ public long getHllValue() { return hllValue_; } + public static final int GSET_VALUE_FIELD_NUMBER = 5; + private java.util.List gsetValue_; + /** + * repeated bytes gset_value = 5; + */ + public java.util.List + getGsetValueList() { + return gsetValue_; + } + /** + * repeated bytes gset_value = 5; + */ + public int getGsetValueCount() { + return gsetValue_.size(); + } + /** + * repeated bytes gset_value = 5; + */ + public com.google.protobuf.ByteString getGsetValue(int index) { + return gsetValue_.get(index); + } + private void initFields() { counterValue_ = 0L; setValue_ = java.util.Collections.emptyList(); mapValue_ = java.util.Collections.emptyList(); hllValue_ = 0L; + gsetValue_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -3637,6 +3697,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeUInt64(4, hllValue_); } + for (int i = 0; i < gsetValue_.size(); i++) { + output.writeBytes(5, gsetValue_.get(i)); + } getUnknownFields().writeTo(output); } @@ -3667,6 +3730,15 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(4, hllValue_); } + { + int dataSize = 0; + for (int i = 0; i < gsetValue_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(gsetValue_.get(i)); + } + size += dataSize; + size += 1 * getGsetValueList().size(); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -3802,6 +3874,8 @@ public Builder clear() { } hllValue_ = 0L; bitField0_ = (bitField0_ & ~0x00000008); + gsetValue_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -3852,6 +3926,11 @@ public com.basho.riak.protobuf.RiakDtPB.DtValue buildPartial() { to_bitField0_ |= 0x00000002; } result.hllValue_ = hllValue_; + if (((bitField0_ & 0x00000010) == 0x00000010)) { + gsetValue_ = java.util.Collections.unmodifiableList(gsetValue_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.gsetValue_ = gsetValue_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -3899,7 +3978,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakDtPB.DtValue other) { mapValueBuilder_ = null; mapValue_ = other.mapValue_; bitField0_ = (bitField0_ & ~0x00000004); - mapValueBuilder_ = + mapValueBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getMapValueFieldBuilder() : null; } else { @@ -3910,6 +3989,16 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakDtPB.DtValue other) { if (other.hasHllValue()) { setHllValue(other.getHllValue()); } + if (!other.gsetValue_.isEmpty()) { + if (gsetValue_.isEmpty()) { + gsetValue_ = other.gsetValue_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureGsetValueIsMutable(); + gsetValue_.addAll(other.gsetValue_); + } + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -3917,6 +4006,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakDtPB.DtValue other) { public final boolean isInitialized() { for (int i = 0; i < getMapValueCount(); i++) { if (!getMapValue(i).isInitialized()) { + return false; } } @@ -4241,7 +4331,7 @@ public com.basho.riak.protobuf.RiakDtPB.MapEntryOrBuilder getMapValueOrBuilder( /** * repeated .MapEntry map_value = 3; */ - public java.util.List + public java.util.List getMapValueOrBuilderList() { if (mapValueBuilder_ != null) { return mapValueBuilder_.getMessageOrBuilderList(); @@ -4267,12 +4357,12 @@ public com.basho.riak.protobuf.RiakDtPB.MapEntry.Builder addMapValueBuilder( /** * repeated .MapEntry map_value = 3; */ - public java.util.List + public java.util.List getMapValueBuilderList() { return getMapValueFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakDtPB.MapEntry, com.basho.riak.protobuf.RiakDtPB.MapEntry.Builder, com.basho.riak.protobuf.RiakDtPB.MapEntryOrBuilder> + com.basho.riak.protobuf.RiakDtPB.MapEntry, com.basho.riak.protobuf.RiakDtPB.MapEntry.Builder, com.basho.riak.protobuf.RiakDtPB.MapEntryOrBuilder> getMapValueFieldBuilder() { if (mapValueBuilder_ == null) { mapValueBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -4338,6 +4428,78 @@ public Builder clearHllValue() { return this; } + private java.util.List gsetValue_ = java.util.Collections.emptyList(); + private void ensureGsetValueIsMutable() { + if (!((bitField0_ & 0x00000010) == 0x00000010)) { + gsetValue_ = new java.util.ArrayList(gsetValue_); + bitField0_ |= 0x00000010; + } + } + /** + * repeated bytes gset_value = 5; + */ + public java.util.List + getGsetValueList() { + return java.util.Collections.unmodifiableList(gsetValue_); + } + /** + * repeated bytes gset_value = 5; + */ + public int getGsetValueCount() { + return gsetValue_.size(); + } + /** + * repeated bytes gset_value = 5; + */ + public com.google.protobuf.ByteString getGsetValue(int index) { + return gsetValue_.get(index); + } + /** + * repeated bytes gset_value = 5; + */ + public Builder setGsetValue( + int index, com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGsetValueIsMutable(); + gsetValue_.set(index, value); + onChanged(); + return this; + } + /** + * repeated bytes gset_value = 5; + */ + public Builder addGsetValue(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGsetValueIsMutable(); + gsetValue_.add(value); + onChanged(); + return this; + } + /** + * repeated bytes gset_value = 5; + */ + public Builder addAllGsetValue( + java.lang.Iterable values) { + ensureGsetValueIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, gsetValue_); + onChanged(); + return this; + } + /** + * repeated bytes gset_value = 5; + */ + public Builder clearGsetValue() { + gsetValue_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:DtValue) } @@ -4352,6 +4514,7 @@ public Builder clearHllValue() { public interface DtFetchRespOrBuilder extends // @@protoc_insertion_point(interface_extends:DtFetchResp) com.google.protobuf.MessageOrBuilder { + /** * optional bytes context = 1; */ @@ -4534,6 +4697,10 @@ public enum DataType * HLL = 4; */ HLL(3, 4), + /** + * GSET = 5; + */ + GSET(4, 5), ; /** @@ -4552,6 +4719,11 @@ public enum DataType * HLL = 4; */ public static final int HLL_VALUE = 4; + /** + * GSET = 5; + */ + public static final int GSET_VALUE = 5; + public final int getNumber() { return value; } @@ -4561,6 +4733,7 @@ public static DataType valueOf(int value) { case 2: return SET; case 3: return MAP; case 4: return HLL; + case 5: return GSET; default: return null; } } @@ -4935,10 +5108,12 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakDtPB.DtFetchResp other) { public final boolean isInitialized() { if (!hasType()) { + return false; } if (hasValue()) { if (!getValue().isInitialized()) { + return false; } } @@ -5137,7 +5312,7 @@ public com.basho.riak.protobuf.RiakDtPB.DtValueOrBuilder getValueOrBuilder() { * optional .DtValue value = 3; */ private com.google.protobuf.SingleFieldBuilder< - com.basho.riak.protobuf.RiakDtPB.DtValue, com.basho.riak.protobuf.RiakDtPB.DtValue.Builder, com.basho.riak.protobuf.RiakDtPB.DtValueOrBuilder> + com.basho.riak.protobuf.RiakDtPB.DtValue, com.basho.riak.protobuf.RiakDtPB.DtValue.Builder, com.basho.riak.protobuf.RiakDtPB.DtValueOrBuilder> getValueFieldBuilder() { if (valueBuilder_ == null) { valueBuilder_ = new com.google.protobuf.SingleFieldBuilder< @@ -5164,6 +5339,7 @@ public com.basho.riak.protobuf.RiakDtPB.DtValueOrBuilder getValueOrBuilder() { public interface CounterOpOrBuilder extends // @@protoc_insertion_point(interface_extends:CounterOp) com.google.protobuf.MessageOrBuilder { + /** * optional sint64 increment = 1; */ @@ -5572,6 +5748,7 @@ public Builder clearIncrement() { public interface SetOpOrBuilder extends // @@protoc_insertion_point(interface_extends:SetOp) com.google.protobuf.MessageOrBuilder { + /** * repeated bytes adds = 1; */ @@ -6124,72 +6301,548 @@ private void ensureRemovesIsMutable() { return java.util.Collections.unmodifiableList(removes_); } /** - * repeated bytes removes = 2; + * repeated bytes removes = 2; + */ + public int getRemovesCount() { + return removes_.size(); + } + /** + * repeated bytes removes = 2; + */ + public com.google.protobuf.ByteString getRemoves(int index) { + return removes_.get(index); + } + /** + * repeated bytes removes = 2; + */ + public Builder setRemoves( + int index, com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemovesIsMutable(); + removes_.set(index, value); + onChanged(); + return this; + } + /** + * repeated bytes removes = 2; + */ + public Builder addRemoves(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemovesIsMutable(); + removes_.add(value); + onChanged(); + return this; + } + /** + * repeated bytes removes = 2; + */ + public Builder addAllRemoves( + java.lang.Iterable values) { + ensureRemovesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, removes_); + onChanged(); + return this; + } + /** + * repeated bytes removes = 2; + */ + public Builder clearRemoves() { + removes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:SetOp) + } + + static { + defaultInstance = new SetOp(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:SetOp) + } + + public interface GSetOpOrBuilder extends + // @@protoc_insertion_point(interface_extends:GSetOp) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated bytes adds = 1; + */ + java.util.List getAddsList(); + /** + * repeated bytes adds = 1; + */ + int getAddsCount(); + /** + * repeated bytes adds = 1; + */ + com.google.protobuf.ByteString getAdds(int index); + } + /** + * Protobuf type {@code GSetOp} + * + *
+   * An operation to update a GSet, on its own.
+   * GSet members are opaque binary values, you can only add
+   * them to a Set.
+   * 
+ */ + public static final class GSetOp extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:GSetOp) + GSetOpOrBuilder { + // Use GSetOp.newBuilder() to construct. + private GSetOp(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GSetOp(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GSetOp defaultInstance; + public static GSetOp getDefaultInstance() { + return defaultInstance; + } + + public GSetOp getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GSetOp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + adds_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + adds_.add(input.readBytes()); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + adds_ = java.util.Collections.unmodifiableList(adds_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.basho.riak.protobuf.RiakDtPB.internal_static_GSetOp_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.basho.riak.protobuf.RiakDtPB.internal_static_GSetOp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.basho.riak.protobuf.RiakDtPB.GSetOp.class, com.basho.riak.protobuf.RiakDtPB.GSetOp.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GSetOp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GSetOp(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public static final int ADDS_FIELD_NUMBER = 1; + private java.util.List adds_; + /** + * repeated bytes adds = 1; + */ + public java.util.List + getAddsList() { + return adds_; + } + /** + * repeated bytes adds = 1; + */ + public int getAddsCount() { + return adds_.size(); + } + /** + * repeated bytes adds = 1; + */ + public com.google.protobuf.ByteString getAdds(int index) { + return adds_.get(index); + } + + private void initFields() { + adds_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < adds_.size(); i++) { + output.writeBytes(1, adds_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < adds_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(adds_.get(i)); + } + size += dataSize; + size += 1 * getAddsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.basho.riak.protobuf.RiakDtPB.GSetOp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.basho.riak.protobuf.RiakDtPB.GSetOp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.basho.riak.protobuf.RiakDtPB.GSetOp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.basho.riak.protobuf.RiakDtPB.GSetOp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.basho.riak.protobuf.RiakDtPB.GSetOp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.basho.riak.protobuf.RiakDtPB.GSetOp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.basho.riak.protobuf.RiakDtPB.GSetOp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.basho.riak.protobuf.RiakDtPB.GSetOp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.basho.riak.protobuf.RiakDtPB.GSetOp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.basho.riak.protobuf.RiakDtPB.GSetOp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.basho.riak.protobuf.RiakDtPB.GSetOp prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code GSetOp} + * + *
+     * An operation to update a GSet, on its own.
+     * GSet members are opaque binary values, you can only add
+     * them to a Set.
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:GSetOp) + com.basho.riak.protobuf.RiakDtPB.GSetOpOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.basho.riak.protobuf.RiakDtPB.internal_static_GSetOp_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.basho.riak.protobuf.RiakDtPB.internal_static_GSetOp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.basho.riak.protobuf.RiakDtPB.GSetOp.class, com.basho.riak.protobuf.RiakDtPB.GSetOp.Builder.class); + } + + // Construct using com.basho.riak.protobuf.RiakDtPB.GSetOp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + adds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.basho.riak.protobuf.RiakDtPB.internal_static_GSetOp_descriptor; + } + + public com.basho.riak.protobuf.RiakDtPB.GSetOp getDefaultInstanceForType() { + return com.basho.riak.protobuf.RiakDtPB.GSetOp.getDefaultInstance(); + } + + public com.basho.riak.protobuf.RiakDtPB.GSetOp build() { + com.basho.riak.protobuf.RiakDtPB.GSetOp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.basho.riak.protobuf.RiakDtPB.GSetOp buildPartial() { + com.basho.riak.protobuf.RiakDtPB.GSetOp result = new com.basho.riak.protobuf.RiakDtPB.GSetOp(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + adds_ = java.util.Collections.unmodifiableList(adds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.adds_ = adds_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.basho.riak.protobuf.RiakDtPB.GSetOp) { + return mergeFrom((com.basho.riak.protobuf.RiakDtPB.GSetOp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.basho.riak.protobuf.RiakDtPB.GSetOp other) { + if (other == com.basho.riak.protobuf.RiakDtPB.GSetOp.getDefaultInstance()) return this; + if (!other.adds_.isEmpty()) { + if (adds_.isEmpty()) { + adds_ = other.adds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAddsIsMutable(); + adds_.addAll(other.adds_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.basho.riak.protobuf.RiakDtPB.GSetOp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.basho.riak.protobuf.RiakDtPB.GSetOp) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List adds_ = java.util.Collections.emptyList(); + private void ensureAddsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + adds_ = new java.util.ArrayList(adds_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated bytes adds = 1; + */ + public java.util.List + getAddsList() { + return java.util.Collections.unmodifiableList(adds_); + } + /** + * repeated bytes adds = 1; */ - public int getRemovesCount() { - return removes_.size(); + public int getAddsCount() { + return adds_.size(); } /** - * repeated bytes removes = 2; + * repeated bytes adds = 1; */ - public com.google.protobuf.ByteString getRemoves(int index) { - return removes_.get(index); + public com.google.protobuf.ByteString getAdds(int index) { + return adds_.get(index); } /** - * repeated bytes removes = 2; + * repeated bytes adds = 1; */ - public Builder setRemoves( + public Builder setAdds( int index, com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - ensureRemovesIsMutable(); - removes_.set(index, value); + ensureAddsIsMutable(); + adds_.set(index, value); onChanged(); return this; } /** - * repeated bytes removes = 2; + * repeated bytes adds = 1; */ - public Builder addRemoves(com.google.protobuf.ByteString value) { + public Builder addAdds(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - ensureRemovesIsMutable(); - removes_.add(value); + ensureAddsIsMutable(); + adds_.add(value); onChanged(); return this; } /** - * repeated bytes removes = 2; + * repeated bytes adds = 1; */ - public Builder addAllRemoves( + public Builder addAllAdds( java.lang.Iterable values) { - ensureRemovesIsMutable(); + ensureAddsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, removes_); + values, adds_); onChanged(); return this; } /** - * repeated bytes removes = 2; + * repeated bytes adds = 1; */ - public Builder clearRemoves() { - removes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + public Builder clearAdds() { + adds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:SetOp) + // @@protoc_insertion_point(builder_scope:GSetOp) } static { - defaultInstance = new SetOp(true); + defaultInstance = new GSetOp(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:SetOp) + // @@protoc_insertion_point(class_scope:GSetOp) } public interface HllOpOrBuilder extends @@ -6669,6 +7322,7 @@ public Builder clearAdds() { public interface MapUpdateOrBuilder extends // @@protoc_insertion_point(interface_extends:MapUpdate) com.google.protobuf.MessageOrBuilder { + /** * required .MapField field = 1; */ @@ -6943,6 +7597,7 @@ public enum FlagOp */ public static final int DISABLE_VALUE = 2; + public final int getNumber() { return value; } public static FlagOp valueOf(int value) { @@ -7474,13 +8129,16 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakDtPB.MapUpdate other) { public final boolean isInitialized() { if (!hasField()) { + return false; } if (!getField().isInitialized()) { + return false; } if (hasMapOp()) { if (!getMapOp().isInitialized()) { + return false; } } @@ -7609,7 +8267,7 @@ public com.basho.riak.protobuf.RiakDtPB.MapFieldOrBuilder getFieldOrBuilder() { * required .MapField field = 1; */ private com.google.protobuf.SingleFieldBuilder< - com.basho.riak.protobuf.RiakDtPB.MapField, com.basho.riak.protobuf.RiakDtPB.MapField.Builder, com.basho.riak.protobuf.RiakDtPB.MapFieldOrBuilder> + com.basho.riak.protobuf.RiakDtPB.MapField, com.basho.riak.protobuf.RiakDtPB.MapField.Builder, com.basho.riak.protobuf.RiakDtPB.MapFieldOrBuilder> getFieldFieldBuilder() { if (fieldBuilder_ == null) { fieldBuilder_ = new com.google.protobuf.SingleFieldBuilder< @@ -7725,7 +8383,7 @@ public com.basho.riak.protobuf.RiakDtPB.CounterOpOrBuilder getCounterOpOrBuilder * optional .CounterOp counter_op = 2; */ private com.google.protobuf.SingleFieldBuilder< - com.basho.riak.protobuf.RiakDtPB.CounterOp, com.basho.riak.protobuf.RiakDtPB.CounterOp.Builder, com.basho.riak.protobuf.RiakDtPB.CounterOpOrBuilder> + com.basho.riak.protobuf.RiakDtPB.CounterOp, com.basho.riak.protobuf.RiakDtPB.CounterOp.Builder, com.basho.riak.protobuf.RiakDtPB.CounterOpOrBuilder> getCounterOpFieldBuilder() { if (counterOpBuilder_ == null) { counterOpBuilder_ = new com.google.protobuf.SingleFieldBuilder< @@ -7841,7 +8499,7 @@ public com.basho.riak.protobuf.RiakDtPB.SetOpOrBuilder getSetOpOrBuilder() { * optional .SetOp set_op = 3; */ private com.google.protobuf.SingleFieldBuilder< - com.basho.riak.protobuf.RiakDtPB.SetOp, com.basho.riak.protobuf.RiakDtPB.SetOp.Builder, com.basho.riak.protobuf.RiakDtPB.SetOpOrBuilder> + com.basho.riak.protobuf.RiakDtPB.SetOp, com.basho.riak.protobuf.RiakDtPB.SetOp.Builder, com.basho.riak.protobuf.RiakDtPB.SetOpOrBuilder> getSetOpFieldBuilder() { if (setOpBuilder_ == null) { setOpBuilder_ = new com.google.protobuf.SingleFieldBuilder< @@ -8047,7 +8705,7 @@ public com.basho.riak.protobuf.RiakDtPB.MapOpOrBuilder getMapOpOrBuilder() { * optional .MapOp map_op = 6; */ private com.google.protobuf.SingleFieldBuilder< - com.basho.riak.protobuf.RiakDtPB.MapOp, com.basho.riak.protobuf.RiakDtPB.MapOp.Builder, com.basho.riak.protobuf.RiakDtPB.MapOpOrBuilder> + com.basho.riak.protobuf.RiakDtPB.MapOp, com.basho.riak.protobuf.RiakDtPB.MapOp.Builder, com.basho.riak.protobuf.RiakDtPB.MapOpOrBuilder> getMapOpFieldBuilder() { if (mapOpBuilder_ == null) { mapOpBuilder_ = new com.google.protobuf.SingleFieldBuilder< @@ -8074,6 +8732,7 @@ public com.basho.riak.protobuf.RiakDtPB.MapOpOrBuilder getMapOpOrBuilder() { public interface MapOpOrBuilder extends // @@protoc_insertion_point(interface_extends:MapOp) com.google.protobuf.MessageOrBuilder { + /** * repeated .MapField removes = 1; * @@ -8083,7 +8742,7 @@ public interface MapOpOrBuilder extends * operations to the values stored in the Map. * */ - java.util.List + java.util.List getRemovesList(); /** * repeated .MapField removes = 1; @@ -8114,7 +8773,7 @@ public interface MapOpOrBuilder extends * operations to the values stored in the Map. * */ - java.util.List + java.util.List getRemovesOrBuilderList(); /** * repeated .MapField removes = 1; @@ -8131,7 +8790,7 @@ com.basho.riak.protobuf.RiakDtPB.MapFieldOrBuilder getRemovesOrBuilder( /** * repeated .MapUpdate updates = 2; */ - java.util.List + java.util.List getUpdatesList(); /** * repeated .MapUpdate updates = 2; @@ -8144,7 +8803,7 @@ com.basho.riak.protobuf.RiakDtPB.MapFieldOrBuilder getRemovesOrBuilder( /** * repeated .MapUpdate updates = 2; */ - java.util.List + java.util.List getUpdatesOrBuilderList(); /** * repeated .MapUpdate updates = 2; @@ -8293,7 +8952,7 @@ public java.util.List getRemovesList( * operations to the values stored in the Map. * */ - public java.util.List + public java.util.List getRemovesOrBuilderList() { return removes_; } @@ -8346,7 +9005,7 @@ public java.util.List getUpdatesList /** * repeated .MapUpdate updates = 2; */ - public java.util.List + public java.util.List getUpdatesOrBuilderList() { return updates_; } @@ -8636,7 +9295,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakDtPB.MapOp other) { removesBuilder_ = null; removes_ = other.removes_; bitField0_ = (bitField0_ & ~0x00000001); - removesBuilder_ = + removesBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getRemovesFieldBuilder() : null; } else { @@ -8662,7 +9321,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakDtPB.MapOp other) { updatesBuilder_ = null; updates_ = other.updates_; bitField0_ = (bitField0_ & ~0x00000002); - updatesBuilder_ = + updatesBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getUpdatesFieldBuilder() : null; } else { @@ -8677,11 +9336,13 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakDtPB.MapOp other) { public final boolean isInitialized() { for (int i = 0; i < getRemovesCount(); i++) { if (!getRemoves(i).isInitialized()) { + return false; } } for (int i = 0; i < getUpdatesCount(); i++) { if (!getUpdates(i).isInitialized()) { + return false; } } @@ -8992,7 +9653,7 @@ public com.basho.riak.protobuf.RiakDtPB.MapFieldOrBuilder getRemovesOrBuilder( * operations to the values stored in the Map. * */ - public java.util.List + public java.util.List getRemovesOrBuilderList() { if (removesBuilder_ != null) { return removesBuilder_.getMessageOrBuilderList(); @@ -9036,12 +9697,12 @@ public com.basho.riak.protobuf.RiakDtPB.MapField.Builder addRemovesBuilder( * operations to the values stored in the Map. * */ - public java.util.List + public java.util.List getRemovesBuilderList() { return getRemovesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakDtPB.MapField, com.basho.riak.protobuf.RiakDtPB.MapField.Builder, com.basho.riak.protobuf.RiakDtPB.MapFieldOrBuilder> + com.basho.riak.protobuf.RiakDtPB.MapField, com.basho.riak.protobuf.RiakDtPB.MapField.Builder, com.basho.riak.protobuf.RiakDtPB.MapFieldOrBuilder> getRemovesFieldBuilder() { if (removesBuilder_ == null) { removesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -9250,7 +9911,7 @@ public com.basho.riak.protobuf.RiakDtPB.MapUpdateOrBuilder getUpdatesOrBuilder( /** * repeated .MapUpdate updates = 2; */ - public java.util.List + public java.util.List getUpdatesOrBuilderList() { if (updatesBuilder_ != null) { return updatesBuilder_.getMessageOrBuilderList(); @@ -9276,12 +9937,12 @@ public com.basho.riak.protobuf.RiakDtPB.MapUpdate.Builder addUpdatesBuilder( /** * repeated .MapUpdate updates = 2; */ - public java.util.List + public java.util.List getUpdatesBuilderList() { return getUpdatesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakDtPB.MapUpdate, com.basho.riak.protobuf.RiakDtPB.MapUpdate.Builder, com.basho.riak.protobuf.RiakDtPB.MapUpdateOrBuilder> + com.basho.riak.protobuf.RiakDtPB.MapUpdate, com.basho.riak.protobuf.RiakDtPB.MapUpdate.Builder, com.basho.riak.protobuf.RiakDtPB.MapUpdateOrBuilder> getUpdatesFieldBuilder() { if (updatesBuilder_ == null) { updatesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -9309,6 +9970,7 @@ public com.basho.riak.protobuf.RiakDtPB.MapUpdate.Builder addUpdatesBuilder( public interface DtOpOrBuilder extends // @@protoc_insertion_point(interface_extends:DtOp) com.google.protobuf.MessageOrBuilder { + /** * optional .CounterOp counter_op = 1; */ @@ -9375,6 +10037,19 @@ public interface DtOpOrBuilder extends * */ com.basho.riak.protobuf.RiakDtPB.HllOpOrBuilder getHllOpOrBuilder(); + + /** + * optional .GSetOp gset_op = 5; + */ + boolean hasGsetOp(); + /** + * optional .GSetOp gset_op = 5; + */ + com.basho.riak.protobuf.RiakDtPB.GSetOp getGsetOp(); + /** + * optional .GSetOp gset_op = 5; + */ + com.basho.riak.protobuf.RiakDtPB.GSetOpOrBuilder getGsetOpOrBuilder(); } /** * Protobuf type {@code DtOp} @@ -9485,6 +10160,19 @@ private DtOp( bitField0_ |= 0x00000008; break; } + case 42: { + com.basho.riak.protobuf.RiakDtPB.GSetOp.Builder subBuilder = null; + if (((bitField0_ & 0x00000010) == 0x00000010)) { + subBuilder = gsetOp_.toBuilder(); + } + gsetOp_ = input.readMessage(com.basho.riak.protobuf.RiakDtPB.GSetOp.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(gsetOp_); + gsetOp_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000010; + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -9624,11 +10312,33 @@ public com.basho.riak.protobuf.RiakDtPB.HllOpOrBuilder getHllOpOrBuilder() { return hllOp_; } + public static final int GSET_OP_FIELD_NUMBER = 5; + private com.basho.riak.protobuf.RiakDtPB.GSetOp gsetOp_; + /** + * optional .GSetOp gset_op = 5; + */ + public boolean hasGsetOp() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional .GSetOp gset_op = 5; + */ + public com.basho.riak.protobuf.RiakDtPB.GSetOp getGsetOp() { + return gsetOp_; + } + /** + * optional .GSetOp gset_op = 5; + */ + public com.basho.riak.protobuf.RiakDtPB.GSetOpOrBuilder getGsetOpOrBuilder() { + return gsetOp_; + } + private void initFields() { counterOp_ = com.basho.riak.protobuf.RiakDtPB.CounterOp.getDefaultInstance(); setOp_ = com.basho.riak.protobuf.RiakDtPB.SetOp.getDefaultInstance(); mapOp_ = com.basho.riak.protobuf.RiakDtPB.MapOp.getDefaultInstance(); hllOp_ = com.basho.riak.protobuf.RiakDtPB.HllOp.getDefaultInstance(); + gsetOp_ = com.basho.riak.protobuf.RiakDtPB.GSetOp.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -9661,6 +10371,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeMessage(4, hllOp_); } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeMessage(5, gsetOp_); + } getUnknownFields().writeTo(output); } @@ -9686,6 +10399,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, hllOp_); } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, gsetOp_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -9804,6 +10521,7 @@ private void maybeForceBuilderInitialization() { getSetOpFieldBuilder(); getMapOpFieldBuilder(); getHllOpFieldBuilder(); + getGsetOpFieldBuilder(); } } private static Builder create() { @@ -9836,6 +10554,12 @@ public Builder clear() { hllOpBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); + if (gsetOpBuilder_ == null) { + gsetOp_ = com.basho.riak.protobuf.RiakDtPB.GSetOp.getDefaultInstance(); + } else { + gsetOpBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -9896,6 +10620,14 @@ public com.basho.riak.protobuf.RiakDtPB.DtOp buildPartial() { } else { result.hllOp_ = hllOpBuilder_.build(); } + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + if (gsetOpBuilder_ == null) { + result.gsetOp_ = gsetOp_; + } else { + result.gsetOp_ = gsetOpBuilder_.build(); + } result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -9924,6 +10656,9 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakDtPB.DtOp other) { if (other.hasHllOp()) { mergeHllOp(other.getHllOp()); } + if (other.hasGsetOp()) { + mergeGsetOp(other.getGsetOp()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -9931,7 +10666,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakDtPB.DtOp other) { public final boolean isInitialized() { if (hasMapOp()) { if (!getMapOp().isInitialized()) { - + return false; } } @@ -10060,7 +10795,7 @@ public com.basho.riak.protobuf.RiakDtPB.CounterOpOrBuilder getCounterOpOrBuilder * optional .CounterOp counter_op = 1; */ private com.google.protobuf.SingleFieldBuilder< - com.basho.riak.protobuf.RiakDtPB.CounterOp, com.basho.riak.protobuf.RiakDtPB.CounterOp.Builder, com.basho.riak.protobuf.RiakDtPB.CounterOpOrBuilder> + com.basho.riak.protobuf.RiakDtPB.CounterOp, com.basho.riak.protobuf.RiakDtPB.CounterOp.Builder, com.basho.riak.protobuf.RiakDtPB.CounterOpOrBuilder> getCounterOpFieldBuilder() { if (counterOpBuilder_ == null) { counterOpBuilder_ = new com.google.protobuf.SingleFieldBuilder< @@ -10176,7 +10911,7 @@ public com.basho.riak.protobuf.RiakDtPB.SetOpOrBuilder getSetOpOrBuilder() { * optional .SetOp set_op = 2; */ private com.google.protobuf.SingleFieldBuilder< - com.basho.riak.protobuf.RiakDtPB.SetOp, com.basho.riak.protobuf.RiakDtPB.SetOp.Builder, com.basho.riak.protobuf.RiakDtPB.SetOpOrBuilder> + com.basho.riak.protobuf.RiakDtPB.SetOp, com.basho.riak.protobuf.RiakDtPB.SetOp.Builder, com.basho.riak.protobuf.RiakDtPB.SetOpOrBuilder> getSetOpFieldBuilder() { if (setOpBuilder_ == null) { setOpBuilder_ = new com.google.protobuf.SingleFieldBuilder< @@ -10292,7 +11027,7 @@ public com.basho.riak.protobuf.RiakDtPB.MapOpOrBuilder getMapOpOrBuilder() { * optional .MapOp map_op = 3; */ private com.google.protobuf.SingleFieldBuilder< - com.basho.riak.protobuf.RiakDtPB.MapOp, com.basho.riak.protobuf.RiakDtPB.MapOp.Builder, com.basho.riak.protobuf.RiakDtPB.MapOpOrBuilder> + com.basho.riak.protobuf.RiakDtPB.MapOp, com.basho.riak.protobuf.RiakDtPB.MapOp.Builder, com.basho.riak.protobuf.RiakDtPB.MapOpOrBuilder> getMapOpFieldBuilder() { if (mapOpBuilder_ == null) { mapOpBuilder_ = new com.google.protobuf.SingleFieldBuilder< @@ -10453,7 +11188,7 @@ public com.basho.riak.protobuf.RiakDtPB.HllOpOrBuilder getHllOpOrBuilder() { * */ private com.google.protobuf.SingleFieldBuilder< - com.basho.riak.protobuf.RiakDtPB.HllOp, com.basho.riak.protobuf.RiakDtPB.HllOp.Builder, com.basho.riak.protobuf.RiakDtPB.HllOpOrBuilder> + com.basho.riak.protobuf.RiakDtPB.HllOp, com.basho.riak.protobuf.RiakDtPB.HllOp.Builder, com.basho.riak.protobuf.RiakDtPB.HllOpOrBuilder> getHllOpFieldBuilder() { if (hllOpBuilder_ == null) { hllOpBuilder_ = new com.google.protobuf.SingleFieldBuilder< @@ -10466,6 +11201,122 @@ public com.basho.riak.protobuf.RiakDtPB.HllOpOrBuilder getHllOpOrBuilder() { return hllOpBuilder_; } + private com.basho.riak.protobuf.RiakDtPB.GSetOp gsetOp_ = com.basho.riak.protobuf.RiakDtPB.GSetOp.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.basho.riak.protobuf.RiakDtPB.GSetOp, com.basho.riak.protobuf.RiakDtPB.GSetOp.Builder, com.basho.riak.protobuf.RiakDtPB.GSetOpOrBuilder> gsetOpBuilder_; + /** + * optional .GSetOp gset_op = 5; + */ + public boolean hasGsetOp() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional .GSetOp gset_op = 5; + */ + public com.basho.riak.protobuf.RiakDtPB.GSetOp getGsetOp() { + if (gsetOpBuilder_ == null) { + return gsetOp_; + } else { + return gsetOpBuilder_.getMessage(); + } + } + /** + * optional .GSetOp gset_op = 5; + */ + public Builder setGsetOp(com.basho.riak.protobuf.RiakDtPB.GSetOp value) { + if (gsetOpBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gsetOp_ = value; + onChanged(); + } else { + gsetOpBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * optional .GSetOp gset_op = 5; + */ + public Builder setGsetOp( + com.basho.riak.protobuf.RiakDtPB.GSetOp.Builder builderForValue) { + if (gsetOpBuilder_ == null) { + gsetOp_ = builderForValue.build(); + onChanged(); + } else { + gsetOpBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * optional .GSetOp gset_op = 5; + */ + public Builder mergeGsetOp(com.basho.riak.protobuf.RiakDtPB.GSetOp value) { + if (gsetOpBuilder_ == null) { + if (((bitField0_ & 0x00000010) == 0x00000010) && + gsetOp_ != com.basho.riak.protobuf.RiakDtPB.GSetOp.getDefaultInstance()) { + gsetOp_ = + com.basho.riak.protobuf.RiakDtPB.GSetOp.newBuilder(gsetOp_).mergeFrom(value).buildPartial(); + } else { + gsetOp_ = value; + } + onChanged(); + } else { + gsetOpBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * optional .GSetOp gset_op = 5; + */ + public Builder clearGsetOp() { + if (gsetOpBuilder_ == null) { + gsetOp_ = com.basho.riak.protobuf.RiakDtPB.GSetOp.getDefaultInstance(); + onChanged(); + } else { + gsetOpBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + /** + * optional .GSetOp gset_op = 5; + */ + public com.basho.riak.protobuf.RiakDtPB.GSetOp.Builder getGsetOpBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getGsetOpFieldBuilder().getBuilder(); + } + /** + * optional .GSetOp gset_op = 5; + */ + public com.basho.riak.protobuf.RiakDtPB.GSetOpOrBuilder getGsetOpOrBuilder() { + if (gsetOpBuilder_ != null) { + return gsetOpBuilder_.getMessageOrBuilder(); + } else { + return gsetOp_; + } + } + /** + * optional .GSetOp gset_op = 5; + */ + private com.google.protobuf.SingleFieldBuilder< + com.basho.riak.protobuf.RiakDtPB.GSetOp, com.basho.riak.protobuf.RiakDtPB.GSetOp.Builder, com.basho.riak.protobuf.RiakDtPB.GSetOpOrBuilder> + getGsetOpFieldBuilder() { + if (gsetOpBuilder_ == null) { + gsetOpBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.basho.riak.protobuf.RiakDtPB.GSetOp, com.basho.riak.protobuf.RiakDtPB.GSetOp.Builder, com.basho.riak.protobuf.RiakDtPB.GSetOpOrBuilder>( + getGsetOp(), + getParentForChildren(), + isClean()); + gsetOp_ = null; + } + return gsetOpBuilder_; + } + // @@protoc_insertion_point(builder_scope:DtOp) } @@ -10480,6 +11331,7 @@ public com.basho.riak.protobuf.RiakDtPB.HllOpOrBuilder getHllOpOrBuilder() { public interface DtUpdateReqOrBuilder extends // @@protoc_insertion_point(interface_extends:DtUpdateReq) com.google.protobuf.MessageOrBuilder { + /** * required bytes bucket = 1; * @@ -11570,15 +12422,19 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakDtPB.DtUpdateReq other) { public final boolean isInitialized() { if (!hasBucket()) { + return false; } if (!hasType()) { + return false; } if (!hasOp()) { + return false; } if (!getOp().isInitialized()) { + return false; } return true; @@ -11946,7 +12802,7 @@ public com.basho.riak.protobuf.RiakDtPB.DtOpOrBuilder getOpOrBuilder() { * */ private com.google.protobuf.SingleFieldBuilder< - com.basho.riak.protobuf.RiakDtPB.DtOp, com.basho.riak.protobuf.RiakDtPB.DtOp.Builder, com.basho.riak.protobuf.RiakDtPB.DtOpOrBuilder> + com.basho.riak.protobuf.RiakDtPB.DtOp, com.basho.riak.protobuf.RiakDtPB.DtOp.Builder, com.basho.riak.protobuf.RiakDtPB.DtOpOrBuilder> getOpFieldBuilder() { if (opBuilder_ == null) { opBuilder_ = new com.google.protobuf.SingleFieldBuilder< @@ -12293,6 +13149,7 @@ public Builder clearIncludeContext() { public interface DtUpdateRespOrBuilder extends // @@protoc_insertion_point(interface_extends:DtUpdateResp) com.google.protobuf.MessageOrBuilder { + /** * optional bytes key = 1; * @@ -12352,7 +13209,7 @@ public interface DtUpdateRespOrBuilder extends /** * repeated .MapEntry map_value = 5; */ - java.util.List + java.util.List getMapValueList(); /** * repeated .MapEntry map_value = 5; @@ -12365,7 +13222,7 @@ public interface DtUpdateRespOrBuilder extends /** * repeated .MapEntry map_value = 5; */ - java.util.List + java.util.List getMapValueOrBuilderList(); /** * repeated .MapEntry map_value = 5; @@ -12381,6 +13238,19 @@ com.basho.riak.protobuf.RiakDtPB.MapEntryOrBuilder getMapValueOrBuilder( * optional uint64 hll_value = 6; */ long getHllValue(); + + /** + * repeated bytes gset_value = 7; + */ + java.util.List getGsetValueList(); + /** + * repeated bytes gset_value = 7; + */ + int getGsetValueCount(); + /** + * repeated bytes gset_value = 7; + */ + com.google.protobuf.ByteString getGsetValue(int index); } /** * Protobuf type {@code DtUpdateResp} @@ -12476,6 +13346,14 @@ private DtUpdateResp( hllValue_ = input.readUInt64(); break; } + case 58: { + if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + gsetValue_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000040; + } + gsetValue_.add(input.readBytes()); + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -12490,6 +13368,9 @@ private DtUpdateResp( if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { mapValue_ = java.util.Collections.unmodifiableList(mapValue_); } + if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + gsetValue_ = java.util.Collections.unmodifiableList(gsetValue_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -12616,7 +13497,7 @@ public java.util.List getMapValueList /** * repeated .MapEntry map_value = 5; */ - public java.util.List + public java.util.List getMapValueOrBuilderList() { return mapValue_; } @@ -12655,6 +13536,28 @@ public long getHllValue() { return hllValue_; } + public static final int GSET_VALUE_FIELD_NUMBER = 7; + private java.util.List gsetValue_; + /** + * repeated bytes gset_value = 7; + */ + public java.util.List + getGsetValueList() { + return gsetValue_; + } + /** + * repeated bytes gset_value = 7; + */ + public int getGsetValueCount() { + return gsetValue_.size(); + } + /** + * repeated bytes gset_value = 7; + */ + public com.google.protobuf.ByteString getGsetValue(int index) { + return gsetValue_.get(index); + } + private void initFields() { key_ = com.google.protobuf.ByteString.EMPTY; context_ = com.google.protobuf.ByteString.EMPTY; @@ -12662,6 +13565,7 @@ private void initFields() { setValue_ = java.util.Collections.emptyList(); mapValue_ = java.util.Collections.emptyList(); hllValue_ = 0L; + gsetValue_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -12700,6 +13604,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeUInt64(6, hllValue_); } + for (int i = 0; i < gsetValue_.size(); i++) { + output.writeBytes(7, gsetValue_.get(i)); + } getUnknownFields().writeTo(output); } @@ -12738,6 +13645,15 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(6, hllValue_); } + { + int dataSize = 0; + for (int i = 0; i < gsetValue_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(gsetValue_.get(i)); + } + size += dataSize; + size += 1 * getGsetValueList().size(); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -12878,6 +13794,8 @@ public Builder clear() { } hllValue_ = 0L; bitField0_ = (bitField0_ & ~0x00000020); + gsetValue_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); return this; } @@ -12936,6 +13854,11 @@ public com.basho.riak.protobuf.RiakDtPB.DtUpdateResp buildPartial() { to_bitField0_ |= 0x00000008; } result.hllValue_ = hllValue_; + if (((bitField0_ & 0x00000040) == 0x00000040)) { + gsetValue_ = java.util.Collections.unmodifiableList(gsetValue_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.gsetValue_ = gsetValue_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -12989,7 +13912,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakDtPB.DtUpdateResp other) { mapValueBuilder_ = null; mapValue_ = other.mapValue_; bitField0_ = (bitField0_ & ~0x00000010); - mapValueBuilder_ = + mapValueBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getMapValueFieldBuilder() : null; } else { @@ -13000,6 +13923,16 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakDtPB.DtUpdateResp other) { if (other.hasHllValue()) { setHllValue(other.getHllValue()); } + if (!other.gsetValue_.isEmpty()) { + if (gsetValue_.isEmpty()) { + gsetValue_ = other.gsetValue_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureGsetValueIsMutable(); + gsetValue_.addAll(other.gsetValue_); + } + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -13007,7 +13940,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakDtPB.DtUpdateResp other) { public final boolean isInitialized() { for (int i = 0; i < getMapValueCount(); i++) { if (!getMapValue(i).isInitialized()) { - + return false; } } @@ -13434,7 +14367,7 @@ public com.basho.riak.protobuf.RiakDtPB.MapEntryOrBuilder getMapValueOrBuilder( /** * repeated .MapEntry map_value = 5; */ - public java.util.List + public java.util.List getMapValueOrBuilderList() { if (mapValueBuilder_ != null) { return mapValueBuilder_.getMessageOrBuilderList(); @@ -13460,12 +14393,12 @@ public com.basho.riak.protobuf.RiakDtPB.MapEntry.Builder addMapValueBuilder( /** * repeated .MapEntry map_value = 5; */ - public java.util.List + public java.util.List getMapValueBuilderList() { return getMapValueFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakDtPB.MapEntry, com.basho.riak.protobuf.RiakDtPB.MapEntry.Builder, com.basho.riak.protobuf.RiakDtPB.MapEntryOrBuilder> + com.basho.riak.protobuf.RiakDtPB.MapEntry, com.basho.riak.protobuf.RiakDtPB.MapEntry.Builder, com.basho.riak.protobuf.RiakDtPB.MapEntryOrBuilder> getMapValueFieldBuilder() { if (mapValueBuilder_ == null) { mapValueBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -13511,6 +14444,78 @@ public Builder clearHllValue() { return this; } + private java.util.List gsetValue_ = java.util.Collections.emptyList(); + private void ensureGsetValueIsMutable() { + if (!((bitField0_ & 0x00000040) == 0x00000040)) { + gsetValue_ = new java.util.ArrayList(gsetValue_); + bitField0_ |= 0x00000040; + } + } + /** + * repeated bytes gset_value = 7; + */ + public java.util.List + getGsetValueList() { + return java.util.Collections.unmodifiableList(gsetValue_); + } + /** + * repeated bytes gset_value = 7; + */ + public int getGsetValueCount() { + return gsetValue_.size(); + } + /** + * repeated bytes gset_value = 7; + */ + public com.google.protobuf.ByteString getGsetValue(int index) { + return gsetValue_.get(index); + } + /** + * repeated bytes gset_value = 7; + */ + public Builder setGsetValue( + int index, com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGsetValueIsMutable(); + gsetValue_.set(index, value); + onChanged(); + return this; + } + /** + * repeated bytes gset_value = 7; + */ + public Builder addGsetValue(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGsetValueIsMutable(); + gsetValue_.add(value); + onChanged(); + return this; + } + /** + * repeated bytes gset_value = 7; + */ + public Builder addAllGsetValue( + java.lang.Iterable values) { + ensureGsetValueIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, gsetValue_); + onChanged(); + return this; + } + /** + * repeated bytes gset_value = 7; + */ + public Builder clearGsetValue() { + gsetValue_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:DtUpdateResp) } @@ -13557,6 +14562,11 @@ public Builder clearHllValue() { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_SetOp_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_GSetOp_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_GSetOp_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_HllOp_descriptor; private static @@ -13608,36 +14618,39 @@ public Builder clearHllValue() { " \002(\014\022\t\n\001r\030\004 \001(\r\022\n\n\002pr\030\005 \001(\r\022\024\n\014basic_quo", "rum\030\006 \001(\010\022\023\n\013notfound_ok\030\007 \001(\010\022\017\n\007timeou" + "t\030\010 \001(\r\022\025\n\rsloppy_quorum\030\t \001(\010\022\r\n\005n_val\030" + - "\n \001(\r\022\035\n\017include_context\030\013 \001(\010:\004true\"d\n\007" + + "\n \001(\r\022\035\n\017include_context\030\013 \001(\010:\004true\"x\n\007" + "DtValue\022\025\n\rcounter_value\030\001 \001(\022\022\021\n\tset_va" + "lue\030\002 \003(\014\022\034\n\tmap_value\030\003 \003(\0132\t.MapEntry\022" + - "\021\n\thll_value\030\004 \001(\004\"\220\001\n\013DtFetchResp\022\017\n\007co" + - "ntext\030\001 \001(\014\022#\n\004type\030\002 \002(\0162\025.DtFetchResp." + - "DataType\022\027\n\005value\030\003 \001(\0132\010.DtValue\"2\n\010Dat" + - "aType\022\013\n\007COUNTER\020\001\022\007\n\003SET\020\002\022\007\n\003MAP\020\003\022\007\n\003" + - "HLL\020\004\"\036\n\tCounterOp\022\021\n\tincrement\030\001 \001(\022\"&\n", - "\005SetOp\022\014\n\004adds\030\001 \003(\014\022\017\n\007removes\030\002 \003(\014\"\025\n" + - "\005HllOp\022\014\n\004adds\030\001 \003(\014\"\321\001\n\tMapUpdate\022\030\n\005fi" + - "eld\030\001 \002(\0132\t.MapField\022\036\n\ncounter_op\030\002 \001(\013" + - "2\n.CounterOp\022\026\n\006set_op\030\003 \001(\0132\006.SetOp\022\023\n\013" + - "register_op\030\004 \001(\014\022\"\n\007flag_op\030\005 \001(\0162\021.Map" + - "Update.FlagOp\022\026\n\006map_op\030\006 \001(\0132\006.MapOp\"!\n" + - "\006FlagOp\022\n\n\006ENABLE\020\001\022\013\n\007DISABLE\020\002\"@\n\005MapO" + - "p\022\032\n\007removes\030\001 \003(\0132\t.MapField\022\033\n\007updates" + - "\030\002 \003(\0132\n.MapUpdate\"n\n\004DtOp\022\036\n\ncounter_op" + - "\030\001 \001(\0132\n.CounterOp\022\026\n\006set_op\030\002 \001(\0132\006.Set", - "Op\022\026\n\006map_op\030\003 \001(\0132\006.MapOp\022\026\n\006hll_op\030\004 \001" + - "(\0132\006.HllOp\"\361\001\n\013DtUpdateReq\022\016\n\006bucket\030\001 \002" + - "(\014\022\013\n\003key\030\002 \001(\014\022\014\n\004type\030\003 \002(\014\022\017\n\007context" + - "\030\004 \001(\014\022\021\n\002op\030\005 \002(\0132\005.DtOp\022\t\n\001w\030\006 \001(\r\022\n\n\002" + - "dw\030\007 \001(\r\022\n\n\002pw\030\010 \001(\r\022\032\n\013return_body\030\t \001(" + - "\010:\005false\022\017\n\007timeout\030\n \001(\r\022\025\n\rsloppy_quor" + - "um\030\013 \001(\010\022\r\n\005n_val\030\014 \001(\r\022\035\n\017include_conte" + - "xt\030\r \001(\010:\004true\"\207\001\n\014DtUpdateResp\022\013\n\003key\030\001" + - " \001(\014\022\017\n\007context\030\002 \001(\014\022\025\n\rcounter_value\030\003" + - " \001(\022\022\021\n\tset_value\030\004 \003(\014\022\034\n\tmap_value\030\005 \003", - "(\0132\t.MapEntry\022\021\n\thll_value\030\006 \001(\004B#\n\027com." + - "basho.riak.protobufB\010RiakDtPB" + "\021\n\thll_value\030\004 \001(\004\022\022\n\ngset_value\030\005 \003(\014\"\232" + + "\001\n\013DtFetchResp\022\017\n\007context\030\001 \001(\014\022#\n\004type\030" + + "\002 \002(\0162\025.DtFetchResp.DataType\022\027\n\005value\030\003 " + + "\001(\0132\010.DtValue\"<\n\010DataType\022\013\n\007COUNTER\020\001\022\007" + + "\n\003SET\020\002\022\007\n\003MAP\020\003\022\007\n\003HLL\020\004\022\010\n\004GSET\020\005\"\036\n\tC", + "ounterOp\022\021\n\tincrement\030\001 \001(\022\"&\n\005SetOp\022\014\n\004" + + "adds\030\001 \003(\014\022\017\n\007removes\030\002 \003(\014\"\026\n\006GSetOp\022\014\n" + + "\004adds\030\001 \003(\014\"\025\n\005HllOp\022\014\n\004adds\030\001 \003(\014\"\321\001\n\tM" + + "apUpdate\022\030\n\005field\030\001 \002(\0132\t.MapField\022\036\n\nco" + + "unter_op\030\002 \001(\0132\n.CounterOp\022\026\n\006set_op\030\003 \001" + + "(\0132\006.SetOp\022\023\n\013register_op\030\004 \001(\014\022\"\n\007flag_" + + "op\030\005 \001(\0162\021.MapUpdate.FlagOp\022\026\n\006map_op\030\006 " + + "\001(\0132\006.MapOp\"!\n\006FlagOp\022\n\n\006ENABLE\020\001\022\013\n\007DIS" + + "ABLE\020\002\"@\n\005MapOp\022\032\n\007removes\030\001 \003(\0132\t.MapFi" + + "eld\022\033\n\007updates\030\002 \003(\0132\n.MapUpdate\"\210\001\n\004DtO", + "p\022\036\n\ncounter_op\030\001 \001(\0132\n.CounterOp\022\026\n\006set" + + "_op\030\002 \001(\0132\006.SetOp\022\026\n\006map_op\030\003 \001(\0132\006.MapO" + + "p\022\026\n\006hll_op\030\004 \001(\0132\006.HllOp\022\030\n\007gset_op\030\005 \001" + + "(\0132\007.GSetOp\"\361\001\n\013DtUpdateReq\022\016\n\006bucket\030\001 " + + "\002(\014\022\013\n\003key\030\002 \001(\014\022\014\n\004type\030\003 \002(\014\022\017\n\007contex" + + "t\030\004 \001(\014\022\021\n\002op\030\005 \002(\0132\005.DtOp\022\t\n\001w\030\006 \001(\r\022\n\n" + + "\002dw\030\007 \001(\r\022\n\n\002pw\030\010 \001(\r\022\032\n\013return_body\030\t \001" + + "(\010:\005false\022\017\n\007timeout\030\n \001(\r\022\025\n\rsloppy_quo" + + "rum\030\013 \001(\010\022\r\n\005n_val\030\014 \001(\r\022\035\n\017include_cont" + + "ext\030\r \001(\010:\004true\"\233\001\n\014DtUpdateResp\022\013\n\003key\030", + "\001 \001(\014\022\017\n\007context\030\002 \001(\014\022\025\n\rcounter_value\030" + + "\003 \001(\022\022\021\n\tset_value\030\004 \003(\014\022\034\n\tmap_value\030\005 " + + "\003(\0132\t.MapEntry\022\021\n\thll_value\030\006 \001(\004\022\022\n\ngse" + + "t_value\030\007 \003(\014B#\n\027com.basho.riak.protobuf" + + "B\010RiakDtPB" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -13674,7 +14687,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_DtValue_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_DtValue_descriptor, - new java.lang.String[] { "CounterValue", "SetValue", "MapValue", "HllValue", }); + new java.lang.String[] { "CounterValue", "SetValue", "MapValue", "HllValue", "GsetValue", }); internal_static_DtFetchResp_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_DtFetchResp_fieldAccessorTable = new @@ -13693,42 +14706,48 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_SetOp_descriptor, new java.lang.String[] { "Adds", "Removes", }); - internal_static_HllOp_descriptor = + internal_static_GSetOp_descriptor = getDescriptor().getMessageTypes().get(7); + internal_static_GSetOp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_GSetOp_descriptor, + new java.lang.String[] { "Adds", }); + internal_static_HllOp_descriptor = + getDescriptor().getMessageTypes().get(8); internal_static_HllOp_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_HllOp_descriptor, new java.lang.String[] { "Adds", }); internal_static_MapUpdate_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(9); internal_static_MapUpdate_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_MapUpdate_descriptor, new java.lang.String[] { "Field", "CounterOp", "SetOp", "RegisterOp", "FlagOp", "MapOp", }); internal_static_MapOp_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(10); internal_static_MapOp_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_MapOp_descriptor, new java.lang.String[] { "Removes", "Updates", }); internal_static_DtOp_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(11); internal_static_DtOp_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_DtOp_descriptor, - new java.lang.String[] { "CounterOp", "SetOp", "MapOp", "HllOp", }); + new java.lang.String[] { "CounterOp", "SetOp", "MapOp", "HllOp", "GsetOp", }); internal_static_DtUpdateReq_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(12); internal_static_DtUpdateReq_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_DtUpdateReq_descriptor, new java.lang.String[] { "Bucket", "Key", "Type", "Context", "Op", "W", "Dw", "Pw", "ReturnBody", "Timeout", "SloppyQuorum", "NVal", "IncludeContext", }); internal_static_DtUpdateResp_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(13); internal_static_DtUpdateResp_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_DtUpdateResp_descriptor, - new java.lang.String[] { "Key", "Context", "CounterValue", "SetValue", "MapValue", "HllValue", }); + new java.lang.String[] { "Key", "Context", "CounterValue", "SetValue", "MapValue", "HllValue", "GsetValue", }); } // @@protoc_insertion_point(outer_class_scope) diff --git a/src/main/java/com/basho/riak/protobuf/RiakKvPB.java b/src/main/java/com/basho/riak/protobuf/RiakKvPB.java index b6dc8cfb7..de2789db3 100644 --- a/src/main/java/com/basho/riak/protobuf/RiakKvPB.java +++ b/src/main/java/com/basho/riak/protobuf/RiakKvPB.java @@ -11,6 +11,7 @@ public static void registerAllExtensions( public interface RpbGetClientIdRespOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbGetClientIdResp) com.google.protobuf.MessageOrBuilder { + /** * required bytes client_id = 1; * @@ -368,6 +369,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbGetClientIdResp oth public final boolean isInitialized() { if (!hasClientId()) { + return false; } return true; @@ -457,6 +459,7 @@ public Builder clearClientId() { public interface RpbSetClientIdReqOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbSetClientIdReq) com.google.protobuf.MessageOrBuilder { + /** * required bytes client_id = 1; * @@ -806,6 +809,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbSetClientIdReq othe public final boolean isInitialized() { if (!hasClientId()) { + return false; } return true; @@ -895,6 +899,7 @@ public Builder clearClientId() { public interface RpbGetReqOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbGetReq) com.google.protobuf.MessageOrBuilder { + /** * required bytes bucket = 1; */ @@ -1888,9 +1893,11 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbGetReq other) { public final boolean isInitialized() { if (!hasBucket()) { + return false; } if (!hasKey()) { + return false; } return true; @@ -2453,10 +2460,11 @@ public Builder clearType() { public interface RpbGetRespOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbGetResp) com.google.protobuf.MessageOrBuilder { + /** * repeated .RpbContent content = 1; */ - java.util.List + java.util.List getContentList(); /** * repeated .RpbContent content = 1; @@ -2469,7 +2477,7 @@ public interface RpbGetRespOrBuilder extends /** * repeated .RpbContent content = 1; */ - java.util.List + java.util.List getContentOrBuilderList(); /** * repeated .RpbContent content = 1; @@ -2631,7 +2639,7 @@ public java.util.List getContentLis /** * repeated .RpbContent content = 1; */ - public java.util.List + public java.util.List getContentOrBuilderList() { return content_; } @@ -2958,7 +2966,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbGetResp other) { contentBuilder_ = null; content_ = other.content_; bitField0_ = (bitField0_ & ~0x00000001); - contentBuilder_ = + contentBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getContentFieldBuilder() : null; } else { @@ -2979,6 +2987,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbGetResp other) { public final boolean isInitialized() { for (int i = 0; i < getContentCount(); i++) { if (!getContent(i).isInitialized()) { + return false; } } @@ -3199,7 +3208,7 @@ public com.basho.riak.protobuf.RiakKvPB.RpbContentOrBuilder getContentOrBuilder( /** * repeated .RpbContent content = 1; */ - public java.util.List + public java.util.List getContentOrBuilderList() { if (contentBuilder_ != null) { return contentBuilder_.getMessageOrBuilderList(); @@ -3225,12 +3234,12 @@ public com.basho.riak.protobuf.RiakKvPB.RpbContent.Builder addContentBuilder( /** * repeated .RpbContent content = 1; */ - public java.util.List + public java.util.List getContentBuilderList() { return getContentFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakKvPB.RpbContent, com.basho.riak.protobuf.RiakKvPB.RpbContent.Builder, com.basho.riak.protobuf.RiakKvPB.RpbContentOrBuilder> + com.basho.riak.protobuf.RiakKvPB.RpbContent, com.basho.riak.protobuf.RiakKvPB.RpbContent.Builder, com.basho.riak.protobuf.RiakKvPB.RpbContentOrBuilder> getContentFieldBuilder() { if (contentBuilder_ == null) { contentBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -3341,6 +3350,7 @@ public Builder clearUnchanged() { public interface RpbPutReqOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbPutReq) com.google.protobuf.MessageOrBuilder { + /** * required bytes bucket = 1; */ @@ -4457,12 +4467,15 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbPutReq other) { public final boolean isInitialized() { if (!hasBucket()) { + return false; } if (!hasContent()) { + return false; } if (!getContent().isInitialized()) { + return false; } return true; @@ -4695,7 +4708,7 @@ public com.basho.riak.protobuf.RiakKvPB.RpbContentOrBuilder getContentOrBuilder( * required .RpbContent content = 4; */ private com.google.protobuf.SingleFieldBuilder< - com.basho.riak.protobuf.RiakKvPB.RpbContent, com.basho.riak.protobuf.RiakKvPB.RpbContent.Builder, com.basho.riak.protobuf.RiakKvPB.RpbContentOrBuilder> + com.basho.riak.protobuf.RiakKvPB.RpbContent, com.basho.riak.protobuf.RiakKvPB.RpbContent.Builder, com.basho.riak.protobuf.RiakKvPB.RpbContentOrBuilder> getContentFieldBuilder() { if (contentBuilder_ == null) { contentBuilder_ = new com.google.protobuf.SingleFieldBuilder< @@ -5157,10 +5170,11 @@ public Builder clearType() { public interface RpbPutRespOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbPutResp) com.google.protobuf.MessageOrBuilder { + /** * repeated .RpbContent content = 1; */ - java.util.List + java.util.List getContentList(); /** * repeated .RpbContent content = 1; @@ -5173,7 +5187,7 @@ public interface RpbPutRespOrBuilder extends /** * repeated .RpbContent content = 1; */ - java.util.List + java.util.List getContentOrBuilderList(); /** * repeated .RpbContent content = 1; @@ -5343,7 +5357,7 @@ public java.util.List getContentLis /** * repeated .RpbContent content = 1; */ - public java.util.List + public java.util.List getContentOrBuilderList() { return content_; } @@ -5678,7 +5692,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbPutResp other) { contentBuilder_ = null; content_ = other.content_; bitField0_ = (bitField0_ & ~0x00000001); - contentBuilder_ = + contentBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getContentFieldBuilder() : null; } else { @@ -5699,6 +5713,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbPutResp other) { public final boolean isInitialized() { for (int i = 0; i < getContentCount(); i++) { if (!getContent(i).isInitialized()) { + return false; } } @@ -5919,7 +5934,7 @@ public com.basho.riak.protobuf.RiakKvPB.RpbContentOrBuilder getContentOrBuilder( /** * repeated .RpbContent content = 1; */ - public java.util.List + public java.util.List getContentOrBuilderList() { if (contentBuilder_ != null) { return contentBuilder_.getMessageOrBuilderList(); @@ -5945,12 +5960,12 @@ public com.basho.riak.protobuf.RiakKvPB.RpbContent.Builder addContentBuilder( /** * repeated .RpbContent content = 1; */ - public java.util.List + public java.util.List getContentBuilderList() { return getContentFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakKvPB.RpbContent, com.basho.riak.protobuf.RiakKvPB.RpbContent.Builder, com.basho.riak.protobuf.RiakKvPB.RpbContentOrBuilder> + com.basho.riak.protobuf.RiakKvPB.RpbContent, com.basho.riak.protobuf.RiakKvPB.RpbContent.Builder, com.basho.riak.protobuf.RiakKvPB.RpbContentOrBuilder> getContentFieldBuilder() { if (contentBuilder_ == null) { contentBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -6080,6 +6095,7 @@ public Builder clearKey() { public interface RpbDelReqOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbDelReq) com.google.protobuf.MessageOrBuilder { + /** * required bytes bucket = 1; */ @@ -7025,9 +7041,11 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbDelReq other) { public final boolean isInitialized() { if (!hasBucket()) { + return false; } if (!hasKey()) { + return false; } return true; @@ -7542,6 +7560,7 @@ public Builder clearType() { public interface RpbListBucketsReqOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbListBucketsReq) com.google.protobuf.MessageOrBuilder { + /** * optional uint32 timeout = 1; */ @@ -8137,6 +8156,7 @@ public Builder clearType() { public interface RpbListBucketsRespOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbListBucketsResp) com.google.protobuf.MessageOrBuilder { + /** * repeated bytes buckets = 1; */ @@ -8691,6 +8711,7 @@ public Builder clearDone() { public interface RpbListKeysReqOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbListKeysReq) com.google.protobuf.MessageOrBuilder { + /** * required bytes bucket = 1; */ @@ -9140,6 +9161,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbListKeysReq other) public final boolean isInitialized() { if (!hasBucket()) { + return false; } return true; @@ -9296,6 +9318,7 @@ public Builder clearType() { public interface RpbListKeysRespOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbListKeysResp) com.google.protobuf.MessageOrBuilder { + /** * repeated bytes keys = 1; */ @@ -9850,6 +9873,7 @@ public Builder clearDone() { public interface RpbMapRedReqOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbMapRedReq) com.google.protobuf.MessageOrBuilder { + /** * required bytes request = 1; */ @@ -10241,9 +10265,11 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbMapRedReq other) { public final boolean isInitialized() { if (!hasRequest()) { + return false; } if (!hasContentType()) { + return false; } return true; @@ -10352,6 +10378,7 @@ public Builder clearContentType() { public interface RpbMapRedRespOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbMapRedResp) com.google.protobuf.MessageOrBuilder { + /** * optional uint32 phase = 1; */ @@ -10919,6 +10946,7 @@ public Builder clearDone() { public interface RpbIndexReqOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbIndexReq) com.google.protobuf.MessageOrBuilder { + /** * required bytes bucket = 1; */ @@ -11308,6 +11336,7 @@ public enum IndexQueryType */ public static final int range_VALUE = 1; + public final int getNumber() { return value; } public static IndexQueryType valueOf(int value) { @@ -12125,12 +12154,15 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbIndexReq other) { public final boolean isInitialized() { if (!hasBucket()) { + return false; } if (!hasIndex()) { + return false; } if (!hasQtype()) { + return false; } return true; @@ -12791,6 +12823,7 @@ public Builder clearReturnBody() { public interface RpbIndexRespOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbIndexResp) com.google.protobuf.MessageOrBuilder { + /** * repeated bytes keys = 1; */ @@ -12807,7 +12840,7 @@ public interface RpbIndexRespOrBuilder extends /** * repeated .RpbPair results = 2; */ - java.util.List + java.util.List getResultsList(); /** * repeated .RpbPair results = 2; @@ -12820,7 +12853,7 @@ public interface RpbIndexRespOrBuilder extends /** * repeated .RpbPair results = 2; */ - java.util.List + java.util.List getResultsOrBuilderList(); /** * repeated .RpbPair results = 2; @@ -13007,7 +13040,7 @@ public java.util.List getResultsList() { /** * repeated .RpbPair results = 2; */ - public java.util.List + public java.util.List getResultsOrBuilderList() { return results_; } @@ -13356,7 +13389,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbIndexResp other) { resultsBuilder_ = null; results_ = other.results_; bitField0_ = (bitField0_ & ~0x00000002); - resultsBuilder_ = + resultsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getResultsFieldBuilder() : null; } else { @@ -13377,6 +13410,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbIndexResp other) { public final boolean isInitialized() { for (int i = 0; i < getResultsCount(); i++) { if (!getResults(i).isInitialized()) { + return false; } } @@ -13669,7 +13703,7 @@ public com.basho.riak.protobuf.RiakPB.RpbPairOrBuilder getResultsOrBuilder( /** * repeated .RpbPair results = 2; */ - public java.util.List + public java.util.List getResultsOrBuilderList() { if (resultsBuilder_ != null) { return resultsBuilder_.getMessageOrBuilderList(); @@ -13695,12 +13729,12 @@ public com.basho.riak.protobuf.RiakPB.RpbPair.Builder addResultsBuilder( /** * repeated .RpbPair results = 2; */ - public java.util.List + public java.util.List getResultsBuilderList() { return getResultsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakPB.RpbPair, com.basho.riak.protobuf.RiakPB.RpbPair.Builder, com.basho.riak.protobuf.RiakPB.RpbPairOrBuilder> + com.basho.riak.protobuf.RiakPB.RpbPair, com.basho.riak.protobuf.RiakPB.RpbPair.Builder, com.basho.riak.protobuf.RiakPB.RpbPairOrBuilder> getResultsFieldBuilder() { if (resultsBuilder_ == null) { resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -13795,10 +13829,11 @@ public Builder clearDone() { public interface RpbIndexBodyRespOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbIndexBodyResp) com.google.protobuf.MessageOrBuilder { + /** * repeated .RpbIndexObject objects = 1; */ - java.util.List + java.util.List getObjectsList(); /** * repeated .RpbIndexObject objects = 1; @@ -13811,7 +13846,7 @@ public interface RpbIndexBodyRespOrBuilder extends /** * repeated .RpbIndexObject objects = 1; */ - java.util.List + java.util.List getObjectsOrBuilderList(); /** * repeated .RpbIndexObject objects = 1; @@ -13965,7 +14000,7 @@ public java.util.List getObject /** * repeated .RpbIndexObject objects = 1; */ - public java.util.List + public java.util.List getObjectsOrBuilderList() { return objects_; } @@ -14284,7 +14319,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbIndexBodyResp other objectsBuilder_ = null; objects_ = other.objects_; bitField0_ = (bitField0_ & ~0x00000001); - objectsBuilder_ = + objectsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getObjectsFieldBuilder() : null; } else { @@ -14305,6 +14340,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbIndexBodyResp other public final boolean isInitialized() { for (int i = 0; i < getObjectsCount(); i++) { if (!getObjects(i).isInitialized()) { + return false; } } @@ -14525,7 +14561,7 @@ public com.basho.riak.protobuf.RiakKvPB.RpbIndexObjectOrBuilder getObjectsOrBuil /** * repeated .RpbIndexObject objects = 1; */ - public java.util.List + public java.util.List getObjectsOrBuilderList() { if (objectsBuilder_ != null) { return objectsBuilder_.getMessageOrBuilderList(); @@ -14551,12 +14587,12 @@ public com.basho.riak.protobuf.RiakKvPB.RpbIndexObject.Builder addObjectsBuilder /** * repeated .RpbIndexObject objects = 1; */ - public java.util.List + public java.util.List getObjectsBuilderList() { return getObjectsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakKvPB.RpbIndexObject, com.basho.riak.protobuf.RiakKvPB.RpbIndexObject.Builder, com.basho.riak.protobuf.RiakKvPB.RpbIndexObjectOrBuilder> + com.basho.riak.protobuf.RiakKvPB.RpbIndexObject, com.basho.riak.protobuf.RiakKvPB.RpbIndexObject.Builder, com.basho.riak.protobuf.RiakKvPB.RpbIndexObjectOrBuilder> getObjectsFieldBuilder() { if (objectsBuilder_ == null) { objectsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -14651,6 +14687,7 @@ public Builder clearDone() { public interface RpbCSBucketReqOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbCSBucketReq) com.google.protobuf.MessageOrBuilder { + /** * required bytes bucket = 1; */ @@ -15446,9 +15483,11 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbCSBucketReq other) public final boolean isInitialized() { if (!hasBucket()) { + return false; } if (!hasStartKey()) { + return false; } return true; @@ -15857,10 +15896,11 @@ public Builder clearCoverContext() { public interface RpbCSBucketRespOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbCSBucketResp) com.google.protobuf.MessageOrBuilder { + /** * repeated .RpbIndexObject objects = 1; */ - java.util.List + java.util.List getObjectsList(); /** * repeated .RpbIndexObject objects = 1; @@ -15873,7 +15913,7 @@ public interface RpbCSBucketRespOrBuilder extends /** * repeated .RpbIndexObject objects = 1; */ - java.util.List + java.util.List getObjectsOrBuilderList(); /** * repeated .RpbIndexObject objects = 1; @@ -16027,7 +16067,7 @@ public java.util.List getObject /** * repeated .RpbIndexObject objects = 1; */ - public java.util.List + public java.util.List getObjectsOrBuilderList() { return objects_; } @@ -16346,7 +16386,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbCSBucketResp other) objectsBuilder_ = null; objects_ = other.objects_; bitField0_ = (bitField0_ & ~0x00000001); - objectsBuilder_ = + objectsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getObjectsFieldBuilder() : null; } else { @@ -16367,6 +16407,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbCSBucketResp other) public final boolean isInitialized() { for (int i = 0; i < getObjectsCount(); i++) { if (!getObjects(i).isInitialized()) { + return false; } } @@ -16587,7 +16628,7 @@ public com.basho.riak.protobuf.RiakKvPB.RpbIndexObjectOrBuilder getObjectsOrBuil /** * repeated .RpbIndexObject objects = 1; */ - public java.util.List + public java.util.List getObjectsOrBuilderList() { if (objectsBuilder_ != null) { return objectsBuilder_.getMessageOrBuilderList(); @@ -16613,12 +16654,12 @@ public com.basho.riak.protobuf.RiakKvPB.RpbIndexObject.Builder addObjectsBuilder /** * repeated .RpbIndexObject objects = 1; */ - public java.util.List + public java.util.List getObjectsBuilderList() { return getObjectsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakKvPB.RpbIndexObject, com.basho.riak.protobuf.RiakKvPB.RpbIndexObject.Builder, com.basho.riak.protobuf.RiakKvPB.RpbIndexObjectOrBuilder> + com.basho.riak.protobuf.RiakKvPB.RpbIndexObject, com.basho.riak.protobuf.RiakKvPB.RpbIndexObject.Builder, com.basho.riak.protobuf.RiakKvPB.RpbIndexObjectOrBuilder> getObjectsFieldBuilder() { if (objectsBuilder_ == null) { objectsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -16713,6 +16754,7 @@ public Builder clearDone() { public interface RpbIndexObjectOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbIndexObject) com.google.protobuf.MessageOrBuilder { + /** * required bytes key = 1; */ @@ -17127,12 +17169,15 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbIndexObject other) public final boolean isInitialized() { if (!hasKey()) { + return false; } if (!hasObject()) { + return false; } if (!getObject().isInitialized()) { + return false; } return true; @@ -17295,7 +17340,7 @@ public com.basho.riak.protobuf.RiakKvPB.RpbGetRespOrBuilder getObjectOrBuilder() * required .RpbGetResp object = 2; */ private com.google.protobuf.SingleFieldBuilder< - com.basho.riak.protobuf.RiakKvPB.RpbGetResp, com.basho.riak.protobuf.RiakKvPB.RpbGetResp.Builder, com.basho.riak.protobuf.RiakKvPB.RpbGetRespOrBuilder> + com.basho.riak.protobuf.RiakKvPB.RpbGetResp, com.basho.riak.protobuf.RiakKvPB.RpbGetResp.Builder, com.basho.riak.protobuf.RiakKvPB.RpbGetRespOrBuilder> getObjectFieldBuilder() { if (objectBuilder_ == null) { objectBuilder_ = new com.google.protobuf.SingleFieldBuilder< @@ -17322,6 +17367,7 @@ public com.basho.riak.protobuf.RiakKvPB.RpbGetRespOrBuilder getObjectOrBuilder() public interface RpbContentOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbContent) com.google.protobuf.MessageOrBuilder { + /** * required bytes value = 1; */ @@ -17382,7 +17428,7 @@ public interface RpbContentOrBuilder extends * links to other resources * */ - java.util.List + java.util.List getLinksList(); /** * repeated .RpbLink links = 6; @@ -17407,7 +17453,7 @@ public interface RpbContentOrBuilder extends * links to other resources * */ - java.util.List + java.util.List getLinksOrBuilderList(); /** * repeated .RpbLink links = 6; @@ -17444,7 +17490,7 @@ com.basho.riak.protobuf.RiakKvPB.RpbLinkOrBuilder getLinksOrBuilder( * user metadata stored with the object * */ - java.util.List + java.util.List getUsermetaList(); /** * repeated .RpbPair usermeta = 9; @@ -17469,7 +17515,7 @@ com.basho.riak.protobuf.RiakKvPB.RpbLinkOrBuilder getLinksOrBuilder( * user metadata stored with the object * */ - java.util.List + java.util.List getUsermetaOrBuilderList(); /** * repeated .RpbPair usermeta = 9; @@ -17488,7 +17534,7 @@ com.basho.riak.protobuf.RiakPB.RpbPairOrBuilder getUsermetaOrBuilder( * user metadata stored with the object * */ - java.util.List + java.util.List getIndexesList(); /** * repeated .RpbPair indexes = 10; @@ -17513,7 +17559,7 @@ com.basho.riak.protobuf.RiakPB.RpbPairOrBuilder getUsermetaOrBuilder( * user metadata stored with the object * */ - java.util.List + java.util.List getIndexesOrBuilderList(); /** * repeated .RpbPair indexes = 10; @@ -17806,7 +17852,7 @@ public java.util.List getLinksList() { * links to other resources * */ - public java.util.List + public java.util.List getLinksOrBuilderList() { return links_; } @@ -17891,7 +17937,7 @@ public java.util.List getUsermetaList() * user metadata stored with the object * */ - public java.util.List + public java.util.List getUsermetaOrBuilderList() { return usermeta_; } @@ -17946,7 +17992,7 @@ public java.util.List getIndexesList() { * user metadata stored with the object * */ - public java.util.List + public java.util.List getIndexesOrBuilderList() { return indexes_; } @@ -18420,7 +18466,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbContent other) { linksBuilder_ = null; links_ = other.links_; bitField0_ = (bitField0_ & ~0x00000020); - linksBuilder_ = + linksBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getLinksFieldBuilder() : null; } else { @@ -18452,7 +18498,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbContent other) { usermetaBuilder_ = null; usermeta_ = other.usermeta_; bitField0_ = (bitField0_ & ~0x00000100); - usermetaBuilder_ = + usermetaBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getUsermetaFieldBuilder() : null; } else { @@ -18478,7 +18524,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbContent other) { indexesBuilder_ = null; indexes_ = other.indexes_; bitField0_ = (bitField0_ & ~0x00000200); - indexesBuilder_ = + indexesBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getIndexesFieldBuilder() : null; } else { @@ -18495,15 +18541,18 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbContent other) { public final boolean isInitialized() { if (!hasValue()) { + return false; } for (int i = 0; i < getUsermetaCount(); i++) { if (!getUsermeta(i).isInitialized()) { + return false; } } for (int i = 0; i < getIndexesCount(); i++) { if (!getIndexes(i).isInitialized()) { + return false; } } @@ -18975,7 +19024,7 @@ public com.basho.riak.protobuf.RiakKvPB.RpbLinkOrBuilder getLinksOrBuilder( * links to other resources * */ - public java.util.List + public java.util.List getLinksOrBuilderList() { if (linksBuilder_ != null) { return linksBuilder_.getMessageOrBuilderList(); @@ -19013,12 +19062,12 @@ public com.basho.riak.protobuf.RiakKvPB.RpbLink.Builder addLinksBuilder( * links to other resources * */ - public java.util.List + public java.util.List getLinksBuilderList() { return getLinksFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakKvPB.RpbLink, com.basho.riak.protobuf.RiakKvPB.RpbLink.Builder, com.basho.riak.protobuf.RiakKvPB.RpbLinkOrBuilder> + com.basho.riak.protobuf.RiakKvPB.RpbLink, com.basho.riak.protobuf.RiakKvPB.RpbLink.Builder, com.basho.riak.protobuf.RiakKvPB.RpbLinkOrBuilder> getLinksFieldBuilder() { if (linksBuilder_ == null) { linksBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -19351,7 +19400,7 @@ public com.basho.riak.protobuf.RiakPB.RpbPairOrBuilder getUsermetaOrBuilder( * user metadata stored with the object * */ - public java.util.List + public java.util.List getUsermetaOrBuilderList() { if (usermetaBuilder_ != null) { return usermetaBuilder_.getMessageOrBuilderList(); @@ -19389,12 +19438,12 @@ public com.basho.riak.protobuf.RiakPB.RpbPair.Builder addUsermetaBuilder( * user metadata stored with the object * */ - public java.util.List + public java.util.List getUsermetaBuilderList() { return getUsermetaFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakPB.RpbPair, com.basho.riak.protobuf.RiakPB.RpbPair.Builder, com.basho.riak.protobuf.RiakPB.RpbPairOrBuilder> + com.basho.riak.protobuf.RiakPB.RpbPair, com.basho.riak.protobuf.RiakPB.RpbPair.Builder, com.basho.riak.protobuf.RiakPB.RpbPairOrBuilder> getUsermetaFieldBuilder() { if (usermetaBuilder_ == null) { usermetaBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -19663,7 +19712,7 @@ public com.basho.riak.protobuf.RiakPB.RpbPairOrBuilder getIndexesOrBuilder( * user metadata stored with the object * */ - public java.util.List + public java.util.List getIndexesOrBuilderList() { if (indexesBuilder_ != null) { return indexesBuilder_.getMessageOrBuilderList(); @@ -19701,12 +19750,12 @@ public com.basho.riak.protobuf.RiakPB.RpbPair.Builder addIndexesBuilder( * user metadata stored with the object * */ - public java.util.List + public java.util.List getIndexesBuilderList() { return getIndexesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakPB.RpbPair, com.basho.riak.protobuf.RiakPB.RpbPair.Builder, com.basho.riak.protobuf.RiakPB.RpbPairOrBuilder> + com.basho.riak.protobuf.RiakPB.RpbPair, com.basho.riak.protobuf.RiakPB.RpbPair.Builder, com.basho.riak.protobuf.RiakPB.RpbPairOrBuilder> getIndexesFieldBuilder() { if (indexesBuilder_ == null) { indexesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -19766,6 +19815,7 @@ public Builder clearDeleted() { public interface RpbLinkOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbLink) com.google.protobuf.MessageOrBuilder { + /** * optional bytes bucket = 1; */ @@ -20335,6 +20385,7 @@ public Builder clearTag() { public interface RpbCounterUpdateReqOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbCounterUpdateReq) com.google.protobuf.MessageOrBuilder { + /** * required bytes bucket = 1; */ @@ -20960,12 +21011,15 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbCounterUpdateReq ot public final boolean isInitialized() { if (!hasBucket()) { + return false; } if (!hasKey()) { + return false; } if (!hasAmount()) { + return false; } return true; @@ -21234,6 +21288,7 @@ public Builder clearReturnvalue() { public interface RpbCounterUpdateRespOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbCounterUpdateResp) com.google.protobuf.MessageOrBuilder { + /** * optional sint64 value = 1; */ @@ -21638,6 +21693,7 @@ public Builder clearValue() { public interface RpbCounterGetReqOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbCounterGetReq) com.google.protobuf.MessageOrBuilder { + /** * required bytes bucket = 1; */ @@ -22213,9 +22269,11 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbCounterGetReq other public final boolean isInitialized() { if (!hasBucket()) { + return false; } if (!hasKey()) { + return false; } return true; @@ -22452,6 +22510,7 @@ public Builder clearNotfoundOk() { public interface RpbCounterGetRespOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbCounterGetResp) com.google.protobuf.MessageOrBuilder { + /** * optional sint64 value = 1; */ @@ -22856,6 +22915,7 @@ public Builder clearValue() { public interface RpbGetBucketKeyPreflistReqOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbGetBucketKeyPreflistReq) com.google.protobuf.MessageOrBuilder { + /** * required bytes bucket = 1; */ @@ -23293,9 +23353,11 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbGetBucketKeyPreflis public final boolean isInitialized() { if (!hasBucket()) { + return false; } if (!hasKey()) { + return false; } return true; @@ -23439,10 +23501,11 @@ public Builder clearType() { public interface RpbGetBucketKeyPreflistRespOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbGetBucketKeyPreflistResp) com.google.protobuf.MessageOrBuilder { + /** * repeated .RpbBucketKeyPreflistItem preflist = 1; */ - java.util.List + java.util.List getPreflistList(); /** * repeated .RpbBucketKeyPreflistItem preflist = 1; @@ -23455,7 +23518,7 @@ public interface RpbGetBucketKeyPreflistRespOrBuilder extends /** * repeated .RpbBucketKeyPreflistItem preflist = 1; */ - java.util.List + java.util.List getPreflistOrBuilderList(); /** * repeated .RpbBucketKeyPreflistItem preflist = 1; @@ -23580,7 +23643,7 @@ public java.util.List /** * repeated .RpbBucketKeyPreflistItem preflist = 1; */ - public java.util.List + public java.util.List getPreflistOrBuilderList() { return preflist_; } @@ -23839,7 +23902,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbGetBucketKeyPreflis preflistBuilder_ = null; preflist_ = other.preflist_; bitField0_ = (bitField0_ & ~0x00000001); - preflistBuilder_ = + preflistBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getPreflistFieldBuilder() : null; } else { @@ -23854,6 +23917,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbGetBucketKeyPreflis public final boolean isInitialized() { for (int i = 0; i < getPreflistCount(); i++) { if (!getPreflist(i).isInitialized()) { + return false; } } @@ -24074,7 +24138,7 @@ public com.basho.riak.protobuf.RiakKvPB.RpbBucketKeyPreflistItemOrBuilder getPre /** * repeated .RpbBucketKeyPreflistItem preflist = 1; */ - public java.util.List + public java.util.List getPreflistOrBuilderList() { if (preflistBuilder_ != null) { return preflistBuilder_.getMessageOrBuilderList(); @@ -24100,12 +24164,12 @@ public com.basho.riak.protobuf.RiakKvPB.RpbBucketKeyPreflistItem.Builder addPref /** * repeated .RpbBucketKeyPreflistItem preflist = 1; */ - public java.util.List + public java.util.List getPreflistBuilderList() { return getPreflistFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakKvPB.RpbBucketKeyPreflistItem, com.basho.riak.protobuf.RiakKvPB.RpbBucketKeyPreflistItem.Builder, com.basho.riak.protobuf.RiakKvPB.RpbBucketKeyPreflistItemOrBuilder> + com.basho.riak.protobuf.RiakKvPB.RpbBucketKeyPreflistItem, com.basho.riak.protobuf.RiakKvPB.RpbBucketKeyPreflistItem.Builder, com.basho.riak.protobuf.RiakKvPB.RpbBucketKeyPreflistItemOrBuilder> getPreflistFieldBuilder() { if (preflistBuilder_ == null) { preflistBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -24133,6 +24197,7 @@ public com.basho.riak.protobuf.RiakKvPB.RpbBucketKeyPreflistItem.Builder addPref public interface RpbBucketKeyPreflistItemOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbBucketKeyPreflistItem) com.google.protobuf.MessageOrBuilder { + /** * required int64 partition = 1; */ @@ -24574,12 +24639,15 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbBucketKeyPreflistIt public final boolean isInitialized() { if (!hasPartition()) { + return false; } if (!hasNode()) { + return false; } if (!hasPrimary()) { + return false; } return true; @@ -24717,6 +24785,7 @@ public Builder clearPrimary() { public interface RpbCoverageReqOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbCoverageReq) com.google.protobuf.MessageOrBuilder { + /** * optional bytes type = 1; * @@ -25344,6 +25413,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbCoverageReq other) public final boolean isInitialized() { if (!hasBucket()) { + return false; } return true; @@ -25667,10 +25737,11 @@ public Builder clearUnavailableCover() { public interface RpbCoverageRespOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbCoverageResp) com.google.protobuf.MessageOrBuilder { + /** * repeated .RpbCoverageEntry entries = 1; */ - java.util.List + java.util.List getEntriesList(); /** * repeated .RpbCoverageEntry entries = 1; @@ -25683,7 +25754,7 @@ public interface RpbCoverageRespOrBuilder extends /** * repeated .RpbCoverageEntry entries = 1; */ - java.util.List + java.util.List getEntriesOrBuilderList(); /** * repeated .RpbCoverageEntry entries = 1; @@ -25808,7 +25879,7 @@ public java.util.List getEntr /** * repeated .RpbCoverageEntry entries = 1; */ - public java.util.List + public java.util.List getEntriesOrBuilderList() { return entries_; } @@ -26067,7 +26138,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbCoverageResp other) entriesBuilder_ = null; entries_ = other.entries_; bitField0_ = (bitField0_ & ~0x00000001); - entriesBuilder_ = + entriesBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getEntriesFieldBuilder() : null; } else { @@ -26082,6 +26153,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbCoverageResp other) public final boolean isInitialized() { for (int i = 0; i < getEntriesCount(); i++) { if (!getEntries(i).isInitialized()) { + return false; } } @@ -26302,7 +26374,7 @@ public com.basho.riak.protobuf.RiakKvPB.RpbCoverageEntryOrBuilder getEntriesOrBu /** * repeated .RpbCoverageEntry entries = 1; */ - public java.util.List + public java.util.List getEntriesOrBuilderList() { if (entriesBuilder_ != null) { return entriesBuilder_.getMessageOrBuilderList(); @@ -26328,12 +26400,12 @@ public com.basho.riak.protobuf.RiakKvPB.RpbCoverageEntry.Builder addEntriesBuild /** * repeated .RpbCoverageEntry entries = 1; */ - public java.util.List + public java.util.List getEntriesBuilderList() { return getEntriesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakKvPB.RpbCoverageEntry, com.basho.riak.protobuf.RiakKvPB.RpbCoverageEntry.Builder, com.basho.riak.protobuf.RiakKvPB.RpbCoverageEntryOrBuilder> + com.basho.riak.protobuf.RiakKvPB.RpbCoverageEntry, com.basho.riak.protobuf.RiakKvPB.RpbCoverageEntry.Builder, com.basho.riak.protobuf.RiakKvPB.RpbCoverageEntryOrBuilder> getEntriesFieldBuilder() { if (entriesBuilder_ == null) { entriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -26361,6 +26433,7 @@ public com.basho.riak.protobuf.RiakKvPB.RpbCoverageEntry.Builder addEntriesBuild public interface RpbCoverageEntryOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbCoverageEntry) com.google.protobuf.MessageOrBuilder { + /** * required bytes ip = 1; */ @@ -26880,12 +26953,15 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakKvPB.RpbCoverageEntry other public final boolean isInitialized() { if (!hasIp()) { + return false; } if (!hasPort()) { + return false; } if (!hasCoverContext()) { + return false; } return true; diff --git a/src/main/java/com/basho/riak/protobuf/RiakMessageCodes.java b/src/main/java/com/basho/riak/protobuf/RiakMessageCodes.java index fc914fcb5..fd007cd23 100644 --- a/src/main/java/com/basho/riak/protobuf/RiakMessageCodes.java +++ b/src/main/java/com/basho/riak/protobuf/RiakMessageCodes.java @@ -77,4 +77,5 @@ public final class RiakMessageCodes { public static final byte MSG_AuthReq = (byte)253; public static final byte MSG_AuthResp = (byte)254; public static final byte MSG_StartTls = (byte)255; -} + +} \ No newline at end of file diff --git a/src/main/java/com/basho/riak/protobuf/RiakPB.java b/src/main/java/com/basho/riak/protobuf/RiakPB.java index e1cf6036b..f14acd2be 100644 --- a/src/main/java/com/basho/riak/protobuf/RiakPB.java +++ b/src/main/java/com/basho/riak/protobuf/RiakPB.java @@ -11,6 +11,7 @@ public static void registerAllExtensions( public interface RpbErrorRespOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbErrorResp) com.google.protobuf.MessageOrBuilder { + /** * required bytes errmsg = 1; */ @@ -402,9 +403,11 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakPB.RpbErrorResp other) { public final boolean isInitialized() { if (!hasErrmsg()) { + return false; } if (!hasErrcode()) { + return false; } return true; @@ -510,6 +513,7 @@ public Builder clearErrcode() { public interface RpbGetServerInfoRespOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbGetServerInfoResp) com.google.protobuf.MessageOrBuilder { + /** * optional bytes node = 1; */ @@ -998,6 +1002,7 @@ public Builder clearServerVersion() { public interface RpbPairOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbPair) com.google.protobuf.MessageOrBuilder { + /** * required bytes key = 1; */ @@ -1385,6 +1390,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakPB.RpbPair other) { public final boolean isInitialized() { if (!hasKey()) { + return false; } return true; @@ -1493,6 +1499,7 @@ public Builder clearValue() { public interface RpbGetBucketReqOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbGetBucketReq) com.google.protobuf.MessageOrBuilder { + /** * required bytes bucket = 1; */ @@ -1880,6 +1887,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakPB.RpbGetBucketReq other) { public final boolean isInitialized() { if (!hasBucket()) { + return false; } return true; @@ -1988,6 +1996,7 @@ public Builder clearType() { public interface RpbGetBucketRespOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbGetBucketResp) com.google.protobuf.MessageOrBuilder { + /** * required .RpbBucketProps props = 1; */ @@ -2360,9 +2369,11 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakPB.RpbGetBucketResp other) public final boolean isInitialized() { if (!hasProps()) { + return false; } if (!getProps().isInitialized()) { + return false; } return true; @@ -2490,7 +2501,7 @@ public com.basho.riak.protobuf.RiakPB.RpbBucketPropsOrBuilder getPropsOrBuilder( * required .RpbBucketProps props = 1; */ private com.google.protobuf.SingleFieldBuilder< - com.basho.riak.protobuf.RiakPB.RpbBucketProps, com.basho.riak.protobuf.RiakPB.RpbBucketProps.Builder, com.basho.riak.protobuf.RiakPB.RpbBucketPropsOrBuilder> + com.basho.riak.protobuf.RiakPB.RpbBucketProps, com.basho.riak.protobuf.RiakPB.RpbBucketProps.Builder, com.basho.riak.protobuf.RiakPB.RpbBucketPropsOrBuilder> getPropsFieldBuilder() { if (propsBuilder_ == null) { propsBuilder_ = new com.google.protobuf.SingleFieldBuilder< @@ -2517,6 +2528,7 @@ public com.basho.riak.protobuf.RiakPB.RpbBucketPropsOrBuilder getPropsOrBuilder( public interface RpbSetBucketReqOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbSetBucketReq) com.google.protobuf.MessageOrBuilder { + /** * required bytes bucket = 1; */ @@ -2985,12 +2997,15 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakPB.RpbSetBucketReq other) { public final boolean isInitialized() { if (!hasBucket()) { + return false; } if (!hasProps()) { + return false; } if (!getProps().isInitialized()) { + return false; } return true; @@ -3153,7 +3168,7 @@ public com.basho.riak.protobuf.RiakPB.RpbBucketPropsOrBuilder getPropsOrBuilder( * required .RpbBucketProps props = 2; */ private com.google.protobuf.SingleFieldBuilder< - com.basho.riak.protobuf.RiakPB.RpbBucketProps, com.basho.riak.protobuf.RiakPB.RpbBucketProps.Builder, com.basho.riak.protobuf.RiakPB.RpbBucketPropsOrBuilder> + com.basho.riak.protobuf.RiakPB.RpbBucketProps, com.basho.riak.protobuf.RiakPB.RpbBucketProps.Builder, com.basho.riak.protobuf.RiakPB.RpbBucketPropsOrBuilder> getPropsFieldBuilder() { if (propsBuilder_ == null) { propsBuilder_ = new com.google.protobuf.SingleFieldBuilder< @@ -3215,6 +3230,7 @@ public Builder clearType() { public interface RpbResetBucketReqOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbResetBucketReq) com.google.protobuf.MessageOrBuilder { + /** * required bytes bucket = 1; */ @@ -3602,6 +3618,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakPB.RpbResetBucketReq other) public final boolean isInitialized() { if (!hasBucket()) { + return false; } return true; @@ -3710,6 +3727,7 @@ public Builder clearType() { public interface RpbGetBucketTypeReqOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbGetBucketTypeReq) com.google.protobuf.MessageOrBuilder { + /** * required bytes type = 1; */ @@ -4051,6 +4069,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakPB.RpbGetBucketTypeReq othe public final boolean isInitialized() { if (!hasType()) { + return false; } return true; @@ -4124,6 +4143,7 @@ public Builder clearType() { public interface RpbSetBucketTypeReqOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbSetBucketTypeReq) com.google.protobuf.MessageOrBuilder { + /** * required bytes type = 1; */ @@ -4546,12 +4566,15 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakPB.RpbSetBucketTypeReq othe public final boolean isInitialized() { if (!hasType()) { + return false; } if (!hasProps()) { + return false; } if (!getProps().isInitialized()) { + return false; } return true; @@ -4714,7 +4737,7 @@ public com.basho.riak.protobuf.RiakPB.RpbBucketPropsOrBuilder getPropsOrBuilder( * required .RpbBucketProps props = 2; */ private com.google.protobuf.SingleFieldBuilder< - com.basho.riak.protobuf.RiakPB.RpbBucketProps, com.basho.riak.protobuf.RiakPB.RpbBucketProps.Builder, com.basho.riak.protobuf.RiakPB.RpbBucketPropsOrBuilder> + com.basho.riak.protobuf.RiakPB.RpbBucketProps, com.basho.riak.protobuf.RiakPB.RpbBucketProps.Builder, com.basho.riak.protobuf.RiakPB.RpbBucketPropsOrBuilder> getPropsFieldBuilder() { if (propsBuilder_ == null) { propsBuilder_ = new com.google.protobuf.SingleFieldBuilder< @@ -4741,6 +4764,7 @@ public com.basho.riak.protobuf.RiakPB.RpbBucketPropsOrBuilder getPropsOrBuilder( public interface RpbModFunOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbModFun) com.google.protobuf.MessageOrBuilder { + /** * required bytes module = 1; */ @@ -5134,9 +5158,11 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakPB.RpbModFun other) { public final boolean isInitialized() { if (!hasModule()) { + return false; } if (!hasFunction()) { + return false; } return true; @@ -5245,6 +5271,7 @@ public Builder clearFunction() { public interface RpbCommitHookOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbCommitHook) com.google.protobuf.MessageOrBuilder { + /** * optional .RpbModFun modfun = 1; */ @@ -5664,6 +5691,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakPB.RpbCommitHook other) { public final boolean isInitialized() { if (hasModfun()) { if (!getModfun().isInitialized()) { + return false; } } @@ -5792,7 +5820,7 @@ public com.basho.riak.protobuf.RiakPB.RpbModFunOrBuilder getModfunOrBuilder() { * optional .RpbModFun modfun = 1; */ private com.google.protobuf.SingleFieldBuilder< - com.basho.riak.protobuf.RiakPB.RpbModFun, com.basho.riak.protobuf.RiakPB.RpbModFun.Builder, com.basho.riak.protobuf.RiakPB.RpbModFunOrBuilder> + com.basho.riak.protobuf.RiakPB.RpbModFun, com.basho.riak.protobuf.RiakPB.RpbModFun.Builder, com.basho.riak.protobuf.RiakPB.RpbModFunOrBuilder> getModfunFieldBuilder() { if (modfunBuilder_ == null) { modfunBuilder_ = new com.google.protobuf.SingleFieldBuilder< @@ -5854,6 +5882,7 @@ public Builder clearName() { public interface RpbBucketPropsOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbBucketProps) com.google.protobuf.MessageOrBuilder { + /** * optional uint32 n_val = 1; * @@ -5892,7 +5921,7 @@ public interface RpbBucketPropsOrBuilder extends /** * repeated .RpbCommitHook precommit = 4; */ - java.util.List + java.util.List getPrecommitList(); /** * repeated .RpbCommitHook precommit = 4; @@ -5905,7 +5934,7 @@ public interface RpbBucketPropsOrBuilder extends /** * repeated .RpbCommitHook precommit = 4; */ - java.util.List + java.util.List getPrecommitOrBuilderList(); /** * repeated .RpbCommitHook precommit = 4; @@ -5925,7 +5954,7 @@ com.basho.riak.protobuf.RiakPB.RpbCommitHookOrBuilder getPrecommitOrBuilder( /** * repeated .RpbCommitHook postcommit = 6; */ - java.util.List + java.util.List getPostcommitList(); /** * repeated .RpbCommitHook postcommit = 6; @@ -5938,7 +5967,7 @@ com.basho.riak.protobuf.RiakPB.RpbCommitHookOrBuilder getPrecommitOrBuilder( /** * repeated .RpbCommitHook postcommit = 6; */ - java.util.List + java.util.List getPostcommitOrBuilderList(); /** * repeated .RpbCommitHook postcommit = 6; @@ -6547,6 +6576,7 @@ public enum RpbReplMode */ public static final int TRUE_VALUE = 3; + public final int getNumber() { return value; } public static RpbReplMode valueOf(int value) { @@ -6671,7 +6701,7 @@ public java.util.List getPrecommit /** * repeated .RpbCommitHook precommit = 4; */ - public java.util.List + public java.util.List getPrecommitOrBuilderList() { return precommit_; } @@ -6721,7 +6751,7 @@ public java.util.List getPostcommi /** * repeated .RpbCommitHook postcommit = 6; */ - public java.util.List + public java.util.List getPostcommitOrBuilderList() { return postcommit_; } @@ -7854,7 +7884,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakPB.RpbBucketProps other) { precommitBuilder_ = null; precommit_ = other.precommit_; bitField0_ = (bitField0_ & ~0x00000008); - precommitBuilder_ = + precommitBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getPrecommitFieldBuilder() : null; } else { @@ -7883,7 +7913,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakPB.RpbBucketProps other) { postcommitBuilder_ = null; postcommit_ = other.postcommit_; bitField0_ = (bitField0_ & ~0x00000020); - postcommitBuilder_ = + postcommitBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getPostcommitFieldBuilder() : null; } else { @@ -7967,21 +7997,25 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakPB.RpbBucketProps other) { public final boolean isInitialized() { for (int i = 0; i < getPrecommitCount(); i++) { if (!getPrecommit(i).isInitialized()) { + return false; } } for (int i = 0; i < getPostcommitCount(); i++) { if (!getPostcommit(i).isInitialized()) { + return false; } } if (hasChashKeyfun()) { if (!getChashKeyfun().isInitialized()) { + return false; } } if (hasLinkfun()) { if (!getLinkfun().isInitialized()) { + return false; } } @@ -8314,7 +8348,7 @@ public com.basho.riak.protobuf.RiakPB.RpbCommitHookOrBuilder getPrecommitOrBuild /** * repeated .RpbCommitHook precommit = 4; */ - public java.util.List + public java.util.List getPrecommitOrBuilderList() { if (precommitBuilder_ != null) { return precommitBuilder_.getMessageOrBuilderList(); @@ -8340,12 +8374,12 @@ public com.basho.riak.protobuf.RiakPB.RpbCommitHook.Builder addPrecommitBuilder( /** * repeated .RpbCommitHook precommit = 4; */ - public java.util.List + public java.util.List getPrecommitBuilderList() { return getPrecommitFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakPB.RpbCommitHook, com.basho.riak.protobuf.RiakPB.RpbCommitHook.Builder, com.basho.riak.protobuf.RiakPB.RpbCommitHookOrBuilder> + com.basho.riak.protobuf.RiakPB.RpbCommitHook, com.basho.riak.protobuf.RiakPB.RpbCommitHook.Builder, com.basho.riak.protobuf.RiakPB.RpbCommitHookOrBuilder> getPrecommitFieldBuilder() { if (precommitBuilder_ == null) { precommitBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -8586,7 +8620,7 @@ public com.basho.riak.protobuf.RiakPB.RpbCommitHookOrBuilder getPostcommitOrBuil /** * repeated .RpbCommitHook postcommit = 6; */ - public java.util.List + public java.util.List getPostcommitOrBuilderList() { if (postcommitBuilder_ != null) { return postcommitBuilder_.getMessageOrBuilderList(); @@ -8612,12 +8646,12 @@ public com.basho.riak.protobuf.RiakPB.RpbCommitHook.Builder addPostcommitBuilder /** * repeated .RpbCommitHook postcommit = 6; */ - public java.util.List + public java.util.List getPostcommitBuilderList() { return getPostcommitFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakPB.RpbCommitHook, com.basho.riak.protobuf.RiakPB.RpbCommitHook.Builder, com.basho.riak.protobuf.RiakPB.RpbCommitHookOrBuilder> + com.basho.riak.protobuf.RiakPB.RpbCommitHook, com.basho.riak.protobuf.RiakPB.RpbCommitHook.Builder, com.basho.riak.protobuf.RiakPB.RpbCommitHookOrBuilder> getPostcommitFieldBuilder() { if (postcommitBuilder_ == null) { postcommitBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -8766,7 +8800,7 @@ public com.basho.riak.protobuf.RiakPB.RpbModFunOrBuilder getChashKeyfunOrBuilder * optional .RpbModFun chash_keyfun = 8; */ private com.google.protobuf.SingleFieldBuilder< - com.basho.riak.protobuf.RiakPB.RpbModFun, com.basho.riak.protobuf.RiakPB.RpbModFun.Builder, com.basho.riak.protobuf.RiakPB.RpbModFunOrBuilder> + com.basho.riak.protobuf.RiakPB.RpbModFun, com.basho.riak.protobuf.RiakPB.RpbModFun.Builder, com.basho.riak.protobuf.RiakPB.RpbModFunOrBuilder> getChashKeyfunFieldBuilder() { if (chashKeyfunBuilder_ == null) { chashKeyfunBuilder_ = new com.google.protobuf.SingleFieldBuilder< @@ -8918,7 +8952,7 @@ public com.basho.riak.protobuf.RiakPB.RpbModFunOrBuilder getLinkfunOrBuilder() { * */ private com.google.protobuf.SingleFieldBuilder< - com.basho.riak.protobuf.RiakPB.RpbModFun, com.basho.riak.protobuf.RiakPB.RpbModFun.Builder, com.basho.riak.protobuf.RiakPB.RpbModFunOrBuilder> + com.basho.riak.protobuf.RiakPB.RpbModFun, com.basho.riak.protobuf.RiakPB.RpbModFun.Builder, com.basho.riak.protobuf.RiakPB.RpbModFunOrBuilder> getLinkfunFieldBuilder() { if (linkfunBuilder_ == null) { linkfunBuilder_ = new com.google.protobuf.SingleFieldBuilder< @@ -9709,6 +9743,7 @@ public Builder clearHllPrecision() { public interface RpbAuthReqOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbAuthReq) com.google.protobuf.MessageOrBuilder { + /** * required bytes user = 1; */ @@ -10100,9 +10135,11 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakPB.RpbAuthReq other) { public final boolean isInitialized() { if (!hasUser()) { + return false; } if (!hasPassword()) { + return false; } return true; diff --git a/src/main/java/com/basho/riak/protobuf/RiakSearchPB.java b/src/main/java/com/basho/riak/protobuf/RiakSearchPB.java index 8b2bf7149..bbbe010fe 100644 --- a/src/main/java/com/basho/riak/protobuf/RiakSearchPB.java +++ b/src/main/java/com/basho/riak/protobuf/RiakSearchPB.java @@ -11,10 +11,11 @@ public static void registerAllExtensions( public interface RpbSearchDocOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbSearchDoc) com.google.protobuf.MessageOrBuilder { + /** * repeated .RpbPair fields = 1; */ - java.util.List + java.util.List getFieldsList(); /** * repeated .RpbPair fields = 1; @@ -27,7 +28,7 @@ public interface RpbSearchDocOrBuilder extends /** * repeated .RpbPair fields = 1; */ - java.util.List + java.util.List getFieldsOrBuilderList(); /** * repeated .RpbPair fields = 1; @@ -148,7 +149,7 @@ public java.util.List getFieldsList() { /** * repeated .RpbPair fields = 1; */ - public java.util.List + public java.util.List getFieldsOrBuilderList() { return fields_; } @@ -403,7 +404,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakSearchPB.RpbSearchDoc other fieldsBuilder_ = null; fields_ = other.fields_; bitField0_ = (bitField0_ & ~0x00000001); - fieldsBuilder_ = + fieldsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getFieldsFieldBuilder() : null; } else { @@ -418,7 +419,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakSearchPB.RpbSearchDoc other public final boolean isInitialized() { for (int i = 0; i < getFieldsCount(); i++) { if (!getFields(i).isInitialized()) { - + return false; } } @@ -639,7 +640,7 @@ public com.basho.riak.protobuf.RiakPB.RpbPairOrBuilder getFieldsOrBuilder( /** * repeated .RpbPair fields = 1; */ - public java.util.List + public java.util.List getFieldsOrBuilderList() { if (fieldsBuilder_ != null) { return fieldsBuilder_.getMessageOrBuilderList(); @@ -665,12 +666,12 @@ public com.basho.riak.protobuf.RiakPB.RpbPair.Builder addFieldsBuilder( /** * repeated .RpbPair fields = 1; */ - public java.util.List + public java.util.List getFieldsBuilderList() { return getFieldsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakPB.RpbPair, com.basho.riak.protobuf.RiakPB.RpbPair.Builder, com.basho.riak.protobuf.RiakPB.RpbPairOrBuilder> + com.basho.riak.protobuf.RiakPB.RpbPair, com.basho.riak.protobuf.RiakPB.RpbPair.Builder, com.basho.riak.protobuf.RiakPB.RpbPairOrBuilder> getFieldsFieldBuilder() { if (fieldsBuilder_ == null) { fieldsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -698,6 +699,7 @@ public com.basho.riak.protobuf.RiakPB.RpbPair.Builder addFieldsBuilder( public interface RpbSearchQueryReqOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbSearchQueryReq) com.google.protobuf.MessageOrBuilder { + /** * required bytes q = 1; * @@ -1647,11 +1649,11 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakSearchPB.RpbSearchQueryReq public final boolean isInitialized() { if (!hasQ()) { - + return false; } if (!hasIndex()) { - + return false; } return true; @@ -2243,6 +2245,7 @@ public Builder clearPresort() { public interface RpbSearchQueryRespOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbSearchQueryResp) com.google.protobuf.MessageOrBuilder { + /** * repeated .RpbSearchDoc docs = 1; * @@ -2250,7 +2253,7 @@ public interface RpbSearchQueryRespOrBuilder extends * Result documents * */ - java.util.List + java.util.List getDocsList(); /** * repeated .RpbSearchDoc docs = 1; @@ -2275,7 +2278,7 @@ public interface RpbSearchQueryRespOrBuilder extends * Result documents * */ - java.util.List + java.util.List getDocsOrBuilderList(); /** * repeated .RpbSearchDoc docs = 1; @@ -2453,7 +2456,7 @@ public java.util.List getDocs * Result documents * */ - public java.util.List + public java.util.List getDocsOrBuilderList() { return docs_; } @@ -2796,7 +2799,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakSearchPB.RpbSearchQueryResp docsBuilder_ = null; docs_ = other.docs_; bitField0_ = (bitField0_ & ~0x00000001); - docsBuilder_ = + docsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getDocsFieldBuilder() : null; } else { @@ -2817,7 +2820,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakSearchPB.RpbSearchQueryResp public final boolean isInitialized() { for (int i = 0; i < getDocsCount(); i++) { if (!getDocs(i).isInitialized()) { - + return false; } } @@ -3098,7 +3101,7 @@ public com.basho.riak.protobuf.RiakSearchPB.RpbSearchDocOrBuilder getDocsOrBuild * Result documents * */ - public java.util.List + public java.util.List getDocsOrBuilderList() { if (docsBuilder_ != null) { return docsBuilder_.getMessageOrBuilderList(); @@ -3136,12 +3139,12 @@ public com.basho.riak.protobuf.RiakSearchPB.RpbSearchDoc.Builder addDocsBuilder( * Result documents * */ - public java.util.List + public java.util.List getDocsBuilderList() { return getDocsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakSearchPB.RpbSearchDoc, com.basho.riak.protobuf.RiakSearchPB.RpbSearchDoc.Builder, com.basho.riak.protobuf.RiakSearchPB.RpbSearchDocOrBuilder> + com.basho.riak.protobuf.RiakSearchPB.RpbSearchDoc, com.basho.riak.protobuf.RiakSearchPB.RpbSearchDoc.Builder, com.basho.riak.protobuf.RiakSearchPB.RpbSearchDocOrBuilder> getDocsFieldBuilder() { if (docsBuilder_ == null) { docsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< diff --git a/src/main/java/com/basho/riak/protobuf/RiakTsPB.java b/src/main/java/com/basho/riak/protobuf/RiakTsPB.java index bef46d3ba..20422b64c 100644 --- a/src/main/java/com/basho/riak/protobuf/RiakTsPB.java +++ b/src/main/java/com/basho/riak/protobuf/RiakTsPB.java @@ -33,6 +33,10 @@ public enum TsColumnType * BOOLEAN = 4; */ BOOLEAN(4, 4), + /** + * BLOB = 5; + */ + BLOB(5, 5), ; /** @@ -55,6 +59,11 @@ public enum TsColumnType * BOOLEAN = 4; */ public static final int BOOLEAN_VALUE = 4; + /** + * BLOB = 5; + */ + public static final int BLOB_VALUE = 5; + public final int getNumber() { return value; } @@ -65,6 +74,7 @@ public static TsColumnType valueOf(int value) { case 2: return DOUBLE; case 3: return TIMESTAMP; case 4: return BOOLEAN; + case 5: return BLOB; default: return null; } } @@ -119,6 +129,7 @@ private TsColumnType(int index, int value) { public interface TsQueryReqOrBuilder extends // @@protoc_insertion_point(interface_extends:TsQueryReq) com.google.protobuf.MessageOrBuilder { + /** * optional .TsInterpolation query = 1; * @@ -622,6 +633,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakTsPB.TsQueryReq other) { public final boolean isInitialized() { if (hasQuery()) { if (!getQuery().isInitialized()) { + return false; } } @@ -786,7 +798,7 @@ public com.basho.riak.protobuf.RiakTsPB.TsInterpolationOrBuilder getQueryOrBuild * */ private com.google.protobuf.SingleFieldBuilder< - com.basho.riak.protobuf.RiakTsPB.TsInterpolation, com.basho.riak.protobuf.RiakTsPB.TsInterpolation.Builder, com.basho.riak.protobuf.RiakTsPB.TsInterpolationOrBuilder> + com.basho.riak.protobuf.RiakTsPB.TsInterpolation, com.basho.riak.protobuf.RiakTsPB.TsInterpolation.Builder, com.basho.riak.protobuf.RiakTsPB.TsInterpolationOrBuilder> getQueryFieldBuilder() { if (queryBuilder_ == null) { queryBuilder_ = new com.google.protobuf.SingleFieldBuilder< @@ -896,10 +908,11 @@ public Builder clearCoverContext() { public interface TsQueryRespOrBuilder extends // @@protoc_insertion_point(interface_extends:TsQueryResp) com.google.protobuf.MessageOrBuilder { + /** * repeated .TsColumnDescription columns = 1; */ - java.util.List + java.util.List getColumnsList(); /** * repeated .TsColumnDescription columns = 1; @@ -912,7 +925,7 @@ public interface TsQueryRespOrBuilder extends /** * repeated .TsColumnDescription columns = 1; */ - java.util.List + java.util.List getColumnsOrBuilderList(); /** * repeated .TsColumnDescription columns = 1; @@ -927,7 +940,7 @@ com.basho.riak.protobuf.RiakTsPB.TsColumnDescriptionOrBuilder getColumnsOrBuilde * 0 to n rows * */ - java.util.List + java.util.List getRowsList(); /** * repeated .TsRow rows = 2; @@ -952,7 +965,7 @@ com.basho.riak.protobuf.RiakTsPB.TsColumnDescriptionOrBuilder getColumnsOrBuilde * 0 to n rows * */ - java.util.List + java.util.List getRowsOrBuilderList(); /** * repeated .TsRow rows = 2; @@ -1103,7 +1116,7 @@ public java.util.List getC /** * repeated .TsColumnDescription columns = 1; */ - public java.util.List + public java.util.List getColumnsOrBuilderList() { return columns_; } @@ -1146,7 +1159,7 @@ public java.util.List getRowsList() { * 0 to n rows * */ - public java.util.List + public java.util.List getRowsOrBuilderList() { return rows_; } @@ -1468,7 +1481,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakTsPB.TsQueryResp other) { columnsBuilder_ = null; columns_ = other.columns_; bitField0_ = (bitField0_ & ~0x00000001); - columnsBuilder_ = + columnsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getColumnsFieldBuilder() : null; } else { @@ -1494,7 +1507,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakTsPB.TsQueryResp other) { rowsBuilder_ = null; rows_ = other.rows_; bitField0_ = (bitField0_ & ~0x00000002); - rowsBuilder_ = + rowsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getRowsFieldBuilder() : null; } else { @@ -1512,6 +1525,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakTsPB.TsQueryResp other) { public final boolean isInitialized() { for (int i = 0; i < getColumnsCount(); i++) { if (!getColumns(i).isInitialized()) { + return false; } } @@ -1732,7 +1746,7 @@ public com.basho.riak.protobuf.RiakTsPB.TsColumnDescriptionOrBuilder getColumnsO /** * repeated .TsColumnDescription columns = 1; */ - public java.util.List + public java.util.List getColumnsOrBuilderList() { if (columnsBuilder_ != null) { return columnsBuilder_.getMessageOrBuilderList(); @@ -1758,12 +1772,12 @@ public com.basho.riak.protobuf.RiakTsPB.TsColumnDescription.Builder addColumnsBu /** * repeated .TsColumnDescription columns = 1; */ - public java.util.List + public java.util.List getColumnsBuilderList() { return getColumnsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakTsPB.TsColumnDescription, com.basho.riak.protobuf.RiakTsPB.TsColumnDescription.Builder, com.basho.riak.protobuf.RiakTsPB.TsColumnDescriptionOrBuilder> + com.basho.riak.protobuf.RiakTsPB.TsColumnDescription, com.basho.riak.protobuf.RiakTsPB.TsColumnDescription.Builder, com.basho.riak.protobuf.RiakTsPB.TsColumnDescriptionOrBuilder> getColumnsFieldBuilder() { if (columnsBuilder_ == null) { columnsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -2032,7 +2046,7 @@ public com.basho.riak.protobuf.RiakTsPB.TsRowOrBuilder getRowsOrBuilder( * 0 to n rows * */ - public java.util.List + public java.util.List getRowsOrBuilderList() { if (rowsBuilder_ != null) { return rowsBuilder_.getMessageOrBuilderList(); @@ -2070,12 +2084,12 @@ public com.basho.riak.protobuf.RiakTsPB.TsRow.Builder addRowsBuilder( * 0 to n rows * */ - public java.util.List + public java.util.List getRowsBuilderList() { return getRowsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakTsPB.TsRow, com.basho.riak.protobuf.RiakTsPB.TsRow.Builder, com.basho.riak.protobuf.RiakTsPB.TsRowOrBuilder> + com.basho.riak.protobuf.RiakTsPB.TsRow, com.basho.riak.protobuf.RiakTsPB.TsRow.Builder, com.basho.riak.protobuf.RiakTsPB.TsRowOrBuilder> getRowsFieldBuilder() { if (rowsBuilder_ == null) { rowsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -2135,6 +2149,7 @@ public Builder clearDone() { public interface TsGetReqOrBuilder extends // @@protoc_insertion_point(interface_extends:TsGetReq) com.google.protobuf.MessageOrBuilder { + /** * required bytes table = 1; */ @@ -2147,7 +2162,7 @@ public interface TsGetReqOrBuilder extends /** * repeated .TsCell key = 2; */ - java.util.List + java.util.List getKeyList(); /** * repeated .TsCell key = 2; @@ -2160,7 +2175,7 @@ public interface TsGetReqOrBuilder extends /** * repeated .TsCell key = 2; */ - java.util.List + java.util.List getKeyOrBuilderList(); /** * repeated .TsCell key = 2; @@ -2316,7 +2331,7 @@ public java.util.List getKeyList() { /** * repeated .TsCell key = 2; */ - public java.util.List + public java.util.List getKeyOrBuilderList() { return key_; } @@ -2617,7 +2632,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakTsPB.TsGetReq other) { keyBuilder_ = null; key_ = other.key_; bitField0_ = (bitField0_ & ~0x00000002); - keyBuilder_ = + keyBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getKeyFieldBuilder() : null; } else { @@ -2634,6 +2649,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakTsPB.TsGetReq other) { public final boolean isInitialized() { if (!hasTable()) { + return false; } return true; @@ -2888,7 +2904,7 @@ public com.basho.riak.protobuf.RiakTsPB.TsCellOrBuilder getKeyOrBuilder( /** * repeated .TsCell key = 2; */ - public java.util.List + public java.util.List getKeyOrBuilderList() { if (keyBuilder_ != null) { return keyBuilder_.getMessageOrBuilderList(); @@ -2914,12 +2930,12 @@ public com.basho.riak.protobuf.RiakTsPB.TsCell.Builder addKeyBuilder( /** * repeated .TsCell key = 2; */ - public java.util.List + public java.util.List getKeyBuilderList() { return getKeyFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakTsPB.TsCell, com.basho.riak.protobuf.RiakTsPB.TsCell.Builder, com.basho.riak.protobuf.RiakTsPB.TsCellOrBuilder> + com.basho.riak.protobuf.RiakTsPB.TsCell, com.basho.riak.protobuf.RiakTsPB.TsCell.Builder, com.basho.riak.protobuf.RiakTsPB.TsCellOrBuilder> getKeyFieldBuilder() { if (keyBuilder_ == null) { keyBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -2979,10 +2995,11 @@ public Builder clearTimeout() { public interface TsGetRespOrBuilder extends // @@protoc_insertion_point(interface_extends:TsGetResp) com.google.protobuf.MessageOrBuilder { + /** * repeated .TsColumnDescription columns = 1; */ - java.util.List + java.util.List getColumnsList(); /** * repeated .TsColumnDescription columns = 1; @@ -2995,7 +3012,7 @@ public interface TsGetRespOrBuilder extends /** * repeated .TsColumnDescription columns = 1; */ - java.util.List + java.util.List getColumnsOrBuilderList(); /** * repeated .TsColumnDescription columns = 1; @@ -3010,7 +3027,7 @@ com.basho.riak.protobuf.RiakTsPB.TsColumnDescriptionOrBuilder getColumnsOrBuilde * 0 or 1 rows * */ - java.util.List + java.util.List getRowsList(); /** * repeated .TsRow rows = 2; @@ -3035,7 +3052,7 @@ com.basho.riak.protobuf.RiakTsPB.TsColumnDescriptionOrBuilder getColumnsOrBuilde * 0 or 1 rows * */ - java.util.List + java.util.List getRowsOrBuilderList(); /** * repeated .TsRow rows = 2; @@ -3171,7 +3188,7 @@ public java.util.List getC /** * repeated .TsColumnDescription columns = 1; */ - public java.util.List + public java.util.List getColumnsOrBuilderList() { return columns_; } @@ -3214,7 +3231,7 @@ public java.util.List getRowsList() { * 0 or 1 rows * */ - public java.util.List + public java.util.List getRowsOrBuilderList() { return rows_; } @@ -3505,7 +3522,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakTsPB.TsGetResp other) { columnsBuilder_ = null; columns_ = other.columns_; bitField0_ = (bitField0_ & ~0x00000001); - columnsBuilder_ = + columnsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getColumnsFieldBuilder() : null; } else { @@ -3531,7 +3548,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakTsPB.TsGetResp other) { rowsBuilder_ = null; rows_ = other.rows_; bitField0_ = (bitField0_ & ~0x00000002); - rowsBuilder_ = + rowsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getRowsFieldBuilder() : null; } else { @@ -3546,6 +3563,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakTsPB.TsGetResp other) { public final boolean isInitialized() { for (int i = 0; i < getColumnsCount(); i++) { if (!getColumns(i).isInitialized()) { + return false; } } @@ -3766,7 +3784,7 @@ public com.basho.riak.protobuf.RiakTsPB.TsColumnDescriptionOrBuilder getColumnsO /** * repeated .TsColumnDescription columns = 1; */ - public java.util.List + public java.util.List getColumnsOrBuilderList() { if (columnsBuilder_ != null) { return columnsBuilder_.getMessageOrBuilderList(); @@ -3792,12 +3810,12 @@ public com.basho.riak.protobuf.RiakTsPB.TsColumnDescription.Builder addColumnsBu /** * repeated .TsColumnDescription columns = 1; */ - public java.util.List + public java.util.List getColumnsBuilderList() { return getColumnsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakTsPB.TsColumnDescription, com.basho.riak.protobuf.RiakTsPB.TsColumnDescription.Builder, com.basho.riak.protobuf.RiakTsPB.TsColumnDescriptionOrBuilder> + com.basho.riak.protobuf.RiakTsPB.TsColumnDescription, com.basho.riak.protobuf.RiakTsPB.TsColumnDescription.Builder, com.basho.riak.protobuf.RiakTsPB.TsColumnDescriptionOrBuilder> getColumnsFieldBuilder() { if (columnsBuilder_ == null) { columnsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -4066,7 +4084,7 @@ public com.basho.riak.protobuf.RiakTsPB.TsRowOrBuilder getRowsOrBuilder( * 0 or 1 rows * */ - public java.util.List + public java.util.List getRowsOrBuilderList() { if (rowsBuilder_ != null) { return rowsBuilder_.getMessageOrBuilderList(); @@ -4104,12 +4122,12 @@ public com.basho.riak.protobuf.RiakTsPB.TsRow.Builder addRowsBuilder( * 0 or 1 rows * */ - public java.util.List + public java.util.List getRowsBuilderList() { return getRowsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakTsPB.TsRow, com.basho.riak.protobuf.RiakTsPB.TsRow.Builder, com.basho.riak.protobuf.RiakTsPB.TsRowOrBuilder> + com.basho.riak.protobuf.RiakTsPB.TsRow, com.basho.riak.protobuf.RiakTsPB.TsRow.Builder, com.basho.riak.protobuf.RiakTsPB.TsRowOrBuilder> getRowsFieldBuilder() { if (rowsBuilder_ == null) { rowsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -4137,6 +4155,7 @@ public com.basho.riak.protobuf.RiakTsPB.TsRow.Builder addRowsBuilder( public interface TsPutReqOrBuilder extends // @@protoc_insertion_point(interface_extends:TsPutReq) com.google.protobuf.MessageOrBuilder { + /** * required bytes table = 1; */ @@ -4153,7 +4172,7 @@ public interface TsPutReqOrBuilder extends * optional: omitting it should use table order * */ - java.util.List + java.util.List getColumnsList(); /** * repeated .TsColumnDescription columns = 2; @@ -4178,7 +4197,7 @@ public interface TsPutReqOrBuilder extends * optional: omitting it should use table order * */ - java.util.List + java.util.List getColumnsOrBuilderList(); /** * repeated .TsColumnDescription columns = 2; @@ -4193,7 +4212,7 @@ com.basho.riak.protobuf.RiakTsPB.TsColumnDescriptionOrBuilder getColumnsOrBuilde /** * repeated .TsRow rows = 3; */ - java.util.List + java.util.List getRowsList(); /** * repeated .TsRow rows = 3; @@ -4206,7 +4225,7 @@ com.basho.riak.protobuf.RiakTsPB.TsColumnDescriptionOrBuilder getColumnsOrBuilde /** * repeated .TsRow rows = 3; */ - java.util.List + java.util.List getRowsOrBuilderList(); /** * repeated .TsRow rows = 3; @@ -4367,7 +4386,7 @@ public java.util.List getC * optional: omitting it should use table order * */ - public java.util.List + public java.util.List getColumnsOrBuilderList() { return columns_; } @@ -4414,7 +4433,7 @@ public java.util.List getRowsList() { /** * repeated .TsRow rows = 3; */ - public java.util.List + public java.util.List getRowsOrBuilderList() { return rows_; } @@ -4716,7 +4735,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakTsPB.TsPutReq other) { columnsBuilder_ = null; columns_ = other.columns_; bitField0_ = (bitField0_ & ~0x00000002); - columnsBuilder_ = + columnsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getColumnsFieldBuilder() : null; } else { @@ -4742,7 +4761,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakTsPB.TsPutReq other) { rowsBuilder_ = null; rows_ = other.rows_; bitField0_ = (bitField0_ & ~0x00000004); - rowsBuilder_ = + rowsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getRowsFieldBuilder() : null; } else { @@ -4756,10 +4775,12 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakTsPB.TsPutReq other) { public final boolean isInitialized() { if (!hasTable()) { + return false; } for (int i = 0; i < getColumnsCount(); i++) { if (!getColumns(i).isInitialized()) { + return false; } } @@ -5075,7 +5096,7 @@ public com.basho.riak.protobuf.RiakTsPB.TsColumnDescriptionOrBuilder getColumnsO * optional: omitting it should use table order * */ - public java.util.List + public java.util.List getColumnsOrBuilderList() { if (columnsBuilder_ != null) { return columnsBuilder_.getMessageOrBuilderList(); @@ -5113,12 +5134,12 @@ public com.basho.riak.protobuf.RiakTsPB.TsColumnDescription.Builder addColumnsBu * optional: omitting it should use table order * */ - public java.util.List + public java.util.List getColumnsBuilderList() { return getColumnsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakTsPB.TsColumnDescription, com.basho.riak.protobuf.RiakTsPB.TsColumnDescription.Builder, com.basho.riak.protobuf.RiakTsPB.TsColumnDescriptionOrBuilder> + com.basho.riak.protobuf.RiakTsPB.TsColumnDescription, com.basho.riak.protobuf.RiakTsPB.TsColumnDescription.Builder, com.basho.riak.protobuf.RiakTsPB.TsColumnDescriptionOrBuilder> getColumnsFieldBuilder() { if (columnsBuilder_ == null) { columnsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -5327,7 +5348,7 @@ public com.basho.riak.protobuf.RiakTsPB.TsRowOrBuilder getRowsOrBuilder( /** * repeated .TsRow rows = 3; */ - public java.util.List + public java.util.List getRowsOrBuilderList() { if (rowsBuilder_ != null) { return rowsBuilder_.getMessageOrBuilderList(); @@ -5353,12 +5374,12 @@ public com.basho.riak.protobuf.RiakTsPB.TsRow.Builder addRowsBuilder( /** * repeated .TsRow rows = 3; */ - public java.util.List + public java.util.List getRowsBuilderList() { return getRowsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakTsPB.TsRow, com.basho.riak.protobuf.RiakTsPB.TsRow.Builder, com.basho.riak.protobuf.RiakTsPB.TsRowOrBuilder> + com.basho.riak.protobuf.RiakTsPB.TsRow, com.basho.riak.protobuf.RiakTsPB.TsRow.Builder, com.basho.riak.protobuf.RiakTsPB.TsRowOrBuilder> getRowsFieldBuilder() { if (rowsBuilder_ == null) { rowsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -5699,6 +5720,7 @@ public Builder mergeFrom( public interface TsDelReqOrBuilder extends // @@protoc_insertion_point(interface_extends:TsDelReq) com.google.protobuf.MessageOrBuilder { + /** * required bytes table = 1; */ @@ -5711,7 +5733,7 @@ public interface TsDelReqOrBuilder extends /** * repeated .TsCell key = 2; */ - java.util.List + java.util.List getKeyList(); /** * repeated .TsCell key = 2; @@ -5724,7 +5746,7 @@ public interface TsDelReqOrBuilder extends /** * repeated .TsCell key = 2; */ - java.util.List + java.util.List getKeyOrBuilderList(); /** * repeated .TsCell key = 2; @@ -5894,7 +5916,7 @@ public java.util.List getKeyList() { /** * repeated .TsCell key = 2; */ - public java.util.List + public java.util.List getKeyOrBuilderList() { return key_; } @@ -6224,7 +6246,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakTsPB.TsDelReq other) { keyBuilder_ = null; key_ = other.key_; bitField0_ = (bitField0_ & ~0x00000002); - keyBuilder_ = + keyBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getKeyFieldBuilder() : null; } else { @@ -6244,6 +6266,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakTsPB.TsDelReq other) { public final boolean isInitialized() { if (!hasTable()) { + return false; } return true; @@ -6498,7 +6521,7 @@ public com.basho.riak.protobuf.RiakTsPB.TsCellOrBuilder getKeyOrBuilder( /** * repeated .TsCell key = 2; */ - public java.util.List + public java.util.List getKeyOrBuilderList() { if (keyBuilder_ != null) { return keyBuilder_.getMessageOrBuilderList(); @@ -6524,12 +6547,12 @@ public com.basho.riak.protobuf.RiakTsPB.TsCell.Builder addKeyBuilder( /** * repeated .TsCell key = 2; */ - public java.util.List + public java.util.List getKeyBuilderList() { return getKeyFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakTsPB.TsCell, com.basho.riak.protobuf.RiakTsPB.TsCell.Builder, com.basho.riak.protobuf.RiakTsPB.TsCellOrBuilder> + com.basho.riak.protobuf.RiakTsPB.TsCell, com.basho.riak.protobuf.RiakTsPB.TsCell.Builder, com.basho.riak.protobuf.RiakTsPB.TsCellOrBuilder> getKeyFieldBuilder() { if (keyBuilder_ == null) { keyBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -6937,6 +6960,7 @@ public Builder mergeFrom( public interface TsInterpolationOrBuilder extends // @@protoc_insertion_point(interface_extends:TsInterpolation) com.google.protobuf.MessageOrBuilder { + /** * required bytes base = 1; */ @@ -6949,7 +6973,7 @@ public interface TsInterpolationOrBuilder extends /** * repeated .RpbPair interpolations = 2; */ - java.util.List + java.util.List getInterpolationsList(); /** * repeated .RpbPair interpolations = 2; @@ -6962,7 +6986,7 @@ public interface TsInterpolationOrBuilder extends /** * repeated .RpbPair interpolations = 2; */ - java.util.List + java.util.List getInterpolationsOrBuilderList(); /** * repeated .RpbPair interpolations = 2; @@ -7104,7 +7128,7 @@ public java.util.List getInterpolationsL /** * repeated .RpbPair interpolations = 2; */ - public java.util.List + public java.util.List getInterpolationsOrBuilderList() { return interpolations_; } @@ -7382,7 +7406,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakTsPB.TsInterpolation other) interpolationsBuilder_ = null; interpolations_ = other.interpolations_; bitField0_ = (bitField0_ & ~0x00000002); - interpolationsBuilder_ = + interpolationsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getInterpolationsFieldBuilder() : null; } else { @@ -7396,10 +7420,12 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakTsPB.TsInterpolation other) public final boolean isInitialized() { if (!hasBase()) { + return false; } for (int i = 0; i < getInterpolationsCount(); i++) { if (!getInterpolations(i).isInitialized()) { + return false; } } @@ -7655,7 +7681,7 @@ public com.basho.riak.protobuf.RiakPB.RpbPairOrBuilder getInterpolationsOrBuilde /** * repeated .RpbPair interpolations = 2; */ - public java.util.List + public java.util.List getInterpolationsOrBuilderList() { if (interpolationsBuilder_ != null) { return interpolationsBuilder_.getMessageOrBuilderList(); @@ -7681,12 +7707,12 @@ public com.basho.riak.protobuf.RiakPB.RpbPair.Builder addInterpolationsBuilder( /** * repeated .RpbPair interpolations = 2; */ - public java.util.List + public java.util.List getInterpolationsBuilderList() { return getInterpolationsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakPB.RpbPair, com.basho.riak.protobuf.RiakPB.RpbPair.Builder, com.basho.riak.protobuf.RiakPB.RpbPairOrBuilder> + com.basho.riak.protobuf.RiakPB.RpbPair, com.basho.riak.protobuf.RiakPB.RpbPair.Builder, com.basho.riak.protobuf.RiakPB.RpbPairOrBuilder> getInterpolationsFieldBuilder() { if (interpolationsBuilder_ == null) { interpolationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -7714,6 +7740,7 @@ public com.basho.riak.protobuf.RiakPB.RpbPair.Builder addInterpolationsBuilder( public interface TsColumnDescriptionOrBuilder extends // @@protoc_insertion_point(interface_extends:TsColumnDescription) com.google.protobuf.MessageOrBuilder { + /** * required bytes name = 1; */ @@ -8103,9 +8130,11 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakTsPB.TsColumnDescription ot public final boolean isInitialized() { if (!hasName()) { + return false; } if (!hasType()) { + return false; } return true; @@ -8214,10 +8243,11 @@ public Builder clearType() { public interface TsRowOrBuilder extends // @@protoc_insertion_point(interface_extends:TsRow) com.google.protobuf.MessageOrBuilder { + /** * repeated .TsCell cells = 1; */ - java.util.List + java.util.List getCellsList(); /** * repeated .TsCell cells = 1; @@ -8230,7 +8260,7 @@ public interface TsRowOrBuilder extends /** * repeated .TsCell cells = 1; */ - java.util.List + java.util.List getCellsOrBuilderList(); /** * repeated .TsCell cells = 1; @@ -8351,7 +8381,7 @@ public java.util.List getCellsList() { /** * repeated .TsCell cells = 1; */ - public java.util.List + public java.util.List getCellsOrBuilderList() { return cells_; } @@ -8600,7 +8630,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakTsPB.TsRow other) { cellsBuilder_ = null; cells_ = other.cells_; bitField0_ = (bitField0_ & ~0x00000001); - cellsBuilder_ = + cellsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getCellsFieldBuilder() : null; } else { @@ -8830,7 +8860,7 @@ public com.basho.riak.protobuf.RiakTsPB.TsCellOrBuilder getCellsOrBuilder( /** * repeated .TsCell cells = 1; */ - public java.util.List + public java.util.List getCellsOrBuilderList() { if (cellsBuilder_ != null) { return cellsBuilder_.getMessageOrBuilderList(); @@ -8856,12 +8886,12 @@ public com.basho.riak.protobuf.RiakTsPB.TsCell.Builder addCellsBuilder( /** * repeated .TsCell cells = 1; */ - public java.util.List + public java.util.List getCellsBuilderList() { return getCellsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakTsPB.TsCell, com.basho.riak.protobuf.RiakTsPB.TsCell.Builder, com.basho.riak.protobuf.RiakTsPB.TsCellOrBuilder> + com.basho.riak.protobuf.RiakTsPB.TsCell, com.basho.riak.protobuf.RiakTsPB.TsCell.Builder, com.basho.riak.protobuf.RiakTsPB.TsCellOrBuilder> getCellsFieldBuilder() { if (cellsBuilder_ == null) { cellsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -8889,6 +8919,7 @@ public com.basho.riak.protobuf.RiakTsPB.TsCell.Builder addCellsBuilder( public interface TsCellOrBuilder extends // @@protoc_insertion_point(interface_extends:TsCell) com.google.protobuf.MessageOrBuilder { + /** * optional bytes varchar_value = 1; */ @@ -9600,6 +9631,7 @@ public Builder clearDoubleValue() { public interface TsListKeysReqOrBuilder extends // @@protoc_insertion_point(interface_extends:TsListKeysReq) com.google.protobuf.MessageOrBuilder { + /** * required bytes table = 1; */ @@ -9979,6 +10011,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakTsPB.TsListKeysReq other) { public final boolean isInitialized() { if (!hasTable()) { + return false; } return true; @@ -10084,10 +10117,11 @@ public Builder clearTimeout() { public interface TsListKeysRespOrBuilder extends // @@protoc_insertion_point(interface_extends:TsListKeysResp) com.google.protobuf.MessageOrBuilder { + /** * repeated .TsRow keys = 1; */ - java.util.List + java.util.List getKeysList(); /** * repeated .TsRow keys = 1; @@ -10100,7 +10134,7 @@ public interface TsListKeysRespOrBuilder extends /** * repeated .TsRow keys = 1; */ - java.util.List + java.util.List getKeysOrBuilderList(); /** * repeated .TsRow keys = 1; @@ -10236,7 +10270,7 @@ public java.util.List getKeysList() { /** * repeated .TsRow keys = 1; */ - public java.util.List + public java.util.List getKeysOrBuilderList() { return keys_; } @@ -10516,7 +10550,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakTsPB.TsListKeysResp other) keysBuilder_ = null; keys_ = other.keys_; bitField0_ = (bitField0_ & ~0x00000001); - keysBuilder_ = + keysBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getKeysFieldBuilder() : null; } else { @@ -10749,7 +10783,7 @@ public com.basho.riak.protobuf.RiakTsPB.TsRowOrBuilder getKeysOrBuilder( /** * repeated .TsRow keys = 1; */ - public java.util.List + public java.util.List getKeysOrBuilderList() { if (keysBuilder_ != null) { return keysBuilder_.getMessageOrBuilderList(); @@ -10775,12 +10809,12 @@ public com.basho.riak.protobuf.RiakTsPB.TsRow.Builder addKeysBuilder( /** * repeated .TsRow keys = 1; */ - public java.util.List + public java.util.List getKeysBuilderList() { return getKeysFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakTsPB.TsRow, com.basho.riak.protobuf.RiakTsPB.TsRow.Builder, com.basho.riak.protobuf.RiakTsPB.TsRowOrBuilder> + com.basho.riak.protobuf.RiakTsPB.TsRow, com.basho.riak.protobuf.RiakTsPB.TsRow.Builder, com.basho.riak.protobuf.RiakTsPB.TsRowOrBuilder> getKeysFieldBuilder() { if (keysBuilder_ == null) { keysBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -10840,6 +10874,7 @@ public Builder clearDone() { public interface TsCoverageReqOrBuilder extends // @@protoc_insertion_point(interface_extends:TsCoverageReq) com.google.protobuf.MessageOrBuilder { + /** * optional .TsInterpolation query = 1; * @@ -11446,10 +11481,12 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakTsPB.TsCoverageReq other) { public final boolean isInitialized() { if (!hasTable()) { + return false; } if (hasQuery()) { if (!getQuery().isInitialized()) { + return false; } } @@ -11614,7 +11651,7 @@ public com.basho.riak.protobuf.RiakTsPB.TsInterpolationOrBuilder getQueryOrBuild * */ private com.google.protobuf.SingleFieldBuilder< - com.basho.riak.protobuf.RiakTsPB.TsInterpolation, com.basho.riak.protobuf.RiakTsPB.TsInterpolation.Builder, com.basho.riak.protobuf.RiakTsPB.TsInterpolationOrBuilder> + com.basho.riak.protobuf.RiakTsPB.TsInterpolation, com.basho.riak.protobuf.RiakTsPB.TsInterpolation.Builder, com.basho.riak.protobuf.RiakTsPB.TsInterpolationOrBuilder> getQueryFieldBuilder() { if (queryBuilder_ == null) { queryBuilder_ = new com.google.protobuf.SingleFieldBuilder< @@ -11827,10 +11864,11 @@ public Builder clearUnavailableCover() { public interface TsCoverageRespOrBuilder extends // @@protoc_insertion_point(interface_extends:TsCoverageResp) com.google.protobuf.MessageOrBuilder { + /** * repeated .TsCoverageEntry entries = 1; */ - java.util.List + java.util.List getEntriesList(); /** * repeated .TsCoverageEntry entries = 1; @@ -11843,7 +11881,7 @@ public interface TsCoverageRespOrBuilder extends /** * repeated .TsCoverageEntry entries = 1; */ - java.util.List + java.util.List getEntriesOrBuilderList(); /** * repeated .TsCoverageEntry entries = 1; @@ -11968,7 +12006,7 @@ public java.util.List getEntri /** * repeated .TsCoverageEntry entries = 1; */ - public java.util.List + public java.util.List getEntriesOrBuilderList() { return entries_; } @@ -12227,7 +12265,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakTsPB.TsCoverageResp other) entriesBuilder_ = null; entries_ = other.entries_; bitField0_ = (bitField0_ & ~0x00000001); - entriesBuilder_ = + entriesBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getEntriesFieldBuilder() : null; } else { @@ -12242,6 +12280,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakTsPB.TsCoverageResp other) public final boolean isInitialized() { for (int i = 0; i < getEntriesCount(); i++) { if (!getEntries(i).isInitialized()) { + return false; } } @@ -12462,7 +12501,7 @@ public com.basho.riak.protobuf.RiakTsPB.TsCoverageEntryOrBuilder getEntriesOrBui /** * repeated .TsCoverageEntry entries = 1; */ - public java.util.List + public java.util.List getEntriesOrBuilderList() { if (entriesBuilder_ != null) { return entriesBuilder_.getMessageOrBuilderList(); @@ -12488,12 +12527,12 @@ public com.basho.riak.protobuf.RiakTsPB.TsCoverageEntry.Builder addEntriesBuilde /** * repeated .TsCoverageEntry entries = 1; */ - public java.util.List + public java.util.List getEntriesBuilderList() { return getEntriesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakTsPB.TsCoverageEntry, com.basho.riak.protobuf.RiakTsPB.TsCoverageEntry.Builder, com.basho.riak.protobuf.RiakTsPB.TsCoverageEntryOrBuilder> + com.basho.riak.protobuf.RiakTsPB.TsCoverageEntry, com.basho.riak.protobuf.RiakTsPB.TsCoverageEntry.Builder, com.basho.riak.protobuf.RiakTsPB.TsCoverageEntryOrBuilder> getEntriesFieldBuilder() { if (entriesBuilder_ == null) { entriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -12521,6 +12560,7 @@ public com.basho.riak.protobuf.RiakTsPB.TsCoverageEntry.Builder addEntriesBuilde public interface TsCoverageEntryOrBuilder extends // @@protoc_insertion_point(interface_extends:TsCoverageEntry) com.google.protobuf.MessageOrBuilder { + /** * required bytes ip = 1; */ @@ -13081,16 +13121,20 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakTsPB.TsCoverageEntry other) public final boolean isInitialized() { if (!hasIp()) { + return false; } if (!hasPort()) { + return false; } if (!hasCoverContext()) { + return false; } if (hasRange()) { if (!getRange().isInitialized()) { + return false; } } @@ -13373,7 +13417,7 @@ public com.basho.riak.protobuf.RiakTsPB.TsRangeOrBuilder getRangeOrBuilder() { * */ private com.google.protobuf.SingleFieldBuilder< - com.basho.riak.protobuf.RiakTsPB.TsRange, com.basho.riak.protobuf.RiakTsPB.TsRange.Builder, com.basho.riak.protobuf.RiakTsPB.TsRangeOrBuilder> + com.basho.riak.protobuf.RiakTsPB.TsRange, com.basho.riak.protobuf.RiakTsPB.TsRange.Builder, com.basho.riak.protobuf.RiakTsPB.TsRangeOrBuilder> getRangeFieldBuilder() { if (rangeBuilder_ == null) { rangeBuilder_ = new com.google.protobuf.SingleFieldBuilder< @@ -13400,6 +13444,7 @@ public com.basho.riak.protobuf.RiakTsPB.TsRangeOrBuilder getRangeOrBuilder() { public interface TsRangeOrBuilder extends // @@protoc_insertion_point(interface_extends:TsRange) com.google.protobuf.MessageOrBuilder { + /** * required bytes field_name = 1; */ @@ -14007,21 +14052,27 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakTsPB.TsRange other) { public final boolean isInitialized() { if (!hasFieldName()) { + return false; } if (!hasLowerBound()) { + return false; } if (!hasLowerBoundInclusive()) { + return false; } if (!hasUpperBound()) { + return false; } if (!hasUpperBoundInclusive()) { + return false; } if (!hasDesc()) { + return false; } return true; @@ -14403,10 +14454,11 @@ public Builder clearDesc() { "TsRange\"\223\001\n\007TsRange\022\022\n\nfield_name\030\001 \002(\014\022" + "\023\n\013lower_bound\030\002 \002(\022\022\035\n\025lower_bound_incl" + "usive\030\003 \002(\010\022\023\n\013upper_bound\030\004 \002(\022\022\035\n\025uppe" + - "r_bound_inclusive\030\005 \002(\010\022\014\n\004desc\030\006 \002(\014*O\n" + + "r_bound_inclusive\030\005 \002(\010\022\014\n\004desc\030\006 \002(\014*Y\n" + "\014TsColumnType\022\013\n\007VARCHAR\020\000\022\n\n\006SINT64\020\001\022\n" + - "\n\006DOUBLE\020\002\022\r\n\tTIMESTAMP\020\003\022\013\n\007BOOLEAN\020\004B#" + - "\n\027com.basho.riak.protobufB\010RiakTsPB" + "\n\006DOUBLE\020\002\022\r\n\tTIMESTAMP\020\003\022\013\n\007BOOLEAN\020\004\022\010" + + "\n\004BLOB\020\005B#\n\027com.basho.riak.protobufB\010Ria" + + "kTsPB" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { diff --git a/src/main/java/com/basho/riak/protobuf/RiakYokozunaPB.java b/src/main/java/com/basho/riak/protobuf/RiakYokozunaPB.java index 7f527033d..7da1a99d7 100644 --- a/src/main/java/com/basho/riak/protobuf/RiakYokozunaPB.java +++ b/src/main/java/com/basho/riak/protobuf/RiakYokozunaPB.java @@ -11,6 +11,7 @@ public static void registerAllExtensions( public interface RpbYokozunaIndexOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbYokozunaIndex) com.google.protobuf.MessageOrBuilder { + /** * required bytes name = 1; * @@ -484,7 +485,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaIndex public final boolean isInitialized() { if (!hasName()) { - + return false; } return true; @@ -673,6 +674,7 @@ public Builder clearNVal() { public interface RpbYokozunaIndexGetReqOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbYokozunaIndexGetReq) com.google.protobuf.MessageOrBuilder { + /** * optional bytes name = 1; * @@ -1112,10 +1114,11 @@ public Builder clearName() { public interface RpbYokozunaIndexGetRespOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbYokozunaIndexGetResp) com.google.protobuf.MessageOrBuilder { + /** * repeated .RpbYokozunaIndex index = 1; */ - java.util.List + java.util.List getIndexList(); /** * repeated .RpbYokozunaIndex index = 1; @@ -1128,7 +1131,7 @@ public interface RpbYokozunaIndexGetRespOrBuilder extends /** * repeated .RpbYokozunaIndex index = 1; */ - java.util.List + java.util.List getIndexOrBuilderList(); /** * repeated .RpbYokozunaIndex index = 1; @@ -1249,7 +1252,7 @@ public java.util.List g /** * repeated .RpbYokozunaIndex index = 1; */ - public java.util.List + public java.util.List getIndexOrBuilderList() { return index_; } @@ -1504,7 +1507,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaIndex indexBuilder_ = null; index_ = other.index_; bitField0_ = (bitField0_ & ~0x00000001); - indexBuilder_ = + indexBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getIndexFieldBuilder() : null; } else { @@ -1519,7 +1522,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaIndex public final boolean isInitialized() { for (int i = 0; i < getIndexCount(); i++) { if (!getIndex(i).isInitialized()) { - + return false; } } @@ -1740,7 +1743,7 @@ public com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaIndexOrBuilder getIndex /** * repeated .RpbYokozunaIndex index = 1; */ - public java.util.List + public java.util.List getIndexOrBuilderList() { if (indexBuilder_ != null) { return indexBuilder_.getMessageOrBuilderList(); @@ -1766,12 +1769,12 @@ public com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaIndex.Builder addIndexB /** * repeated .RpbYokozunaIndex index = 1; */ - public java.util.List + public java.util.List getIndexBuilderList() { return getIndexFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaIndex, com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaIndex.Builder, com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaIndexOrBuilder> + com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaIndex, com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaIndex.Builder, com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaIndexOrBuilder> getIndexFieldBuilder() { if (indexBuilder_ == null) { indexBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< @@ -1799,6 +1802,7 @@ public com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaIndex.Builder addIndexB public interface RpbYokozunaIndexPutReqOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbYokozunaIndexPutReq) com.google.protobuf.MessageOrBuilder { + /** * required .RpbYokozunaIndex index = 1; */ @@ -2233,11 +2237,11 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaIndex public final boolean isInitialized() { if (!hasIndex()) { - + return false; } if (!getIndex().isInitialized()) { - + return false; } return true; @@ -2365,7 +2369,7 @@ public com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaIndexOrBuilder getIndex * required .RpbYokozunaIndex index = 1; */ private com.google.protobuf.SingleFieldBuilder< - com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaIndex, com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaIndex.Builder, com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaIndexOrBuilder> + com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaIndex, com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaIndex.Builder, com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaIndexOrBuilder> getIndexFieldBuilder() { if (indexBuilder_ == null) { indexBuilder_ = new com.google.protobuf.SingleFieldBuilder< @@ -2440,6 +2444,7 @@ public Builder clearTimeout() { public interface RpbYokozunaIndexDeleteReqOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbYokozunaIndexDeleteReq) com.google.protobuf.MessageOrBuilder { + /** * required bytes name = 1; * @@ -2797,7 +2802,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaIndex public final boolean isInitialized() { if (!hasName()) { - + return false; } return true; @@ -2887,6 +2892,7 @@ public Builder clearName() { public interface RpbYokozunaSchemaOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbYokozunaSchema) com.google.protobuf.MessageOrBuilder { + /** * required bytes name = 1; * @@ -3298,7 +3304,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaSchem public final boolean isInitialized() { if (!hasName()) { - + return false; } return true; @@ -3439,6 +3445,7 @@ public Builder clearContent() { public interface RpbYokozunaSchemaPutReqOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbYokozunaSchemaPutReq) com.google.protobuf.MessageOrBuilder { + /** * required .RpbYokozunaSchema schema = 1; */ @@ -3811,11 +3818,11 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaSchem public final boolean isInitialized() { if (!hasSchema()) { - + return false; } if (!getSchema().isInitialized()) { - + return false; } return true; @@ -3943,7 +3950,7 @@ public com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaSchemaOrBuilder getSche * required .RpbYokozunaSchema schema = 1; */ private com.google.protobuf.SingleFieldBuilder< - com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaSchema, com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaSchema.Builder, com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaSchemaOrBuilder> + com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaSchema, com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaSchema.Builder, com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaSchemaOrBuilder> getSchemaFieldBuilder() { if (schemaBuilder_ == null) { schemaBuilder_ = new com.google.protobuf.SingleFieldBuilder< @@ -3970,6 +3977,7 @@ public com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaSchemaOrBuilder getSche public interface RpbYokozunaSchemaGetReqOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbYokozunaSchemaGetReq) com.google.protobuf.MessageOrBuilder { + /** * required bytes name = 1; * @@ -4327,7 +4335,7 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaSchem public final boolean isInitialized() { if (!hasName()) { - + return false; } return true; @@ -4417,6 +4425,7 @@ public Builder clearName() { public interface RpbYokozunaSchemaGetRespOrBuilder extends // @@protoc_insertion_point(interface_extends:RpbYokozunaSchemaGetResp) com.google.protobuf.MessageOrBuilder { + /** * required .RpbYokozunaSchema schema = 1; */ @@ -4781,11 +4790,11 @@ public Builder mergeFrom(com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaSchem public final boolean isInitialized() { if (!hasSchema()) { - + return false; } if (!getSchema().isInitialized()) { - + return false; } return true; @@ -4913,7 +4922,7 @@ public com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaSchemaOrBuilder getSche * required .RpbYokozunaSchema schema = 1; */ private com.google.protobuf.SingleFieldBuilder< - com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaSchema, com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaSchema.Builder, com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaSchemaOrBuilder> + com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaSchema, com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaSchema.Builder, com.basho.riak.protobuf.RiakYokozunaPB.RpbYokozunaSchemaOrBuilder> getSchemaFieldBuilder() { if (schemaBuilder_ == null) { schemaBuilder_ = new com.google.protobuf.SingleFieldBuilder< diff --git a/src/test/java/com/basho/riak/client/api/commands/itest/ITestTimeSeries.java b/src/test/java/com/basho/riak/client/api/commands/itest/ITestTimeSeries.java index 12fc2fdf3..c369685f2 100644 --- a/src/test/java/com/basho/riak/client/api/commands/itest/ITestTimeSeries.java +++ b/src/test/java/com/basho/riak/client/api/commands/itest/ITestTimeSeries.java @@ -11,14 +11,13 @@ import com.basho.riak.client.core.operations.itest.ts.ITestTsBase; import com.basho.riak.client.core.query.Namespace; import com.basho.riak.client.core.query.timeseries.*; -import org.junit.FixMethodOrder; -import org.junit.Rule; -import org.junit.Test; +import org.junit.*; import org.junit.rules.ExpectedException; import org.junit.runners.MethodSorters; import java.util.*; import java.util.concurrent.ExecutionException; +import java.util.stream.Collectors; import static org.junit.Assert.*; import static org.junit.Assume.assumeTrue; @@ -41,6 +40,7 @@ * temperature double, * uv_index sint64, * observed boolean not null, + * sensor_data blob, * PRIMARY KEY( * (geohash, user, quantum(time, 15, 'm')), * geohash, user, time) @@ -55,11 +55,17 @@ public class ITestTimeSeries extends ITestTsBase private RiakFuture createTableAsync(final RiakClient client, String tableName) throws InterruptedException { - final TableDefinition tableDef = new TableDefinition(tableName, GeoCheckinWideTableDefinition.getFullColumnDescriptions()); + final TableDefinition tableDef = new TableDefinition(tableName, GeoCheckin_1_5_TableDefinition.getFullColumnDescriptions()); return createTableAsync(client, tableDef); } + @BeforeClass + public static void SetupCheck() + { + assumeTrue("Timeseries 1.5 features not supported in this test environment, skipping tests.", testTs_1_5_Features()); + } + @Rule public ExpectedException thrown= ExpectedException.none(); @@ -102,7 +108,7 @@ public void test_c_StoringData() throws ExecutionException, InterruptedException { RiakClient client = new RiakClient(cluster); - Store store = new Store.Builder(tableName).withRows(rows).build(); + Store store = new Store.Builder(tableName).withRows(ts_1_5_rows).build(); RiakFuture execFuture = client.executeAsync(store); @@ -152,10 +158,10 @@ public void test_f_QueryingDataWithMinimumPredicate() throws ExecutionException, final QueryResult queryResult = executeQuery(new Query.Builder(queryText)); - assertEquals(7, queryResult.getColumnDescriptionsCopy().size()); + assertEquals(8, queryResult.getColumnDescriptionsCopy().size()); assertEquals(1, queryResult.getRowsCount()); - assertRowMatches(rows.get(1), queryResult.iterator().next()); + assertRowMatches(ts_1_5_rows.get(1), queryResult.iterator().next()); } @Test @@ -173,10 +179,10 @@ public void test_g_QueryingDataWithExtraPredicate() throws ExecutionException, I final QueryResult queryResult = executeQuery(new Query.Builder(queryText)); - assertEquals(7, queryResult.getColumnDescriptionsCopy().size()); + assertEquals(8, queryResult.getColumnDescriptionsCopy().size()); assertEquals(1, queryResult.getRowsCount()); - assertRowMatches(rows.get(1), queryResult.iterator().next()); + assertRowMatches(ts_1_5_rows.get(1), queryResult.iterator().next()); } @Test @@ -193,12 +199,12 @@ public void test_h_QueryingDataAcrossManyQuantum() throws ExecutionException, In final QueryResult queryResult = executeQuery(new Query.Builder(queryText)); - assertEquals(7, queryResult.getColumnDescriptionsCopy().size()); + assertEquals(8, queryResult.getColumnDescriptionsCopy().size()); assertEquals(2, queryResult.getRowsCount()); final Iterator itor = queryResult.iterator(); - assertRowMatches(rows.get(1), itor.next()); - assertRowMatches(rows.get(2), itor.next()); + assertRowMatches(ts_1_5_rows.get(1), itor.next()); + assertRowMatches(ts_1_5_rows.get(2), itor.next()); } @Test @@ -253,18 +259,19 @@ public void test_k_TestStoringDataOutOfOrderResultsInError() throws ExecutionExc @Test public void test_l_TestFetchingSingleRowsWorks() throws ExecutionException, InterruptedException { + Row expectedRow = ts_1_5_rows.get(7); + List keyCells = expectedRow.getCellsCopy().stream().limit(3).collect(Collectors.toList()); + RiakClient client = new RiakClient(cluster); - final List keyCells = Arrays.asList(new Cell("hash2"), new Cell("user4"), - Cell.newTimestamp(fifteenMinsAgo)); Fetch fetch = new Fetch.Builder(tableName, keyCells).build(); QueryResult queryResult = client.execute(fetch); assertEquals(1, queryResult.getRowsCount()); - Row row = queryResult.getRowsCopy().get(0); - assertEquals("rain", row.getCellsCopy().get(3).getVarcharAsUTF8String()); - assertEquals(79.0, row.getCellsCopy().get(4).getDouble(), Double.MIN_VALUE); + + Row actualRow = queryResult.getRowsCopy().get(0); + assertRowMatches(expectedRow, actualRow); } @Test @@ -335,9 +342,9 @@ public void test_p_TestDescribeTable() throws InterruptedException, ExecutionExc assertFutureSuccess(resultFuture); final QueryResult tableDescription = resultFuture.get(); - assertEquals(7, tableDescription.getRowsCount()); + assertEquals(8, tableDescription.getRowsCount()); int numColumnDesc = tableDescription.getColumnDescriptionsCopy().size(); - assertTrue(numColumnDesc == 5 || numColumnDesc == 7); + assertTrue(numColumnDesc == 5 || numColumnDesc == 7 || numColumnDesc == 8); } @Test @@ -354,7 +361,7 @@ public void test_q_TestDescribeTableCommand() throws InterruptedException, Execu final TableDefinition tableDefinition = describeFuture.get(); final Collection fullColumnDescriptions = tableDefinition.getFullColumnDescriptions(); - assertEquals(7, fullColumnDescriptions.size()); + assertEquals(8, fullColumnDescriptions.size()); TableDefinitionTest.assertFullColumnDefinitionsMatch(GetCreatedTableFullDescriptions(), new ArrayList<>(fullColumnDescriptions)); @@ -374,7 +381,8 @@ public void test_r_TestDescribeTableCommandForNonExistingTable() throws Interrup final String message = describeFuture.cause().getMessage(); assertTrue(message.toLowerCase().contains(BAD_TABLE_NAME.toLowerCase())); - assertTrue(message.toLowerCase().contains("not an active table")); + assertTrue(message.toLowerCase().contains("not")); + assertTrue(message.toLowerCase().contains("active")); } @Test @@ -398,13 +406,7 @@ public void test_z_TestPBCErrorsReturnWhenSecurityIsOn() throws InterruptedExcep private static List GetCreatedTableFullDescriptions() { - return Arrays.asList(new FullColumnDescription("geohash", ColumnDescription.ColumnType.VARCHAR, false, 1), - new FullColumnDescription("user", ColumnDescription.ColumnType.VARCHAR, false, 2), - new FullColumnDescription("time", ColumnDescription.ColumnType.TIMESTAMP, false, 3), - new FullColumnDescription("weather", ColumnDescription.ColumnType.VARCHAR, false), - new FullColumnDescription("temperature", ColumnDescription.ColumnType.DOUBLE, true), - new FullColumnDescription("uv_index", ColumnDescription.ColumnType.SINT64, true), - new FullColumnDescription("observed", ColumnDescription.ColumnType.BOOLEAN, false)); + return GeoCheckin_1_5_TableDefinition.getFullColumnDescriptions().stream().collect(Collectors.toList()); } private static List toList(Iterator itor) @@ -449,9 +451,21 @@ private static void assertRowMatches(R1 expecte } else { - assertEquals(Double.toString(expectedCells.get(5).getLong()), Double.toString(actualCells.get(5).getLong())); + assertEquals(expectedCell5.getLong(), actualCell5.getLong()); } assertEquals(expectedCells.get(6).getBoolean(), actualCells.get(6).getBoolean()); + + Cell expectedCell7 = expectedCells.get(7); + Cell actualCell7 = actualCells.get(7); + + if (expectedCell7 == null) + { + assertNull(actualCell7); + } + else + { + assertEquals(expectedCell7.getVarcharValue(), actualCell7.getVarcharValue()); + } } } diff --git a/src/test/java/com/basho/riak/client/core/codec/TermToBinaryCodecTest.java b/src/test/java/com/basho/riak/client/core/codec/TermToBinaryCodecTest.java index 8f7747e16..3d116d646 100644 --- a/src/test/java/com/basho/riak/client/core/codec/TermToBinaryCodecTest.java +++ b/src/test/java/com/basho/riak/client/core/codec/TermToBinaryCodecTest.java @@ -17,6 +17,7 @@ /** * + * @author Alex Moore * @author Luke Bakken */ public class TermToBinaryCodecTest @@ -29,37 +30,49 @@ public class TermToBinaryCodecTest @Test public void encodesPutRequestCorrectly_1() { - // {tsputreq, <<"test_table">>, [], [{<<"varchar">>, 12345678, 12.34, true, 12345}, - // {<<"string">>, 8765432, 43.21, false, 543321}]} - final byte[] exp = {(byte)131, 104, 4, 100, 0, 8, 116, 115, 112, 117, 116, 114, 101, 113, 109, 0, - 0, 0, 10, 116, 101, 115, 116, 95, 116, 97, 98, 108, 101, 106, 108, 0, 0, - 0, 2, 104, 5, 109, 0, 0, 0, 7, 118, 97, 114, 99, 104, 97, 114, 98, 0, (byte)188, - 97, 78, - 70, 64, 65, 38, 102, 102, 102, 102, 102, - 100, 0, 4, 116, - 114, 117, 101, 98, 0, 0, 48, 57, 104, 5, 109, 0, 0, 0, 6, 115, 116, 114, - 105, 110, 103, 98, 0, (byte)133, (byte)191, (byte)248, - 70, 64, 65, 38, 102, 102, 102, 102, 102, - 100, 0, 5, 102, 97, 108, 115, 101, 98, 0, 8, 74, 89, 106}; + // {tsputreq, <<"test_table">>, [], [{<<"varchar">>, 12345678, 34.3, true, 12345, <<0,1,2,3,4,5,6,7>>}, + // {<<"string">>, 8765432, 34.3, false, 543321, <<8,9,10,11,12,13,14,15>>}]} + final byte[] exp = {(byte)131, 104, 4, // outer tuple arity 4 + 100, 0, 8, 116, 115, 112, 117, 116, 114, 101, 113, // tsputreq atom + 109, 0, 0, 0, 10, 116, 101, 115, 116, 95, 116, 97, 98, 108, 101, // table name + 106, // empty list + 108, 0, 0, 0, 2, // list start arity 2 + 104, 6, // row tuple arity 6 + 109, 0, 0, 0, 7, 118, 97, 114, 99, 104, 97, 114, // varchar cell + 98, 0, (byte)188, 97, 78, // integer + 70, 64, 65, 38, 102, 102, 102, 102, 102, // 34.3 float + 100, 0, 4, 116, 114, 117, 101, // true atom + 98, 0, 0, 48, 57, // integer + 109,0,0,0,8,0,1,2,3,4,5,6,7, // blob cell + 104, 6, // row tuple arity 6 + 109, 0, 0, 0, 6, 115, 116, 114, 105, 110, 103, // varchar cell "string" + 98, 0, (byte)133, (byte)191, (byte)248, // integer + 70, 64, 65, 38, 102, 102, 102, 102, 102, // 34.3 float + 100, 0, 5, 102, 97, 108, 115, 101, // false atom + 98, 0, 8, 74, 89, // integer + 109,0,0,0,8,8,9,10,11,12,13,14,15, // blob cell + 106}; // end list arity 2 - Cell c1 = new Cell("varchar"); - Cell c2 = new Cell(12345678L); - Cell c3 = new Cell(34.3); - Cell c4 = new Cell(true); + Cell r1c1 = new Cell("varchar"); + Cell r1c2 = new Cell(12345678L); + Cell r1c3 = new Cell(34.3); + Cell r1c4 = new Cell(true); Calendar cal1 = Calendar.getInstance(); cal1.setTimeInMillis(12345); - Cell c5 = new Cell(cal1); - Row r1 = new Row(c1, c2, c3, c4, c5); + Cell r1c5 = new Cell(cal1); + Cell r1c6 = new Cell(new byte[] {0,1,2,3,4,5,6,7}); + Row r1 = new Row(r1c1, r1c2, r1c3, r1c4, r1c5, r1c6); - Cell c6 = new Cell("string"); - Cell c7 = new Cell(8765432L); - Cell c8 = new Cell(34.3); - Cell c9 = new Cell(false); + Cell r2c1 = new Cell("string"); + Cell r2c2 = new Cell(8765432L); + Cell r2c3 = new Cell(34.3); + Cell r2c4 = new Cell(false); Calendar cal2 = Calendar.getInstance(); cal2.setTimeInMillis(543321); - Cell c10 = new Cell(cal2); - Row r2 = new Row(c6, c7, c8, c9, c10); - Row[] rows = { r1, r2 }; + Cell r2c5 = new Cell(cal2); + Cell r2c6 = new Cell(new byte[] {8,9,10,11,12,13,14,15}); + Row r2 = new Row(r2c1, r2c2, r2c3, r2c4, r2c5, r2c6); + Row[] rows = {r1, r2}; try { @@ -78,7 +91,7 @@ public void encodesPutRequestCorrectly_1() public void encodesPutRequestCorrectly_2() { // A = riakc_ts_put_operator:serialize(<<"test_table">>, - // [{<<"series">>, <<"family">>, 12345678, 1, true, 34.3, []}], + // [{<<"series">>, <<"family">>, 12345678, 1, true, 34.3, [], <<0,1,2,3,4,5,6,7>>}], // true). // A = {tsputreq,<<"test_table">>,[],[{<<"series">>,<<"family">>,12345678,1,true,34.3,[]}]} final byte[] exp = {(byte)131,104,4, // outer tuple arity 4 @@ -86,7 +99,7 @@ public void encodesPutRequestCorrectly_2() 109,0,0,0,10,116,101,115,116,95,116,97,98,108,101, // table name binary 106, // empty list 108,0,0,0,1, // list start arity 1 - 104,7, // row tuple arity 7 + 104,8, // row tuple arity 8 109,0,0,0,6,115,101,114,105,101,115, // series binary 109,0,0,0,6,102,97,109,105,108,121, // family binary 98,0,(byte)188,97,78, // integer @@ -98,11 +111,12 @@ public void encodesPutRequestCorrectly_2() // NB: this is what JInterface generates, a new-style float 70,64,65,38,102,102,102,102,102, 106, // null cell empty list + 109,0,0,0,8,0,1,2,3,4,5,6,7, // blob cell 106}; // list arity 1 end final ArrayList rows = new ArrayList<>(1); rows.add(new Row(new Cell("series"), new Cell("family"), Cell.newTimestamp(12345678), - new Cell(1L), new Cell(true), new Cell(34.3), null)); + new Cell(1L), new Cell(true), new Cell(34.3), null, new Cell(new byte[] {0,1,2,3,4,5,6,7}))); try { @@ -122,8 +136,8 @@ public void encodesPutWithColumnsCorrectly() { /* {tsputreq,<<"test_table">>, - [<<"a">>,<<"b">>,<<"c">>,<<"d">>,<<"e">>,<<"f">>,<<"g">>], - [{<<"series">>,<<"family">>,12345678,1,true,34.3,[]}]} + [<<"a">>,<<"b">>,<<"c">>,<<"d">>,<<"e">>,<<"f">>,<<"g">>, ], + [{<<"series">>,<<"family">>,12345678,1,true,34.3,[], <<0,1,2,3,4,5,6,7>>}]} */ final byte[] exp = { (byte)131,104,4, @@ -139,7 +153,7 @@ public void encodesPutWithColumnsCorrectly() 109,0,0,0,1,103, 106, 108,0,0,0,1, - 104,7, + 104,8, 109,0,0,0,6,115,101,114,105,101,115, 109,0,0,0,6,102,97,109,105,108,121, 98,0,(byte)188,97,78, @@ -151,12 +165,13 @@ public void encodesPutWithColumnsCorrectly() // NB: this is what JInterface generates, a new-style float 70,64,65,38,102,102,102,102,102, 106, + 109,0,0,0,8,0,1,2,3,4,5,6,7, 106}; final List columns = Arrays.asList("a", "b", "c", "d", "e", "f", "g"); final ArrayList rows = new ArrayList<>(1); rows.add(new Row(new Cell("series"), new Cell("family"), Cell.newTimestamp(12345678), - new Cell(1L), new Cell(true), new Cell(34.3), null)); + new Cell(1L), new Cell(true), new Cell(34.3), null, new Cell(new byte[] {0,1,2,3,4,5,6,7}))); try { @@ -259,29 +274,51 @@ public void decodesQueryResultCorrectly() throws OtpErlangDecodeException ROW = { binary :: numeric :: atom :: [], ... } { tsqueryresp, - { [<<"geohash">>,<<"user">>,<<"time">>,<<"weather">>,<<"temperature">>,<<"uv_index">>,<<"observed">>], - [varchar,varchar,timestamp,varchar,double,sint64,boolean], + { [<<"geohash">>,<<"user">>,<<"time">>,<<"weather">>,<<"temperature">>,<<"uv_index">>,<<"observed">>,<<"sensor_data">>], + [varchar,varchar,timestamp,varchar,double,sint64,boolean,blob], [ - {<<"hash1">>,<<"user2">>,1443806600000,<<"cloudy">>,[],[],true} + {<<"hash1">>,<<"user2">>,1443806600000,<<"cloudy">>,[],[],true,<<0,1,2,3,4,5,6,7>>} ] } } */ final byte[] input = - {-125, 104, 2, 100, 0, 11, 116, 115, 113, 117, 101, 114, 121, 114, 101, 115, 112, 104, 3, 108, 0, 0, - 0, 7, 109, 0, 0, 0, 7, 103, 101, 111, 104, 97, 115, 104, 109, 0, 0, 0, 4, 117, 115, 101, 114, 109, - 0, 0, 0, 4, 116, 105, 109, 101, 109, 0, 0, 0, 7, 119, 101, 97, 116, 104, 101, 114, 109, 0, 0, 0, 11, - 116, 101, 109, 112, 101, 114, 97, 116, 117, 114, 101, 109, 0, 0, 0, 8, 117, 118, 95, 105, 110, 100, - 101, 120, 109, 0, 0, 0, 8, 111, 98, 115, 101, 114, 118, 101, 100, 106, 108, 0, 0, 0, 7, 100, 0, 7, - 118, 97, 114, 99, 104, 97, 114, 100, 0, 7, 118, 97, 114, 99, 104, 97, 114, 100, 0, 9, 116, 105, 109, - 101, 115, 116, 97, 109, 112, 100, 0, 7, 118, 97, 114, 99, 104, 97, 114, 100, 0, 6, 100, 111, 117, - 98, 108, 101, 100, 0, 6, 115, 105, 110, 116, 54, 52, 100, 0, 7, 98, 111, 111, 108, 101, 97, 110, - 106, 108, 0, 0, 0, 1, 104, 7, 109, 0, 0, 0, 5, 104, 97, 115, 104, 49, 109, 0, 0, 0, 5, 117, 115, - 101, 114, 50, 110, 6, 0, 64, 91, -108, 41, 80, 1, 109, 0, 0, 0, 6, 99, 108, 111, 117, 100, 121, 106, - 106, 100, 0, 4, 116, 114, 117, 101, 106}; + {(byte)131, 104, 2, // outer tuple arity 2 + 100, 0, 11, 116, 115, 113, 117, 101, 114, 121, 114, 101, 115, 112, 104, 3, // tsqueryresp atom + 108, 0, 0, 0, 8, // list start arity 8 + 109, 0, 0, 0, 7, 103, 101, 111, 104, 97, 115, 104, // "geohash" + 109, 0, 0, 0, 4, 117, 115, 101, 114, // "user + 109, 0, 0, 0, 4, 116, 105, 109, 101, // "time" + 109, 0, 0, 0, 7, 119, 101, 97, 116, 104, 101, 114, // "weather" + 109, 0, 0, 0, 11, 116, 101, 109, 112, 101, 114, 97, 116, 117, 114, 101, // "temperature" + 109, 0, 0, 0, 8, 117, 118, 95, 105, 110, 100, 101, 120, // "uv_index" + 109, 0, 0, 0, 8, 111, 98, 115, 101, 114, 118, 101, 100, // "observed" + 109, 0, 0, 0, 11, 115, 101, 110, 115, 111, 114, 95, 100, 97, 116, 97, // "sensor_data" + 106, // list stop arity 8 + 108, 0, 0, 0, 8, // list start arity 8 + 100, 0, 7, 118, 97, 114, 99, 104, 97, 114, // varchar atom + 100, 0, 7, 118, 97, 114, 99, 104, 97, 114, // varchar atom + 100, 0, 9, 116, 105, 109, 101, 115, 116, 97, 109, 112, // timestamp atom + 100, 0, 7, 118, 97, 114, 99, 104, 97, 114, // varchar atom + 100, 0, 6, 100, 111, 117, 98, 108, 101, // double atom + 100, 0, 6, 115, 105, 110, 116, 54, 52, // sint64 atom + 100, 0, 7, 98, 111, 111, 108, 101, 97, 110, // boolean atom + 100, 0, 4, 98, 108, 111, 98, // blob atom + 106, // list stop arity 8 + 108, 0, 0, 0, 1, // list start arity 1 + 104, 8, // tuple arity 8 + 109, 0, 0, 0, 5, 104, 97, 115, 104, 49, // "hash1" + 109, 0, 0, 0, 5, 117, 115, 101, 114, 50, // "user 2 + 110, 6, 0, 64, 91, -108, 41, 80, 1, // 1443806600000 + 109, 0, 0, 0, 6, 99, 108, 111, 117, 100, 121, // "cloudy" + 106, // empty list / null cell + 106, // empty list / null cell + 100, 0, 4, 116, 114, 117, 101, // true atom + 109, 0, 0, 0, 8, 0, 1, 2, 3, 4, 5, 6, 7, // <<0,1,2,3,4,5,6,7>> + 106}; - final ColumnDescription[] expectedColumnDescriptions = new ColumnDescription[7]; + final ColumnDescription[] expectedColumnDescriptions = new ColumnDescription[8]; expectedColumnDescriptions[0] = new ColumnDescription("geohash", ColumnDescription.ColumnType.VARCHAR); expectedColumnDescriptions[1] = new ColumnDescription("user", ColumnDescription.ColumnType.VARCHAR); expectedColumnDescriptions[2] = new ColumnDescription("time", ColumnDescription.ColumnType.TIMESTAMP); @@ -289,9 +326,10 @@ public void decodesQueryResultCorrectly() throws OtpErlangDecodeException expectedColumnDescriptions[4] = new ColumnDescription("temperature", ColumnDescription.ColumnType.DOUBLE); expectedColumnDescriptions[5] = new ColumnDescription("uv_index", ColumnDescription.ColumnType.SINT64); expectedColumnDescriptions[6] = new ColumnDescription("observed", ColumnDescription.ColumnType.BOOLEAN); + expectedColumnDescriptions[7] = new ColumnDescription("sensor_data", ColumnDescription.ColumnType.BLOB); final Row row = new Row(new Cell("hash1"), new Cell("user2"), Cell.newTimestamp(1443806600000L), - new Cell("cloudy"), null, null, new Cell(true)); + new Cell("cloudy"), null, null, new Cell(true), new Cell(new byte[] {0,1,2,3,4,5,6,7})); final Row[] expectedRows = new Row[1]; expectedRows[0] = (row); diff --git a/src/test/java/com/basho/riak/client/core/operations/itest/ts/ITestFetchOperation.java b/src/test/java/com/basho/riak/client/core/operations/itest/ts/ITestFetchOperation.java index 7051c3501..ea5c3034c 100644 --- a/src/test/java/com/basho/riak/client/core/operations/itest/ts/ITestFetchOperation.java +++ b/src/test/java/com/basho/riak/client/core/operations/itest/ts/ITestFetchOperation.java @@ -12,6 +12,7 @@ import java.util.Arrays; import java.util.List; import java.util.concurrent.ExecutionException; +import java.util.stream.Collectors; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @@ -38,9 +39,9 @@ public static void InsertData() throws ExecutionException, InterruptedException @Test public void testSingleFetch() throws ExecutionException, InterruptedException { - final List keyCells = Arrays.asList(new Cell("hash2"), - new Cell("user4"), - Cell.newTimestamp(fifteenMinsAgo)); + final Row expectedRow = rows.get(4); + final List keyCells = expectedRow.getCellsCopy().stream().limit(3).collect(Collectors.toList()); + FetchOperation fetchOp = new FetchOperation.Builder(tableName, keyCells).build(); final RiakFuture future = cluster.execute(fetchOp); @@ -50,11 +51,9 @@ public void testSingleFetch() throws ExecutionException, InterruptedException QueryResult result = future.get(); assertEquals(1, result.getRowsCount()); - assertEquals(7, result.getColumnDescriptionsCopy().size()); + assertEquals(expectedRow.getCellsCount(), result.getColumnDescriptionsCopy().size()); - Row row = result.getRowsCopy().get(0); - assertEquals(7, row.getCellsCount()); - assertEquals("rain", row.getCellsCopy().get(3).getVarcharAsUTF8String()); - assertEquals(79.0, row.getCellsCopy().get(4).getDouble(), Double.MIN_VALUE); + Row actualRow = result.getRowsCopy().get(0); + assertEquals(expectedRow, actualRow); } } diff --git a/src/test/java/com/basho/riak/client/core/operations/itest/ts/ITestQueryOperation.java b/src/test/java/com/basho/riak/client/core/operations/itest/ts/ITestQueryOperation.java index f77d54d51..7e34ff029 100644 --- a/src/test/java/com/basho/riak/client/core/operations/itest/ts/ITestQueryOperation.java +++ b/src/test/java/com/basho/riak/client/core/operations/itest/ts/ITestQueryOperation.java @@ -65,7 +65,8 @@ public void querySomeMatches() throws ExecutionException, InterruptedException ); assertNotNull(queryResult); - assertEquals(7, queryResult.getColumnDescriptionsCopy().size()); + assertEquals(GeoCheckinWideTableDefinition.getFullColumnDescriptions().size(), + queryResult.getColumnDescriptionsCopy().size()); assertEquals(1, queryResult.getRowsCount()); } diff --git a/src/test/java/com/basho/riak/client/core/operations/itest/ts/ITestTsBase.java b/src/test/java/com/basho/riak/client/core/operations/itest/ts/ITestTsBase.java index a51ea6a7a..6d53e1f72 100644 --- a/src/test/java/com/basho/riak/client/core/operations/itest/ts/ITestTsBase.java +++ b/src/test/java/com/basho/riak/client/core/operations/itest/ts/ITestTsBase.java @@ -14,9 +14,12 @@ import org.junit.BeforeClass; import java.util.Arrays; +import java.util.LinkedList; import java.util.List; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; +import java.util.function.Function; +import java.util.stream.Collectors; /** * Time Series Operation Integration Tests Base @@ -32,6 +35,7 @@ * temperature double, * uv_index sint64, * observed boolean not null, + * sensor_data blob, * PRIMARY KEY( * (geohash, user, quantum(time, 15, 'm')), * geohash, user, time) @@ -45,11 +49,13 @@ public abstract class ITestTsBase extends ITestAutoCleanupBase { protected final static String tableName = "GeoCheckin_Wide"; + protected final static String tableName_ts_1_5 = "GeoCheckin_Wide_1_5"; protected final static TableDefinition GeoCheckinWideTableDefinition = new TableDefinition(tableName, Arrays.asList( new FullColumnDescription("geohash", ColumnDescription.ColumnType.VARCHAR, false, 1), - new FullColumnDescription("user", ColumnDescription.ColumnType.VARCHAR, false, 2), + new FullColumnDescription("user", ColumnDescription.ColumnType.VARCHAR, false, 2, + FullColumnDescription.KeyOrder.DESC), new FullColumnDescription("time", ColumnDescription.ColumnType.TIMESTAMP, false, 3, new Quantum(15, TimeUnit.MINUTES)), new FullColumnDescription("weather", ColumnDescription.ColumnType.VARCHAR, false), @@ -59,6 +65,16 @@ public abstract class ITestTsBase extends ITestAutoCleanupBase ) ); + protected final static TableDefinition GeoCheckin_1_5_TableDefinition; + + static + { + final LinkedList geoCheckinColumns = + new LinkedList<>(GeoCheckinWideTableDefinition.getFullColumnDescriptions()); + geoCheckinColumns.add(new FullColumnDescription("sensor_data", ColumnDescription.ColumnType.BLOB, true)); + GeoCheckin_1_5_TableDefinition = new TableDefinition(tableName, geoCheckinColumns); + } + protected final static long now = 1443806900000L; // "now" protected final static long fiveMinsInMS = 5L * 60L * 1000L; protected final static long fiveMinsAgo = now - fiveMinsInMS; @@ -66,7 +82,19 @@ public abstract class ITestTsBase extends ITestAutoCleanupBase protected final static long fifteenMinsAgo = tenMinsAgo - fiveMinsInMS; protected final static long fifteenMinsInFuture = now + (fiveMinsInMS * 3L); - protected final static List rows = Arrays.asList( + protected final static List rows; + protected static final List ts_1_5_rows; + + private static Function convertToTs1_5Row = x -> + { + final List cells = new LinkedList<>(x.getCellsCopy()); + cells.add(null); + return new Row(cells); + }; + + static + { + rows = Arrays.asList( // "Normal" Data new Row(new Cell("hash1"), new Cell("user1"), Cell.newTimestamp(fifteenMinsAgo), new Cell("cloudy"), new Cell(79.0), new Cell(1), new Cell(true)), @@ -91,6 +119,18 @@ public abstract class ITestTsBase extends ITestAutoCleanupBase new Row(new Cell("hash2"), new Cell("user4"), Cell.newTimestamp(now), new Cell("snow"), new Cell(20.0), new Cell(11), new Cell(true))); + final LinkedList extendedRows = new LinkedList<>(); + extendedRows.addAll(rows.stream() + .map(convertToTs1_5Row) + .collect(Collectors.toList())); + // Data for blob tests + extendedRows.add(new Row(new Cell("hash2"), new Cell("user4"), Cell.newTimestamp(now + 3), + new Cell("snow"), new Cell(20.0), new Cell(11), new Cell(true), + new Cell(new byte[] {0,1,2,3,4,5,6,7}))); + + ts_1_5_rows = extendedRows; + } + @BeforeClass public static void BeforeClass() throws ExecutionException, InterruptedException { @@ -169,4 +209,23 @@ protected static QueryResult executeQuery(Query.Builder builder) throws Executio assertFutureSuccess(future); return future.get(); } + + protected static boolean testTs_1_5_Features() + { + final Namespace ns = new Namespace(tableName_ts_1_5, tableName_ts_1_5); + final FetchBucketPropsOperation fbp = new FetchBucketPropsOperation.Builder(ns).build(); + + final RiakFuture execute = cluster.execute(fbp); + try + { + final FetchBucketPropsOperation.Response response = execute.get(); + response.getBucketProperties(); + } + catch (Exception ex) + { + System.out.println(ex.toString()); + return false; + } + return true; + } } diff --git a/src/test/java/com/basho/riak/client/core/query/timeseries/CellTest.java b/src/test/java/com/basho/riak/client/core/query/timeseries/CellTest.java index 957315a68..b70da53d4 100644 --- a/src/test/java/com/basho/riak/client/core/query/timeseries/CellTest.java +++ b/src/test/java/com/basho/riak/client/core/query/timeseries/CellTest.java @@ -109,4 +109,14 @@ public void TestRawTimestamps() assertTrue(c.hasTimestamp()); assertEquals(c.getTimestamp(), t); } + @Test + public void TestBlobs() + { + byte[] b = new byte[] {0,1,2,3,4,5}; + Cell c = new Cell(b); + assertTrue(c.hasBlob()); + assertEquals(c.getBlob(), b); + + assertTrue(c.toString().contains("0x000102030405")); + } } diff --git a/tools b/tools index 72939314a..64f62fa13 160000 --- a/tools +++ b/tools @@ -1 +1 @@ -Subproject commit 72939314ab3151db776fcc01c92c26f6ee3dc499 +Subproject commit 64f62fa13124a40fe947c8589e71051cd6c4ddbe