From 42249fad9938f5d643c53fe8d65375beed8a4de4 Mon Sep 17 00:00:00 2001 From: galarragas Date: Mon, 24 Feb 2014 15:21:28 +0000 Subject: Code review. Removed some commented code and some warning --- src/main/scala/parallelai/spyglass/jdbc/JDBCSource.scala | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/main/scala/parallelai/spyglass/jdbc') 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) + } } -- cgit v1.2.3