Package org.apache.hadoop.zebra.types

Examples of org.apache.hadoop.zebra.types.Projection


        Schema schema;
        colGroups = new ColumnGroup.Reader[numCGs];
        cgTuples = new Tuple[numCGs];
        // set default projection that contains everything
        schema = schemaFile.getLogical();
        projection = new Projection(schema);
        String storage = schemaFile.getStorageString();
        String comparator = schemaFile.getComparator();
        partition = new Partition(schema, projection, storage, comparator);
        for (int nx = 0; nx < numCGs; nx++) {
          if (!schemaFile.isCGDeleted(nx)) {
View Full Code Here


     * @throws IOException
     */
    public synchronized void setProjection(String projection)
        throws ParseException, IOException {
      if (projection == null) {
        this.projection = new Projection(schemaFile.getLogical());
        partition =
            new Partition(schemaFile.getLogical(), this.projection, schemaFile
                .getStorageString(), schemaFile.getComparator());
      }
      else {
        /**
         * the typed schema from projection which is untyped or actually typed
         * as "bytes"
         */
        this.projection =
            new Projection(schemaFile.getLogical(), projection);
        partition =
            new Partition(schemaFile.getLogical(), this.projection, schemaFile
                .getStorageString(), schemaFile.getComparator());
      }
      inferredMapping = false;
View Full Code Here

    if( pigLoadSignature != null) {
      jobConf.set("pig.loader.signature", pigLoadSignature);
   
    setProjection();
   
    Projection projection;

    org.apache.hadoop.zebra.schema.Schema tschema = TableInputFormat.getSchema(jobConf);
    try {
      projection = new org.apache.hadoop.zebra.types.Projection(tschema, TableInputFormat.getProjection(jobConf));
      projectionSchema = projection.getProjectionSchema();
    } catch (ParseException e) {
      throw new IOException("Schema parsing failed : "+e.getMessage());
    }

    if (projectionSchema == null) {
View Full Code Here

      cgschema = CGSchema.load(fs, path);
      if (cgschema.isSorted()) {
        comparator = TFile.makeComparator(cgschema.getComparator());
      }
      projection = new Projection(cgschema.getSchema()); // default projection to CG schema.
      Path metaFilePath = makeMetaFilePath(path);
      /* If index file is not existing */
      if (!fs.exists(metaFilePath)) {
        throw new FileNotFoundException(
              "Missing Meta File of " + metaFilePath);
View Full Code Here

     *          operations. If we want select all columns, pass
     *          projection==null.
     */
    public synchronized void setProjection(String projection) throws ParseException {
      if (projection == null) {
        this.projection = new Projection(cgschema.getSchema());
      }
      else {
        this.projection = new Projection(cgschema.getSchema(), projection);
      }
    }
View Full Code Here

         projectionSchema = tableSchema;
         try {
           if(projectionString != null)
             TableInputFormat.setProjection(job, projectionString);                     
             Projection projection = new org.apache.hadoop.zebra.types.Projection( tableSchema,
                     TableInputFormat.getProjection( job ) );
             projectionSchema = projection.getProjectionSchema();
         } catch (ParseException e) {
             throw new IOException( "Schema parsing failed : "+ e.getMessage() );
         }

         if( projectionSchema == null ) {
View Full Code Here

        Schema schema;
        colGroups = new ColumnGroup.Reader[numCGs];
        cgTuples = new Tuple[numCGs];
        // set default projection that contains everything
        schema = schemaFile.getLogical();
        projection = new Projection(schema);
        String storage = schemaFile.getStorageString();
        String comparator = schemaFile.getComparator();
        partition = new Partition(schema, projection, storage, comparator);
        for (int nx = 0; nx < numCGs; nx++) {
          if (!schemaFile.isCGDeleted(nx)) {
View Full Code Here

     * @throws IOException
     */
    public synchronized void setProjection(String projection)
        throws ParseException, IOException {
      if (projection == null) {
        this.projection = new Projection(schemaFile.getLogical());
        partition =
            new Partition(schemaFile.getLogical(), this.projection, schemaFile
                .getStorageString(), schemaFile.getComparator());
      }
      else {
        /**
         * the typed schema from projection which is untyped or actually typed
         * as "bytes"
         */
        this.projection =
            new Projection(schemaFile.getLogical(), projection);
        partition =
            new Partition(schemaFile.getLogical(), this.projection, schemaFile
                .getStorageString(), schemaFile.getComparator());
      }
      inferredMapping = false;
View Full Code Here

         projectionSchema = tableSchema;
         try {
           if(projectionString != null)
             TableInputFormat.setProjection(job, projectionString);                     
             Projection projection = new org.apache.hadoop.zebra.types.Projection( tableSchema,
                     TableInputFormat.getProjection( job ) );
             projectionSchema = projection.getProjectionSchema();
         } catch (ParseException e) {
             throw new IOException( "Schema parsing failed : "+ e.getMessage() );
         }

         if( projectionSchema == null ) {
View Full Code Here

      cgschema = CGSchema.load(fs, path);
      if (cgschema.isSorted()) {
        comparator = TFile.makeComparator(cgschema.getComparator());
      }
      projection = new Projection(cgschema.getSchema()); // default projection to CG schema.
      Path metaFilePath = makeMetaFilePath(path);
      /* If index file is not existing */
      if (!fs.exists(metaFilePath)) {
        throw new FileNotFoundException(
              "Missing Meta File of " + metaFilePath);
View Full Code Here

TOP

Related Classes of org.apache.hadoop.zebra.types.Projection

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.