Package org.apache.tajo.catalog.proto.CatalogProtos

Examples of org.apache.tajo.catalog.proto.CatalogProtos.SchemaProto


      byte [] schemaBytes = new byte[schemaByteSize];
      Bytes.readFully(indexIn, schemaBytes, 0, schemaByteSize);

      SchemaProto.Builder builder = SchemaProto.newBuilder();
      builder.mergeFrom(schemaBytes);
      SchemaProto proto = builder.build();
      this.keySchema = new Schema(proto);
      this.rowStoreDecoder = RowStoreUtil.createDecoder(keySchema);

      // comparator
      int compByteSize = indexIn.readInt();
View Full Code Here


  public Fragment(String tableName, Path uri, TableMeta meta, BlockLocation blockLocation, int[] diskIds) throws IOException {
    this();
    //TableMeta newMeta = new TableMetaImpl(meta.getProto());
    TableMeta newMeta = meta;
    SchemaProto newSchemaProto = CatalogUtil.getQualfiedSchema(tableName, meta
        .getSchema().getProto());
    newMeta.setSchema(new Schema(newSchemaProto));
    this.set(tableName, uri, newMeta, blockLocation.getOffset(), blockLocation.getLength(),
        blockLocation.getHosts(), diskIds);
  }
View Full Code Here

  // Non splittable
  public Fragment(String tableName, Path uri, TableMeta meta, long start, long length, String[] hosts, int[] hostsBlockCount) {
    this();
    TableMeta newMeta = new TableMetaImpl(meta.getProto());
    SchemaProto newSchemaProto = CatalogUtil.getQualfiedSchema(tableName, meta
        .getSchema().getProto());
    newMeta.setSchema(new Schema(newSchemaProto));
    this.set(tableName, uri, newMeta, start, length, null, null);
    this.hosts = hosts;
    this.hostsBlockCount = hostsBlockCount;
View Full Code Here

  }

  public Fragment(String fragmentId, Path path, TableMeta meta, long start, long length) {
    this();
    TableMeta newMeta = new TableMetaImpl(meta.getProto());
    SchemaProto newSchemaProto = CatalogUtil.getQualfiedSchema(fragmentId, meta
        .getSchema().getProto());
    newMeta.setSchema(new Schema(newSchemaProto));
    this.set(fragmentId, path, newMeta, start, length, null, null);
  }
View Full Code Here

      int schemaByteSize = indexIn.readInt();
      byte [] schemaBytes = new byte[schemaByteSize];
      indexIn.read(schemaBytes);
      SchemaProto.Builder builder = SchemaProto.newBuilder();
      builder.mergeFrom(schemaBytes);
      SchemaProto proto = builder.build();
      this.keySchema = new Schema(proto);

      // comparator
      int compByteSize = indexIn.readInt();
      byte [] compBytes = new byte[compByteSize];
View Full Code Here

    assertEquals(schema, schema2);
  }

  @Test
  public final void testGetProto() {
    SchemaProto proto = schema.getProto();
   
    assertEquals("name", proto.getFields(0).getColumnName());
    assertEquals("age", proto.getFields(1).getColumnName());
    assertEquals("addr", proto.getFields(2).getColumnName());
  }
View Full Code Here

  }

  @Test
  public final void testProto() {
    Schema schema2 = new Schema(schema.getProto());
    SchemaProto proto = schema2.getProto();
    Schema fromJson = new Schema(proto);
    assertEquals(schema2, fromJson);
  }
View Full Code Here

    assertEquals(schema, schema2);
  }

  @Test
  public final void testGetProto() {
    SchemaProto proto = schema.getProto();
   
    assertEquals("name", proto.getFields(0).getName());
    assertEquals("age", proto.getFields(1).getName());
    assertEquals("addr", proto.getFields(2).getName());
  }
View Full Code Here

  }

  @Test
  public final void testProto() {
    Schema schema2 = new Schema(schema.getProto());
    SchemaProto proto = schema2.getProto();
    Schema fromJson = new Schema(proto);
    assertEquals(schema2, fromJson);
  }
View Full Code Here

TOP

Related Classes of org.apache.tajo.catalog.proto.CatalogProtos.SchemaProto

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.