Class FilesetDTO
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder for FilesetDTO.Nested classes/interfaces inherited from interface org.apache.gravitino.file.Fileset
Fileset.Type
-
Field Summary
Fields inherited from interface org.apache.gravitino.file.Fileset
LOCATION_NAME_UNKNOWN, PROPERTY_CATALOG_PLACEHOLDER, PROPERTY_DEFAULT_LOCATION_NAME, PROPERTY_FILESET_PLACEHOLDER, PROPERTY_LOCATION_PLACEHOLDER_PREFIX, PROPERTY_MULTIPLE_LOCATIONS_PREFIX, PROPERTY_SCHEMA_PLACEHOLDER
-
Method Summary
Modifier and TypeMethodDescriptionstatic FilesetDTO.FilesetDTOBuilder
builder()
Create a new FilesetDTO builder.comment()
name()
Get the storage location name and corresponding path of the file or directory path that is managed by this fileset object.type()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.gravitino.file.Fileset
storageLocation, supportsCredentials, supportsPolicies, supportsRoles, supportsTags
-
Method Details
-
name
-
comment
-
type
-
storageLocations
Description copied from interface:Fileset
Get the storage location name and corresponding path of the file or directory path that is managed by this fileset object. The key is the name of the storage location and the value is the storage location path.Each storageLocation in the values can either be the one specified when creating the fileset object, or the one specified in the catalog / schema level if the fileset object is created under this catalog / schema.
The "unknown" location name is reserved to indicate the storage location of the fileset. It can be specified in catalog / schema level by the property "location" or in the fileset level by the field "storageLocation". Other location names can be specified in the fileset level by the key-value pairs in the field "storageLocations", and by "location-{name}" properties in the catalog / schema level.
The storageLocation in each level can contain placeholders, format as {{name}}, which will be replaced by the corresponding fileset property value when the fileset object is created. The placeholder property in the fileset object is formed as "placeholder-{{name}}". For example, if the storageLocation is "file:///path/{{schema}}-{{fileset}}-{{version}}", and the fileset object "catalog1.schema1.fileset1" has the property "placeholder-version" set to "v1", then the storageLocation will be "file:///path/schema1-fileset1-v1".
For managed fileset, the storageLocation can be:
1) The one specified when creating the fileset object, and the placeholders in the storageLocation will be replaced by the placeholder value specified in the fileset properties.
2) When catalog property "location" is specified but schema property "location" is not specified, then the storageLocation will be:
a. "{catalog location}/schemaName/filesetName" if {catalog location} does not contain any placeholder.
b. "{catalog location}" - placeholders in the {catalog location} will be replaced by the placeholder value specified in the fileset properties.
3) When catalog property "location" is not specified but schema property "location" is specified, then the storageLocation will be:
a. "{schema location}/filesetName" if {schema location} does not contain any placeholder.
b. "{schema location}" - placeholders in the {schema location} will be replaced by the placeholder value specified in the fileset properties.
4) When both catalog property "location" and schema property "location" are specified, then the storageLocation will be:
a. "{schema location}/filesetName" if {schema location} does not contain any placeholder.
b. "{schema location}" - placeholders in the {schema location} will be replaced by values specified in the fileset properties.
5) When there is no location specified in catalog level, schema level, storageLocation of fileset, and storageLocations of fileset at the same time, this situation is illegal.
For external fileset, the storageLocation can be:
1) The one specified when creating the fileset object, and the placeholders in the storageLocation will be replaced by the placeholder value specified in the fileset properties.
- Specified by:
storageLocations
in interfaceFileset
- Returns:
- The storage locations of the fileset object, the key is the name of the storage location and the value is the storage location path.
-
properties
- Specified by:
properties
in interfaceFileset
- Returns:
- The properties of the fileset object. Empty map is returned if no properties are set.
-
auditInfo
-
builder
Create a new FilesetDTO builder.- Returns:
- A new FilesetDTO builder.
-