public class MultiStreamStateHandle extends Object implements StreamStateHandle
StreamStateHandle
and makes them look like a single one. This is done by
providing a contiguous view on all the streams of the inner handles through a wrapper stream and by summing up all
all the meta data.Constructor and Description |
---|
MultiStreamStateHandle(List<StreamStateHandle> stateHandles) |
Modifier and Type | Method and Description |
---|---|
void |
discardState()
Discards the state referred to by this handle, to free up resources in
the persistent storage.
|
long |
getStateSize()
Returns the size of the state in bytes.
|
FSDataInputStream |
openInputStream()
Returns an
FSDataInputStream that can be used to read back the data that
was previously written to the stream. |
public MultiStreamStateHandle(List<StreamStateHandle> stateHandles) throws IOException
IOException
public FSDataInputStream openInputStream() throws IOException
StreamStateHandle
FSDataInputStream
that can be used to read back the data that
was previously written to the stream.openInputStream
in interface StreamStateHandle
IOException
public void discardState() throws Exception
StateObject
discardState
in interface StateObject
Exception
public long getStateSize()
StateObject
If the the size is not known, return 0
.
getStateSize
in interface StateObject
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.