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 voidassertSplayed(TableDefinition tableDef, String operation) static booleandeleteColumnPartition(LocalTablePathManager locationManager, TableDefinitionSchema schema, String internalPartitionValue, String columnPartitionValue) static booleandeleteTable(TableDefinitionSchema schema, LocalTablePathManager locationManager) static TableDefinitionSchemagetRequiredTableDefinitionSchema(String namespace, String tableName, SchemaService schemaService) Get the requested schema, and throw IllegalArgumentException if it is null.static FilegetTableLockFile(TableDefinitionSchema table, LocalTablePathManager locationManager) Create and return a table data lock file.static TableDefinitionSchemamakeSchemaFromDefinition(TableDefinition tableDef, String namespace, String tableName, int storageType, boolean getWritable, SchemaService schemaService, NamespaceSet newNamespaceSet) static <T> voidmaybeCreateUserNamespace(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
-
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 IllegalArgumentException if it is null.- Parameters:
namespace- the schema namespacetableName- the schema table nameschemaService- schema service to get the schema from- Returns:
- a TableDefinitionSchema
- Throws:
IllegalArgumentException- if the schema is not found
-