I
- Vertex idV
- Vertex dataE
- Edge datapublic class NettyWorkerServer<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable> extends Object implements WorkerServer<I,V,E>
WorkerServer
and contains
the actual ServerData
.Constructor and Description |
---|
NettyWorkerServer(ImmutableClassesGiraphConfiguration<I,V,E> conf,
CentralizedServiceWorker<I,V,E> service,
org.apache.hadoop.mapreduce.Mapper.Context context,
Thread.UncaughtExceptionHandler exceptionHandler)
Constructor to start the server.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Shuts down.
|
long |
getBytesReceived()
Returns aggregate bytes received.
|
long |
getBytesReceivedPerSuperstep()
Returns bytes received in current superstep
|
String |
getLocalHostOrIp()
Get server host name or IP
|
InetSocketAddress |
getMyAddress()
Get server address
|
ServerData<I,V,E> |
getServerData()
Get server data
|
void |
prepareSuperstep()
Prepare incoming messages for computation, and resolve mutation requests.
|
void |
resetBytesReceivedPerSuperstep()
Resets the counter for bytes received per superstep.
|
void |
setFlowControl(FlowControl flowControl)
Inform this server about the flow control used in sending requests
|
public NettyWorkerServer(ImmutableClassesGiraphConfiguration<I,V,E> conf, CentralizedServiceWorker<I,V,E> service, org.apache.hadoop.mapreduce.Mapper.Context context, Thread.UncaughtExceptionHandler exceptionHandler)
conf
- Configurationservice
- Service to get partition mappingscontext
- Mapper contextexceptionHandler
- handle uncaught exceptionspublic InetSocketAddress getMyAddress()
WorkerServer
getMyAddress
in interface WorkerServer<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
public String getLocalHostOrIp()
WorkerServer
getLocalHostOrIp
in interface WorkerServer<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
public void prepareSuperstep()
WorkerServer
prepareSuperstep
in interface WorkerServer<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
public ServerData<I,V,E> getServerData()
WorkerServer
getServerData
in interface WorkerServer<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
public void close()
WorkerServer
close
in interface Closeable
close
in interface AutoCloseable
close
in interface WorkerServer<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
public void setFlowControl(FlowControl flowControl)
WorkerServer
setFlowControl
in interface WorkerServer<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
flowControl
- reference to the flow control policypublic long getBytesReceivedPerSuperstep()
NetworkMetrics
getBytesReceivedPerSuperstep
in interface NetworkMetrics
public void resetBytesReceivedPerSuperstep()
NetworkMetrics
resetBytesReceivedPerSuperstep
in interface NetworkMetrics
public long getBytesReceived()
NetworkMetrics
getBytesReceived
in interface NetworkMetrics
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.