diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java index caa8f4e..2d25e84 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java @@ -882,6 +882,9 @@ public final class ProtobufUtil { if (scan.isSmall()) { scanBuilder.setSmall(scan.isSmall()); } + if (scan.getAllowPartialResults()) { + scanBuilder.setAllowPartialResults(scan.getAllowPartialResults()); + } Boolean loadColumnFamiliesOnDemand = scan.getLoadColumnFamiliesOnDemandValue(); if (loadColumnFamiliesOnDemand != null) { scanBuilder.setLoadColumnFamiliesOnDemand(loadColumnFamiliesOnDemand.booleanValue()); @@ -1006,6 +1012,9 @@ public final class ProtobufUtil { if (proto.hasSmall()) { scan.setSmall(proto.getSmall()); } + if (proto.hasAllowPartialResults()) { + scan.setAllowPartialResults(proto.getAllowPartialResults()); + } for (NameBytesPair attribute: proto.getAttributeList()) { scan.setAttribute(attribute.getName(), attribute.getValue().toByteArray()); } diff --git a/hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ClientProtos.java b/hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ClientProtos.java index c90a625..cb13fc0 100644 --- a/hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ClientProtos.java +++ b/hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/ClientProtos.java @@ -13814,6 +13814,16 @@ public final class ClientProtos { * optional uint32 caching = 17; */ int getCaching(); + + // optional bool allow_partial_results = 18; + /** + * optional bool allow_partial_results = 18; + */ + boolean hasAllowPartialResults(); + /** + * optional bool allow_partial_results = 18; + */ + boolean getAllowPartialResults(); } /** * Protobuf type {@code hbase.pb.Scan} @@ -13990,6 +14000,11 @@ public final class ClientProtos { caching_ = input.readUInt32(); break; } + case 144: { + bitField0_ |= 0x00008000; + allowPartialResults_ = input.readBool(); + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -14368,6 +14383,22 @@ public final class ClientProtos { return caching_; } + // optional bool allow_partial_results = 18; + public static final int ALLOW_PARTIAL_RESULTS_FIELD_NUMBER = 18; + private boolean allowPartialResults_; + /** + * optional bool allow_partial_results = 18; + */ + public boolean hasAllowPartialResults() { + return ((bitField0_ & 0x00008000) == 0x00008000); + } + /** + * optional bool allow_partial_results = 18; + */ + public boolean getAllowPartialResults() { + return allowPartialResults_; + } + private void initFields() { column_ = java.util.Collections.emptyList(); attribute_ = java.util.Collections.emptyList(); @@ -14386,6 +14417,7 @@ public final class ClientProtos { reversed_ = false; consistency_ = org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Consistency.STRONG; caching_ = 0; + allowPartialResults_ = false; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -14468,6 +14500,9 @@ public final class ClientProtos { if (((bitField0_ & 0x00004000) == 0x00004000)) { output.writeUInt32(17, caching_); } + if (((bitField0_ & 0x00008000) == 0x00008000)) { + output.writeBool(18, allowPartialResults_); + } getUnknownFields().writeTo(output); } @@ -14545,6 +14580,10 @@ public final class ClientProtos { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(17, caching_); } + if (((bitField0_ & 0x00008000) == 0x00008000)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(18, allowPartialResults_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -14647,6 +14686,11 @@ public final class ClientProtos { result = result && (getCaching() == other.getCaching()); } + result = result && (hasAllowPartialResults() == other.hasAllowPartialResults()); + if (hasAllowPartialResults()) { + result = result && (getAllowPartialResults() + == other.getAllowPartialResults()); + } result = result && getUnknownFields().equals(other.getUnknownFields()); return result; @@ -14728,6 +14772,10 @@ public final class ClientProtos { hash = (37 * hash) + CACHING_FIELD_NUMBER; hash = (53 * hash) + getCaching(); } + if (hasAllowPartialResults()) { + hash = (37 * hash) + ALLOW_PARTIAL_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + hashBoolean(getAllowPartialResults()); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -14902,6 +14950,8 @@ public final class ClientProtos { bitField0_ = (bitField0_ & ~0x00008000); caching_ = 0; bitField0_ = (bitField0_ & ~0x00010000); + allowPartialResults_ = false; + bitField0_ = (bitField0_ & ~0x00020000); return this; } @@ -15016,6 +15066,10 @@ public final class ClientProtos { to_bitField0_ |= 0x00004000; } result.caching_ = caching_; + if (((from_bitField0_ & 0x00020000) == 0x00020000)) { + to_bitField0_ |= 0x00008000; + } + result.allowPartialResults_ = allowPartialResults_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -15129,6 +15183,9 @@ public final class ClientProtos { if (other.hasCaching()) { setCaching(other.getCaching()); } + if (other.hasAllowPartialResults()) { + setAllowPartialResults(other.getAllowPartialResults()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -16342,6 +16399,39 @@ public final class ClientProtos { return this; } + // optional bool allow_partial_results = 18; + private boolean allowPartialResults_ ; + /** + * optional bool allow_partial_results = 18; + */ + public boolean hasAllowPartialResults() { + return ((bitField0_ & 0x00020000) == 0x00020000); + } + /** + * optional bool allow_partial_results = 18; + */ + public boolean getAllowPartialResults() { + return allowPartialResults_; + } + /** + * optional bool allow_partial_results = 18; + */ + public Builder setAllowPartialResults(boolean value) { + bitField0_ |= 0x00020000; + allowPartialResults_ = value; + onChanged(); + return this; + } + /** + * optional bool allow_partial_results = 18; + */ + public Builder clearAllowPartialResults() { + bitField0_ = (bitField0_ & ~0x00020000); + allowPartialResults_ = false; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:hbase.pb.Scan) } @@ -33301,7 +33391,7 @@ public final class ClientProtos { "ationProto\022&\n\tcondition\030\003 \001(\0132\023.hbase.pb" + ".Condition\022\023\n\013nonce_group\030\004 \001(\004\"E\n\016Mutat" + "eResponse\022 \n\006result\030\001 \001(\0132\020.hbase.pb.Res" + - "ult\022\021\n\tprocessed\030\002 \001(\010\"\346\003\n\004Scan\022 \n\006colum" + + "ult\022\021\n\tprocessed\030\002 \001(\010\"\205\004\n\004Scan\022 \n\006colum" + "n\030\001 \003(\0132\020.hbase.pb.Column\022*\n\tattribute\030\002" + " \003(\0132\027.hbase.pb.NameBytesPair\022\021\n\tstart_r" + "ow\030\003 \001(\014\022\020\n\010stop_row\030\004 \001(\014\022 \n\006filter\030\005 \001" + @@ -33313,75 +33403,76 @@ public final class ClientProtos { "(\r\022&\n\036load_column_families_on_demand\030\r \001" + "(\010\022\r\n\005small\030\016 \001(\010\022\027\n\010reversed\030\017 \001(\010:\005fal" + "se\0222\n\013consistency\030\020 \001(\0162\025.hbase.pb.Consi" + - "stency:\006STRONG\022\017\n\007caching\030\021 \001(\r\"\220\002\n\013Scan" + - "Request\022)\n\006region\030\001 \001(\0132\031.hbase.pb.Regio" + - "nSpecifier\022\034\n\004scan\030\002 \001(\0132\016.hbase.pb.Scan" + - "\022\022\n\nscanner_id\030\003 \001(\004\022\026\n\016number_of_rows\030\004" + - " \001(\r\022\025\n\rclose_scanner\030\005 \001(\010\022\025\n\rnext_call", - "_seq\030\006 \001(\004\022\037\n\027client_handles_partials\030\007 " + - "\001(\010\022!\n\031client_handles_heartbeats\030\010 \001(\010\022\032" + - "\n\022track_scan_metrics\030\t \001(\010\"\232\002\n\014ScanRespo" + - "nse\022\030\n\020cells_per_result\030\001 \003(\r\022\022\n\nscanner" + - "_id\030\002 \001(\004\022\024\n\014more_results\030\003 \001(\010\022\013\n\003ttl\030\004" + - " \001(\r\022!\n\007results\030\005 \003(\0132\020.hbase.pb.Result\022" + - "\r\n\005stale\030\006 \001(\010\022\037\n\027partial_flag_per_resul" + - "t\030\007 \003(\010\022\036\n\026more_results_in_region\030\010 \001(\010\022" + - "\031\n\021heartbeat_message\030\t \001(\010\022+\n\014scan_metri" + - "cs\030\n \001(\0132\025.hbase.pb.ScanMetrics\"\305\001\n\024Bulk", - "LoadHFileRequest\022)\n\006region\030\001 \002(\0132\031.hbase" + - ".pb.RegionSpecifier\022>\n\013family_path\030\002 \003(\013" + - "2).hbase.pb.BulkLoadHFileRequest.FamilyP" + - "ath\022\026\n\016assign_seq_num\030\003 \001(\010\032*\n\nFamilyPat" + - "h\022\016\n\006family\030\001 \002(\014\022\014\n\004path\030\002 \002(\t\"\'\n\025BulkL" + - "oadHFileResponse\022\016\n\006loaded\030\001 \002(\010\"a\n\026Copr" + - "ocessorServiceCall\022\013\n\003row\030\001 \002(\014\022\024\n\014servi" + - "ce_name\030\002 \002(\t\022\023\n\013method_name\030\003 \002(\t\022\017\n\007re" + - "quest\030\004 \002(\014\"B\n\030CoprocessorServiceResult\022" + - "&\n\005value\030\001 \001(\0132\027.hbase.pb.NameBytesPair\"", - "v\n\031CoprocessorServiceRequest\022)\n\006region\030\001" + - " \002(\0132\031.hbase.pb.RegionSpecifier\022.\n\004call\030" + - "\002 \002(\0132 .hbase.pb.CoprocessorServiceCall\"" + - "o\n\032CoprocessorServiceResponse\022)\n\006region\030" + - "\001 \002(\0132\031.hbase.pb.RegionSpecifier\022&\n\005valu" + - "e\030\002 \002(\0132\027.hbase.pb.NameBytesPair\"\226\001\n\006Act" + - "ion\022\r\n\005index\030\001 \001(\r\022)\n\010mutation\030\002 \001(\0132\027.h" + - "base.pb.MutationProto\022\032\n\003get\030\003 \001(\0132\r.hba" + - "se.pb.Get\0226\n\014service_call\030\004 \001(\0132 .hbase." + - "pb.CoprocessorServiceCall\"k\n\014RegionActio", - "n\022)\n\006region\030\001 \002(\0132\031.hbase.pb.RegionSpeci" + - "fier\022\016\n\006atomic\030\002 \001(\010\022 \n\006action\030\003 \003(\0132\020.h" + - "base.pb.Action\"D\n\017RegionLoadStats\022\027\n\014mem" + - "storeLoad\030\001 \001(\005:\0010\022\030\n\rheapOccupancy\030\002 \001(" + - "\005:\0010\"\332\001\n\021ResultOrException\022\r\n\005index\030\001 \001(" + - "\r\022 \n\006result\030\002 \001(\0132\020.hbase.pb.Result\022*\n\te" + - "xception\030\003 \001(\0132\027.hbase.pb.NameBytesPair\022" + - ":\n\016service_result\030\004 \001(\0132\".hbase.pb.Copro" + - "cessorServiceResult\022,\n\tloadStats\030\005 \001(\0132\031" + - ".hbase.pb.RegionLoadStats\"x\n\022RegionActio", - "nResult\0226\n\021resultOrException\030\001 \003(\0132\033.hba" + - "se.pb.ResultOrException\022*\n\texception\030\002 \001" + - "(\0132\027.hbase.pb.NameBytesPair\"x\n\014MultiRequ" + - "est\022,\n\014regionAction\030\001 \003(\0132\026.hbase.pb.Reg" + - "ionAction\022\022\n\nnonceGroup\030\002 \001(\004\022&\n\tconditi" + - "on\030\003 \001(\0132\023.hbase.pb.Condition\"\\\n\rMultiRe" + - "sponse\0228\n\022regionActionResult\030\001 \003(\0132\034.hba" + - "se.pb.RegionActionResult\022\021\n\tprocessed\030\002 " + - "\001(\010*\'\n\013Consistency\022\n\n\006STRONG\020\000\022\014\n\010TIMELI" + - "NE\020\0012\203\004\n\rClientService\0222\n\003Get\022\024.hbase.pb", - ".GetRequest\032\025.hbase.pb.GetResponse\022;\n\006Mu" + - "tate\022\027.hbase.pb.MutateRequest\032\030.hbase.pb" + - ".MutateResponse\0225\n\004Scan\022\025.hbase.pb.ScanR" + - "equest\032\026.hbase.pb.ScanResponse\022P\n\rBulkLo" + - "adHFile\022\036.hbase.pb.BulkLoadHFileRequest\032" + - "\037.hbase.pb.BulkLoadHFileResponse\022X\n\013Exec" + - "Service\022#.hbase.pb.CoprocessorServiceReq" + - "uest\032$.hbase.pb.CoprocessorServiceRespon" + - "se\022d\n\027ExecRegionServerService\022#.hbase.pb" + - ".CoprocessorServiceRequest\032$.hbase.pb.Co", - "processorServiceResponse\0228\n\005Multi\022\026.hbas" + - "e.pb.MultiRequest\032\027.hbase.pb.MultiRespon" + - "seBB\n*org.apache.hadoop.hbase.protobuf.g" + - "eneratedB\014ClientProtosH\001\210\001\001\240\001\001" + "stency:\006STRONG\022\017\n\007caching\030\021 \001(\r\022\035\n\025allow" + + "_partial_results\030\022 \001(\010\"\220\002\n\013ScanRequest\022)" + + "\n\006region\030\001 \001(\0132\031.hbase.pb.RegionSpecifie" + + "r\022\034\n\004scan\030\002 \001(\0132\016.hbase.pb.Scan\022\022\n\nscann" + + "er_id\030\003 \001(\004\022\026\n\016number_of_rows\030\004 \001(\r\022\025\n\rc", + "lose_scanner\030\005 \001(\010\022\025\n\rnext_call_seq\030\006 \001(" + + "\004\022\037\n\027client_handles_partials\030\007 \001(\010\022!\n\031cl" + + "ient_handles_heartbeats\030\010 \001(\010\022\032\n\022track_s" + + "can_metrics\030\t \001(\010\"\232\002\n\014ScanResponse\022\030\n\020ce" + + "lls_per_result\030\001 \003(\r\022\022\n\nscanner_id\030\002 \001(\004" + + "\022\024\n\014more_results\030\003 \001(\010\022\013\n\003ttl\030\004 \001(\r\022!\n\007r" + + "esults\030\005 \003(\0132\020.hbase.pb.Result\022\r\n\005stale\030" + + "\006 \001(\010\022\037\n\027partial_flag_per_result\030\007 \003(\010\022\036" + + "\n\026more_results_in_region\030\010 \001(\010\022\031\n\021heartb" + + "eat_message\030\t \001(\010\022+\n\014scan_metrics\030\n \001(\0132", + "\025.hbase.pb.ScanMetrics\"\305\001\n\024BulkLoadHFile" + + "Request\022)\n\006region\030\001 \002(\0132\031.hbase.pb.Regio" + + "nSpecifier\022>\n\013family_path\030\002 \003(\0132).hbase." + + "pb.BulkLoadHFileRequest.FamilyPath\022\026\n\016as" + + "sign_seq_num\030\003 \001(\010\032*\n\nFamilyPath\022\016\n\006fami" + + "ly\030\001 \002(\014\022\014\n\004path\030\002 \002(\t\"\'\n\025BulkLoadHFileR" + + "esponse\022\016\n\006loaded\030\001 \002(\010\"a\n\026CoprocessorSe" + + "rviceCall\022\013\n\003row\030\001 \002(\014\022\024\n\014service_name\030\002" + + " \002(\t\022\023\n\013method_name\030\003 \002(\t\022\017\n\007request\030\004 \002" + + "(\014\"B\n\030CoprocessorServiceResult\022&\n\005value\030", + "\001 \001(\0132\027.hbase.pb.NameBytesPair\"v\n\031Coproc" + + "essorServiceRequest\022)\n\006region\030\001 \002(\0132\031.hb" + + "ase.pb.RegionSpecifier\022.\n\004call\030\002 \002(\0132 .h" + + "base.pb.CoprocessorServiceCall\"o\n\032Coproc" + + "essorServiceResponse\022)\n\006region\030\001 \002(\0132\031.h" + + "base.pb.RegionSpecifier\022&\n\005value\030\002 \002(\0132\027" + + ".hbase.pb.NameBytesPair\"\226\001\n\006Action\022\r\n\005in" + + "dex\030\001 \001(\r\022)\n\010mutation\030\002 \001(\0132\027.hbase.pb.M" + + "utationProto\022\032\n\003get\030\003 \001(\0132\r.hbase.pb.Get" + + "\0226\n\014service_call\030\004 \001(\0132 .hbase.pb.Coproc", + "essorServiceCall\"k\n\014RegionAction\022)\n\006regi" + + "on\030\001 \002(\0132\031.hbase.pb.RegionSpecifier\022\016\n\006a" + + "tomic\030\002 \001(\010\022 \n\006action\030\003 \003(\0132\020.hbase.pb.A" + + "ction\"D\n\017RegionLoadStats\022\027\n\014memstoreLoad" + + "\030\001 \001(\005:\0010\022\030\n\rheapOccupancy\030\002 \001(\005:\0010\"\332\001\n\021" + + "ResultOrException\022\r\n\005index\030\001 \001(\r\022 \n\006resu" + + "lt\030\002 \001(\0132\020.hbase.pb.Result\022*\n\texception\030" + + "\003 \001(\0132\027.hbase.pb.NameBytesPair\022:\n\016servic" + + "e_result\030\004 \001(\0132\".hbase.pb.CoprocessorSer" + + "viceResult\022,\n\tloadStats\030\005 \001(\0132\031.hbase.pb", + ".RegionLoadStats\"x\n\022RegionActionResult\0226" + + "\n\021resultOrException\030\001 \003(\0132\033.hbase.pb.Res" + + "ultOrException\022*\n\texception\030\002 \001(\0132\027.hbas" + + "e.pb.NameBytesPair\"x\n\014MultiRequest\022,\n\014re" + + "gionAction\030\001 \003(\0132\026.hbase.pb.RegionAction" + + "\022\022\n\nnonceGroup\030\002 \001(\004\022&\n\tcondition\030\003 \001(\0132" + + "\023.hbase.pb.Condition\"\\\n\rMultiResponse\0228\n" + + "\022regionActionResult\030\001 \003(\0132\034.hbase.pb.Reg" + + "ionActionResult\022\021\n\tprocessed\030\002 \001(\010*\'\n\013Co" + + "nsistency\022\n\n\006STRONG\020\000\022\014\n\010TIMELINE\020\0012\203\004\n\r", + "ClientService\0222\n\003Get\022\024.hbase.pb.GetReque" + + "st\032\025.hbase.pb.GetResponse\022;\n\006Mutate\022\027.hb" + + "ase.pb.MutateRequest\032\030.hbase.pb.MutateRe" + + "sponse\0225\n\004Scan\022\025.hbase.pb.ScanRequest\032\026." + + "hbase.pb.ScanResponse\022P\n\rBulkLoadHFile\022\036" + + ".hbase.pb.BulkLoadHFileRequest\032\037.hbase.p" + + "b.BulkLoadHFileResponse\022X\n\013ExecService\022#" + + ".hbase.pb.CoprocessorServiceRequest\032$.hb" + + "ase.pb.CoprocessorServiceResponse\022d\n\027Exe" + + "cRegionServerService\022#.hbase.pb.Coproces", + "sorServiceRequest\032$.hbase.pb.Coprocessor" + + "ServiceResponse\0228\n\005Multi\022\026.hbase.pb.Mult" + + "iRequest\032\027.hbase.pb.MultiResponseBB\n*org" + + ".apache.hadoop.hbase.protobuf.generatedB" + + "\014ClientProtosH\001\210\001\001\240\001\001" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -33471,7 +33562,7 @@ public final class ClientProtos { internal_static_hbase_pb_Scan_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_hbase_pb_Scan_descriptor, - new java.lang.String[] { "Column", "Attribute", "StartRow", "StopRow", "Filter", "TimeRange", "MaxVersions", "CacheBlocks", "BatchSize", "MaxResultSize", "StoreLimit", "StoreOffset", "LoadColumnFamiliesOnDemand", "Small", "Reversed", "Consistency", "Caching", }); + new java.lang.String[] { "Column", "Attribute", "StartRow", "StopRow", "Filter", "TimeRange", "MaxVersions", "CacheBlocks", "BatchSize", "MaxResultSize", "StoreLimit", "StoreOffset", "LoadColumnFamiliesOnDemand", "Small", "Reversed", "Consistency", "Caching", "AllowPartialResults", }); internal_static_hbase_pb_ScanRequest_descriptor = getDescriptor().getMessageTypes().get(12); internal_static_hbase_pb_ScanRequest_fieldAccessorTable = new diff --git a/hbase-protocol/src/main/protobuf/Client.proto b/hbase-protocol/src/main/protobuf/Client.proto index 3390de7..b615bd4 100644 --- a/hbase-protocol/src/main/protobuf/Client.proto +++ b/hbase-protocol/src/main/protobuf/Client.proto @@ -256,6 +256,7 @@ message Scan { optional bool reversed = 15 [default = false]; optional Consistency consistency = 16 [default = STRONG]; optional uint32 caching = 17; + optional bool allow_partial_results = 18; } /**