@InterfaceAudience.Private public abstract class FetchedInput extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
FetchedInput.State |
static class |
FetchedInput.Type |
Modifier and Type | Field and Description |
---|---|
protected long |
actualSize |
protected FetchedInputCallback |
callback |
protected long |
compressedSize |
protected int |
id |
protected InputAttemptIdentifier |
inputAttemptIdentifier |
protected FetchedInput.State |
state |
protected FetchedInput.Type |
type |
Constructor and Description |
---|
FetchedInput(FetchedInput.Type type,
long actualSize,
long compressedSize,
InputAttemptIdentifier inputAttemptIdentifier,
FetchedInputCallback callbackHandler) |
Modifier and Type | Method and Description |
---|---|
abstract void |
abort()
Abort the output.
|
abstract void |
commit()
Commit the output.
|
boolean |
equals(Object obj) |
abstract void |
free()
Called when this input has been consumed, so that resources can be
reclaimed.
|
long |
getActualSize() |
long |
getCompressedSize() |
InputAttemptIdentifier |
getInputAttemptIdentifier() |
abstract InputStream |
getInputStream()
Return an input stream to be used to read the previously fetched data.
|
abstract OutputStream |
getOutputStream()
Returns the output stream to be used to write fetched data.
|
FetchedInput.Type |
getType() |
int |
hashCode() |
void |
notifyFetchComplete()
Inform the Allocator about a committed resource.
|
void |
notifyFetchFailure()
Inform the Allocator about a failed resource.
|
void |
notifyFreedResource()
Inform the Allocator about a completed resource being released.
|
protected InputAttemptIdentifier inputAttemptIdentifier
protected final long actualSize
protected final long compressedSize
protected final FetchedInput.Type type
protected final FetchedInputCallback callback
protected final int id
protected FetchedInput.State state
public FetchedInput(FetchedInput.Type type, long actualSize, long compressedSize, InputAttemptIdentifier inputAttemptIdentifier, FetchedInputCallback callbackHandler)
public FetchedInput.Type getType()
public long getActualSize()
public long getCompressedSize()
public InputAttemptIdentifier getInputAttemptIdentifier()
public void notifyFetchComplete()
public void notifyFetchFailure()
public void notifyFreedResource()
public abstract OutputStream getOutputStream() throws IOException
IOException
public abstract InputStream getInputStream() throws IOException
IOException
public abstract void commit() throws IOException
IOException
public abstract void abort() throws IOException
IOException
public abstract void free()
Copyright © 2016 Apache Software Foundation. All rights reserved.