@Override
  public CompletableFuture<Optional<Long>>
    getLastMajorCompactionTimestampForRegion(byte[] regionName) {
    CompletableFuture<Optional<Long>> future = new CompletableFuture<>();
    // regionName may be a full region name or encoded region name, so getRegionInfo(byte[]) first
    addListener(getRegionInfo(regionName), (region, err) -> {
      if (err != null) {
        future.completeExceptionally(err);
        return;
      }
      MajorCompactionTimestampForRegionRequest.Builder builder =
        MajorCompactionTimestampForRegionRequest.newBuilder();
      builder.setRegion(
        RequestConverter.buildRegionSpecifier(RegionSpecifierType.REGION_NAME, regionName));
      addListener(this.<Optional<Long>> newMasterCaller()
        .action((controller, stub) -> this.<MajorCompactionTimestampForRegionRequest,
          MajorCompactionTimestampResponse, Optional<Long>> call(controller, stub, builder.build(),
            (s, c, req, done) -> s.getLastMajorCompactionTimestampForRegion(c, req, done),
            ProtobufUtil::toOptionalTimestamp))
        .call(), (timestamp, err2) -> {
          if (err2 != null) {
            future.completeExceptionally(err2);
          } else {
            future.complete(timestamp);
          }
        });
    });
    return future;
  }
Get the region info for the passed region name. The region name may be a full region name or
encoded region name. If the region does not found, then it'll throw an UnknownRegionException
wrapped by a {@link CompletableFuture}
@return region info, wrapped by a {@link CompletableFuture}
hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java