|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kitesdk.data.DatasetDescriptor
@Immutable public class DatasetDescriptor
The structural definition of a Dataset
.
Each Dataset
has an associated Schema
and optional
PartitionStrategy
defined at the time of creation. Instances of this
class are used to hold this information. Users are strongly encouraged to use
the inner DatasetDescriptor.Builder
to create new instances.
Nested Class Summary | |
---|---|
static class |
DatasetDescriptor.Builder
A fluent builder to aid in the construction of DatasetDescriptor s. |
Constructor Summary | |
---|---|
DatasetDescriptor(Schema schema,
URL schemaUrl,
Format format,
URI location,
Map<String,String> properties,
PartitionStrategy partitionStrategy)
Create an instance of this class with the supplied Schema ,
optional URL, Format , optional location URL, and optional
PartitionStrategy . |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
Format |
getFormat()
Get the associated Format that the data is stored in. |
URI |
getLocation()
Get the URL location where the data for this Dataset is stored
(optional). |
PartitionStrategy |
getPartitionStrategy()
Get the PartitionStrategy , if this dataset is partitioned. |
String |
getProperty(String name)
Get a named property. |
Schema |
getSchema()
Get the associated Schema . |
URL |
getSchemaUrl()
Get a URL from which the Schema may be retrieved (optional). |
int |
hashCode()
|
boolean |
hasProperty(String name)
Check if a named property exists. |
boolean |
isPartitioned()
Returns true if an associated dataset is partitioned (that is, has an associated PartitionStrategy ), false otherwise. |
Collection<String> |
listProperties()
List the names of all custom properties set. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DatasetDescriptor(Schema schema, @Nullable URL schemaUrl, Format format, @Nullable URI location, @Nullable Map<String,String> properties, @Nullable PartitionStrategy partitionStrategy)
Schema
,
optional URL, Format
, optional location URL, and optional
PartitionStrategy
.
Method Detail |
---|
public Schema getSchema()
Schema
. Depending on the underlying storage
system, this schema may be simple (i.e. records made up of only scalar
types) or complex (i.e. containing other records, lists, and so on).
Validation of the supported schemas is performed by the managing
repository, not the dataset or descriptor itself.
@Nullable public URL getSchemaUrl()
Schema
may be retrieved (optional). This
method may return null
if the schema is not stored at a persistent
URL, e.g. if it was constructed from a literal string.
public Format getFormat()
Format
that the data is stored in.
@Nullable public URI getLocation()
Dataset
is stored
(optional).
@Nullable public String getProperty(String name)
name
- the String property name to get.
public boolean hasProperty(String name)
name
- the String property name.
public Collection<String> listProperties()
public PartitionStrategy getPartitionStrategy()
PartitionStrategy
, if this dataset is partitioned. Calling
this method on a non-partitioned dataset is an error. Instead, use the
isPartitioned()
method prior to invocation.
public boolean isPartitioned()
PartitionStrategy
), false otherwise.
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |