diff options
author | Reynold Xin <rxin@databricks.com> | 2015-05-28 18:08:56 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2015-05-28 18:08:56 -0700 |
commit | ee6a0e12fb76e4d5c24175900e5bf6a8cb35e2b0 (patch) | |
tree | d0aee386ce036ae5c8c53bafde7f22edd6ad38e6 /sql/hive-thriftserver/src/main | |
parent | 3af0b3136e4b7dea52c413d640653ccddc638574 (diff) | |
download | spark-ee6a0e12fb76e4d5c24175900e5bf6a8cb35e2b0.tar.gz spark-ee6a0e12fb76e4d5c24175900e5bf6a8cb35e2b0.tar.bz2 spark-ee6a0e12fb76e4d5c24175900e5bf6a8cb35e2b0.zip |
[SPARK-7927] whitespace fixes for Hive and ThriftServer.
So we can enable a whitespace enforcement rule in the style checker to save code review time.
Author: Reynold Xin <rxin@databricks.com>
Closes #6478 from rxin/whitespace-hive and squashes the following commits:
e01b0e0 [Reynold Xin] Fixed tests.
a3bba22 [Reynold Xin] [SPARK-7927] whitespace fixes for Hive and ThriftServer.
Diffstat (limited to 'sql/hive-thriftserver/src/main')
3 files changed, 8 insertions, 8 deletions
diff --git a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala index deb1008c46..14f6f658d9 100644 --- a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala +++ b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala @@ -43,7 +43,7 @@ import org.apache.spark.util.Utils private[hive] object SparkSQLCLIDriver { private var prompt = "spark-sql" private var continuedPrompt = "".padTo(prompt.length, ' ') - private var transport:TSocket = _ + private var transport: TSocket = _ installSignalHandler() @@ -276,13 +276,13 @@ private[hive] class SparkSQLCLIDriver extends CliDriver with Logging { driver.init() val out = sessionState.out - val start:Long = System.currentTimeMillis() + val start: Long = System.currentTimeMillis() if (sessionState.getIsVerbose) { out.println(cmd) } val rc = driver.run(cmd) val end = System.currentTimeMillis() - val timeTaken:Double = (end - start) / 1000.0 + val timeTaken: Double = (end - start) / 1000.0 ret = rc.getResponseCode if (ret != 0) { @@ -310,7 +310,7 @@ private[hive] class SparkSQLCLIDriver extends CliDriver with Logging { res.clear() } } catch { - case e:IOException => + case e: IOException => console.printError( s"""Failed with exception ${e.getClass.getName}: ${e.getMessage} |${org.apache.hadoop.util.StringUtils.stringifyException(e)} diff --git a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/ui/ThriftServerPage.scala b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/ui/ThriftServerPage.scala index 7c48ff4b35..10c83d8b27 100644 --- a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/ui/ThriftServerPage.scala +++ b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/ui/ThriftServerPage.scala @@ -77,7 +77,7 @@ private[ui] class ThriftServerPage(parent: ThriftServerTab) extends WebUIPage("" [{id}] </a> } - val detail = if(info.state == ExecutionState.FAILED) info.detail else info.executePlan + val detail = if (info.state == ExecutionState.FAILED) info.detail else info.executePlan <tr> <td>{info.userName}</td> <td> @@ -85,7 +85,7 @@ private[ui] class ThriftServerPage(parent: ThriftServerTab) extends WebUIPage("" </td> <td>{info.groupId}</td> <td>{formatDate(info.startTimestamp)}</td> - <td>{if(info.finishTimestamp > 0) formatDate(info.finishTimestamp)}</td> + <td>{if (info.finishTimestamp > 0) formatDate(info.finishTimestamp)}</td> <td>{formatDurationOption(Some(info.totalTime))}</td> <td>{info.statement}</td> <td>{info.state}</td> @@ -150,7 +150,7 @@ private[ui] class ThriftServerPage(parent: ThriftServerTab) extends WebUIPage("" <td> {session.ip} </td> <td> <a href={sessionLink}> {session.sessionId} </a> </td> <td> {formatDate(session.startTimestamp)} </td> - <td> {if(session.finishTimestamp > 0) formatDate(session.finishTimestamp)} </td> + <td> {if (session.finishTimestamp > 0) formatDate(session.finishTimestamp)} </td> <td> {formatDurationOption(Some(session.totalTime))} </td> <td> {session.totalExecution.toString} </td> </tr> diff --git a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/ui/ThriftServerSessionPage.scala b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/ui/ThriftServerSessionPage.scala index d9d66dcd85..3b01afa603 100644 --- a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/ui/ThriftServerSessionPage.scala +++ b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/ui/ThriftServerSessionPage.scala @@ -87,7 +87,7 @@ private[ui] class ThriftServerSessionPage(parent: ThriftServerTab) [{id}] </a> } - val detail = if(info.state == ExecutionState.FAILED) info.detail else info.executePlan + val detail = if (info.state == ExecutionState.FAILED) info.detail else info.executePlan <tr> <td>{info.userName}</td> <td> |