public class OutOfCoreEngine extends Object implements ResetSuperstepMetricsObserver
Modifier and Type | Field and Description |
---|---|
static int |
CHECK_IN_INTERVAL
Number of 'units of processing' after which an active thread should
check-in with the out-of-core engine in order to re-claim its permission to
stay active.
|
static String |
GRAPH_PERCENTAGE_IN_MEMORY
Name of metric for percentage of graph on disk
|
Constructor and Description |
---|
OutOfCoreEngine(ImmutableClassesGiraphConfiguration<?,?,?> conf,
CentralizedServiceWorker<?,?,?> service,
NetworkMetrics networkMetrics)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
activeThreadCheckIn()
A processing thread would check in with out-of-core engine every once in a
while to make sure that it can still remain active.
|
void |
doneProcessingPartition(int partitionId)
Notify out-of-core engine that processing of a particular partition is done
|
void |
gcCompleted(com.sun.management.GarbageCollectionNotificationInfo info)
Notify the out-of-core engine that a GC has just been completed
|
OutOfCoreDataAccessor |
getDataAccessor() |
FlowControl |
getFlowControl() |
OutOfCoreIOScheduler |
getIOScheduler()
Get a reference to IO scheduler
|
OutOfCoreIOStatistics |
getIOStatistics()
Get a reference to IO statistics collector
|
MetaPartitionManager |
getMetaPartitionManager()
Get a reference to meta partition information
|
NetworkMetrics |
getNetworkMetrics() |
Integer |
getNextPartition()
Get the id of the next partition to process in the current iteration over
all the partitions.
|
OutOfCoreOracle |
getOracle()
Get a reference to out-of-core oracle
|
ServerData |
getServerData()
Get a reference to the server data
|
CentralizedServiceWorker |
getServiceWorker()
Get a reference to the service worker
|
long |
getSuperstep() |
ReadWriteLock |
getSuperstepLock()
Get a reference to superstep lock
|
void |
initialize()
Initialize/Start the out-of-core engine.
|
void |
ioCommandCompleted(IOCommand command)
Notify out-of-core engine that an IO command is completed by an IO thread
|
void |
newSuperstep(SuperstepMetricsRegistry superstepMetrics)
Starting a new superstep.
|
void |
processingThreadFinish()
Notify the out-of-core engine that a processing (input/compute) thread has
finished.
|
void |
processingThreadStart()
Notify the out-of-core engine that a processing (input/compute) thread has
started.
|
void |
reset()
Reset partitions and messages meta data.
|
void |
retrievePartition(int partitionId)
Retrieve a particular partition.
|
void |
setFlowControl(FlowControl flowControl) |
void |
shutdown()
Shutdown/Stop the out-of-core engine.
|
void |
startIteration()
Notify out-of-core engine that iteration cycle over all partitions is about
to begin.
|
void |
updateActiveThreadsFraction(double fraction)
Update the fraction of processing threads that should remain active.
|
void |
updateRequestsCreditFraction(double fraction)
Update the credit announced for this worker in Netty.
|
public static final int CHECK_IN_INTERVAL
public static final String GRAPH_PERCENTAGE_IN_MEMORY
public OutOfCoreEngine(ImmutableClassesGiraphConfiguration<?,?,?> conf, CentralizedServiceWorker<?,?,?> service, NetworkMetrics networkMetrics)
conf
- Configurationservice
- Service workernetworkMetrics
- Interface for network statspublic void initialize()
public void shutdown()
public ServerData getServerData()
public CentralizedServiceWorker getServiceWorker()
public OutOfCoreIOScheduler getIOScheduler()
public MetaPartitionManager getMetaPartitionManager()
public ReadWriteLock getSuperstepLock()
public OutOfCoreIOStatistics getIOStatistics()
public OutOfCoreOracle getOracle()
public Integer getNextPartition()
public void doneProcessingPartition(int partitionId)
partitionId
- id of the partition that its processing is donepublic void startIteration()
public void retrievePartition(int partitionId)
partitionId
- id of the partition to retrievepublic void ioCommandCompleted(IOCommand command)
command
- the IO command that is completedpublic void updateActiveThreadsFraction(double fraction)
fraction
- the fraction of processing threads to remain active. This
number is in range [0, 1]public void activeThreadCheckIn()
public void processingThreadStart()
public void processingThreadFinish()
public void updateRequestsCreditFraction(double fraction)
fraction
- the fraction of max credits others can use to send requests
to this workerpublic void reset()
public long getSuperstep()
public void gcCompleted(com.sun.management.GarbageCollectionNotificationInfo info)
info
- GC informationpublic void newSuperstep(SuperstepMetricsRegistry superstepMetrics)
ResetSuperstepMetricsObserver
newSuperstep
in interface ResetSuperstepMetricsObserver
superstepMetrics
- SuperstepMetricsRegistry being used.public FlowControl getFlowControl()
public void setFlowControl(FlowControl flowControl)
public OutOfCoreDataAccessor getDataAccessor()
public NetworkMetrics getNetworkMetrics()
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.