Refine search
/** * <code>required .hbase.pb.Scan scan = 1;</code> */ public Builder mergeScan(org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan value) { if (scanBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && scan_ != org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.getDefaultInstance()) { scan_ = org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.newBuilder(scan_).mergeFrom(value).buildPartial(); } else { scan_ = value; } onChanged(); } else { scanBuilder_.mergeFrom(value); } bitField0_ |= 0x00000001; return this; } /**
static String convertScanToString(Scan scan) throws IOException { ClientProtos.Scan proto = ProtobufUtil.toScan(scan); return Base64.encodeBase64String(proto.toByteArray()); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.hadoop.hbase.protobuf.generated.AggregateProtos.AggregateRequest)) { return super.equals(obj); } org.apache.hadoop.hbase.protobuf.generated.AggregateProtos.AggregateRequest other = (org.apache.hadoop.hbase.protobuf.generated.AggregateProtos.AggregateRequest) obj; boolean result = true; result = result && (hasInterpreterClassName() == other.hasInterpreterClassName()); if (hasInterpreterClassName()) { result = result && getInterpreterClassName() .equals(other.getInterpreterClassName()); } result = result && (hasScan() == other.hasScan()); if (hasScan()) { result = result && getScan() .equals(other.getScan()); } result = result && (hasInterpreterSpecificBytes() == other.hasInterpreterSpecificBytes()); if (hasInterpreterSpecificBytes()) { result = result && getInterpreterSpecificBytes() .equals(other.getInterpreterSpecificBytes()); } result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.Builder subBuilder = null; if (((bitField0_ & 0x00000002) == 0x00000002)) { subBuilder = scan_.toBuilder();
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasInterpreterClassName()) { hash = (37 * hash) + INTERPRETER_CLASS_NAME_FIELD_NUMBER; hash = (53 * hash) + getInterpreterClassName().hashCode(); } if (hasScan()) { hash = (37 * hash) + SCAN_FIELD_NUMBER; hash = (53 * hash) + getScan().hashCode(); } if (hasInterpreterSpecificBytes()) { hash = (37 * hash) + INTERPRETER_SPECIFIC_BYTES_FIELD_NUMBER; hash = (53 * hash) + getInterpreterSpecificBytes().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
public Builder clear() { super.clear(); interpreterClassName_ = ""; bitField0_ = (bitField0_ & ~0x00000001); if (scanBuilder_ == null) { scan_ = org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.getDefaultInstance(); } else { scanBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); interpreterSpecificBytes_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); return this; }
ClientProtos.Scan.Builder scanBuilder = ClientProtos.Scan.newBuilder(); scanBuilder.setStartRow(ByteString.copyFromUtf8("row1")); scanBuilder.setStopRow(ByteString.copyFromUtf8("row2")); assertEquals(1, proto.getMaxVersions()); assertEquals(true, proto.getCacheBlocks()); scanBuilder = ClientProtos.Scan.newBuilder(proto); scanBuilder.setMaxVersions(2); scanBuilder.setCacheBlocks(false); scanBuilder.setCaching(1024); scanBuilder.setTimeRange(ProtobufUtil.toTimeRange(TimeRange.allTime())); scanBuilder.setIncludeStopRow(false); ClientProtos.Scan expectedProto = scanBuilder.build(); ClientProtos.Scan actualProto = ProtobufUtil.toScan( ProtobufUtil.toScan(expectedProto)); assertEquals(expectedProto, actualProto);
boolean includeStartRow = true; boolean includeStopRow = false; if (proto.hasStartRow()) { startRow = proto.getStartRow().toByteArray(); if (proto.hasStopRow()) { stopRow = proto.getStopRow().toByteArray(); if (proto.hasIncludeStartRow()) { includeStartRow = proto.getIncludeStartRow(); if (proto.hasIncludeStopRow()) { includeStopRow = proto.getIncludeStopRow(); if (proto.hasCacheBlocks()) { scan.setCacheBlocks(proto.getCacheBlocks()); if (proto.hasMaxVersions()) { scan.setMaxVersions(proto.getMaxVersions()); if (proto.hasStoreLimit()) { scan.setMaxResultsPerColumnFamily(proto.getStoreLimit()); if (proto.hasStoreOffset()) { scan.setRowOffsetPerColumnFamily(proto.getStoreOffset()); if (proto.hasLoadColumnFamiliesOnDemand()) { scan.setLoadColumnFamiliesOnDemand(proto.getLoadColumnFamiliesOnDemand());
final Scan scan) throws IOException { ClientProtos.Scan.Builder scanBuilder = ClientProtos.Scan.newBuilder(); scanBuilder.setCacheBlocks(scan.getCacheBlocks()); if (scan.getBatch() > 0) { scanBuilder.addCfTimeRange(HBaseProtos.ColumnFamilyTimeRange.newBuilder() .setColumnFamily(ByteStringer.wrap(cf)) .setTimeRange(toTimeRange(timeRange)) .build()); }); scanBuilder.setTimeRange(toTimeRange(scan.getTimeRange())); Map<String, byte[]> attributes = scan.getAttributesMap(); if (!attributes.isEmpty()) { scanBuilder.setFilter(ProtobufUtil.toFilter(scan.getFilter()));
byte [] startRow = HConstants.EMPTY_START_ROW; byte [] stopRow = HConstants.EMPTY_END_ROW; if (proto.hasStartRow()) { startRow = proto.getStartRow().toByteArray(); if (proto.hasStopRow()) { stopRow = proto.getStopRow().toByteArray(); if (proto.hasCacheBlocks()) { scan.setCacheBlocks(proto.getCacheBlocks()); if (proto.hasMaxVersions()) { scan.setMaxVersions(proto.getMaxVersions()); if (proto.hasStoreLimit()) { scan.setMaxResultsPerColumnFamily(proto.getStoreLimit()); if (proto.hasStoreOffset()) { scan.setRowOffsetPerColumnFamily(proto.getStoreOffset()); if (proto.hasLoadColumnFamiliesOnDemand()) { scan.setLoadColumnFamiliesOnDemand(proto.getLoadColumnFamiliesOnDemand()); if (proto.getCfTimeRangeCount() > 0) { for (HBaseProtos.ColumnFamilyTimeRange cftr : proto.getCfTimeRangeList()) { TimeRange timeRange = protoToTimeRange(cftr.getTimeRange()); scan.setColumnFamilyTimeRange(cftr.getColumnFamily().toByteArray(), timeRange.getMin(), timeRange.getMax());
public final boolean isInitialized() { if (!hasInterpreterClassName()) { return false; } if (!hasScan()) { return false; } if (!getScan().isInitialized()) { return false; } return true; }
public final boolean isInitialized() { if (!hasScan()) { return false; } if (!hasOutputPath()) { return false; } if (!getScan().isInitialized()) { return false; } return true; }
private void initFields() { interpreterClassName_ = ""; scan_ = org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.getDefaultInstance(); interpreterSpecificBytes_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1;
private void initFields() { scan_ = org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.getDefaultInstance(); deleteType_ = org.apache.hadoop.hbase.coprocessor.example.generated.BulkDeleteProtos.BulkDeleteRequest.DeleteType.ROW; timestamp_ = 0L; rowBatchSize_ = 0; } private byte memoizedIsInitialized = -1;
/** * <code>optional bytes start_row = 3;</code> */ public Builder clearStartRow() { bitField0_ = (bitField0_ & ~0x00000004); startRow_ = getDefaultInstance().getStartRow(); onChanged(); return this; }
private void initFields() { scan_ = org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.getDefaultInstance(); outputPath_ = ""; compressed_ = false; compressType_ = ""; compressCodec_ = ""; fsToken_ = org.apache.hadoop.hbase.protobuf.generated.ClientProtos.DelegationToken.getDefaultInstance(); } private byte memoizedIsInitialized = -1;
/** * <code>optional bytes stop_row = 4;</code> */ public Builder clearStopRow() { bitField0_ = (bitField0_ & ~0x00000008); stopRow_ = getDefaultInstance().getStopRow(); onChanged(); return this; }
public org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan build() { org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
public final boolean isInitialized() { if (hasRegion()) { if (!getRegion().isInitialized()) { return false; } } if (hasScan()) { if (!getScan().isInitialized()) { return false; } } return true; }
public static Builder newBuilder(org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }