Example usage for org.apache.hadoop.io ObjectWritable setConf

List of usage examples for org.apache.hadoop.io ObjectWritable setConf

Introduction

In this page you can find the example usage for org.apache.hadoop.io ObjectWritable setConf.

Prototype

@Override
    public void setConf(Configuration conf) 

Source Link

Usage

From source file:com.bah.culvert.constraints.Constraint.java

License:Apache License

/**
 * Read the constraint from the stream/*  w w w . j  a  va 2s  .  c  o m*/
 * @param in to read the constraint from
 * @return specified {@link Constraint}
 * @throws IOException if the constraint could not be created or read
 */
public static Constraint readFromStream(DataInput in) throws IOException {
    ObjectWritable ow = new ObjectWritable();
    Configuration conf = new Configuration();
    ow.setConf(conf);
    ow.readFields(in);
    return (Constraint) ow.get();
}

From source file:com.bah.culvert.constraints.IndexRangeConstraint.java

License:Apache License

@Override
public void readFields(DataInput in) throws IOException {
    range.readFields(in);/*www.  j  a v a 2s. c  om*/
    ObjectWritable ow = new ObjectWritable();
    Configuration conf = new Configuration();
    ow.setConf(conf);
    ow.readFields(in);
    this.index = (Index) ow.get();
}

From source file:com.bah.culvert.constraints.join.IndexedJoin.java

License:Apache License

@Override
public void readFields(DataInput in) throws IOException {
    super.readFields(in);
    ObjectWritable ow = new ObjectWritable();
    Configuration conf = new Configuration();
    ow.setConf(conf);
    ow.readFields(in);/*from ww  w.j  a v a2 s.c om*/
    this.rightIndex = (Index) ow.get();
}

From source file:com.bah.culvert.constraints.Join.java

License:Apache License

@Override
public void readFields(DataInput in) throws IOException {
    ObjectWritable ow = new ObjectWritable();
    Configuration conf = new Configuration();
    ow.setConf(conf);

    // read in left table
    ow.readFields(in);// w  ww  . j  a v a2 s  . com
    this.leftTable = (TableAdapter) ow.get();

    // read in left constraint
    ow.readFields(in);
    this.left = (Constraint) ow.get();

    // read in left column
    this.leftColumn = new CColumn();
    this.leftColumn.readFields(in);

    // read in right table
    this.rightTable = Text.readString(in);

    ow.readFields(in);
    this.database = (DatabaseAdapter) ow.get();
}

From source file:com.bah.culvert.constraints.RetrieveColumns.java

License:Apache License

@Override
public void readFields(DataInput in) throws IOException {
    this.columns = new CColumn[in.readInt()];
    for (int i = 0; i < this.columns.length; i++) {
        CColumn column = new CColumn();
        column.readFields(in);/*from   w  w  w . j av a 2  s. c  om*/
        this.columns[i] = column;
    }
    this.subConstraint = Constraint.readFromStream(in);
    ObjectWritable ow = new ObjectWritable();
    Configuration conf = new Configuration();
    ow.setConf(conf);
    ow.readFields(in);
    this.table = (TableAdapter) ow.get();
}