public class SendGlobalCommCache extends CountingCache
Constructor and Description |
---|
SendGlobalCommCache(boolean writeClass)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addSpecialCount(Integer taskId)
Creates special value which will hold the total number of global
communication requests for worker with selected task id.
|
int |
addValue(Integer taskId,
String name,
GlobalCommType type,
org.apache.hadoop.io.Writable value)
Add global communication value to the cache
|
byte[] |
removeSerialized(Integer taskId)
Remove and get values for certain worker
|
getCount, incrementCounter, reset
public SendGlobalCommCache(boolean writeClass)
writeClass
- boolean whether to write Class object for valuespublic int addValue(Integer taskId, String name, GlobalCommType type, org.apache.hadoop.io.Writable value) throws IOException
taskId
- Task id of worker which owns the valuename
- Nametype
- Global communication typevalue
- ValueIOException
public byte[] removeSerialized(Integer taskId)
taskId
- Partition id of worker ownerpublic void addSpecialCount(Integer taskId) throws IOException
taskId
- Destination worker's task idIOException
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.