public class LocalDiskDataAccessor extends Object implements OutOfCoreDataAccessor
OutOfCoreDataAccessor.DataInputWrapper, OutOfCoreDataAccessor.DataOutputWrapper| Modifier and Type | Field and Description |
|---|---|
static IntConfOption |
OOC_DISK_BUFFER_SIZE
Size of the buffer used for (de)serializing data when reading/writing
from/to disk
|
| Constructor and Description |
|---|
LocalDiskDataAccessor(ImmutableClassesGiraphConfiguration<?,?,?> conf)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
dataExist(int threadId,
DataIndex index)
Whether the data for the given thread and index chain exists?
|
int |
getNumAccessorThreads() |
void |
initialize()
Initialize the DAO
|
OutOfCoreDataAccessor.DataInputWrapper |
prepareInput(int threadId,
DataIndex index)
Prepare a wrapper containing
DataInput representation for a
given thread involved in persistence for a given index chain for data. |
OutOfCoreDataAccessor.DataOutputWrapper |
prepareOutput(int threadId,
DataIndex index,
boolean shouldAppend)
Prepare a wrapper containing
DataOutput representation for a
given thread involved in persistence for a given index chain for data. |
void |
shutdown()
Shut down the DAO
|
public static final IntConfOption OOC_DISK_BUFFER_SIZE
public LocalDiskDataAccessor(ImmutableClassesGiraphConfiguration<?,?,?> conf)
conf - Configurationpublic void initialize()
OutOfCoreDataAccessorinitialize in interface OutOfCoreDataAccessorpublic void shutdown()
OutOfCoreDataAccessorshutdown in interface OutOfCoreDataAccessorpublic int getNumAccessorThreads()
getNumAccessorThreads in interface OutOfCoreDataAccessorpublic OutOfCoreDataAccessor.DataInputWrapper prepareInput(int threadId, DataIndex index) throws IOException
OutOfCoreDataAccessorDataInput representation for a
given thread involved in persistence for a given index chain for data.prepareInput in interface OutOfCoreDataAccessorthreadId - id of the thread involved in persistenceindex - index chain of the data to access the serialized data formDataInput representation of dataIOExceptionpublic OutOfCoreDataAccessor.DataOutputWrapper prepareOutput(int threadId, DataIndex index, boolean shouldAppend) throws IOException
OutOfCoreDataAccessorDataOutput representation for a
given thread involved in persistence for a given index chain for data.prepareOutput in interface OutOfCoreDataAccessorthreadId - id of the thread involved in persistenceindex - index chain of the data to access the serialized data formshouldAppend - whether the DataOutput should be used for
appending to already existing data for the given index
or the DataOutput should create new
instance to store serialized dataDataOutput representation of dataIOExceptionpublic boolean dataExist(int threadId,
DataIndex index)
OutOfCoreDataAccessordataExist in interface OutOfCoreDataAccessorthreadId - id of the thread involved in persistenceindex - index chain used to access the dataCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.