|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kitesdk.data.spi.AbstractMetadataProvider
org.kitesdk.data.filesystem.FileSystemMetadataProvider
public class FileSystemMetadataProvider
A MetadataProvider that stores dataset metadata in a Hadoop
FileSystem.
When configured with a root directory, this implementation serializes the
information within a DatasetDescriptor on the provided
FileSystem. The descriptor is serialized as an Avro object and stored
in a directory named after the dataset name. For example, if the dataset name
is logs, the directory rootDirectory/logs/ will be created,
if it doesn't exist, and the serialized descriptor will be stored in the file
descriptor.avro.
| Nested Class Summary | |
|---|---|
static class |
FileSystemMetadataProvider.Builder
A fluent builder to aid in the construction of FileSystemMetadataProvider
instances. |
| Constructor Summary | |
|---|---|
FileSystemMetadataProvider(Configuration conf,
Path rootDirectory)
|
|
| Method Summary | |
|---|---|
DatasetDescriptor |
create(String name,
DatasetDescriptor descriptor)
Create a DatasetDescriptor for the dataset named name. |
boolean |
delete(String name)
Delete all metadata associated with the dataset named name. |
boolean |
exists(String name)
Checks if there is a DatasetDescriptor for the dataset named
name. |
List<String> |
list()
List the names of the Datasets managed by this
MetadataProvider. |
DatasetDescriptor |
load(String name)
Load the dataset descriptor for the dataset name. |
String |
toString()
|
DatasetDescriptor |
update(String name,
DatasetDescriptor descriptor)
Update a DatasetDescriptor for the dataset named name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FileSystemMetadataProvider(Configuration conf,
Path rootDirectory)
| Method Detail |
|---|
public DatasetDescriptor load(String name)
MetadataProvidername.
name - The fully qualified name of an existing dataset.
public DatasetDescriptor create(String name,
DatasetDescriptor descriptor)
MetadataProviderDatasetDescriptor for the dataset named name.
The descriptor will be stored for the named data set in this provider's
metadata store. It is illegal to create more than one descriptor for a
named data set, and an exception will be thrown.
name - The fully qualified name of a dataset.descriptor - A dataset descriptor.
public DatasetDescriptor update(String name,
DatasetDescriptor descriptor)
MetadataProviderDatasetDescriptor for the dataset named name.
The new descriptor will be stored for the named data set in this provider's
metadata store, replacing the previous descriptor. The named dataset must
already exist or an error will be thrown.
This method is optional.
name - The fully qualified name of a dataset.descriptor - A dataset descriptor.
public boolean delete(String name)
MetadataProvidername.
name - The fully qualified name of a dataset.
public boolean exists(String name)
MetadataProviderDatasetDescriptor for the dataset named
name.
name - a Dataset name to check the existence of
name exists, false otherwisepublic List<String> list()
MetadataProviderDatasets managed by this
MetadataProvider. If there is not at least one Dataset, an
empty list will be returned.
Collection of Dataset names (Strings)public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||