Interface DBSpecificQueryProvider
- All Known Implementing Classes:
DB2DatabaseQueryProvider,H2DatabaseQueryProvider,MySQLDatabaseQueryProvider,OracleDatabaseQueryProvider,PostgreSQLDatabaseQueryProvider,SQLServerDatabaseQueryProvider
public interface DBSpecificQueryProvider
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringThe database-clock "now" expression for this dialect.default Stringdefault Stringdefault Stringdefault StringAtomically claims an orphaned coordination row for recovery: sets the transient status and takes ownership (master_node_id), guarded by the (job execution, lost owner) pair.default StringRead-only: lists coordinated jobs (most recent first), for the job-centric observability view.default StringCount of partitions that ended in FAILED for a job, so the master can fail the step accordingly.default Stringdefault Stringdefault StringRead-only: the coordination row for one job execution.default StringFinds jobs whose current owner has left the cluster: coordination rows still in-flight (STARTED, orRECOVERINGif a previous reaper died) whosemaster_node_idno longer exists inbatch_nodes(the owner was marked unreachable and then removed by the node-cleanup phase).default StringRead-only: the partitions of a job (by manager step execution id) with their placement and status.default Stringdefault StringAppends a coordination phase event, timestamped with the database clock (single clock across nodes).default Stringdefault StringReturns a dialect-specific SQL expression for the elapsed milliseconds betweencolumnNameand the current database time, used in heartbeat-age comparisons.default Stringdefault Stringdefault Stringdefault Stringdefault String
-
Method Details
-
currentDbTimestampExpression
The database-clock "now" expression for this dialect. Every server-side timestamp write uses it, so that timestamps are written with the same clock the heartbeat/orphan age comparisons read — making liveness immune to node<->DB clock skew. Defaults to the SQL-standardCURRENT_TIMESTAMP; a dialect whose age comparison uses a different now-expression overrides this to match it (e.g. Oracle compares againstSYSTIMESTAMP, so it must also write it —CURRENT_TIMESTAMPon Oracle is the session time zone and would disagree with the server-time-zoneSYSTIMESTAMP). -
getInsertQueryToRegisterNodeQuery
-
getUpdateNodeHeartBeatQuery
-
getSaveBatchJobCoordinationInfoQuery
-
getUpdateBatchJobCoordinationStatusQuery
-
getSaveBatchPartitionsQuery
-
getUpdateBatchPartitionsToReAssignedNodesQuery
-
getPendingTasksCountQuery
-
getFailedTasksCountQuery
Count of partitions that ended in FAILED for a job, so the master can fail the step accordingly. -
getFetchPartitionAssignedTasksQuery
-
getUpdatePartitionStatusToQuery
-
getUpdateLastUpdateTimeQuery
-
getCheckForOrphanedTasksQuery
-
getActiveNodesQuery
-
getOrphanedMasterJobsQuery
Finds jobs whose current owner has left the cluster: coordination rows still in-flight (STARTED, orRECOVERINGif a previous reaper died) whosemaster_node_idno longer exists inbatch_nodes(the owner was marked unreachable and then removed by the node-cleanup phase). IncludingRECOVERINGensures a recovery that was itself interrupted is picked up by another node rather than being stranded. -
getCoordinatedJobsQuery
Read-only: lists coordinated jobs (most recent first), for the job-centric observability view. -
getJobCoordinationByIdQuery
Read-only: the coordination row for one job execution. -
getPartitionsByMasterStepQuery
Read-only: the partitions of a job (by manager step execution id) with their placement and status. -
getRecordPhaseEventQuery
Appends a coordination phase event, timestamped with the database clock (single clock across nodes). -
getClaimOrphanedMasterJobQuery
Atomically claims an orphaned coordination row for recovery: sets the transient status and takes ownership (master_node_id), guarded by the (job execution, lost owner) pair. Because the winner overwritesmaster_node_idwith its own id, concurrent reapers see zero rows updated, so a job is claimed exactly once; and if the winner later dies, the row's owner is gone again and it is re-detected. -
getAllNodesInClusterQuery
-
getMarkNodesUnreachableQuery
String getMarkNodesUnreachableQuery() -
getDeleteNodesUnreachableQuery
String getDeleteNodesUnreachableQuery() -
getTimeStampColumnWithDiffInMillisToCurrentTime
Returns a dialect-specific SQL expression for the elapsed milliseconds betweencolumnNameand the current database time, used in heartbeat-age comparisons.Security:
columnNameis interpolated directly into SQL, so it must always be a trusted, hard-coded column name from this library — never user-supplied input. All values in the generated queries are passed as bind parameters (?), not concatenated.
-