List of usage examples for org.apache.hadoop.io ObjectWritable readFields
@Override public void readFields(DataInput in) throws IOException
From source file:com.bah.culvert.constraints.Constraint.java
License:Apache License
/** * Read the constraint from the stream//from w w w .ja v a 2 s .c om * @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);/*from w w w . j a v a2s. c o m*/ 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);/* w ww . j a v a 2 s . co m*/ ow.readFields(in); 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);//from w ww . j av a 2s .c om // read in left table ow.readFields(in); 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);// www . ja v a 2 s. c o m 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(); }