public static class DatasetKeyInputFormat.ConfigBuilder extends Object
Modifier and Type | Method and Description |
---|---|
DatasetKeyInputFormat.ConfigBuilder |
readFrom(String uri)
Adds configuration for
DatasetKeyInputFormat to read from the
given dataset or view URI string. |
DatasetKeyInputFormat.ConfigBuilder |
readFrom(URI uri)
Adds configuration for
DatasetKeyInputFormat to read from the
given dataset or view URI. |
DatasetKeyInputFormat.ConfigBuilder |
readFrom(View<?> view)
|
DatasetKeyInputFormat.ConfigBuilder |
withSchema(Schema readerSchema)
Sets the expected schema to use when reading records from the Dataset.
|
<E> DatasetKeyInputFormat.ConfigBuilder |
withType(Class<E> type)
Sets the entity Class that the input Dataset should produce.
|
public DatasetKeyInputFormat.ConfigBuilder readFrom(URI uri)
DatasetKeyInputFormat
to read from the
given dataset or view URI.
URI formats are defined by Dataset
implementations, but must
begin with "dataset:" or "view:". For more information, see
Datasets
.
uri
- a dataset or view URIpublic DatasetKeyInputFormat.ConfigBuilder readFrom(View<?> view)
view
- a dataset or viewpublic DatasetKeyInputFormat.ConfigBuilder readFrom(String uri)
DatasetKeyInputFormat
to read from the
given dataset or view URI string.
URI formats are defined by Dataset
implementations, but must
begin with "dataset:" or "view:". For more information, see
Datasets
.
uri
- a dataset or view URI stringpublic <E> DatasetKeyInputFormat.ConfigBuilder withType(Class<E> type)
This Class is used to configure the input Dataset
. If this class
cannot be found during job setup, the job will fail and throw a
TypeNotFoundException
.
If the type is set, then the type's schema is used for the expected
schema and withSchema(Schema)
should not be called. This may,
however, be used at the same time if the type is a generic record
subclass.
type
- the entity Class that will be producedpublic DatasetKeyInputFormat.ConfigBuilder withSchema(Schema readerSchema)
If this schema is set, withType(Class)
should only be called
with a generic record subclass.
readerSchema
- the expected entity schemaCopyright © 2013–2015. All rights reserved.