public class GlobalCommValueOutputStream extends CountingOutputStream
CountingOutputStream
which allows writing of
reduced values in the form of pair (name, type, value)
There are two modes:
- when class of the value is written into the stream.
- when it isn't, and reader needs to know Class of the value in order
to read it.dataOutput
Constructor and Description |
---|
GlobalCommValueOutputStream(boolean writeClass)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
addValue(String name,
GlobalCommType type,
org.apache.hadoop.io.Writable value)
Write global communication object to the stream
and increment internal counter
|
flush, getSize, incrementCounter
public GlobalCommValueOutputStream(boolean writeClass)
writeClass
- boolean whether to write Class object for valuespublic int addValue(String name, GlobalCommType type, org.apache.hadoop.io.Writable value) throws IOException
name
- Nametype
- Global communication typevalue
- Object valueIOException
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.