Interface Executor
-
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
ExecutorAdded,ExecutorRemoved,ExecutorUpdated
public interface Executor extends java.io.SerializableThe Executor interface represents an executor in a Spark cluster. It defines methods for setting and getting various attributes of an executor. These attributes include the name of the event, the ID of the stage the executor is running, the ID of the executor itself, the attempt ID of the stage, the time at which the executor started, the host where the executor is running, the total number of cores available to the executor, the resource information of the executor, and the reason for which the executor was removed from the cluster.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidexecutorTime(long Time)Sets the time at which this executor started.java.lang.StringgetEventName()Returns the name of the event associated with this executor.java.lang.StringgetExecutorHost()Returns the host where this executor is running.java.lang.StringgetExecutorID()Returns the ID of this executor.longgetExecutorTime()Returns the time at which this executor started.java.lang.StringgetReasonOfRemoval()Returns the reason for which this executor was removed from the cluster.intgetResourceInfo()Returns the resource information of this executor.intgetStageAttempt()Returns the attempt ID of the stage.intgetStageID()Returns the ID of the stage the executor is running.intgetTotalCores()Returns the total number of cores available to this executor.voidsetEventame(java.lang.String name)Sets the name of the event associated with this executor.voidsetExecutorHost(java.lang.String host)Sets the host where this executor is running.voidsetExecutorID(java.lang.String id)Sets the ID of this executor.voidsetReasonOfRemoval(java.lang.String reasonOfRemoval)Sets the reason for which this executor was removed from the cluster.voidsetResourceInfo(int resourceInfoId)Sets the resource information of this executor.voidsetStageID(int id)Sets the ID of the stage the executor is running.voidsetTotalCores(int cores)Sets the total number of cores available to this executor.voidstageAttempt(int id)Sets the attempt ID of the stage.
-
-
-
Method Detail
-
setEventame
void setEventame(java.lang.String name)
Sets the name of the event associated with this executor.- Parameters:
name- The name of the event.
-
getEventName
java.lang.String getEventName()
Returns the name of the event associated with this executor.- Returns:
- The name of the event.
-
setStageID
void setStageID(int id)
Sets the ID of the stage the executor is running.- Parameters:
id- The ID of the stage.
-
getStageID
int getStageID()
Returns the ID of the stage the executor is running.- Returns:
- The ID of the stage.
-
setExecutorID
void setExecutorID(java.lang.String id)
Sets the ID of this executor.- Parameters:
id- The ID of the executor.
-
getExecutorID
java.lang.String getExecutorID()
Returns the ID of this executor.- Returns:
- The ID of the executor.
-
stageAttempt
void stageAttempt(int id)
Sets the attempt ID of the stage.- Parameters:
id- The attempt ID of the stage.
-
getStageAttempt
int getStageAttempt()
Returns the attempt ID of the stage.- Returns:
- The attempt ID of the stage.
-
executorTime
void executorTime(long Time)
Sets the time at which this executor started.- Parameters:
Time- The start time of the executor.
-
getExecutorTime
long getExecutorTime()
Returns the time at which this executor started.- Returns:
- The start time of the executor.
-
setExecutorHost
void setExecutorHost(java.lang.String host)
Sets the host where this executor is running.- Parameters:
host- The host where the executor is running.
-
getExecutorHost
java.lang.String getExecutorHost()
Returns the host where this executor is running.- Returns:
- The host where the executor is running.
-
setTotalCores
void setTotalCores(int cores)
Sets the total number of cores available to this executor.- Parameters:
cores- The total number of cores.
-
getTotalCores
int getTotalCores()
Returns the total number of cores available to this executor.- Returns:
- The total number of cores.
-
setResourceInfo
void setResourceInfo(int resourceInfoId)
Sets the resource information of this executor.- Parameters:
resourceInfoId- The resource information of the executor.
-
getResourceInfo
int getResourceInfo()
Returns the resource information of this executor.- Returns:
- The resource information of the executor.
-
setReasonOfRemoval
void setReasonOfRemoval(java.lang.String reasonOfRemoval)
Sets the reason for which this executor was removed from the cluster.- Parameters:
reasonOfRemoval- The reason for removal.
-
getReasonOfRemoval
java.lang.String getReasonOfRemoval()
Returns the reason for which this executor was removed from the cluster.- Returns:
- The reason for removal.
-
-