Tabnine Logo
ClusterStatusProtos$StoreSequenceId$Builder.setSequenceId
Code IndexAdd Tabnine to your IDE (free)

How to use
setSequenceId
method
in
org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos$StoreSequenceId$Builder

Best Java code snippets using org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos$StoreSequenceId$Builder.setSequenceId (Showing top 8 results out of 315)

origin: harbby/presto-connectors

public RegionStoreSequenceIds getLastFlushedSequenceId(byte[] encodedRegionName) {
 RegionStoreSequenceIds.Builder builder = RegionStoreSequenceIds.newBuilder();
 Long seqId = flushedSequenceIdByRegion.get(encodedRegionName);
 builder.setLastFlushedSequenceId(seqId != null ? seqId.longValue() : HConstants.NO_SEQNUM);
 Map<byte[], Long> storeFlushedSequenceId =
   storeFlushedSequenceIdsByRegion.get(encodedRegionName);
 if (storeFlushedSequenceId != null) {
  for (Map.Entry<byte[], Long> entry : storeFlushedSequenceId.entrySet()) {
   builder.addStoreSequenceId(StoreSequenceId.newBuilder()
     .setFamilyName(ByteString.copyFrom(entry.getKey()))
     .setSequenceId(entry.getValue().longValue()).build());
  }
 }
 return builder.build();
}
origin: harbby/presto-connectors

/**
 * @param regionLastFlushedSequenceId the flushed sequence id of a region which is the min of its
 *          store max seq ids
 * @param storeSequenceIds column family to sequence Id map
 * @return Serialized protobuf of <code>RegionSequenceIds</code> with pb magic prefix prepended
 *         suitable for use to filter wal edits in distributedLogReplay mode
 */
public static byte[] regionSequenceIdsToByteArray(final Long regionLastFlushedSequenceId,
  final Map<byte[], Long> storeSequenceIds) {
 ClusterStatusProtos.RegionStoreSequenceIds.Builder regionSequenceIdsBuilder =
   ClusterStatusProtos.RegionStoreSequenceIds.newBuilder();
 ClusterStatusProtos.StoreSequenceId.Builder storeSequenceIdBuilder =
   ClusterStatusProtos.StoreSequenceId.newBuilder();
 if (storeSequenceIds != null) {
  for (Map.Entry<byte[], Long> e : storeSequenceIds.entrySet()){
   byte[] columnFamilyName = e.getKey();
   Long curSeqId = e.getValue();
   storeSequenceIdBuilder.setFamilyName(ByteStringer.wrap(columnFamilyName));
   storeSequenceIdBuilder.setSequenceId(curSeqId);
   regionSequenceIdsBuilder.addStoreSequenceId(storeSequenceIdBuilder.build());
   storeSequenceIdBuilder.clear();
  }
 }
 regionSequenceIdsBuilder.setLastFlushedSequenceId(regionLastFlushedSequenceId);
 byte[] result = regionSequenceIdsBuilder.build().toByteArray();
 return ProtobufUtil.prependPBMagic(result);
}
origin: com.aliyun.hbase/alihbase-client

/**
 * @param regionLastFlushedSequenceId the flushed sequence id of a region which is the min of its
 *          store max seq ids
 * @param storeSequenceIds column family to sequence Id map
 * @return Serialized protobuf of <code>RegionSequenceIds</code> with pb magic prefix prepended
 *         suitable for use to filter wal edits in distributedLogReplay mode
 */
public static byte[] regionSequenceIdsToByteArray(final Long regionLastFlushedSequenceId,
  final Map<byte[], Long> storeSequenceIds) {
 ClusterStatusProtos.RegionStoreSequenceIds.Builder regionSequenceIdsBuilder =
   ClusterStatusProtos.RegionStoreSequenceIds.newBuilder();
 ClusterStatusProtos.StoreSequenceId.Builder storeSequenceIdBuilder =
   ClusterStatusProtos.StoreSequenceId.newBuilder();
 if (storeSequenceIds != null) {
  for (Map.Entry<byte[], Long> e : storeSequenceIds.entrySet()){
   byte[] columnFamilyName = e.getKey();
   Long curSeqId = e.getValue();
   storeSequenceIdBuilder.setFamilyName(ByteStringer.wrap(columnFamilyName));
   storeSequenceIdBuilder.setSequenceId(curSeqId);
   regionSequenceIdsBuilder.addStoreSequenceId(storeSequenceIdBuilder.build());
   storeSequenceIdBuilder.clear();
  }
 }
 regionSequenceIdsBuilder.setLastFlushedSequenceId(regionLastFlushedSequenceId);
 byte[] result = regionSequenceIdsBuilder.build().toByteArray();
 return ProtobufUtil.prependPBMagic(result);
}
origin: harbby/presto-connectors

RegionLoad.Builder setCompleteSequenceId(RegionLoad.Builder regionLoadBldr) {
 long lastFlushOpSeqIdLocal = this.lastFlushOpSeqId;
 byte[] encodedRegionName = this.getRegionInfo().getEncodedNameAsBytes();
 regionLoadBldr.clearStoreCompleteSequenceId();
 for (byte[] familyName : this.stores.keySet()) {
  long earliest = this.wal.getEarliestMemstoreSeqNum(encodedRegionName, familyName);
  // Subtract - 1 to go earlier than the current oldest, unflushed edit in memstore; this will
  // give us a sequence id that is for sure flushed. We want edit replay to start after this
  // sequence id in this region. If NO_SEQNUM, use the regions maximum flush id.
  long csid = (earliest == HConstants.NO_SEQNUM)? lastFlushOpSeqIdLocal: earliest - 1;
  regionLoadBldr.addStoreCompleteSequenceId(StoreSequenceId.
   newBuilder().setFamilyName(ByteString.copyFrom(familyName)).setSequenceId(csid).build());
 }
 return regionLoadBldr.setCompleteSequenceId(getMaxFlushedSeqId());
}
origin: harbby/presto-connectors

public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.StoreSequenceId other) {
 if (other == org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.StoreSequenceId.getDefaultInstance()) return this;
 if (other.hasFamilyName()) {
  setFamilyName(other.getFamilyName());
 }
 if (other.hasSequenceId()) {
  setSequenceId(other.getSequenceId());
 }
 this.mergeUnknownFields(other.getUnknownFields());
 return this;
}
origin: org.apache.hbase/hbase-protocol

public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.StoreSequenceId other) {
 if (other == org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.StoreSequenceId.getDefaultInstance()) return this;
 if (other.hasFamilyName()) {
  setFamilyName(other.getFamilyName());
 }
 if (other.hasSequenceId()) {
  setSequenceId(other.getSequenceId());
 }
 this.mergeUnknownFields(other.getUnknownFields());
 return this;
}
origin: com.aliyun.hbase/alihbase-protocol

public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.StoreSequenceId other) {
 if (other == org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.StoreSequenceId.getDefaultInstance()) return this;
 if (other.hasFamilyName()) {
  setFamilyName(other.getFamilyName());
 }
 if (other.hasSequenceId()) {
  setSequenceId(other.getSequenceId());
 }
 this.mergeUnknownFields(other.getUnknownFields());
 return this;
}
origin: apache/hbase

public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.StoreSequenceId other) {
 if (other == org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.StoreSequenceId.getDefaultInstance()) return this;
 if (other.hasFamilyName()) {
  setFamilyName(other.getFamilyName());
 }
 if (other.hasSequenceId()) {
  setSequenceId(other.getSequenceId());
 }
 this.mergeUnknownFields(other.getUnknownFields());
 return this;
}
org.apache.hadoop.hbase.protobuf.generatedClusterStatusProtos$StoreSequenceId$BuildersetSequenceId

Javadoc

required uint64 sequence_id = 2;

Popular methods of ClusterStatusProtos$StoreSequenceId$Builder

  • build
  • setFamilyName
    required bytes family_name = 1;
  • <init>
  • buildPartial
  • create
  • hasFamilyName
    required bytes family_name = 1;
  • hasSequenceId
    required uint64 sequence_id = 2;
  • maybeForceBuilderInitialization
  • mergeFrom
  • mergeUnknownFields
  • newUninitializedMessageException
  • onBuilt
  • newUninitializedMessageException,
  • onBuilt,
  • onChanged,
  • clear

Popular in Java

  • Reactive rest calls using spring rest template
  • onCreateOptionsMenu (Activity)
  • runOnUiThread (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now