public class NettyMasterClient extends Object implements MasterClient
MasterClient
Constructor and Description |
---|
NettyMasterClient(org.apache.hadoop.mapreduce.Mapper.Context context,
ImmutableClassesGiraphConfiguration configuration,
CentralizedServiceMaster<?,?,?> service,
Thread.UncaughtExceptionHandler exceptionHandler)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
closeConnections()
Closes all connections.
|
void |
finishSendingValues()
Flush aggregated values cache.
|
void |
flush()
Flush all outgoing messages.
|
FlowControl |
getFlowControl()
Get the reference to the flow control policy used for sending requests
|
void |
openConnections()
Make sure that all the connections to workers have been established.
|
void |
sendToOwner(String name,
GlobalCommType sendType,
org.apache.hadoop.io.Writable object)
Sends aggregator to its owner
|
void |
sendWritableRequest(int destTaskId,
WritableRequest request)
Send a request to a remote server (should be already connected)
|
public NettyMasterClient(org.apache.hadoop.mapreduce.Mapper.Context context, ImmutableClassesGiraphConfiguration configuration, CentralizedServiceMaster<?,?,?> service, Thread.UncaughtExceptionHandler exceptionHandler)
context
- Context from mapperconfiguration
- Configurationservice
- Centralized serviceexceptionHandler
- handler for uncaught exception. Will
terminate job.public void openConnections()
MasterClient
openConnections
in interface MasterClient
public void sendToOwner(String name, GlobalCommType sendType, org.apache.hadoop.io.Writable object) throws IOException
MasterClient
sendToOwner
in interface MasterClient
name
- Name of the objectsendType
- Global communication typeobject
- Object valueIOException
public void finishSendingValues() throws IOException
MasterClient
finishSendingValues
in interface MasterClient
IOException
public void flush()
MasterClient
flush
in interface MasterClient
public void sendWritableRequest(int destTaskId, WritableRequest request)
MasterClient
sendWritableRequest
in interface MasterClient
destTaskId
- Destination worker idrequest
- Request to sendpublic void closeConnections()
MasterClient
closeConnections
in interface MasterClient
public FlowControl getFlowControl()
MasterClient
getFlowControl
in interface MasterClient
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.