List of usage examples for org.apache.hadoop.io Text readString
public static String readString(DataInput in) throws IOException
From source file:edu.yale.cs.hadoopdb.connector.DBInputSplit.java
License:Apache License
/** * Deserializes relation and DBChunk object. Then creates the list of locations from the * DBChunk object.//from ww w .ja va 2 s . c o m */ @Override public void readFields(DataInput in) throws IOException { relation = Text.readString(in); setChunk(deserializeChunk(in)); }
From source file:edu.yale.cs.hadoopdb.sms.connector.SMSInputSplit.java
License:Apache License
/** * readFields is used to deserialize information necessary to instantiate * the SMSInputSplit at Map nodes. It first reads the path and * calls the DBInputSplit to deserialize remaining information. *//* www . java2 s. com*/ @Override public void readFields(DataInput in) throws IOException { p = new Path(Text.readString(in)); super.readFields(in); }
From source file:fi.tkk.ics.hadoop.bam.FileVirtualSplit.java
License:Open Source License
@Override public void readFields(DataInput in) throws IOException { file = new Path(Text.readString(in)); vStart = in.readLong();/* w ww.j a v a 2 s.c om*/ vEnd = in.readLong(); }
From source file:fire.util.fileformats.combinetextfileinputformat.WordOffset.java
License:Apache License
public void readFields(DataInput in) throws IOException { this.offset = in.readLong(); this.fileName = Text.readString(in); }
From source file:gaffer.accumulo.iterators.ColumnQualifierColumnVisibilityValueTriple.java
License:Apache License
@Override public void readFields(DataInput in) throws IOException { this.columnQualifier = Text.readString(in); this.columnVisibility = Text.readString(in); value.readFields(in);/* w w w. j a v a 2 s.c o m*/ }
From source file:gaffer.accumulo.predicate.impl.OtherEndOfEdgePredicate.java
License:Apache License
@Override public void readFields(DataInput in) throws IOException { String className = Text.readString(in); try {/*from w w w . jav a 2 s. co m*/ predicate = (TypeValuePredicate) Class.forName(className).newInstance(); predicate.readFields(in); } catch (InstantiationException e) { throw new IOException("Exception deserialising predicate in " + this.getClass().getName() + ": " + e); } catch (IllegalAccessException e) { throw new IOException("Exception deserialising predicate in " + this.getClass().getName() + ": " + e); } catch (ClassNotFoundException e) { throw new IOException("Exception deserialising predicate in " + this.getClass().getName() + ": " + e); } catch (ClassCastException e) { throw new IOException("Exception deserialising predicate in " + this.getClass().getName() + ": " + e); } }
From source file:gaffer.accumulo.predicate.RawGraphElementWithStatisticsPredicate.java
License:Apache License
@Override public void readFields(DataInput in) throws IOException { String className = Text.readString(in); try {/*from www . j a v a 2s . c o m*/ predicate = (Predicate<GraphElementWithStatistics>) Class.forName(className).newInstance(); predicate.readFields(in); } catch (InstantiationException e) { throw new IOException("Exception deserialising predicate in " + this.getClass().getName() + ": " + e); } catch (IllegalAccessException e) { throw new IOException("Exception deserialising predicate in " + this.getClass().getName() + ": " + e); } catch (ClassNotFoundException e) { throw new IOException("Exception deserialising predicate in " + this.getClass().getName() + ": " + e); } catch (ClassCastException e) { throw new IOException("Exception deserialising predicate in " + this.getClass().getName() + ": " + e); } }
From source file:gaffer.graph.Edge.java
License:Apache License
public void readFields(DataInput in) throws IOException { this.sourceType = Text.readString(in); this.sourceValue = Text.readString(in); this.destinationType = Text.readString(in); this.destinationValue = Text.readString(in); this.summaryType = Text.readString(in); this.summarySubType = Text.readString(in); this.directed = in.readBoolean(); this.visibility = Text.readString(in); this.startDate.setTime(in.readLong()); this.endDate.setTime(in.readLong()); }
From source file:gaffer.graph.Entity.java
License:Apache License
@Override public void readFields(DataInput in) throws IOException { this.entityType = Text.readString(in); this.entityValue = Text.readString(in); this.summaryType = Text.readString(in); this.summarySubType = Text.readString(in); this.visibility = Text.readString(in); this.startDate.setTime(in.readLong()); this.endDate.setTime(in.readLong()); }
From source file:gaffer.graph.transform.impl.ListOfTransforms.java
License:Apache License
@Override public void readFields(DataInput in) throws IOException { list.clear();/*from w w w .ja va 2s. c om*/ int listSize = in.readInt(); for (int i = 0; i < listSize; i++) { String className = Text.readString(in); try { Transform transform = (Transform) Class.forName(className).newInstance(); transform.readFields(in); list.add(transform); } catch (InstantiationException e) { throw new IOException("Exception deserialising writable: " + e); } catch (IllegalAccessException e) { throw new IOException("Exception deserialising writable: " + e); } catch (ClassNotFoundException e) { throw new IOException("Exception deserialising writable: " + e); } catch (ClassCastException e) { throw new IOException("Exception deserialising writable: " + e); } } }