public final class NodeManagerImpl extends Object implements NodeManager, SimpleRMI.ServerListener, WorkerServerHandle.Listener
| Modifier and Type | Method and Description |
|---|---|
OutputStream |
addToCache(CacheScope scope,
ClasspathKey key) |
boolean |
anyJobsRunning() |
void |
cleanup(GUID jobGUID,
WorkerRole role,
CleanupLevel level)
Cleans up files created for the job
|
void |
clearClasspathCache()
Clears the shared classpath cache
|
WorkerService |
createCommandExecutor(SerializationBridge<ClientWorkerServerArguments> arguments) |
void |
deleteJobLog(GUID jobId,
WorkerRole role)
Deletes the log file for the given job.
|
void |
destroy()
Called upon server shutdown.
|
Map<String,String> |
getAllJobs()
Gets the id of every job log mapped to it's name that is managed by this node.
|
Integer |
getCommandServiceStatus(GUID guid,
WorkerRole role)
Get the current status of the command service associated with the job and role
null - command service does not exist or has been terminated
-1 - command service still executing
0 - command service execution completed normally
1+ - command service execution completed with error
|
NodeConfiguration |
getConfiguration()
Gets the current configuration settings for the node.
|
String |
getJobName(GUID jobId)
Gets the name of the job with the provided id.
|
long |
getNodeLogAge(GUID jobId,
WorkerRole role)
Gets the age of the log files for the given job based on the last
modification date.
|
Map<String,Long> |
getNodeLogAge(WorkerRole role)
Gets the age of all log files based on the last modification
date mapped to job id.
|
JobLogInfo.LogInfo |
getNodeLogInfo(GUID jobId,
WorkerRole role)
Get the log info for a job.
|
Map<String,JobLogInfo.LogInfo> |
getNodeLogInfo(WorkerRole role)
Gets a map of all job ids linked with the node's log info.
|
List<NodeStatistics> |
getStatistics()
Fetches statistics from each of the live processes launched by this node manager
|
String |
getStatus()
Gets a description of the current status of the node
|
String |
getVersion()
Returns the version number of this NodeManager instance
|
void |
init(GenericTCPServer.ServerContext context)
Called upon server start to inform the handler of context information
such as the listening address.
|
NodeStatistics |
killJob(GUID guid,
WorkerRole role)
Admin kill.
|
void |
notifyNodePreferencesChanged(ClusterPreferences nodeScopedPreferences)
Notifies the node manager that their preferences (may) have changed
|
Set<ClasspathKey> |
notInNodeCache(Set<ClasspathKey> elements) |
InputStream |
openJobLogFile(GUID jobId,
WorkerRole role,
LogFileOptions options)
Opens the log file for the given job.
|
InputStream |
openNodeLogFile(LogFileOptions options)
Opens the log file for the node manager.
|
void |
processTerminated(com.pervasive.datarush.cluster.WorkerServerHandle handle) |
void |
rotateNodeLog()
Rotates the node manager log
|
void |
shutdown()
Terminates the node manager.
|
static void |
start(DataRushCluster cluster,
String name,
boolean daemon,
String host) |
public void notifyNodePreferencesChanged(ClusterPreferences nodeScopedPreferences)
NodeManagernotifyNodePreferencesChanged in interface NodeManagernodeScopedPreferences - the new preferencespublic NodeConfiguration getConfiguration()
NodeManagergetConfiguration in interface NodeManagerpublic WorkerService createCommandExecutor(SerializationBridge<ClientWorkerServerArguments> arguments)
createCommandExecutor in interface NodeManagerpublic String getStatus()
NodeManagergetStatus in interface NodeManagerpublic void shutdown()
NodeManagershutdown in interface NodeManagerpublic static void start(DataRushCluster cluster, String name, boolean daemon, String host)
public void init(GenericTCPServer.ServerContext context)
SimpleRMI.ServerListenerinit in interface SimpleRMI.ServerListenercontext - the server contextpublic void destroy()
SimpleRMI.ServerListenerdestroy in interface SimpleRMI.ServerListenerpublic List<NodeStatistics> getStatistics()
NodeManagergetStatistics in interface NodeManagerpublic void processTerminated(com.pervasive.datarush.cluster.WorkerServerHandle handle)
processTerminated in interface WorkerServerHandle.Listenerpublic Integer getCommandServiceStatus(GUID guid, WorkerRole role)
NodeManagergetCommandServiceStatus in interface NodeManagerguid - the job guidrole - the role of the workerpublic NodeStatistics killJob(GUID guid, WorkerRole role)
NodeManagerkillJob in interface NodeManagerrole - the role of the worker to killClusterManager#killJob(GUID)}public Map<String,String> getAllJobs()
NodeManagergetAllJobs in interface NodeManagerpublic String getJobName(GUID jobId)
NodeManagergetJobName in interface NodeManagerpublic Map<String,Long> getNodeLogAge(WorkerRole role)
NodeManagergetNodeLogAge in interface NodeManagerrole - whether we want the log for the job master or the jobpublic long getNodeLogAge(GUID jobId, WorkerRole role)
NodeManagergetNodeLogAge in interface NodeManagerjobId - information used to determine the name of the log filerole - whether we want the log for the job master or the jobpublic Map<String,JobLogInfo.LogInfo> getNodeLogInfo(WorkerRole role)
NodeManagergetNodeLogInfo in interface NodeManagerpublic JobLogInfo.LogInfo getNodeLogInfo(GUID jobId, WorkerRole role)
NodeManagergetNodeLogInfo in interface NodeManagerjobId - information used to determine the name of the log filerole - whether we want the log for the job master or the jobpublic InputStream openJobLogFile(GUID jobId, WorkerRole role, LogFileOptions options) throws IOException
NodeManageropenJobLogFile in interface NodeManagerjobId - information used to determine the name of the log filerole - whether we want the log for the job master or the jobIOException - if a failure happens reading the filepublic void deleteJobLog(GUID jobId, WorkerRole role)
NodeManagerdeleteJobLog in interface NodeManagerjobId - information used to determine the name of the log filerole - whether we want the log for the job master or the jobpublic InputStream openNodeLogFile(LogFileOptions options) throws IOException
NodeManageropenNodeLogFile in interface NodeManagerIOExceptionpublic void cleanup(GUID jobGUID, WorkerRole role, CleanupLevel level)
NodeManagercleanup in interface NodeManagerjobGUID - the job guidlevel - the cleanup level.public Set<ClasspathKey> notInNodeCache(Set<ClasspathKey> elements)
notInNodeCache in interface ClasspathCacheManagerpublic OutputStream addToCache(CacheScope scope, ClasspathKey key) throws IOException
addToCache in interface ClasspathCacheManagerIOExceptionpublic void clearClasspathCache()
throws IOException
NodeManagerclearClasspathCache in interface NodeManagerIOException - if unable to delete (would typically happen if job is running)public String getVersion()
NodeManagergetVersion in interface NodeManagerpublic boolean anyJobsRunning()
throws RMIException
anyJobsRunning in interface NodeManagerRMIExceptionpublic void rotateNodeLog()
throws RMIException
NodeManagerrotateNodeLog in interface NodeManagerRMIExceptionCopyright © 2015 Actian Corporation. All Rights Reserved.