aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/scala/parallelai/spyglass/jdbc
diff options
context:
space:
mode:
authorgalarragas <galarragas@gmail.com>2014-02-24 15:21:28 +0000
committergalarragas <galarragas@gmail.com>2014-02-24 15:21:28 +0000
commit42249fad9938f5d643c53fe8d65375beed8a4de4 (patch)
tree14339e6cbd1a65a493deed10a2287e0adbfbd80c /src/main/scala/parallelai/spyglass/jdbc
parentd09d29b7f301d8eca613dff0e62f658bcee536bc (diff)
downloadSpyGlass-42249fad9938f5d643c53fe8d65375beed8a4de4.tar.gz
SpyGlass-42249fad9938f5d643c53fe8d65375beed8a4de4.zip
Code review. Removed some commented code and some warning
Diffstat (limited to 'src/main/scala/parallelai/spyglass/jdbc')
-rw-r--r--src/main/scala/parallelai/spyglass/jdbc/JDBCSource.scala12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/main/scala/parallelai/spyglass/jdbc/JDBCSource.scala b/src/main/scala/parallelai/spyglass/jdbc/JDBCSource.scala
index 2472eda..1abad55 100644
--- a/src/main/scala/parallelai/spyglass/jdbc/JDBCSource.scala
+++ b/src/main/scala/parallelai/spyglass/jdbc/JDBCSource.scala
@@ -47,7 +47,7 @@ case class JDBCSource(
case _ => throw new ClassCastException("Failed casting from Scheme to JDBCScheme")
}
mode match {
- case hdfsMode @ Hdfs(_, _) => readOrWrite match {
+ case Hdfs(_, _) => readOrWrite match {
case Read => {
val tableDesc = new TableDesc(tableName, columnNames.toArray, columnDefs.toArray, primaryKeys.toArray)
val jdbcTap = new JDBCTap(connectionString, userId, password, driverName, tableDesc, jdbcScheme)
@@ -60,7 +60,7 @@ case class JDBCSource(
jdbcTap.asInstanceOf[Tap[_,_,_]]
}
}
- case testMode @ Test(buffer) => readOrWrite match {
+ case Test(buffer) => readOrWrite match {
case Read => {
val hbt = new MemoryTap[InputStream, OutputStream](localScheme, buffer.apply(this).get)
@@ -76,10 +76,6 @@ case class JDBCSource(
}
def createEmptyTap(readOrWrite : AccessMode)(mode : Mode) : Tap[_,_,_] = {
- mode match {
- case _ => {
- throw new RuntimeException("Source: (" + toString + ") doesn't support mode: " + mode.toString)
- }
- }
- }
+ throw new RuntimeException("Source: (" + toString + ") doesn't support mode: " + mode.toString)
+ }
}