Exemplo n.º 1
0
  public Boolean isDistCached() {
    TabletProtoOrBuilder p = viaProto ? proto : builder;

    if (this.distCached != null) {
      return distCached;
    }
    if (!p.hasDistCached()) {
      return false;
    }
    this.distCached = p.getDistCached();
    return this.distCached;
  }
Exemplo n.º 2
0
  public Long getLength() {
    TabletProtoOrBuilder p = viaProto ? proto : builder;

    if (this.length != null) {
      return this.length;
    }
    if (!p.hasLength()) {
      return null;
    }
    this.length = p.getLength();
    return this.length;
  }
Exemplo n.º 3
0
  public Long getStartOffset() {
    TabletProtoOrBuilder p = viaProto ? proto : builder;

    if (this.startOffset != null) {
      return this.startOffset;
    }
    if (!p.hasStartOffset()) {
      return null;
    }
    this.startOffset = p.getStartOffset();
    return this.startOffset;
  }
Exemplo n.º 4
0
  public TableMeta getMeta() {
    TabletProtoOrBuilder p = viaProto ? proto : builder;

    if (this.meta != null) {
      return this.meta;
    }
    if (!p.hasMeta()) {
      return null;
    }
    this.meta = new TableMetaImpl(p.getMeta());
    return this.meta;
  }
Exemplo n.º 5
0
  @Override
  public Path getPath() {
    TabletProtoOrBuilder p = viaProto ? proto : builder;

    if (this.path != null) {
      return this.path;
    }
    if (!p.hasPath()) {
      return null;
    }
    this.path = new Path(p.getPath());
    return this.path;
  }
Exemplo n.º 6
0
  public String getId() {
    TabletProtoOrBuilder p = viaProto ? proto : builder;

    if (this.fragmentId != null) {
      return this.fragmentId;
    }

    if (!p.hasId()) {
      return null;
    }
    this.fragmentId = p.getId();

    return this.fragmentId;
  }
Exemplo n.º 7
0
 private void mergeProtoToLocal() {
   TabletProtoOrBuilder p = viaProto ? proto : builder;
   if (fragmentId == null && p.hasId()) {
     fragmentId = p.getId();
   }
   if (path == null && p.hasPath()) {
     path = new Path(p.getPath());
   }
   if (meta == null && p.hasMeta()) {
     meta = new TableMetaImpl(p.getMeta());
   }
   if (startOffset == null && p.hasStartOffset()) {
     startOffset = p.getStartOffset();
   }
   if (length == null && p.hasLength()) {
     length = p.getLength();
   }
   if (distCached == null && p.hasDistCached()) {
     distCached = p.getDistCached();
   }
 }