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

How to use
setFamilyName
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.setFamilyName (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$BuildersetFamilyName

Javadoc

required bytes family_name = 1;

Popular methods of ClusterStatusProtos$StoreSequenceId$Builder

  • build
  • setSequenceId
    required uint64 sequence_id = 2;
  • <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
  • getSupportFragmentManager (FragmentActivity)
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Notification (javax.management)
  • Top 12 Jupyter Notebook extensions
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