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()
OutOfCoreDataAccessor
initialize
in interface OutOfCoreDataAccessor
public void shutdown()
OutOfCoreDataAccessor
shutdown
in interface OutOfCoreDataAccessor
public int getNumAccessorThreads()
getNumAccessorThreads
in interface OutOfCoreDataAccessor
public OutOfCoreDataAccessor.DataInputWrapper prepareInput(int threadId, DataIndex index) throws IOException
OutOfCoreDataAccessor
DataInput
representation for a
given thread involved in persistence for a given index chain for data.prepareInput
in interface OutOfCoreDataAccessor
threadId
- id of the thread involved in persistenceindex
- index chain of the data to access the serialized data formDataInput
representation of dataIOException
public OutOfCoreDataAccessor.DataOutputWrapper prepareOutput(int threadId, DataIndex index, boolean shouldAppend) throws IOException
OutOfCoreDataAccessor
DataOutput
representation for a
given thread involved in persistence for a given index chain for data.prepareOutput
in interface OutOfCoreDataAccessor
threadId
- 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 dataIOException
public boolean dataExist(int threadId, DataIndex index)
OutOfCoreDataAccessor
dataExist
in interface OutOfCoreDataAccessor
threadId
- id of the thread involved in persistenceindex
- index chain used to access the dataCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.