public class PostgreSQLConnector extends SQLMetadataConnector
Constructor and Description |
---|
PostgreSQLConnector(com.google.common.base.Supplier<MetadataStorageConnectorConfig> config,
com.google.common.base.Supplier<MetadataStorageTablesConfig> dbTables) |
Modifier and Type | Method and Description |
---|---|
org.skife.jdbi.v2.DBI |
getDBI() |
protected String |
getPayloadType()
SQL type to use for payload data (e.g.
|
protected String |
getSerialType()
Auto-incrementing SQL type to use for IDs
Must be an integer type, which values will be automatically set by the database
The resulting string will be interpolated into the table creation statement, e.g.
|
Void |
insertOrUpdate(String tableName,
String keyColumn,
String valueColumn,
String key,
byte[] value) |
protected boolean |
isTransientException(Throwable e) |
boolean |
tableExists(org.skife.jdbi.v2.Handle handle,
String tableName) |
createAuditTable, createConfigTable, createConfigTable, createEntryTable, createLockTable, createLogTable, createRulesTable, createRulesTable, createSegmentTable, createSegmentTable, createTable, createTaskTables, getConfig, getDatasource, getValidationQuery, lookup
@Inject public PostgreSQLConnector(com.google.common.base.Supplier<MetadataStorageConnectorConfig> config, com.google.common.base.Supplier<MetadataStorageTablesConfig> dbTables)
protected String getPayloadType()
SQLMetadataConnector
CREATE TABLE druid_table ( payload NOT NULL, ... )
getPayloadType
in class SQLMetadataConnector
protected String getSerialType()
SQLMetadataConnector
CREATE TABLE druid_table ( id NOT NULL, ... )
getSerialType
in class SQLMetadataConnector
public boolean tableExists(org.skife.jdbi.v2.Handle handle, String tableName)
tableExists
in class SQLMetadataConnector
public Void insertOrUpdate(String tableName, String keyColumn, String valueColumn, String key, byte[] value) throws Exception
insertOrUpdate
in interface MetadataStorageConnector
insertOrUpdate
in class SQLMetadataConnector
Exception
public org.skife.jdbi.v2.DBI getDBI()
getDBI
in class SQLMetadataConnector
protected boolean isTransientException(Throwable e)
isTransientException
in class SQLMetadataConnector
Copyright © 2011–2015. All rights reserved.