Moving SparkKernel entry point to Main

Project: http://git-wip-us.apache.org/repos/asf/incubator-toree/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-toree/commit/ac330ed1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-toree/tree/ac330ed1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-toree/diff/ac330ed1

Branch: refs/heads/master
Commit: ac330ed1de044225bb9651a7315183b31a99226a
Parents: 9612a62
Author: Gino Bustelo <lbust...@us.ibm.com>
Authored: Fri Jan 15 11:46:57 2016 -0600
Committer: Gino Bustelo <lbust...@us.ibm.com>
Committed: Fri Jan 15 11:46:57 2016 -0600

----------------------------------------------------------------------
 .../src/main/scala/org/apache/toree/Main.scala  | 43 ++++++++++++++++++++
 .../scala/org/apache/toree/SparkKernel.scala    | 43 --------------------
 2 files changed, 43 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/ac330ed1/kernel/src/main/scala/org/apache/toree/Main.scala
----------------------------------------------------------------------
diff --git a/kernel/src/main/scala/org/apache/toree/Main.scala 
b/kernel/src/main/scala/org/apache/toree/Main.scala
new file mode 100644
index 0000000..1a8ac40
--- /dev/null
+++ b/kernel/src/main/scala/org/apache/toree/Main.scala
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2014 IBM Corp.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.toree
+
+import org.apache.toree.boot.layer._
+import org.apache.toree.boot.{CommandLineOptions, KernelBootstrap}
+import org.apache.toree.kernel.BuildInfo
+
+object SparkKernel extends App {
+  private val options = new CommandLineOptions(args)
+
+  if (options.help) {
+    options.printHelpOn(System.out)
+  } else if (options.version) {
+    println(s"Kernel Version:       ${BuildInfo.version}")
+    println(s"Build Date:           ${BuildInfo.buildDate}")
+    println(s"Scala Version:        ${BuildInfo.scalaVersion}")
+    println(s"Apache Spark Version: ${BuildInfo.sparkVersion}")
+  } else {
+    (new KernelBootstrap(options.toConfig)
+      with StandardBareInitialization
+      with StandardComponentInitialization
+      with StandardHandlerInitialization
+      with StandardHookInitialization)
+      .initialize()
+      .waitForTermination()
+      .shutdown()
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/ac330ed1/kernel/src/main/scala/org/apache/toree/SparkKernel.scala
----------------------------------------------------------------------
diff --git a/kernel/src/main/scala/org/apache/toree/SparkKernel.scala 
b/kernel/src/main/scala/org/apache/toree/SparkKernel.scala
deleted file mode 100644
index 1a8ac40..0000000
--- a/kernel/src/main/scala/org/apache/toree/SparkKernel.scala
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2014 IBM Corp.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.toree
-
-import org.apache.toree.boot.layer._
-import org.apache.toree.boot.{CommandLineOptions, KernelBootstrap}
-import org.apache.toree.kernel.BuildInfo
-
-object SparkKernel extends App {
-  private val options = new CommandLineOptions(args)
-
-  if (options.help) {
-    options.printHelpOn(System.out)
-  } else if (options.version) {
-    println(s"Kernel Version:       ${BuildInfo.version}")
-    println(s"Build Date:           ${BuildInfo.buildDate}")
-    println(s"Scala Version:        ${BuildInfo.scalaVersion}")
-    println(s"Apache Spark Version: ${BuildInfo.sparkVersion}")
-  } else {
-    (new KernelBootstrap(options.toConfig)
-      with StandardBareInitialization
-      with StandardComponentInitialization
-      with StandardHandlerInitialization
-      with StandardHookInitialization)
-      .initialize()
-      .waitForTermination()
-      .shutdown()
-  }
-}

Reply via email to