Class OnDiskDatabaseUtil
java.lang.Object
com.illumon.iris.db.tables.databases.OnDiskDatabaseUtil
Functionality factored out of
OnDiskDatabase
, OnDiskQueryDatabase
, and related classes, exposed for other database implementations.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic void
assertSplayed
(TableDefinition tableDef, String operation) static boolean
deleteColumnPartition
(LocalTablePathManager locationManager, TableDefinitionSchema schema, String internalPartitionValue, String columnPartitionValue) static boolean
deleteTable
(TableDefinitionSchema schema, LocalTablePathManager locationManager) static Schema
getRequiredSchema
(String namespace, String tableName, SchemaService schemaService) Get the requested schema, and throw SchemaNotFoundException if it is null.static TableDefinitionSchema
getRequiredTableDefinitionSchema
(String namespace, String tableName, SchemaService schemaService) Get the requested schema, and throw SchemaNotFoundException if it is null.static File
getTableLockFile
(TableDefinitionSchema table, LocalTablePathManager locationManager) Create and return a table data lock file.static MutableSchema
makeMutableSchemaFromDefinition
(TableDefinition tableDef, String namespace, String tableName, int storageType, boolean getWritable, SchemaService schemaService, NamespaceSet newNamespaceSet) static TableDefinitionSchema
makeSchemaFromDefinition
(TableDefinition tableDef, String namespace, String tableName, int storageType, boolean getWritable, SchemaService schemaService, NamespaceSet newNamespaceSet) static <T> void
maybeCreateUserNamespace
(String namespace, String tableName, SchemaService schemaService, Class<T> clazz)
-
Field Details
-
DEFAULT_RTA_INTERNAL_PARTITION_STRING
- See Also:
-
-
Method Details
-
getTableLockFile
public static File getTableLockFile(TableDefinitionSchema table, LocalTablePathManager locationManager) Create and return a table data lock file.- Parameters:
table
- schemalocationManager
- used to ascertain metadata location- Returns:
- the table data lock file handle
-
makeMutableSchemaFromDefinition
public static MutableSchema makeMutableSchemaFromDefinition(TableDefinition tableDef, String namespace, String tableName, int storageType, boolean getWritable, SchemaService schemaService, NamespaceSet newNamespaceSet) -
makeSchemaFromDefinition
public static TableDefinitionSchema makeSchemaFromDefinition(TableDefinition tableDef, String namespace, String tableName, int storageType, boolean getWritable, SchemaService schemaService, NamespaceSet newNamespaceSet) -
assertSplayed
-
deleteColumnPartition
public static boolean deleteColumnPartition(LocalTablePathManager locationManager, TableDefinitionSchema schema, String internalPartitionValue, String columnPartitionValue) -
deleteTable
public static boolean deleteTable(TableDefinitionSchema schema, LocalTablePathManager locationManager) -
maybeCreateUserNamespace
public static <T> void maybeCreateUserNamespace(String namespace, String tableName, SchemaService schemaService, Class<T> clazz) -
getRequiredTableDefinitionSchema
@NotNull public static TableDefinitionSchema getRequiredTableDefinitionSchema(String namespace, String tableName, SchemaService schemaService) Get the requested schema, and throw SchemaNotFoundException if it is null.- Parameters:
namespace
- the schema namespacetableName
- the schema table nameschemaService
- schema service to get the schema from- Returns:
- a
TableDefinitionSchema
- Throws:
SchemaNotFoundException
- if the schema is not found
-
getRequiredSchema
@NotNull public static Schema getRequiredSchema(@NotNull String namespace, @NotNull String tableName, @NotNull SchemaService schemaService) Get the requested schema, and throw SchemaNotFoundException if it is null.- Parameters:
namespace
- the schema namespacetableName
- the schema table nameschemaService
- schema service to get the schema from- Returns:
- a
Schema
- Throws:
SchemaNotFoundException
- if the schema is not found
-