private static List<ClusterStatusProtos.StoreSequenceId> toStoreSequenceId( Map<byte[], Long> ids) { return ids.entrySet().stream() .map(e -> ClusterStatusProtos.StoreSequenceId.newBuilder() .setFamilyName(UnsafeByteOperations.unsafeWrap(e.getKey())) .setSequenceId(e.getValue()) .build()) .collect(Collectors.toList()); }
/** * @return completed sequence id per store. * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0 * Use {@link #getStoreSequenceId} instead. */ @Deprecated public List<ClusterStatusProtos.StoreSequenceId> getStoreCompleteSequenceId() { return metrics.getStoreSequenceId().entrySet().stream() .map(s -> ClusterStatusProtos.StoreSequenceId.newBuilder() .setFamilyName(UnsafeByteOperations.unsafeWrap(s.getKey())) .setSequenceId(s.getValue()) .build()) .collect(Collectors.toList()); }
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(UnsafeByteOperations.unsafeWrap(entry.getKey())) .setSequenceId(entry.getValue().longValue()).build()); } } return builder.build(); }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() {
/** * @return completed sequence id per store. * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0 * Use {@link #getStoreSequenceId} instead. */ @Deprecated public List<ClusterStatusProtos.StoreSequenceId> getStoreCompleteSequenceId() { return metrics.getStoreSequenceId().entrySet().stream() .map(s -> ClusterStatusProtos.StoreSequenceId.newBuilder() .setFamilyName(UnsafeByteOperations.unsafeWrap(s.getKey())) .setSequenceId(s.getValue()) .build()) .collect(Collectors.toList()); }
private static List<ClusterStatusProtos.StoreSequenceId> toStoreSequenceId( Map<byte[], Long> ids) { return ids.entrySet().stream() .map(e -> ClusterStatusProtos.StoreSequenceId.newBuilder() .setFamilyName(UnsafeByteOperations.unsafeWrap(e.getKey())) .setSequenceId(e.getValue()) .build()) .collect(Collectors.toList()); }
/** * @return completed sequence id per store. * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0 * Use {@link #getStoreSequenceId} instead. */ @Deprecated public List<ClusterStatusProtos.StoreSequenceId> getStoreCompleteSequenceId() { return metrics.getStoreSequenceId().entrySet().stream() .map(s -> ClusterStatusProtos.StoreSequenceId.newBuilder() .setFamilyName(UnsafeByteOperations.unsafeWrap(s.getKey())) .setSequenceId(s.getValue()) .build()) .collect(Collectors.toList()); }
private static List<ClusterStatusProtos.StoreSequenceId> toStoreSequenceId( Map<byte[], Long> ids) { return ids.entrySet().stream() .map(e -> ClusterStatusProtos.StoreSequenceId.newBuilder() .setFamilyName(UnsafeByteOperations.unsafeWrap(e.getKey())) .setSequenceId(e.getValue()) .build()) .collect(Collectors.toList()); }
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(UnsafeByteOperations.unsafeWrap(familyName)).setSequenceId(csid).build()); } return regionLoadBldr.setCompleteSequenceId(getMaxFlushedSeqId()); }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() {