org.kitesdk.data.crunch
Class CrunchDatasets

java.lang.Object
  extended by org.kitesdk.data.crunch.CrunchDatasets

@Beta
public class CrunchDatasets
extends Object

A helper class for exposing Datasets and Views as Crunch ReadableSources or Targets.


Constructor Summary
CrunchDatasets()
           
 
Method Summary
static
<E> ReadableSource<E>
asSource(Dataset<E> dataset, Class<E> type)
          Deprecated. will be removed in 0.16.0; use asSource(View)
static
<E> ReadableSource<E>
asSource(String uri, Class<E> type)
          Expose the View or Dataset represented by the URI as a Crunch ReadableSource.
static
<E> ReadableSource<E>
asSource(URI uri, Class<E> type)
          Expose the View or Dataset represented by the URI as a Crunch ReadableSource.
static
<E> ReadableSource<E>
asSource(View<E> view)
          Expose the given View as a Crunch ReadableSource.
static
<E> ReadableSource<E>
asSource(View<E> view, Class<E> type)
          Deprecated. will be removed in 0.16.0; use asSource(View)
static
<E> Target
asTarget(Dataset<E> dataset)
          Deprecated. will be removed in 0.16.0; use asTarget(View)
static Target asTarget(String uri)
          Expose the Dataset or View represented by the given URI as a Crunch Target.
static Target asTarget(URI uri)
          Expose the Dataset or View represented by the given URI as a Crunch Target.
static
<E> Target
asTarget(View<E> view)
          Expose the given View as a Crunch Target.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CrunchDatasets

public CrunchDatasets()
Method Detail

asSource

@Deprecated
public static <E> ReadableSource<E> asSource(Dataset<E> dataset,
                                                        Class<E> type)
Deprecated. will be removed in 0.16.0; use asSource(View)

Expose the given Dataset as a Crunch ReadableSource.

Type Parameters:
E - the type of entity produced by the source
Parameters:
dataset - the dataset to read from
type - the Java type of the entities in the dataset
Returns:
a ReadableSource for the dataset

asSource

public static <E> ReadableSource<E> asSource(View<E> view,
                                             Class<E> type)
Deprecated. will be removed in 0.16.0; use asSource(View)

Expose the given View as a Crunch ReadableSource.

Type Parameters:
E - the type of entity produced by the source
Parameters:
view - the view to read from
type - the Java type of the entities in the dataset
Returns:
a ReadableSource for the view
Since:
0.14.0

asSource

public static <E> ReadableSource<E> asSource(View<E> view)
Expose the given View as a Crunch ReadableSource.

Type Parameters:
E - the type of entity produced by the source
Parameters:
view - the view to read from
Returns:
a ReadableSource for the view
Since:
0.14.0

asSource

public static <E> ReadableSource<E> asSource(URI uri,
                                             Class<E> type)
Expose the View or Dataset represented by the URI as a Crunch ReadableSource.

Type Parameters:
E - the type of entity produced by the source
Parameters:
uri - the URI of the view or dataset to read from
type - the Java type of the entities in the dataset
Returns:
a ReadableSource for the view
Since:
0.15.0

asSource

public static <E> ReadableSource<E> asSource(String uri,
                                             Class<E> type)
Expose the View or Dataset represented by the URI as a Crunch ReadableSource.

Type Parameters:
E - the type of entity produced by the source
Parameters:
uri - the URI of the view or dataset to read from
type - the Java type of the entities in the dataset
Returns:
a ReadableSource for the view
Since:
0.15.0

asTarget

@Deprecated
public static <E> Target asTarget(Dataset<E> dataset)
Deprecated. will be removed in 0.16.0; use asTarget(View)

Expose the given Dataset as a Crunch Target.

Type Parameters:
E - the type of entity stored in the dataset
Parameters:
dataset - the dataset to write to
Returns:
a Target for the dataset

asTarget

public static <E> Target asTarget(View<E> view)
Expose the given View as a Crunch Target.

Type Parameters:
E - the type of entity stored in the view
Parameters:
view - the view to write to
Returns:
a Target for the view
Since:
0.14.0

asTarget

public static Target asTarget(String uri)
Expose the Dataset or View represented by the given URI as a Crunch Target.

Parameters:
uri - the dataset or view URI
Returns:
a Target for the dataset or view
Since:
0.15.0

asTarget

public static Target asTarget(URI uri)
Expose the Dataset or View represented by the given URI as a Crunch Target.

Parameters:
uri - the dataset or view URI
Returns:
a Target for the dataset or view
Since:
0.15.0


Copyright © 2013–2014. All rights reserved.