public class AlluxioCluster extends Object implements ProtoConverter<AlluxioCluster>
Constructor and Description |
---|
AlluxioCluster(ExecutorService svc)
Creates a new instance of
AlluxioCluster . |
Modifier and Type | Method and Description |
---|---|
Set<String> |
getNodeType(AlluxioNodeType type)
Gets a set of node hostnames which correspond to a given
AlluxioNodeType . |
Map<AlluxioNodeType,ProcessState> |
heartbeat(AlluxioNodeStatusOrBuilder addr)
Add a new node to the cluster.
|
Map<AlluxioNodeType,ProcessState> |
remove(AlluxioNodeStatusOrBuilder addr)
Remove a node from the cluster with the address's hostname.
|
Map<AlluxioNodeType,ProcessState> |
remove(String hostname)
Remove a node from the cluster.
|
void |
setContext(ManagerProcessContext ctx)
Sets ManagerProcessContext and registers an event to send heartbeats.
|
int |
size() |
AlluxioCluster |
toProto()
Converts an objects representation into a protobuf type.
|
public AlluxioCluster(ExecutorService svc)
AlluxioCluster
.svc
- the executor service used to run event handlerspublic void setContext(ManagerProcessContext ctx)
ctx
- Manager process contextpublic Map<AlluxioNodeType,ProcessState> heartbeat(AlluxioNodeStatusOrBuilder addr)
addr
- the alluxio node address to addpublic Map<AlluxioNodeType,ProcessState> remove(AlluxioNodeStatusOrBuilder addr)
addr
- the node of the Alluxio cluster to remove statuses forpublic Map<AlluxioNodeType,ProcessState> remove(String hostname)
hostname
- the node to remove with the given hostnamepublic Set<String> getNodeType(AlluxioNodeType type)
AlluxioNodeType
.type
- the type to query forpublic int size()
public AlluxioCluster toProto()
ProtoConverter
toProto
in interface ProtoConverter<AlluxioCluster>
Copyright © 2023. All Rights Reserved.