@Test public void testDoubleScan() throws Throwable { prepareTestData(); CoprocessorRpcChannel channel = table.coprocessorService(ROW); RowProcessorEndpoint.FriendsOfFriendsProcessor processor = new RowProcessorEndpoint.FriendsOfFriendsProcessor(ROW, A); RowProcessorService.BlockingInterface service = RowProcessorService.newBlockingStub(channel); ProcessRequest request = RowProcessorClient.getRowProcessorPB(processor); ProcessResponse protoResult = service.process(null, request); FriendsOfFriendsProcessorResponse response = FriendsOfFriendsProcessorResponse.parseFrom(protoResult.getRowProcessorResult()); Set<String> result = new HashSet<>(); result.addAll(response.getResultList()); Set<String> expected = new HashSet<>(Arrays.asList(new String[]{"d", "e", "f", "g"})); Get get = new Get(ROW); LOG.debug("row keyvalues:" + stringifyKvs(table.get(get).listCells())); assertEquals(expected, result); }
public Builder mergeFrom(org.apache.hadoop.hbase.coprocessor.protobuf.generated.IncrementCounterProcessorTestProtos.FriendsOfFriendsProcessorResponse other) { if (other == org.apache.hadoop.hbase.coprocessor.protobuf.generated.IncrementCounterProcessorTestProtos.FriendsOfFriendsProcessorResponse.getDefaultInstance()) return this; if (!other.result_.isEmpty()) { if (result_.isEmpty()) { result_ = other.result_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureResultIsMutable(); result_.addAll(other.result_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (getResultCount() > 0) { hash = (37 * hash) + RESULT_FIELD_NUMBER; hash = (53 * hash) + getResultList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; makeExtensionsImmutable();
com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; makeExtensionsImmutable();
@Test public void testDoubleScan() throws Throwable { prepareTestData(); CoprocessorRpcChannel channel = table.coprocessorService(ROW); RowProcessorEndpoint.FriendsOfFriendsProcessor processor = new RowProcessorEndpoint.FriendsOfFriendsProcessor(ROW, A); RowProcessorService.BlockingInterface service = RowProcessorService.newBlockingStub(channel); ProcessRequest request = RowProcessorClient.getRowProcessorPB(processor); ProcessResponse protoResult = service.process(null, request); FriendsOfFriendsProcessorResponse response = FriendsOfFriendsProcessorResponse.parseFrom(protoResult.getRowProcessorResult()); Set<String> result = new HashSet<>(); result.addAll(response.getResultList()); Set<String> expected = new HashSet<>(Arrays.asList(new String[]{"d", "e", "f", "g"})); Get get = new Get(ROW); LOG.debug("row keyvalues:" + stringifyKvs(table.get(get).listCells())); assertEquals(expected, result); }
@Test public void testDoubleScan() throws Throwable { prepareTestData(); CoprocessorRpcChannel channel = table.coprocessorService(ROW); RowProcessorEndpoint.FriendsOfFriendsProcessor processor = new RowProcessorEndpoint.FriendsOfFriendsProcessor(ROW, A); RowProcessorService.BlockingInterface service = RowProcessorService.newBlockingStub(channel); ProcessRequest request = RowProcessorClient.getRowProcessorPB(processor); ProcessResponse protoResult = service.process(null, request); FriendsOfFriendsProcessorResponse response = FriendsOfFriendsProcessorResponse.parseFrom(protoResult.getRowProcessorResult()); Set<String> result = new HashSet<>(); result.addAll(response.getResultList()); Set<String> expected = new HashSet<>(Arrays.asList(new String[]{"d", "e", "f", "g"})); Get get = new Get(ROW); LOG.debug("row keyvalues:" + stringifyKvs(table.get(get).listCells())); assertEquals(expected, result); }
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < result_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(result_.getByteString(i)); } size += dataSize; size += 1 * getResultList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
public Builder toBuilder() { return newBuilder(this); }
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < result_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(result_.getByteString(i)); } size += dataSize; size += 1 * getResultList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
public Builder toBuilder() { return newBuilder(this); }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.apache.hadoop.hbase.coprocessor.protobuf.generated.IncrementCounterProcessorTestProtos.FriendsOfFriendsProcessorResponse prototype) {
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.hadoop.hbase.coprocessor.protobuf.generated.IncrementCounterProcessorTestProtos.FriendsOfFriendsProcessorResponse)) { return super.equals(obj); } org.apache.hadoop.hbase.coprocessor.protobuf.generated.IncrementCounterProcessorTestProtos.FriendsOfFriendsProcessorResponse other = (org.apache.hadoop.hbase.coprocessor.protobuf.generated.IncrementCounterProcessorTestProtos.FriendsOfFriendsProcessorResponse) obj; boolean result = true; result = result && getResultList() .equals(other.getResultList()); result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
public Builder mergeFrom(org.apache.hadoop.hbase.coprocessor.protobuf.generated.IncrementCounterProcessorTestProtos.FriendsOfFriendsProcessorResponse other) { if (other == org.apache.hadoop.hbase.coprocessor.protobuf.generated.IncrementCounterProcessorTestProtos.FriendsOfFriendsProcessorResponse.getDefaultInstance()) return this; if (!other.result_.isEmpty()) { if (result_.isEmpty()) { result_ = other.result_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureResultIsMutable(); result_.addAll(other.result_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.hadoop.hbase.coprocessor.protobuf.generated.IncrementCounterProcessorTestProtos.FriendsOfFriendsProcessorResponse)) { return super.equals(obj); } org.apache.hadoop.hbase.coprocessor.protobuf.generated.IncrementCounterProcessorTestProtos.FriendsOfFriendsProcessorResponse other = (org.apache.hadoop.hbase.coprocessor.protobuf.generated.IncrementCounterProcessorTestProtos.FriendsOfFriendsProcessorResponse) obj; boolean result = true; result = result && getResultList() .equals(other.getResultList()); result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
public Builder mergeFrom(org.apache.hadoop.hbase.coprocessor.protobuf.generated.IncrementCounterProcessorTestProtos.FriendsOfFriendsProcessorResponse other) { if (other == org.apache.hadoop.hbase.coprocessor.protobuf.generated.IncrementCounterProcessorTestProtos.FriendsOfFriendsProcessorResponse.getDefaultInstance()) return this; if (!other.result_.isEmpty()) { if (result_.isEmpty()) { result_ = other.result_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureResultIsMutable(); result_.addAll(other.result_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.apache.hadoop.hbase.coprocessor.protobuf.generated.IncrementCounterProcessorTestProtos.FriendsOfFriendsProcessorResponse prototype) {
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (getResultCount() > 0) { hash = (37 * hash) + RESULT_FIELD_NUMBER; hash = (53 * hash) + getResultList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
public org.apache.hadoop.hbase.coprocessor.protobuf.generated.IncrementCounterProcessorTestProtos.FriendsOfFriendsProcessorResponse getDefaultInstanceForType() { return org.apache.hadoop.hbase.coprocessor.protobuf.generated.IncrementCounterProcessorTestProtos.FriendsOfFriendsProcessorResponse.getDefaultInstance(); }
public org.apache.hadoop.hbase.coprocessor.protobuf.generated.IncrementCounterProcessorTestProtos.FriendsOfFriendsProcessorResponse getDefaultInstanceForType() { return org.apache.hadoop.hbase.coprocessor.protobuf.generated.IncrementCounterProcessorTestProtos.FriendsOfFriendsProcessorResponse.getDefaultInstance(); }