Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix LzoTextLine as a TypedSource #921

Merged
merged 2 commits into from
Jun 30, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ trait LzoThrift[T <: TBase[_, _]] extends FileSource with SingleMappable[T] with
trait LzoText extends FileSource with SingleMappable[String] with TypedSink[String] with LocalTapSource {
override def setter[U <: String] = TupleSetter.asSubSetter[String, U](TupleSetter.singleSetter[String])
override def hdfsScheme = HadoopSchemeInstance(new LzoTextLine())
override def sourceFields = Dsl.intFields(Seq(1))
}

trait LzoTsv extends DelimitedScheme with LocalTapSource {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,7 @@ trait TextSourceScheme extends SchemedSource {
override def hdfsScheme = HadoopSchemeInstance(new CHTextLine(CHTextLine.DEFAULT_SOURCE_FIELDS, textEncoding))
}

trait TextLineScheme extends TextSourceScheme with Mappable[String] {
override def converter[U >: String] = TupleConverter.asSuperConverter[String, U](TupleConverter.of[String])

trait TextLineScheme extends TextSourceScheme with SingleMappable[String] {
//In textline, 0 is the byte position, the actual text string is in column 1
override def sourceFields = Dsl.intFields(Seq(1))
}
Expand Down Expand Up @@ -275,9 +273,8 @@ trait DelimitedScheme extends SchemedSource {
//These should not be changed:
override def localScheme = new CLTextDelimited(fields, skipHeader, writeHeader, separator, strict, quote, types, safe)

override def hdfsScheme = {
override def hdfsScheme =
HadoopSchemeInstance(new CHTextDelimited(fields, null, skipHeader, writeHeader, separator, strict, quote, types, safe))
}
}

trait SequenceFileScheme extends SchemedSource {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,3 @@ case class FlatMappedFn[T, R](fmap: FlatMapFn[T], fn: T => TraversableOnce[R]) e
case class FilteredFn[R](fmap: FlatMapFn[R], fn: R => Boolean) extends FlatMapFn[R] {
def apply(te: TupleEntry) = fmap(te).filter(fn)
}