Package org.apache.pig

Examples of org.apache.pig.LoadMetadata


    }
   
    private Schema determineSchema() throws IOException {
        if(!mDeterminedSchemaCached) {
            if(LoadMetadata.class.isAssignableFrom(mLoadFunc.getClass())) {
                LoadMetadata loadMetadata = (LoadMetadata)mLoadFunc;
                ResourceSchema rSchema = loadMetadata.getSchema(
                        mInputFileSpec.getFileName(), new Job(conf));
                mDeterminedSchema = Schema.getPigSchema(rSchema);
            }
            // set the flag so that future calls just use mDeterminedSchema
            mDeterminedSchemaCached = true;
View Full Code Here


    }
   
    private Schema determineSchema() throws IOException {
        if(!mDeterminedSchemaCached) {
            if(LoadMetadata.class.isAssignableFrom(mLoadFunc.getClass())) {
                LoadMetadata loadMetadata = (LoadMetadata)mLoadFunc;
                ResourceSchema rSchema = loadMetadata.getSchema(
                        mInputFileSpec.getFileName(), new Job(conf));
                mDeterminedSchema = Schema.getPigSchema(rSchema);
            }
            // set the flag so that future calls just use mDeterminedSchema
            mDeterminedSchemaCached = true;
View Full Code Here

  }


  @Override
  public String[] getPartitionKeys(String location, Job job) throws IOException {
    LoadMetadata metadata = asLoadMetadata(loader);
    return metadata == null ? null :  metadata.getPartitionKeys(location, job);
  }
View Full Code Here

    return metadata == null ? null :  metadata.getPartitionKeys(location, job);
  }

  @Override
  public ResourceSchema getSchema(String location, Job job) throws IOException {
    LoadMetadata metadata = asLoadMetadata(loader);
    return metadata == null ? null : metadata.getSchema(location, job);
  }
View Full Code Here

    return metadata == null ? null : metadata.getSchema(location, job);
  }

  @Override
  public ResourceStatistics getStatistics(String location, Job job) throws IOException {
    LoadMetadata metadata = asLoadMetadata(loader);
    return metadata == null ? null : metadata.getStatistics(location, job);
  }
View Full Code Here

    return metadata == null ? null : metadata.getStatistics(location, job);
  }

  @Override
  public void setPartitionFilter(Expression partitionFilter) throws IOException {
    LoadMetadata metadata = asLoadMetadata(loader);
    if ( metadata != null ) {
      metadata.setPartitionFilter(partitionFilter);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.pig.LoadMetadata

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.