org.apache.hadoop.record.Record Java Examples

The following examples show how to use org.apache.hadoop.record.Record. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TypedBytesWritableOutput.java    From hadoop with Apache License 2.0 5 votes vote down vote up
public void write(Writable w) throws IOException {
  if (w instanceof TypedBytesWritable) {
    writeTypedBytes((TypedBytesWritable) w);
  } else if (w instanceof BytesWritable) {
    writeBytes((BytesWritable) w);
  } else if (w instanceof ByteWritable) {
    writeByte((ByteWritable) w);
  } else if (w instanceof BooleanWritable) {
    writeBoolean((BooleanWritable) w);
  } else if (w instanceof IntWritable) {
    writeInt((IntWritable) w);
  } else if (w instanceof VIntWritable) {
    writeVInt((VIntWritable) w);
  } else if (w instanceof LongWritable) {
    writeLong((LongWritable) w);
  } else if (w instanceof VLongWritable) {
    writeVLong((VLongWritable) w);
  } else if (w instanceof FloatWritable) {
    writeFloat((FloatWritable) w);
  } else if (w instanceof DoubleWritable) {
    writeDouble((DoubleWritable) w);
  } else if (w instanceof Text) {
    writeText((Text) w);
  } else if (w instanceof ArrayWritable) {
    writeArray((ArrayWritable) w);
  } else if (w instanceof MapWritable) {
    writeMap((MapWritable) w);
  } else if (w instanceof SortedMapWritable) {
    writeSortedMap((SortedMapWritable) w);
  } else if (w instanceof Record) {
    writeRecord((Record) w);
  } else {
    writeWritable(w); // last resort
  }
}
 
Example #2
Source File: TypedBytesWritableOutput.java    From big-c with Apache License 2.0 5 votes vote down vote up
public void write(Writable w) throws IOException {
  if (w instanceof TypedBytesWritable) {
    writeTypedBytes((TypedBytesWritable) w);
  } else if (w instanceof BytesWritable) {
    writeBytes((BytesWritable) w);
  } else if (w instanceof ByteWritable) {
    writeByte((ByteWritable) w);
  } else if (w instanceof BooleanWritable) {
    writeBoolean((BooleanWritable) w);
  } else if (w instanceof IntWritable) {
    writeInt((IntWritable) w);
  } else if (w instanceof VIntWritable) {
    writeVInt((VIntWritable) w);
  } else if (w instanceof LongWritable) {
    writeLong((LongWritable) w);
  } else if (w instanceof VLongWritable) {
    writeVLong((VLongWritable) w);
  } else if (w instanceof FloatWritable) {
    writeFloat((FloatWritable) w);
  } else if (w instanceof DoubleWritable) {
    writeDouble((DoubleWritable) w);
  } else if (w instanceof Text) {
    writeText((Text) w);
  } else if (w instanceof ArrayWritable) {
    writeArray((ArrayWritable) w);
  } else if (w instanceof MapWritable) {
    writeMap((MapWritable) w);
  } else if (w instanceof SortedMapWritable) {
    writeSortedMap((SortedMapWritable) w);
  } else if (w instanceof Record) {
    writeRecord((Record) w);
  } else {
    writeWritable(w); // last resort
  }
}
 
Example #3
Source File: TypedBytesWritableOutput.java    From hadoop with Apache License 2.0 4 votes vote down vote up
public void writeRecord(Record r) throws IOException {
  r.serialize(TypedBytesRecordOutput.get(out));
}
 
Example #4
Source File: TypedBytesRecordOutput.java    From hadoop with Apache License 2.0 4 votes vote down vote up
public void startRecord(Record r, String tag) throws IOException {
  out.writeListHeader();
}
 
Example #5
Source File: TypedBytesRecordOutput.java    From hadoop with Apache License 2.0 4 votes vote down vote up
public void endRecord(Record r, String tag) throws IOException {
  out.writeListFooter();
}
 
Example #6
Source File: TypedBytesWritableOutput.java    From big-c with Apache License 2.0 4 votes vote down vote up
public void writeRecord(Record r) throws IOException {
  r.serialize(TypedBytesRecordOutput.get(out));
}
 
Example #7
Source File: TypedBytesRecordOutput.java    From big-c with Apache License 2.0 4 votes vote down vote up
public void startRecord(Record r, String tag) throws IOException {
  out.writeListHeader();
}
 
Example #8
Source File: TypedBytesRecordOutput.java    From big-c with Apache License 2.0 4 votes vote down vote up
public void endRecord(Record r, String tag) throws IOException {
  out.writeListFooter();
}