Пример #1
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;
  }
Пример #2
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();
   }
 }