Package org.apache.druid.metadata
Class SQLMetadataStorageActionHandler<EntryType,StatusType,LogType,LockType>
java.lang.Object
org.apache.druid.metadata.SQLMetadataStorageActionHandler<EntryType,StatusType,LogType,LockType>
- All Implemented Interfaces:
MetadataStorageActionHandler<EntryType,StatusType, LogType, LockType>
- Direct Known Subclasses:
DerbyMetadataStorageActionHandler,MySQLMetadataStorageActionHandler,PostgreSQLMetadataStorageActionHandler,SQLServerMetadataStorageActionHandler
public abstract class SQLMetadataStorageActionHandler<EntryType,StatusType,LogType,LockType>
extends Object
implements MetadataStorageActionHandler<EntryType,StatusType,LogType,LockType>
-
Constructor Summary
ConstructorsConstructorDescriptionSQLMetadataStorageActionHandler(SQLMetadataConnector connector, com.fasterxml.jackson.databind.ObjectMapper jsonMapper, MetadataStorageActionHandlerTypes<EntryType, StatusType, LogType, LockType> types, String entryTypeName, String entryTable, String lockTable) SQLMetadataStorageActionHandler(SQLMetadataConnector connector, com.fasterxml.jackson.databind.ObjectMapper jsonMapper, MetadataStorageActionHandlerTypes<EntryType, StatusType, LogType, LockType> types, String entryTypeName, String entryTable, String logTable, String lockTable) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected abstract Stringprotected SQLMetadataConnectorcom.google.common.base.Optional<EntryType>protected Stringcom.fasterxml.jackson.core.type.TypeReference<EntryType>protected Stringprotected com.fasterxml.jackson.databind.ObjectMapperprotected Stringcom.google.common.base.Optional<StatusType>protected com.fasterxml.jackson.core.type.TypeReference<StatusType>getTaskInfo(String entryId) getTaskInfos(Map<TaskLookup.TaskLookupType, TaskLookup> taskLookups, String dataSource) getTaskStatusList(Map<TaskLookup.TaskLookupType, TaskLookup> taskLookups, String dataSource) voidinsert(String id, org.joda.time.DateTime timestamp, String dataSource, EntryType entry, boolean active, StatusType status, String type, String groupId) static booleanvoidvoidremoveLock(long lockId) voidremoveTasksOlderThan(long timestamp) booleanreplaceLock(String entryId, long oldLockId, LockType newLock) booleansetStatus(String entryId, boolean active, StatusType status) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.druid.metadata.MetadataStorageActionHandler
addLog, getLogs, getTaskInfos
-
Constructor Details
-
SQLMetadataStorageActionHandler
@Deprecated public SQLMetadataStorageActionHandler(SQLMetadataConnector connector, com.fasterxml.jackson.databind.ObjectMapper jsonMapper, MetadataStorageActionHandlerTypes<EntryType, StatusType, LogType, LockType> types, String entryTypeName, String entryTable, String logTable, String lockTable) Deprecated.Use the other constructor withoutlogTableargument since this argument is now unused. -
SQLMetadataStorageActionHandler
public SQLMetadataStorageActionHandler(SQLMetadataConnector connector, com.fasterxml.jackson.databind.ObjectMapper jsonMapper, MetadataStorageActionHandlerTypes<EntryType, StatusType, LogType, LockType> types, String entryTypeName, String entryTable, String lockTable)
-
-
Method Details
-
getConnector
-
getJsonMapper
protected com.fasterxml.jackson.databind.ObjectMapper getJsonMapper() -
getStatusType
-
getEntryTable
-
getLogTable
-
getEntryTypeName
-
getEntryType
-
insert
public void insert(String id, org.joda.time.DateTime timestamp, String dataSource, EntryType entry, boolean active, StatusType status, String type, String groupId) - Specified by:
insertin interfaceMetadataStorageActionHandler<EntryType,StatusType, LogType, LockType>
-
isStatementException
-
setStatus
- Specified by:
setStatusin interfaceMetadataStorageActionHandler<EntryType,StatusType, LogType, LockType>
-
getEntry
- Specified by:
getEntryin interfaceMetadataStorageActionHandler<EntryType,StatusType, LogType, LockType>
-
getStatus
- Specified by:
getStatusin interfaceMetadataStorageActionHandler<EntryType,StatusType, LogType, LockType>
-
getTaskInfo
- Specified by:
getTaskInfoin interfaceMetadataStorageActionHandler<EntryType,StatusType, LogType, LockType>
-
getTaskInfos
public List<TaskInfo<EntryType,StatusType>> getTaskInfos(Map<TaskLookup.TaskLookupType, TaskLookup> taskLookups, @Nullable String dataSource) - Specified by:
getTaskInfosin interfaceMetadataStorageActionHandler<EntryType,StatusType, LogType, LockType>
-
getTaskStatusList
public List<TaskInfo<TaskIdentifier,StatusType>> getTaskStatusList(Map<TaskLookup.TaskLookupType, TaskLookup> taskLookups, @Nullable String dataSource) - Specified by:
getTaskStatusListin interfaceMetadataStorageActionHandler<EntryType,StatusType, LogType, LockType>
-
decorateSqlWithLimit
-
addLock
- Specified by:
addLockin interfaceMetadataStorageActionHandler<EntryType,StatusType, LogType, LockType>
-
replaceLock
- Specified by:
replaceLockin interfaceMetadataStorageActionHandler<EntryType,StatusType, LogType, LockType>
-
removeLock
public void removeLock(long lockId) - Specified by:
removeLockin interfaceMetadataStorageActionHandler<EntryType,StatusType, LogType, LockType>
-
removeTasksOlderThan
public void removeTasksOlderThan(long timestamp) - Specified by:
removeTasksOlderThanin interfaceMetadataStorageActionHandler<EntryType,StatusType, LogType, LockType>
-
getLocks
- Specified by:
getLocksin interfaceMetadataStorageActionHandler<EntryType,StatusType, LogType, LockType>
-
getLockId
- Specified by:
getLockIdin interfaceMetadataStorageActionHandler<EntryType,StatusType, LogType, LockType>
-
populateTaskTypeAndGroupIdAsync
public void populateTaskTypeAndGroupIdAsync()- Specified by:
populateTaskTypeAndGroupIdAsyncin interfaceMetadataStorageActionHandler<EntryType,StatusType, LogType, LockType>
-
logTableargument since this argument is now unused.