public final class Parse extends Object
PCollection<String>
into PCollection
's of strongly-typed
tuples.Modifier and Type | Method and Description |
---|---|
static <T> PCollection<T> |
parse(String groupName,
PCollection<String> input,
Extractor<T> extractor)
Parses the lines of the input
PCollection<String> and returns a PCollection<T> using
the given Extractor<T> . |
static <T> PCollection<T> |
parse(String groupName,
PCollection<String> input,
PTypeFamily ptf,
Extractor<T> extractor)
Parses the lines of the input
PCollection<String> and returns a PCollection<T> using
the given Extractor<T> that uses the given PTypeFamily . |
static <K,V> PTable<K,V> |
parseTable(String groupName,
PCollection<String> input,
Extractor<Pair<K,V>> extractor)
Parses the lines of the input
PCollection<String> and returns a PTable<K, V> using
the given Extractor<Pair<K, V>> . |
static <K,V> PTable<K,V> |
parseTable(String groupName,
PCollection<String> input,
PTypeFamily ptf,
Extractor<Pair<K,V>> extractor)
Parses the lines of the input
PCollection<String> and returns a PTable<K, V> using
the given Extractor<Pair<K, V>> that uses the given PTypeFamily . |
public static <T> PCollection<T> parse(String groupName, PCollection<String> input, Extractor<T> extractor)
PCollection<String>
and returns a PCollection<T>
using
the given Extractor<T>
.groupName
- A label to use for tracking errors related to the parsing processinput
- The input PCollection<String>
to convertextractor
- The Extractor<T>
that converts each linePCollection<T>
public static <T> PCollection<T> parse(String groupName, PCollection<String> input, PTypeFamily ptf, Extractor<T> extractor)
PCollection<String>
and returns a PCollection<T>
using
the given Extractor<T>
that uses the given PTypeFamily
.groupName
- A label to use for tracking errors related to the parsing processinput
- The input PCollection<String>
to convertptf
- The PTypeFamily
of the returned PCollection<T>
extractor
- The Extractor<T>
that converts each linePCollection<T>
public static <K,V> PTable<K,V> parseTable(String groupName, PCollection<String> input, Extractor<Pair<K,V>> extractor)
PCollection<String>
and returns a PTable<K, V>
using
the given Extractor<Pair<K, V>>
.groupName
- A label to use for tracking errors related to the parsing processinput
- The input PCollection<String>
to convertextractor
- The Extractor<Pair<K, V>>
that converts each linePTable<K, V>
public static <K,V> PTable<K,V> parseTable(String groupName, PCollection<String> input, PTypeFamily ptf, Extractor<Pair<K,V>> extractor)
PCollection<String>
and returns a PTable<K, V>
using
the given Extractor<Pair<K, V>>
that uses the given PTypeFamily
.groupName
- A label to use for tracking errors related to the parsing processinput
- The input PCollection<String>
to convertptf
- The PTypeFamily
of the returned PTable<K, V>
extractor
- The Extractor<Pair<K, V>>
that converts each linePTable<K, V>
Copyright © 2016 The Apache Software Foundation. All rights reserved.