diff --git a/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java b/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java index 2afdb068cc7..32ddf120c62 100644 --- a/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java +++ b/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java @@ -99,9 +99,13 @@ public class ClientScanner extends AbstractClientScanner { this.tableName = tableName; this.lastNext = System.currentTimeMillis(); this.connection = connection; - this.maxScannerResultSize = conf.getLong( + if (scan.getMaxResultSize() > 0) { + this.maxScannerResultSize = scan.getMaxResultSize(); + } else { + this.maxScannerResultSize = conf.getLong( HConstants.HBASE_CLIENT_SCANNER_MAX_RESULT_SIZE_KEY, HConstants.DEFAULT_HBASE_CLIENT_SCANNER_MAX_RESULT_SIZE); + } this.scannerTimeout = (int) conf.getLong( HConstants.HBASE_REGIONSERVER_LEASE_PERIOD_KEY, HConstants.DEFAULT_HBASE_REGIONSERVER_LEASE_PERIOD); diff --git a/src/main/java/org/apache/hadoop/hbase/client/Scan.java b/src/main/java/org/apache/hadoop/hbase/client/Scan.java index c4004deb17b..3bd9dda0424 100644 --- a/src/main/java/org/apache/hadoop/hbase/client/Scan.java +++ b/src/main/java/org/apache/hadoop/hbase/client/Scan.java @@ -53,8 +53,11 @@ import java.util.TreeSet; * To scan everything for each row, instantiate a Scan object. *

* To modify scanner caching for just this scan, use {@link #setCaching(int) setCaching}. - * If caching is NOT set, we will use the caching value of the hosting - * {@link HTable}. See {@link HTable#setScannerCaching(int)}. + * If caching is NOT set, we will use the caching value of the hosting {@link HTable}. See + * {@link HTable#setScannerCaching(int)}. In addition to row caching, it is possible to specify a + * maximum result size, using {@link #setMaxResultSize(long)}. When both are used, + * single server requests are limited by either number of rows or maximum result size, whichever + * limit comes first. *

* To further define the scope of what to get when scanning, perform additional * methods as outlined below. @@ -88,7 +91,7 @@ public class Scan extends OperationWithAttributes implements Writable { private static final String RAW_ATTR = "_raw_"; private static final String ISOLATION_LEVEL = "_isolationlevel_"; - private static final byte SCAN_VERSION = (byte)2; + private static final byte SCAN_VERSION = (byte)3; private byte [] startRow = HConstants.EMPTY_START_ROW; private byte [] stopRow = HConstants.EMPTY_END_ROW; private int maxVersions = 1; @@ -104,6 +107,7 @@ public class Scan extends OperationWithAttributes implements Writable { * -1 means no caching */ private int caching = -1; + private long maxResultSize = -1; private boolean cacheBlocks = true; private Filter filter = null; private TimeRange tr = new TimeRange(); @@ -153,6 +157,7 @@ public class Scan extends OperationWithAttributes implements Writable { maxVersions = scan.getMaxVersions(); batch = scan.getBatch(); caching = scan.getCaching(); + maxResultSize = scan.getMaxResultSize(); cacheBlocks = scan.getCacheBlocks(); filter = scan.getFilter(); // clone? TimeRange ctr = scan.getTimeRange(); @@ -326,6 +331,24 @@ public class Scan extends OperationWithAttributes implements Writable { this.caching = caching; } + /** + * @return the maximum result size in bytes. See {@link #setMaxResultSize(long)} + */ + public long getMaxResultSize() { + return maxResultSize; + } + + /** + * Set the maximum result size. The default is -1; this means that no specific + * maximum result size will be set for this scan, and the global configured + * value will be used instead. (Defaults to unlimited). + * + * @param maxResultSize The maximum result size in bytes. + */ + public void setMaxResultSize(long maxResultSize) { + this.maxResultSize = maxResultSize; + } + /** * Apply the specified server-side filter when performing the Scan. * @param filter filter to run on the server @@ -504,6 +527,7 @@ public class Scan extends OperationWithAttributes implements Writable { map.put("maxVersions", this.maxVersions); map.put("batch", this.batch); map.put("caching", this.caching); + map.put("maxResultSize", this.maxResultSize); map.put("cacheBlocks", this.cacheBlocks); List timeRange = new ArrayList(); timeRange.add(this.tr.getMin()); @@ -586,6 +610,9 @@ public class Scan extends OperationWithAttributes implements Writable { if (version > 1) { readAttributes(in); } + if (version > 2) { + this.maxResultSize = in.readLong(); + } } public void write(final DataOutput out) @@ -619,6 +646,7 @@ public class Scan extends OperationWithAttributes implements Writable { } } writeAttributes(out); + out.writeLong(maxResultSize); } /** diff --git a/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java b/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java index 3a4f706871f..77bc2d4e33b 100644 --- a/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java +++ b/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java @@ -585,6 +585,9 @@ public final class ProtobufUtil { if (scan.getBatch() > 0) { scanBuilder.setBatchSize(scan.getBatch()); } + if (scan.getMaxResultSize() > 0) { + scanBuilder.setMaxResultSize(scan.getMaxResultSize()); + } scanBuilder.setMaxVersions(scan.getMaxVersions()); TimeRange timeRange = scan.getTimeRange(); if (!timeRange.isAllTime()) { @@ -675,6 +678,9 @@ public final class ProtobufUtil { if (proto.hasBatchSize()) { scan.setBatch(proto.getBatchSize()); } + if (proto.hasMaxResultSize()) { + scan.setMaxResultSize(proto.getMaxResultSize()); + } for (NameBytesPair attribute: proto.getAttributeList()) { scan.setAttribute(attribute.getName(), attribute.getValue().toByteArray()); } @@ -1398,4 +1404,4 @@ public final class ProtobufUtil { } // End helpers for Admin -} \ No newline at end of file +} diff --git a/src/main/java/org/apache/hadoop/hbase/protobuf/generated/AdminProtos.java b/src/main/java/org/apache/hadoop/hbase/protobuf/generated/AdminProtos.java index f67d4205bd4..fbf0127c1e5 100644 --- a/src/main/java/org/apache/hadoop/hbase/protobuf/generated/AdminProtos.java +++ b/src/main/java/org/apache/hadoop/hbase/protobuf/generated/AdminProtos.java @@ -102,15 +102,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -575,15 +573,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -1080,15 +1076,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -1629,15 +1623,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -2016,15 +2008,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -2361,15 +2351,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -2977,15 +2965,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -3674,15 +3660,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -4154,15 +4138,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -4707,15 +4689,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -5116,15 +5096,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -5647,15 +5625,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -6100,15 +6076,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -6585,15 +6559,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -6942,15 +6914,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -7424,15 +7394,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -7777,15 +7745,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -8355,15 +8321,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -9157,15 +9121,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -9600,15 +9562,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -10255,15 +10215,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -10872,15 +10830,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -11420,15 +11376,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -11720,15 +11674,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -12052,15 +12004,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -12412,12 +12362,12 @@ public final class AdminProtos { private int bitField0_; // required string reason = 1; public static final int REASON_FIELD_NUMBER = 1; - private java.lang.Object reason_; + private Object reason_; public boolean hasReason() { return ((bitField0_ & 0x00000001) == 0x00000001); } public String getReason() { - java.lang.Object ref = reason_; + Object ref = reason_; if (ref instanceof String) { return (String) ref; } else { @@ -12431,7 +12381,7 @@ public final class AdminProtos { } } private com.google.protobuf.ByteString getReasonBytes() { - java.lang.Object ref = reason_; + Object ref = reason_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); @@ -12482,15 +12432,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -12744,12 +12692,12 @@ public final class AdminProtos { private int bitField0_; // required string reason = 1; - private java.lang.Object reason_ = ""; + private Object reason_ = ""; public boolean hasReason() { return ((bitField0_ & 0x00000001) == 0x00000001); } public String getReason() { - java.lang.Object ref = reason_; + Object ref = reason_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); reason_ = s; @@ -12849,15 +12797,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -13149,15 +13095,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -13484,15 +13428,13 @@ public final class AdminProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } diff --git a/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ClientProtos.java b/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ClientProtos.java index 3860b429f55..db1333b001f 100644 --- a/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ClientProtos.java +++ b/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ClientProtos.java @@ -126,15 +126,13 @@ public final class ClientProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -801,15 +799,13 @@ public final class ClientProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -2070,15 +2066,13 @@ public final class ClientProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -2564,15 +2558,13 @@ public final class ClientProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -3273,15 +3265,13 @@ public final class ClientProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -3970,15 +3960,13 @@ public final class ClientProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -4975,15 +4963,13 @@ public final class ClientProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -5491,15 +5477,13 @@ public final class ClientProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -6245,15 +6229,13 @@ public final class ClientProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -7508,15 +7490,13 @@ public final class ClientProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -8261,15 +8241,13 @@ public final class ClientProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -8728,6 +8706,10 @@ public final class ClientProtos { // optional uint32 batchSize = 9; boolean hasBatchSize(); int getBatchSize(); + + // optional uint64 maxResultSize = 10; + boolean hasMaxResultSize(); + long getMaxResultSize(); } public static final class Scan extends com.google.protobuf.GeneratedMessage @@ -8876,6 +8858,16 @@ public final class ClientProtos { return batchSize_; } + // optional uint64 maxResultSize = 10; + public static final int MAXRESULTSIZE_FIELD_NUMBER = 10; + private long maxResultSize_; + public boolean hasMaxResultSize() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + public long getMaxResultSize() { + return maxResultSize_; + } + private void initFields() { column_ = java.util.Collections.emptyList(); attribute_ = java.util.Collections.emptyList(); @@ -8886,6 +8878,7 @@ public final class ClientProtos { maxVersions_ = 1; cacheBlocks_ = true; batchSize_ = 0; + maxResultSize_ = 0L; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -8944,6 +8937,9 @@ public final class ClientProtos { if (((bitField0_ & 0x00000040) == 0x00000040)) { output.writeUInt32(9, batchSize_); } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeUInt64(10, maxResultSize_); + } getUnknownFields().writeTo(output); } @@ -8989,20 +8985,22 @@ public final class ClientProtos { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(9, batchSize_); } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(10, maxResultSize_); + } 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 { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -9051,6 +9049,11 @@ public final class ClientProtos { result = result && (getBatchSize() == other.getBatchSize()); } + result = result && (hasMaxResultSize() == other.hasMaxResultSize()); + if (hasMaxResultSize()) { + result = result && (getMaxResultSize() + == other.getMaxResultSize()); + } result = result && getUnknownFields().equals(other.getUnknownFields()); return result; @@ -9096,6 +9099,10 @@ public final class ClientProtos { hash = (37 * hash) + BATCHSIZE_FIELD_NUMBER; hash = (53 * hash) + getBatchSize(); } + if (hasMaxResultSize()) { + hash = (37 * hash) + MAXRESULTSIZE_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getMaxResultSize()); + } hash = (29 * hash) + getUnknownFields().hashCode(); return hash; } @@ -9250,6 +9257,8 @@ public final class ClientProtos { bitField0_ = (bitField0_ & ~0x00000080); batchSize_ = 0; bitField0_ = (bitField0_ & ~0x00000100); + maxResultSize_ = 0L; + bitField0_ = (bitField0_ & ~0x00000200); return this; } @@ -9342,6 +9351,10 @@ public final class ClientProtos { to_bitField0_ |= 0x00000040; } result.batchSize_ = batchSize_; + if (((from_bitField0_ & 0x00000200) == 0x00000200)) { + to_bitField0_ |= 0x00000080; + } + result.maxResultSize_ = maxResultSize_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -9431,6 +9444,9 @@ public final class ClientProtos { if (other.hasBatchSize()) { setBatchSize(other.getBatchSize()); } + if (other.hasMaxResultSize()) { + setMaxResultSize(other.getMaxResultSize()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -9535,6 +9551,11 @@ public final class ClientProtos { batchSize_ = input.readUInt32(); break; } + case 80: { + bitField0_ |= 0x00000200; + maxResultSize_ = input.readUInt64(); + break; + } } } } @@ -10204,6 +10225,27 @@ public final class ClientProtos { return this; } + // optional uint64 maxResultSize = 10; + private long maxResultSize_ ; + public boolean hasMaxResultSize() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + public long getMaxResultSize() { + return maxResultSize_; + } + public Builder setMaxResultSize(long value) { + bitField0_ |= 0x00000200; + maxResultSize_ = value; + onChanged(); + return this; + } + public Builder clearMaxResultSize() { + bitField0_ = (bitField0_ & ~0x00000200); + maxResultSize_ = 0L; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:Scan) } @@ -10405,15 +10447,13 @@ public final class ClientProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -11211,15 +11251,13 @@ public final class ClientProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -11954,15 +11992,13 @@ public final class ClientProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -12520,15 +12556,13 @@ public final class ClientProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -12977,15 +13011,13 @@ public final class ClientProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -13463,15 +13495,13 @@ public final class ClientProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -13802,12 +13832,12 @@ public final class ClientProtos { // required string path = 2; public static final int PATH_FIELD_NUMBER = 2; - private java.lang.Object path_; + private Object path_; public boolean hasPath() { return ((bitField0_ & 0x00000002) == 0x00000002); } public String getPath() { - java.lang.Object ref = path_; + Object ref = path_; if (ref instanceof String) { return (String) ref; } else { @@ -13821,7 +13851,7 @@ public final class ClientProtos { } } private com.google.protobuf.ByteString getPathBytes() { - java.lang.Object ref = path_; + Object ref = path_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); @@ -13884,15 +13914,13 @@ public final class ClientProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -14197,12 +14225,12 @@ public final class ClientProtos { } // required string path = 2; - private java.lang.Object path_ = ""; + private Object path_ = ""; public boolean hasPath() { return ((bitField0_ & 0x00000002) == 0x00000002); } public String getPath() { - java.lang.Object ref = path_; + Object ref = path_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); path_ = s; @@ -14336,15 +14364,13 @@ public final class ClientProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -15047,15 +15073,13 @@ public final class ClientProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -15416,12 +15440,12 @@ public final class ClientProtos { // required string protocolName = 2; public static final int PROTOCOLNAME_FIELD_NUMBER = 2; - private java.lang.Object protocolName_; + private Object protocolName_; public boolean hasProtocolName() { return ((bitField0_ & 0x00000002) == 0x00000002); } public String getProtocolName() { - java.lang.Object ref = protocolName_; + Object ref = protocolName_; if (ref instanceof String) { return (String) ref; } else { @@ -15435,7 +15459,7 @@ public final class ClientProtos { } } private com.google.protobuf.ByteString getProtocolNameBytes() { - java.lang.Object ref = protocolName_; + Object ref = protocolName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); @@ -15448,12 +15472,12 @@ public final class ClientProtos { // required string methodName = 3; public static final int METHODNAME_FIELD_NUMBER = 3; - private java.lang.Object methodName_; + private Object methodName_; public boolean hasMethodName() { return ((bitField0_ & 0x00000004) == 0x00000004); } public String getMethodName() { - java.lang.Object ref = methodName_; + Object ref = methodName_; if (ref instanceof String) { return (String) ref; } else { @@ -15467,7 +15491,7 @@ public final class ClientProtos { } } private com.google.protobuf.ByteString getMethodNameBytes() { - java.lang.Object ref = methodName_; + Object ref = methodName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); @@ -15612,15 +15636,13 @@ public final class ClientProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -16072,12 +16094,12 @@ public final class ClientProtos { } // required string protocolName = 2; - private java.lang.Object protocolName_ = ""; + private Object protocolName_ = ""; public boolean hasProtocolName() { return ((bitField0_ & 0x00000002) == 0x00000002); } public String getProtocolName() { - java.lang.Object ref = protocolName_; + Object ref = protocolName_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); protocolName_ = s; @@ -16108,12 +16130,12 @@ public final class ClientProtos { } // required string methodName = 3; - private java.lang.Object methodName_ = ""; + private Object methodName_ = ""; public boolean hasMethodName() { return ((bitField0_ & 0x00000004) == 0x00000004); } public String getMethodName() { - java.lang.Object ref = methodName_; + Object ref = methodName_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); methodName_ = s; @@ -16654,15 +16676,13 @@ public final class ClientProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -17261,15 +17281,13 @@ public final class ClientProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -17796,15 +17814,13 @@ public final class ClientProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -18561,15 +18577,13 @@ public final class ClientProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -19231,15 +19245,13 @@ public final class ClientProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -20004,15 +20016,13 @@ public final class ClientProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -21355,55 +21365,56 @@ public final class ClientProtos { "\001 \002(\0132\020.RegionSpecifier\022\027\n\006mutate\030\002 \002(\0132" + "\007.Mutate\022\035\n\tcondition\030\003 \001(\0132\n.Condition\"" + "<\n\016MutateResponse\022\027\n\006result\030\001 \001(\0132\007.Resu" + - "lt\022\021\n\tprocessed\030\002 \001(\010\"\352\001\n\004Scan\022\027\n\006column" + + "lt\022\021\n\tprocessed\030\002 \001(\010\"\201\002\n\004Scan\022\027\n\006column" + "\030\001 \003(\0132\007.Column\022!\n\tattribute\030\002 \003(\0132\016.Nam" + "eBytesPair\022\020\n\010startRow\030\003 \001(\014\022\017\n\007stopRow\030", "\004 \001(\014\022\036\n\006filter\030\005 \001(\0132\016.NameBytesPair\022\035\n" + "\ttimeRange\030\006 \001(\0132\n.TimeRange\022\026\n\013maxVersi" + "ons\030\007 \001(\r:\0011\022\031\n\013cacheBlocks\030\010 \001(\010:\004true\022" + - "\021\n\tbatchSize\030\t \001(\r\"\203\001\n\013ScanRequest\022 \n\006re" + - "gion\030\001 \001(\0132\020.RegionSpecifier\022\023\n\004scan\030\002 \001" + - "(\0132\005.Scan\022\021\n\tscannerId\030\003 \001(\004\022\024\n\014numberOf" + - "Rows\030\004 \001(\r\022\024\n\014closeScanner\030\005 \001(\010\"\\\n\014Scan" + - "Response\022\027\n\006result\030\001 \003(\0132\007.Result\022\021\n\tsca" + - "nnerId\030\002 \001(\004\022\023\n\013moreResults\030\003 \001(\010\022\013\n\003ttl" + - "\030\004 \001(\r\"?\n\016LockRowRequest\022 \n\006region\030\001 \002(\013", - "2\020.RegionSpecifier\022\013\n\003row\030\002 \003(\014\".\n\017LockR" + - "owResponse\022\016\n\006lockId\030\001 \002(\004\022\013\n\003ttl\030\002 \001(\r\"" + - "D\n\020UnlockRowRequest\022 \n\006region\030\001 \002(\0132\020.Re" + - "gionSpecifier\022\016\n\006lockId\030\002 \002(\004\"\023\n\021UnlockR" + - "owResponse\"\232\001\n\024BulkLoadHFileRequest\022 \n\006r" + - "egion\030\001 \002(\0132\020.RegionSpecifier\0224\n\nfamilyP" + - "ath\030\002 \003(\0132 .BulkLoadHFileRequest.FamilyP" + - "ath\032*\n\nFamilyPath\022\016\n\006family\030\001 \002(\014\022\014\n\004pat" + - "h\030\002 \002(\t\"\'\n\025BulkLoadHFileResponse\022\016\n\006load" + - "ed\030\001 \002(\010\"\203\001\n\004Exec\022\013\n\003row\030\001 \002(\014\022\024\n\014protoc", - "olName\030\002 \002(\t\022\022\n\nmethodName\030\003 \002(\t\022!\n\010prop" + - "erty\030\004 \003(\0132\017.NameStringPair\022!\n\tparameter" + - "\030\005 \003(\0132\016.NameBytesPair\"O\n\026ExecCoprocesso" + - "rRequest\022 \n\006region\030\001 \002(\0132\020.RegionSpecifi" + - "er\022\023\n\004call\030\002 \002(\0132\005.Exec\"8\n\027ExecCoprocess" + - "orResponse\022\035\n\005value\030\001 \002(\0132\016.NameBytesPai" + - "r\"N\n\013MultiAction\022\027\n\006mutate\030\001 \001(\0132\007.Mutat" + - "e\022\021\n\003get\030\002 \001(\0132\004.Get\022\023\n\004exec\030\003 \001(\0132\005.Exe" + - "c\"P\n\014ActionResult\022\035\n\005value\030\001 \001(\0132\016.NameB" + - "ytesPair\022!\n\texception\030\002 \001(\0132\016.NameBytesP", - "air\"^\n\014MultiRequest\022 \n\006region\030\001 \002(\0132\020.Re" + - "gionSpecifier\022\034\n\006action\030\002 \003(\0132\014.MultiAct" + - "ion\022\016\n\006atomic\030\003 \001(\010\".\n\rMultiResponse\022\035\n\006" + - "result\030\001 \003(\0132\r.ActionResult2\221\003\n\rClientSe" + - "rvice\022 \n\003get\022\013.GetRequest\032\014.GetResponse\022" + - ")\n\006mutate\022\016.MutateRequest\032\017.MutateRespon" + - "se\022#\n\004scan\022\014.ScanRequest\032\r.ScanResponse\022" + - ",\n\007lockRow\022\017.LockRowRequest\032\020.LockRowRes" + - "ponse\0222\n\tunlockRow\022\021.UnlockRowRequest\032\022." + - "UnlockRowResponse\022>\n\rbulkLoadHFile\022\025.Bul", - "kLoadHFileRequest\032\026.BulkLoadHFileRespons" + - "e\022D\n\017execCoprocessor\022\027.ExecCoprocessorRe" + - "quest\032\030.ExecCoprocessorResponse\022&\n\005multi" + - "\022\r.MultiRequest\032\016.MultiResponseBB\n*org.a" + - "pache.hadoop.hbase.protobuf.generatedB\014C" + - "lientProtosH\001\210\001\001\240\001\001" + "\021\n\tbatchSize\030\t \001(\r\022\025\n\rmaxResultSize\030\n \001(" + + "\004\"\203\001\n\013ScanRequest\022 \n\006region\030\001 \001(\0132\020.Regi" + + "onSpecifier\022\023\n\004scan\030\002 \001(\0132\005.Scan\022\021\n\tscan" + + "nerId\030\003 \001(\004\022\024\n\014numberOfRows\030\004 \001(\r\022\024\n\014clo" + + "seScanner\030\005 \001(\010\"\\\n\014ScanResponse\022\027\n\006resul" + + "t\030\001 \003(\0132\007.Result\022\021\n\tscannerId\030\002 \001(\004\022\023\n\013m" + + "oreResults\030\003 \001(\010\022\013\n\003ttl\030\004 \001(\r\"?\n\016LockRow", + "Request\022 \n\006region\030\001 \002(\0132\020.RegionSpecifie" + + "r\022\013\n\003row\030\002 \003(\014\".\n\017LockRowResponse\022\016\n\006loc" + + "kId\030\001 \002(\004\022\013\n\003ttl\030\002 \001(\r\"D\n\020UnlockRowReque" + + "st\022 \n\006region\030\001 \002(\0132\020.RegionSpecifier\022\016\n\006" + + "lockId\030\002 \002(\004\"\023\n\021UnlockRowResponse\"\232\001\n\024Bu" + + "lkLoadHFileRequest\022 \n\006region\030\001 \002(\0132\020.Reg" + + "ionSpecifier\0224\n\nfamilyPath\030\002 \003(\0132 .BulkL" + + "oadHFileRequest.FamilyPath\032*\n\nFamilyPath" + + "\022\016\n\006family\030\001 \002(\014\022\014\n\004path\030\002 \002(\t\"\'\n\025BulkLo" + + "adHFileResponse\022\016\n\006loaded\030\001 \002(\010\"\203\001\n\004Exec", + "\022\013\n\003row\030\001 \002(\014\022\024\n\014protocolName\030\002 \002(\t\022\022\n\nm" + + "ethodName\030\003 \002(\t\022!\n\010property\030\004 \003(\0132\017.Name" + + "StringPair\022!\n\tparameter\030\005 \003(\0132\016.NameByte" + + "sPair\"O\n\026ExecCoprocessorRequest\022 \n\006regio" + + "n\030\001 \002(\0132\020.RegionSpecifier\022\023\n\004call\030\002 \002(\0132" + + "\005.Exec\"8\n\027ExecCoprocessorResponse\022\035\n\005val" + + "ue\030\001 \002(\0132\016.NameBytesPair\"N\n\013MultiAction\022" + + "\027\n\006mutate\030\001 \001(\0132\007.Mutate\022\021\n\003get\030\002 \001(\0132\004." + + "Get\022\023\n\004exec\030\003 \001(\0132\005.Exec\"P\n\014ActionResult" + + "\022\035\n\005value\030\001 \001(\0132\016.NameBytesPair\022!\n\texcep", + "tion\030\002 \001(\0132\016.NameBytesPair\"^\n\014MultiReque" + + "st\022 \n\006region\030\001 \002(\0132\020.RegionSpecifier\022\034\n\006" + + "action\030\002 \003(\0132\014.MultiAction\022\016\n\006atomic\030\003 \001" + + "(\010\".\n\rMultiResponse\022\035\n\006result\030\001 \003(\0132\r.Ac" + + "tionResult2\221\003\n\rClientService\022 \n\003get\022\013.Ge" + + "tRequest\032\014.GetResponse\022)\n\006mutate\022\016.Mutat" + + "eRequest\032\017.MutateResponse\022#\n\004scan\022\014.Scan" + + "Request\032\r.ScanResponse\022,\n\007lockRow\022\017.Lock" + + "RowRequest\032\020.LockRowResponse\0222\n\tunlockRo" + + "w\022\021.UnlockRowRequest\032\022.UnlockRowResponse", + "\022>\n\rbulkLoadHFile\022\025.BulkLoadHFileRequest" + + "\032\026.BulkLoadHFileResponse\022D\n\017execCoproces" + + "sor\022\027.ExecCoprocessorRequest\032\030.ExecCopro" + + "cessorResponse\022&\n\005multi\022\r.MultiRequest\032\016" + + ".MultiResponseBB\n*org.apache.hadoop.hbas" + + "e.protobuf.generatedB\014ClientProtosH\001\210\001\001\240" + + "\001\001" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -21503,7 +21514,7 @@ public final class ClientProtos { internal_static_Scan_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_Scan_descriptor, - new java.lang.String[] { "Column", "Attribute", "StartRow", "StopRow", "Filter", "TimeRange", "MaxVersions", "CacheBlocks", "BatchSize", }, + new java.lang.String[] { "Column", "Attribute", "StartRow", "StopRow", "Filter", "TimeRange", "MaxVersions", "CacheBlocks", "BatchSize", "MaxResultSize", }, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.class, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.Builder.class); internal_static_ScanRequest_descriptor = diff --git a/src/main/java/org/apache/hadoop/hbase/protobuf/generated/HBaseProtos.java b/src/main/java/org/apache/hadoop/hbase/protobuf/generated/HBaseProtos.java index efcf74d2f1b..1b4a6312844 100644 --- a/src/main/java/org/apache/hadoop/hbase/protobuf/generated/HBaseProtos.java +++ b/src/main/java/org/apache/hadoop/hbase/protobuf/generated/HBaseProtos.java @@ -289,15 +289,13 @@ public final class HBaseProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -996,15 +994,13 @@ public final class HBaseProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -1453,15 +1449,13 @@ public final class HBaseProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -1990,15 +1984,13 @@ public final class HBaseProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -2578,12 +2570,12 @@ public final class HBaseProtos { private int bitField0_; // required string hostName = 1; public static final int HOSTNAME_FIELD_NUMBER = 1; - private java.lang.Object hostName_; + private Object hostName_; public boolean hasHostName() { return ((bitField0_ & 0x00000001) == 0x00000001); } public String getHostName() { - java.lang.Object ref = hostName_; + Object ref = hostName_; if (ref instanceof String) { return (String) ref; } else { @@ -2597,7 +2589,7 @@ public final class HBaseProtos { } } private com.google.protobuf.ByteString getHostNameBytes() { - java.lang.Object ref = hostName_; + Object ref = hostName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); @@ -2684,15 +2676,13 @@ public final class HBaseProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -2992,12 +2982,12 @@ public final class HBaseProtos { private int bitField0_; // required string hostName = 1; - private java.lang.Object hostName_ = ""; + private Object hostName_ = ""; public boolean hasHostName() { return ((bitField0_ & 0x00000001) == 0x00000001); } public String getHostName() { - java.lang.Object ref = hostName_; + Object ref = hostName_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); hostName_ = s; @@ -3122,12 +3112,12 @@ public final class HBaseProtos { private int bitField0_; // required string name = 1; public static final int NAME_FIELD_NUMBER = 1; - private java.lang.Object name_; + private Object name_; public boolean hasName() { return ((bitField0_ & 0x00000001) == 0x00000001); } public String getName() { - java.lang.Object ref = name_; + Object ref = name_; if (ref instanceof String) { return (String) ref; } else { @@ -3141,7 +3131,7 @@ public final class HBaseProtos { } } private com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; + Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); @@ -3154,12 +3144,12 @@ public final class HBaseProtos { // required string value = 2; public static final int VALUE_FIELD_NUMBER = 2; - private java.lang.Object value_; + private Object value_; public boolean hasValue() { return ((bitField0_ & 0x00000002) == 0x00000002); } public String getValue() { - java.lang.Object ref = value_; + Object ref = value_; if (ref instanceof String) { return (String) ref; } else { @@ -3173,7 +3163,7 @@ public final class HBaseProtos { } } private com.google.protobuf.ByteString getValueBytes() { - java.lang.Object ref = value_; + Object ref = value_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); @@ -3236,15 +3226,13 @@ public final class HBaseProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -3525,12 +3513,12 @@ public final class HBaseProtos { private int bitField0_; // required string name = 1; - private java.lang.Object name_ = ""; + private Object name_ = ""; public boolean hasName() { return ((bitField0_ & 0x00000001) == 0x00000001); } public String getName() { - java.lang.Object ref = name_; + Object ref = name_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); name_ = s; @@ -3561,12 +3549,12 @@ public final class HBaseProtos { } // required string value = 2; - private java.lang.Object value_ = ""; + private Object value_ = ""; public boolean hasValue() { return ((bitField0_ & 0x00000002) == 0x00000002); } public String getValue() { - java.lang.Object ref = value_; + Object ref = value_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); value_ = s; @@ -3649,12 +3637,12 @@ public final class HBaseProtos { private int bitField0_; // required string name = 1; public static final int NAME_FIELD_NUMBER = 1; - private java.lang.Object name_; + private Object name_; public boolean hasName() { return ((bitField0_ & 0x00000001) == 0x00000001); } public String getName() { - java.lang.Object ref = name_; + Object ref = name_; if (ref instanceof String) { return (String) ref; } else { @@ -3668,7 +3656,7 @@ public final class HBaseProtos { } } private com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; + Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); @@ -3737,15 +3725,13 @@ public final class HBaseProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -4022,12 +4008,12 @@ public final class HBaseProtos { private int bitField0_; // required string name = 1; - private java.lang.Object name_ = ""; + private Object name_ = ""; public boolean hasName() { return ((bitField0_ & 0x00000001) == 0x00000001); } public String getName() { - java.lang.Object ref = name_; + Object ref = name_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); name_ = s; diff --git a/src/main/java/org/apache/hadoop/hbase/protobuf/generated/RPCProtos.java b/src/main/java/org/apache/hadoop/hbase/protobuf/generated/RPCProtos.java index 9c416fa0a1f..8b45f038699 100644 --- a/src/main/java/org/apache/hadoop/hbase/protobuf/generated/RPCProtos.java +++ b/src/main/java/org/apache/hadoop/hbase/protobuf/generated/RPCProtos.java @@ -50,12 +50,12 @@ public final class RPCProtos { private int bitField0_; // required string effectiveUser = 1; public static final int EFFECTIVEUSER_FIELD_NUMBER = 1; - private java.lang.Object effectiveUser_; + private Object effectiveUser_; public boolean hasEffectiveUser() { return ((bitField0_ & 0x00000001) == 0x00000001); } public String getEffectiveUser() { - java.lang.Object ref = effectiveUser_; + Object ref = effectiveUser_; if (ref instanceof String) { return (String) ref; } else { @@ -69,7 +69,7 @@ public final class RPCProtos { } } private com.google.protobuf.ByteString getEffectiveUserBytes() { - java.lang.Object ref = effectiveUser_; + Object ref = effectiveUser_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); @@ -82,12 +82,12 @@ public final class RPCProtos { // required string realUser = 2; public static final int REALUSER_FIELD_NUMBER = 2; - private java.lang.Object realUser_; + private Object realUser_; public boolean hasRealUser() { return ((bitField0_ & 0x00000002) == 0x00000002); } public String getRealUser() { - java.lang.Object ref = realUser_; + Object ref = realUser_; if (ref instanceof String) { return (String) ref; } else { @@ -101,7 +101,7 @@ public final class RPCProtos { } } private com.google.protobuf.ByteString getRealUserBytes() { - java.lang.Object ref = realUser_; + Object ref = realUser_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); @@ -164,15 +164,13 @@ public final class RPCProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -453,12 +451,12 @@ public final class RPCProtos { private int bitField0_; // required string effectiveUser = 1; - private java.lang.Object effectiveUser_ = ""; + private Object effectiveUser_ = ""; public boolean hasEffectiveUser() { return ((bitField0_ & 0x00000001) == 0x00000001); } public String getEffectiveUser() { - java.lang.Object ref = effectiveUser_; + Object ref = effectiveUser_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); effectiveUser_ = s; @@ -489,12 +487,12 @@ public final class RPCProtos { } // required string realUser = 2; - private java.lang.Object realUser_ = ""; + private Object realUser_ = ""; public boolean hasRealUser() { return ((bitField0_ & 0x00000002) == 0x00000002); } public String getRealUser() { - java.lang.Object ref = realUser_; + Object ref = realUser_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); realUser_ = s; @@ -591,12 +589,12 @@ public final class RPCProtos { // optional string protocol = 2 [default = "org.apache.hadoop.hbase.ipc.HRegionInterface"]; public static final int PROTOCOL_FIELD_NUMBER = 2; - private java.lang.Object protocol_; + private Object protocol_; public boolean hasProtocol() { return ((bitField0_ & 0x00000002) == 0x00000002); } public String getProtocol() { - java.lang.Object ref = protocol_; + Object ref = protocol_; if (ref instanceof String) { return (String) ref; } else { @@ -610,7 +608,7 @@ public final class RPCProtos { } } private com.google.protobuf.ByteString getProtocolBytes() { - java.lang.Object ref = protocol_; + Object ref = protocol_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); @@ -671,15 +669,13 @@ public final class RPCProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -1061,12 +1057,12 @@ public final class RPCProtos { } // optional string protocol = 2 [default = "org.apache.hadoop.hbase.ipc.HRegionInterface"]; - private java.lang.Object protocol_ = "org.apache.hadoop.hbase.ipc.HRegionInterface"; + private Object protocol_ = "org.apache.hadoop.hbase.ipc.HRegionInterface"; public boolean hasProtocol() { return ((bitField0_ & 0x00000002) == 0x00000002); } public String getProtocol() { - java.lang.Object ref = protocol_; + Object ref = protocol_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); protocol_ = s; @@ -1215,15 +1211,13 @@ public final class RPCProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -1597,12 +1591,12 @@ public final class RPCProtos { private int bitField0_; // required string exceptionName = 1; public static final int EXCEPTIONNAME_FIELD_NUMBER = 1; - private java.lang.Object exceptionName_; + private Object exceptionName_; public boolean hasExceptionName() { return ((bitField0_ & 0x00000001) == 0x00000001); } public String getExceptionName() { - java.lang.Object ref = exceptionName_; + Object ref = exceptionName_; if (ref instanceof String) { return (String) ref; } else { @@ -1616,7 +1610,7 @@ public final class RPCProtos { } } private com.google.protobuf.ByteString getExceptionNameBytes() { - java.lang.Object ref = exceptionName_; + Object ref = exceptionName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); @@ -1629,12 +1623,12 @@ public final class RPCProtos { // optional string stackTrace = 2; public static final int STACKTRACE_FIELD_NUMBER = 2; - private java.lang.Object stackTrace_; + private Object stackTrace_; public boolean hasStackTrace() { return ((bitField0_ & 0x00000002) == 0x00000002); } public String getStackTrace() { - java.lang.Object ref = stackTrace_; + Object ref = stackTrace_; if (ref instanceof String) { return (String) ref; } else { @@ -1648,7 +1642,7 @@ public final class RPCProtos { } } private com.google.protobuf.ByteString getStackTraceBytes() { - java.lang.Object ref = stackTrace_; + Object ref = stackTrace_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); @@ -1707,15 +1701,13 @@ public final class RPCProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -1992,12 +1984,12 @@ public final class RPCProtos { private int bitField0_; // required string exceptionName = 1; - private java.lang.Object exceptionName_ = ""; + private Object exceptionName_ = ""; public boolean hasExceptionName() { return ((bitField0_ & 0x00000001) == 0x00000001); } public String getExceptionName() { - java.lang.Object ref = exceptionName_; + Object ref = exceptionName_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); exceptionName_ = s; @@ -2028,12 +2020,12 @@ public final class RPCProtos { } // optional string stackTrace = 2; - private java.lang.Object stackTrace_ = ""; + private Object stackTrace_ = ""; public boolean hasStackTrace() { return ((bitField0_ & 0x00000002) == 0x00000002); } public String getStackTrace() { - java.lang.Object ref = stackTrace_; + Object ref = stackTrace_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); stackTrace_ = s; @@ -2240,15 +2232,13 @@ public final class RPCProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } diff --git a/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ZooKeeperProtos.java b/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ZooKeeperProtos.java index 6be9b7c3a54..827fb230a13 100644 --- a/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ZooKeeperProtos.java +++ b/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ZooKeeperProtos.java @@ -102,15 +102,13 @@ public final class ZooKeeperProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -575,15 +573,13 @@ public final class ZooKeeperProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -992,12 +988,12 @@ public final class ZooKeeperProtos { private int bitField0_; // required string clusterId = 1; public static final int CLUSTERID_FIELD_NUMBER = 1; - private java.lang.Object clusterId_; + private Object clusterId_; public boolean hasClusterId() { return ((bitField0_ & 0x00000001) == 0x00000001); } public String getClusterId() { - java.lang.Object ref = clusterId_; + Object ref = clusterId_; if (ref instanceof String) { return (String) ref; } else { @@ -1011,7 +1007,7 @@ public final class ZooKeeperProtos { } } private com.google.protobuf.ByteString getClusterIdBytes() { - java.lang.Object ref = clusterId_; + Object ref = clusterId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); @@ -1062,15 +1058,13 @@ public final class ZooKeeperProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -1324,12 +1318,12 @@ public final class ZooKeeperProtos { private int bitField0_; // required string clusterId = 1; - private java.lang.Object clusterId_ = ""; + private Object clusterId_ = ""; public boolean hasClusterId() { return ((bitField0_ & 0x00000001) == 0x00000001); } public String getClusterId() { - java.lang.Object ref = clusterId_; + Object ref = clusterId_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); clusterId_ = s; @@ -1408,12 +1402,12 @@ public final class ZooKeeperProtos { private int bitField0_; // required string startDate = 1; public static final int STARTDATE_FIELD_NUMBER = 1; - private java.lang.Object startDate_; + private Object startDate_; public boolean hasStartDate() { return ((bitField0_ & 0x00000001) == 0x00000001); } public String getStartDate() { - java.lang.Object ref = startDate_; + Object ref = startDate_; if (ref instanceof String) { return (String) ref; } else { @@ -1427,7 +1421,7 @@ public final class ZooKeeperProtos { } } private com.google.protobuf.ByteString getStartDateBytes() { - java.lang.Object ref = startDate_; + Object ref = startDate_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); @@ -1478,15 +1472,13 @@ public final class ZooKeeperProtos { return size; } - private static final long serialVersionUID = 0L; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { + protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -1740,12 +1732,12 @@ public final class ZooKeeperProtos { private int bitField0_; // required string startDate = 1; - private java.lang.Object startDate_ = ""; + private Object startDate_ = ""; public boolean hasStartDate() { return ((bitField0_ & 0x00000001) == 0x00000001); } public String getStartDate() { - java.lang.Object ref = startDate_; + Object ref = startDate_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); startDate_ = s; diff --git a/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java b/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java index 6e1b475a644..8df9eeb951a 100644 --- a/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java +++ b/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java @@ -3304,6 +3304,7 @@ public class HRegion implements HeapSize { // , Writable{ private int isScan; private boolean filterClosed = false; private long readPt; + private long maxResultSize; public HRegionInfo getRegionInfo() { return regionInfo; @@ -3311,6 +3312,7 @@ public class HRegion implements HeapSize { // , Writable{ RegionScannerImpl(Scan scan, List additionalScanners) throws IOException { //DebugPrint.println("HRegionScanner."); + this.maxResultSize = scan.getMaxResultSize(); this.filter = scan.getFilter(); this.batch = scan.getBatch(); if (Bytes.equals(scan.getStopRow(), HConstants.EMPTY_END_ROW)) { @@ -3354,6 +3356,11 @@ public class HRegion implements HeapSize { // , Writable{ this(scan, null); } + @Override + public long getMaxResultSize() { + return maxResultSize; + } + /** * Reset both the filter and the old filter. */ diff --git a/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java index e8137cbea02..6cd64871da1 100644 --- a/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java +++ b/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java @@ -2200,9 +2200,13 @@ public class HRegionServer extends RegionServer : results.toArray(new Result[0]); } } - - for (int i = 0; i < nbRows - && currentScanResultSize < maxScannerResultSize; i++) { + long maxResultSize; + if (s.getMaxResultSize() > 0) { + maxResultSize = s.getMaxResultSize(); + } else { + maxResultSize = maxScannerResultSize; + } + for (int i = 0; i < nbRows && currentScanResultSize < maxResultSize; i++) { requestCount.incrementAndGet(); // Collect values to be returned here boolean moreRows = s.next(values, SchemaMetrics.METRIC_NEXTSIZE); diff --git a/src/main/java/org/apache/hadoop/hbase/regionserver/RegionScanner.java b/src/main/java/org/apache/hadoop/hbase/regionserver/RegionScanner.java index f77ea5732f5..f36650ec8bb 100644 --- a/src/main/java/org/apache/hadoop/hbase/regionserver/RegionScanner.java +++ b/src/main/java/org/apache/hadoop/hbase/regionserver/RegionScanner.java @@ -23,6 +23,7 @@ import java.io.IOException; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.hbase.HRegionInfo; +import org.apache.hadoop.hbase.client.Scan; /** * RegionScanner describes iterators over rows in an HRegion. @@ -52,4 +53,8 @@ public interface RegionScanner extends InternalScanner { */ public boolean reseek(byte[] row) throws IOException; + /** + * @return The preferred max buffersize. See {@link Scan#setMaxResultSize(long)} + */ + public long getMaxResultSize(); } diff --git a/src/main/java/org/apache/hadoop/hbase/regionserver/RegionServer.java b/src/main/java/org/apache/hadoop/hbase/regionserver/RegionServer.java index b88925478a0..c2c89ea1dc0 100644 --- a/src/main/java/org/apache/hadoop/hbase/regionserver/RegionServer.java +++ b/src/main/java/org/apache/hadoop/hbase/regionserver/RegionServer.java @@ -819,11 +819,17 @@ public abstract class RegionServer implements done = true; } } + long maxResultSize; + if (scanner.getMaxResultSize() > 0) { + maxResultSize = scanner.getMaxResultSize(); + } else { + maxResultSize = maxScannerResultSize; + } if (!done) { List values = new ArrayList(); for (int i = 0; i < rows - && currentScanResultSize < maxScannerResultSize; i++) { + && currentScanResultSize < maxResultSize; i++) { // Collect values to be returned here boolean moreRows = scanner.next(values, SchemaMetrics.METRIC_NEXTSIZE); if (!values.isEmpty()) { diff --git a/src/main/protobuf/Client.proto b/src/main/protobuf/Client.proto index 138274b94fe..ad2cb934433 100644 --- a/src/main/protobuf/Client.proto +++ b/src/main/protobuf/Client.proto @@ -194,6 +194,7 @@ message Scan { optional uint32 maxVersions = 7 [default = 1]; optional bool cacheBlocks = 8 [default = true]; optional uint32 batchSize = 9; + optional uint64 maxResultSize = 10; } /** diff --git a/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java b/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java index 89a6fa7ddb9..f52c35eceb5 100644 --- a/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java +++ b/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java @@ -111,6 +111,11 @@ public class TestCoprocessorInterface extends HBaseTestCase { return false; } + @Override + public long getMaxResultSize() { + return delegate.getMaxResultSize(); + } + } public static class CoprocessorImpl extends BaseRegionObserver {