public class InMemoryDataAccessor extends Object implements OutOfCoreDataAccessor
| Modifier and Type | Class and Description |
|---|---|
class |
InMemoryDataAccessor.InMemoryDataInputWrapper
DataInputWrapper implementation for InMemoryDataAccessor |
static class |
InMemoryDataAccessor.InMemoryDataOutputWrapper
DataOutputWrapper implementation for InMemoryDataAccessor |
OutOfCoreDataAccessor.DataInputWrapper, OutOfCoreDataAccessor.DataOutputWrapper| Constructor and Description |
|---|
InMemoryDataAccessor(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 InMemoryDataAccessor(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.