aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/scala/parallelai/spyglass/jdbc
diff options
context:
space:
mode:
authorSaad Rashid <saad373@gmail.com>2014-02-20 16:21:06 +0000
committerSaad Rashid <saad373@gmail.com>2014-02-20 16:21:06 +0000
commitb4f423438e9726d9c5efdb295552e8e737e2ca8f (patch)
tree034697ffad913a4d311d7e28f15172f21071ab3b /src/main/scala/parallelai/spyglass/jdbc
parent8efafea5338dd4204897af085de7a5a14288652e (diff)
downloadSpyGlass-b4f423438e9726d9c5efdb295552e8e737e2ca8f.tar.gz
SpyGlass-b4f423438e9726d9c5efdb295552e8e737e2ca8f.zip
Update Scalding and Cascading latest release and pom versions. Now
SpyGlass supports scalding (0.9.0rc4) and cascading (2.2.1). Its a release candidate.
Diffstat (limited to 'src/main/scala/parallelai/spyglass/jdbc')
-rw-r--r--src/main/scala/parallelai/spyglass/jdbc/JDBCSource.scala14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/main/scala/parallelai/spyglass/jdbc/JDBCSource.scala b/src/main/scala/parallelai/spyglass/jdbc/JDBCSource.scala
index beb66be..09f4579 100644
--- a/src/main/scala/parallelai/spyglass/jdbc/JDBCSource.scala
+++ b/src/main/scala/parallelai/spyglass/jdbc/JDBCSource.scala
@@ -28,11 +28,11 @@ case class JDBCSource(
updateByFields: Fields = null
) extends Source {
- override val hdfsScheme = new JDBCScheme(fields, columnNames.toArray, orderBy.toArray, updateByFields, updateBy.toArray)
+ val hdfsScheme = new JDBCScheme(fields, columnNames.toArray, orderBy.toArray, updateByFields, updateBy.toArray)
.asInstanceOf[Scheme[JobConf, RecordReader[_, _], OutputCollector[_, _], _, _]]
// To enable local mode testing
- override def localScheme = new NullScheme(fields, fields)
+ def localScheme = new NullScheme(fields, fields)
override def createTap(readOrWrite: AccessMode)(implicit mode: Mode): Tap[_, _, _] = {
val jdbcScheme = hdfsScheme match {
@@ -53,7 +53,15 @@ case class JDBCSource(
jdbcTap.asInstanceOf[Tap[_,_,_]]
}
}
- case _ => super.createTap(readOrWrite)(mode)
+ case _ => createEmptyTap(readOrWrite)(mode)
}
}
+
+ def createEmptyTap(readOrWrite : AccessMode)(mode : Mode) : Tap[_,_,_] = {
+ mode match {
+ case _ => {
+ throw new RuntimeException("Source: (" + toString + ") doesn't support mode: " + mode.toString)
+ }
+ }
+ }
}