Examples of UDFContext


Examples of org.apache.pig.impl.util.UDFContext

        return partitionKeys;
    }

    public void setPartitionFilter(Expression partitionFilter)
    {
        UDFContext context = UDFContext.getUDFContext();
        Properties property = context.getUDFProperties(CassandraStorage.class);
        property.setProperty(PARTITION_FILTER_SIGNATURE, indexExpressionsToString(filterToIndexExpressions(partitionFilter)));
    }
View Full Code Here

Examples of org.apache.pig.impl.util.UDFContext

    // InputFormat.createRecordReader() time - we are not sure when
    // HCatInputFormat needs to know about pruned projections - so doing it
    // here will ensure we communicate to HCatInputFormat about pruned
    // projections at getSplits() and createRecordReader() time

    UDFContext udfContext = UDFContext.getUDFContext();
    Properties props = udfContext.getUDFProperties(this.getClass(),
        new String[]{signature});
    RequiredFieldList requiredFieldsInfo =
      (RequiredFieldList)props.get(PRUNE_PROJECTION_INFO);
    if(requiredFieldsInfo != null) {
      // convert to hcatschema and pass to HCatInputFormat
View Full Code Here

Examples of org.apache.pig.impl.util.UDFContext

  }


  // helper methods
  protected void storeInUDFContext(String signature, String key, Object value) {
    UDFContext udfContext = UDFContext.getUDFContext();
    Properties props = udfContext.getUDFProperties(
        this.getClass(), new String[] {signature});
    props.put(key, value);
  }
View Full Code Here

Examples of org.apache.pig.impl.util.UDFContext

    partitionSchema = rv.get(1);
    List<HCatFieldSchema> colsPlusPartKeys = new ArrayList<HCatFieldSchema>();
    colsPlusPartKeys.addAll(tableSchema.getFields());
    colsPlusPartKeys.addAll(partitionSchema.getFields());
    outputSchema = new HCatSchema(colsPlusPartKeys);
    UDFContext udfContext = UDFContext.getUDFContext();
    Properties props = udfContext.getUDFProperties(this.getClass(),
          new String[] {signature});
    RequiredFieldList requiredFieldsInfo =
          (RequiredFieldList) props.get(PRUNE_PROJECTION_INFO);
    if (requiredFieldsInfo != null) {
      ArrayList<HCatFieldSchema> fcols = new ArrayList<HCatFieldSchema>();
View Full Code Here

Examples of org.apache.pig.impl.util.UDFContext

        return schema;
    }

    public void setPartitionFilter(Expression partitionFilter)
    {
        UDFContext context = UDFContext.getUDFContext();
        Properties property = context.getUDFProperties(AbstractCassandraStorage.class);
        property.setProperty(PARTITION_FILTER_SIGNATURE, partitionFilterToWhereClauseString(partitionFilter));
    }
View Full Code Here

Examples of org.apache.pig.impl.util.UDFContext

    }

    /** retrieve where clause for partition filter */
    private String getWhereClauseForPartitionFilter()
    {
        UDFContext context = UDFContext.getUDFContext();
        Properties property = context.getUDFProperties(AbstractCassandraStorage.class);
        return property.getProperty(PARTITION_FILTER_SIGNATURE);
    }
View Full Code Here

Examples of org.apache.pig.impl.util.UDFContext

    }

    /** set partition filter */
    public void setPartitionFilter(Expression partitionFilter)
    {
        UDFContext context = UDFContext.getUDFContext();
        Properties property = context.getUDFProperties(AbstractCassandraStorage.class);
        property.setProperty(PARTITION_FILTER_SIGNATURE, indexExpressionsToString(filterToIndexExpressions(partitionFilter)));
    }
View Full Code Here

Examples of org.apache.pig.impl.util.UDFContext

    }

    /** get a list of index expression */
    private List<IndexExpression> getIndexExpressions()
    {
        UDFContext context = UDFContext.getUDFContext();
        Properties property = context.getUDFProperties(AbstractCassandraStorage.class);
        if (property.getProperty(PARTITION_FILTER_SIGNATURE) != null)
            return indexExpressionsFromString(property.getProperty(PARTITION_FILTER_SIGNATURE));
        else
            return null;
    }
View Full Code Here

Examples of org.apache.pig.impl.util.UDFContext

    }

    /** get the columnfamily definition for the signature */
    protected CfDef getCfDef(String signature)
    {
        UDFContext context = UDFContext.getUDFContext();
        Properties property = context.getUDFProperties(AbstractCassandraStorage.class);
        return cfdefFromString(property.getProperty(signature));
    }
View Full Code Here

Examples of org.apache.pig.impl.util.UDFContext

        return schema;
    }

    public void setPartitionFilter(Expression partitionFilter)
    {
        UDFContext context = UDFContext.getUDFContext();
        Properties property = context.getUDFProperties(AbstractCassandraStorage.class);
        property.setProperty(PARTITION_FILTER_SIGNATURE, partitionFilterToWhereClauseString(partitionFilter));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.