Interface DistributedLogStore
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
H2LogStore
Interface for distributed log storage.
This interface defines operations for storing and querying logs from distributed workflow execution across multiple nodes.
- Author:
- devteam@scivics-lab.com
-
Method Summary
Modifier and TypeMethodDescriptionvoidendSession(long sessionId, SessionStatus status) Ends a session with the given status.getErrors(long sessionId) Retrieves error logs for a session.longGets the most recent session ID.getLogsByLevel(long sessionId, LogLevel minLevel) Retrieves log entries filtered by level.getLogsByNode(long sessionId, String nodeId) Retrieves all log entries for a specific node in a session.getSummary(long sessionId) Gets a summary of the session.listSessions(int limit) Lists all sessions.voidRecords a log entry.voidRecords a log entry with vertex context.voidlogAction(long sessionId, String nodeId, String vertexName, String actionName, int exitCode, long durationMs, String output) Records an action result.voidmarkNodeFailed(long sessionId, String nodeId, String reason) Marks a node as failed in this session.voidmarkNodeSuccess(long sessionId, String nodeId) Marks a node as succeeded in this session.longstartSession(String workflowName, int nodeCount) Starts a new workflow execution session.longstartSession(String workflowName, String overlayName, String inventoryName, int nodeCount) Starts a new workflow execution session with overlay and inventory info.Methods inherited from interface AutoCloseable
close
-
Method Details
-
startSession
Starts a new workflow execution session.- Parameters:
workflowName- name of the workflow being executednodeCount- number of nodes participating in this session- Returns:
- session ID for subsequent log entries
-
startSession
Starts a new workflow execution session with overlay and inventory info.- Parameters:
workflowName- name of the workflow being executedoverlayName- name of the overlay being used (may be null)inventoryName- name of the inventory file being used (may be null)nodeCount- number of nodes participating in this session- Returns:
- session ID for subsequent log entries
-
log
-
log
Records a log entry with vertex context.- Parameters:
sessionId- session ID from startSession()nodeId- identifier of the nodevertexName- current vertex name in workflowlevel- log levelmessage- log message
-
logAction
void logAction(long sessionId, String nodeId, String vertexName, String actionName, int exitCode, long durationMs, String output) Records an action result.- Parameters:
sessionId- session IDnodeId- node identifiervertexName- vertex nameactionName- action/method nameexitCode- command exit code (0 for success)durationMs- execution duration in millisecondsoutput- command output or result message
-
markNodeSuccess
Marks a node as succeeded in this session.- Parameters:
sessionId- session IDnodeId- node identifier
-
markNodeFailed
Marks a node as failed in this session.- Parameters:
sessionId- session IDnodeId- node identifierreason- failure reason
-
endSession
Ends a session with the given status.- Parameters:
sessionId- session IDstatus- final status
-
getLogsByNode
Retrieves all log entries for a specific node in a session.- Parameters:
sessionId- session IDnodeId- node identifier- Returns:
- list of log entries
-
getLogsByLevel
Retrieves log entries filtered by level.- Parameters:
sessionId- session IDminLevel- minimum log level to include- Returns:
- list of log entries
-
getErrors
-
getSummary
Gets a summary of the session.- Parameters:
sessionId- session ID- Returns:
- session summary
-
getLatestSessionId
long getLatestSessionId()Gets the most recent session ID.- Returns:
- latest session ID, or -1 if no sessions exist
-
listSessions
Lists all sessions.- Parameters:
limit- maximum number of sessions to return- Returns:
- list of session summaries
-