You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@toree.apache.org by lr...@apache.org on 2017/02/19 09:36:57 UTC

[01/14] incubator-toree git commit: Add Flush Method to Logger so it can be compliant to stream interface [Forced Update!]

Repository: incubator-toree
Updated Branches:
  refs/heads/sandbox e86ac4602 -> 53a94d790 (forced update)


Add Flush Method to Logger so it can be compliant to stream interface


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

Branch: refs/heads/sandbox
Commit: e1dc4e5414599ea2d298540a4805d0f87a83d5eb
Parents: 9b577f1
Author: David Taieb <da...@us.ibm.com>
Authored: Wed Jan 4 08:36:49 2017 -0500
Committer: David Taieb <da...@us.ibm.com>
Committed: Wed Jan 4 08:36:49 2017 -0500

----------------------------------------------------------------------
 pyspark-interpreter/src/main/resources/PySpark/pyspark_runner.py | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/e1dc4e54/pyspark-interpreter/src/main/resources/PySpark/pyspark_runner.py
----------------------------------------------------------------------
diff --git a/pyspark-interpreter/src/main/resources/PySpark/pyspark_runner.py b/pyspark-interpreter/src/main/resources/PySpark/pyspark_runner.py
index e3864f8..fcb1a06 100644
--- a/pyspark-interpreter/src/main/resources/PySpark/pyspark_runner.py
+++ b/pyspark-interpreter/src/main/resources/PySpark/pyspark_runner.py
@@ -93,6 +93,9 @@ class Logger(object):
 
     def reset(self):
         self.out = ""
+        
+    def flush(self):
+    	pass
 
 output = Logger()
 sys.stdout = output


[09/14] incubator-toree git commit: Removed unused dependency

Posted by lr...@apache.org.
Removed unused dependency


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

Branch: refs/heads/sandbox
Commit: 16a27b0101f692607eb4060e6c468bb5b8bf8271
Parents: b36fa46
Author: Marius van Niekerk <ma...@gmail.com>
Authored: Tue Sep 27 11:06:31 2016 -0400
Committer: Chip Senkbeil <ch...@gmail.com>
Committed: Fri Jan 20 11:05:56 2017 -0600

----------------------------------------------------------------------
 protocol/build.sbt | 3 ---
 1 file changed, 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/16a27b01/protocol/build.sbt
----------------------------------------------------------------------
diff --git a/protocol/build.sbt b/protocol/build.sbt
index f82b465..097eccd 100644
--- a/protocol/build.sbt
+++ b/protocol/build.sbt
@@ -28,6 +28,3 @@ libraryDependencies ++= Seq(
 //
 // TEST DEPENDENCIES
 //
-libraryDependencies ++= Seq(
-  "org.scalactic" %% "scalactic" % "2.2.6" % "test" // Apache v2
-)


[06/14] incubator-toree git commit: fire allInterpretersReady and preRunCell events

Posted by lr...@apache.org.
fire allInterpretersReady and preRunCell events

allInterpretersReady event: fired when all interpreters have completed
their initialization
preRunCell event: fired every time a new cell is being run, unless the
silent flag is set


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

Branch: refs/heads/sandbox
Commit: 5feb3bda115b8c900aeed7014108a390fd0cbb3b
Parents: 70b804b
Author: David Taieb <da...@us.ibm.com>
Authored: Tue Jan 17 18:13:40 2017 -0500
Committer: David Taieb <da...@us.ibm.com>
Committed: Tue Jan 17 18:13:40 2017 -0500

----------------------------------------------------------------------
 .../org/apache/toree/boot/layer/ComponentInitialization.scala   | 2 ++
 .../kernel/protocol/v5/handler/ExecuteRequestHandler.scala      | 5 +++++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/5feb3bda/kernel/src/main/scala/org/apache/toree/boot/layer/ComponentInitialization.scala
----------------------------------------------------------------------
diff --git a/kernel/src/main/scala/org/apache/toree/boot/layer/ComponentInitialization.scala b/kernel/src/main/scala/org/apache/toree/boot/layer/ComponentInitialization.scala
index ec05898..fafbae7 100644
--- a/kernel/src/main/scala/org/apache/toree/boot/layer/ComponentInitialization.scala
+++ b/kernel/src/main/scala/org/apache/toree/boot/layer/ComponentInitialization.scala
@@ -88,6 +88,8 @@ trait StandardComponentInitialization extends ComponentInitialization {
     initializeSparkContext(config, kernel, appName)
 
     interpreterManager.initializeInterpreters(kernel)
+    
+    pluginManager.fireEvent("allInterpretersReady")
 
     val responseMap = initializeResponseMap()
 

http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/5feb3bda/kernel/src/main/scala/org/apache/toree/kernel/protocol/v5/handler/ExecuteRequestHandler.scala
----------------------------------------------------------------------
diff --git a/kernel/src/main/scala/org/apache/toree/kernel/protocol/v5/handler/ExecuteRequestHandler.scala b/kernel/src/main/scala/org/apache/toree/kernel/protocol/v5/handler/ExecuteRequestHandler.scala
index 8060b41..3764b8c 100644
--- a/kernel/src/main/scala/org/apache/toree/kernel/protocol/v5/handler/ExecuteRequestHandler.scala
+++ b/kernel/src/main/scala/org/apache/toree/kernel/protocol/v5/handler/ExecuteRequestHandler.scala
@@ -74,6 +74,11 @@ class ExecuteRequestHandler(
         actorLoader.load(SystemActorType.ExecuteRequestRelay),
         (executeRequest, km, outputStream)
       ).mapTo[(ExecuteReply, ExecuteResult)]
+      
+      if (!executeRequest.silent){
+        import org.apache.toree.plugins.Implicits._
+        kernel.pluginManager.fireEvent("preRunCell", "outputStream" -> outputStream)
+      }
 
       // Flush the output stream after code execution completes to ensure
       // stream messages are sent prior to idle status messages.


[10/14] incubator-toree git commit: Add git configuration for line ending

Posted by lr...@apache.org.
Add git configuration for line ending

Git relies on user setting core.autocrlf which
is ususally unreliable as not all users are aware
of this configuration, or they forget to properly set.

The .gitattributes file is a template file with the
appropriate configuration for different file types.

After these changes are applied it's recommended to
do the following commands on your local repository:

git rm --cached -r .
git reset --hard

More info available at
https://help.github.com/articles/dealing-with-line-endings/


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

Branch: refs/heads/sandbox
Commit: 1a9c11f5f1381c15b691a716acd0e1f0432a9a35
Parents: 16a27b0
Author: Luciano Resende <lr...@apache.org>
Authored: Sat Jan 7 20:08:56 2017 -0800
Committer: Luciano Resende <lr...@apache.org>
Committed: Wed Feb 1 09:33:00 2017 -0800

----------------------------------------------------------------------
 .gitattributes | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/1a9c11f5/.gitattributes
----------------------------------------------------------------------
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..a8edefd
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,13 @@
+# Set the default behavior to have all files normalized to Unix-style
+# line endings upon check-in.
+* text=auto
+
+# Declare files that will always have CRLF line endings on checkout.
+*.bat text eol=crlf
+
+# Denote all files that are truly binary and should not be modified.
+*.dll binary
+*.exp binary
+*.lib binary
+*.pdb binary
+*.exe binary


[05/14] incubator-toree git commit: Merging PR #82 for TOREE-356 and TOREE-357

Posted by lr...@apache.org.
Merging PR #82 for TOREE-356 and TOREE-357


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

Branch: refs/heads/sandbox
Commit: 70b804bd75d2e5f8fcc2f1151e6badfabfaf9dcd
Parents: e06da57 447f0e2
Author: Marius van Niekerk <ma...@gmail.com>
Authored: Tue Jan 17 12:58:46 2017 -0500
Committer: Marius van Niekerk <ma...@gmail.com>
Committed: Tue Jan 17 12:58:46 2017 -0500

----------------------------------------------------------------------
 .../src/main/resources/PySpark/pyspark_runner.py            | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[13/14] incubator-toree git commit: Update Play JSON to version 2.5.9

Posted by lr...@apache.org.
Update Play JSON to version 2.5.9


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

Branch: refs/heads/sandbox
Commit: ef0f7802902929c1c4f3e46f2b7bd2203d00be87
Parents: 5992441
Author: Luciano Resende <lr...@apache.org>
Authored: Fri Jan 27 14:04:46 2017 -0800
Committer: Luciano Resende <lr...@apache.org>
Committed: Fri Feb 10 13:03:13 2017 -0500

----------------------------------------------------------------------
 kernel/build.sbt   | 4 ++++
 protocol/build.sbt | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/ef0f7802/kernel/build.sbt
----------------------------------------------------------------------
diff --git a/kernel/build.sbt b/kernel/build.sbt
index 0965dce..52ba9cf 100644
--- a/kernel/build.sbt
+++ b/kernel/build.sbt
@@ -18,6 +18,10 @@
 //
 // TEST DEPENDENCIES
 //
+
+libraryDependencies +=
+  "com.typesafe.play" %% "play-json" % "2.5.9"
+
 libraryDependencies +=
   "com.typesafe.akka" %% "akka-testkit" % "2.4.8" % "test" // MIT
 

http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/ef0f7802/protocol/build.sbt
----------------------------------------------------------------------
diff --git a/protocol/build.sbt b/protocol/build.sbt
index 097eccd..541e459 100644
--- a/protocol/build.sbt
+++ b/protocol/build.sbt
@@ -19,8 +19,8 @@
 // JSON DEPENDENCIES
 //
 libraryDependencies ++= Seq(
-  "com.typesafe.play" %% "play-json" % "2.3.10" excludeAll( // Apache v2
-      ExclusionRule(organization = "com.fasterxml.jackson.core")
+  "com.typesafe.play" %% "play-json" % "2.5.9" excludeAll( // Apache v2
+      //ExclusionRule(organization = "com.fasterxml.jackson.core")
     ),
   "org.slf4j" % "slf4j-api" % "1.7.21" // MIT
 )


[12/14] incubator-toree git commit: Fixed postInit call for interpreters The postInit method was being called after the ready message for kernel initialization was being sent

Posted by lr...@apache.org.
Fixed postInit call for interpreters
The postInit method was being called after the ready
message for kernel initialization was being sent


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

Branch: refs/heads/sandbox
Commit: 53a94d790b961dc8c78241558caf4848da1561ab
Parents: ef0f780
Author: Corey Stubbs <cs...@apache.org>
Authored: Mon Feb 6 11:14:49 2017 -0600
Committer: Luciano Resende <lr...@apache.org>
Committed: Fri Feb 10 13:03:13 2017 -0500

----------------------------------------------------------------------
 .../src/main/scala/org/apache/toree/boot/KernelBootstrap.scala  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/53a94d79/kernel/src/main/scala/org/apache/toree/boot/KernelBootstrap.scala
----------------------------------------------------------------------
diff --git a/kernel/src/main/scala/org/apache/toree/boot/KernelBootstrap.scala b/kernel/src/main/scala/org/apache/toree/boot/KernelBootstrap.scala
index eaaf6a1..4ab773c 100644
--- a/kernel/src/main/scala/org/apache/toree/boot/KernelBootstrap.scala
+++ b/kernel/src/main/scala/org/apache/toree/boot/KernelBootstrap.scala
@@ -128,11 +128,12 @@ class KernelBootstrap(config: Config) extends LogLike {
     logger.debug("Initializing security manager")
     System.setSecurityManager(new KernelSecurityManager)
 
+    logger.debug("Running postInit for interpreters")
+    interpreters foreach {_.postInit()}
+
     logger.info("Marking relay as ready for receiving messages")
     kernelMessageRelayActor ! true
 
-    interpreters foreach {_.postInit()}
-    
     this
   }
 


[11/14] incubator-toree git commit: Update Spark version to 2.0.2

Posted by lr...@apache.org.
Update Spark version to 2.0.2


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

Branch: refs/heads/sandbox
Commit: 5992441f933b958a9e1f35e0185b552e0f4f781b
Parents: 55abd44
Author: Luciano Resende <lr...@apache.org>
Authored: Sat Jan 7 18:16:16 2017 -0800
Committer: Luciano Resende <lr...@apache.org>
Committed: Fri Feb 10 13:03:13 2017 -0500

----------------------------------------------------------------------
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/5992441f/Makefile
----------------------------------------------------------------------
diff --git a/Makefile b/Makefile
index 79d3440..eaf6562 100644
--- a/Makefile
+++ b/Makefile
@@ -27,7 +27,7 @@ IS_SNAPSHOT?=true
 SNAPSHOT:=-SNAPSHOT
 endif
 
-APACHE_SPARK_VERSION?=2.0.0
+APACHE_SPARK_VERSION?=2.0.2
 SCALA_VERSION?=2.11
 IMAGE?=jupyter/all-spark-notebook:07a7c4d6d447
 EXAMPLE_IMAGE?=apache/toree-examples


[07/14] incubator-toree git commit: Check PluginManager is not null to make tests pass. Refactors event names into their own class

Posted by lr...@apache.org.
Check PluginManager is not null to make tests pass. Refactors event names into their own class


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

Branch: refs/heads/sandbox
Commit: 63ba1c3cd5559e35e7ebef7a1cb7d2d75094377f
Parents: 5feb3bd
Author: David Taieb <da...@us.ibm.com>
Authored: Wed Jan 18 16:18:54 2017 -0500
Committer: David Taieb <da...@us.ibm.com>
Committed: Wed Jan 18 16:18:54 2017 -0500

----------------------------------------------------------------------
 .../org/apache/toree/boot/layer/ComponentInitialization.scala  | 5 ++---
 kernel/src/main/scala/org/apache/toree/kernel/api/Kernel.scala | 5 ++---
 .../kernel/protocol/v5/handler/ExecuteRequestHandler.scala     | 6 +++---
 .../toree/kernel/protocol/v5/relay/ExecuteRequestRelay.scala   | 5 ++---
 4 files changed, 9 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/63ba1c3c/kernel/src/main/scala/org/apache/toree/boot/layer/ComponentInitialization.scala
----------------------------------------------------------------------
diff --git a/kernel/src/main/scala/org/apache/toree/boot/layer/ComponentInitialization.scala b/kernel/src/main/scala/org/apache/toree/boot/layer/ComponentInitialization.scala
index fafbae7..a69d276 100644
--- a/kernel/src/main/scala/org/apache/toree/boot/layer/ComponentInitialization.scala
+++ b/kernel/src/main/scala/org/apache/toree/boot/layer/ComponentInitialization.scala
@@ -21,7 +21,6 @@ import java.io.File
 import java.net.URL
 import java.nio.file.{Files, Paths}
 import java.util.concurrent.ConcurrentHashMap
-
 import akka.actor.ActorRef
 import com.typesafe.config.Config
 import org.apache.spark.SparkConf
@@ -34,8 +33,8 @@ import org.apache.toree.kernel.protocol.v5.kernel.ActorLoader
 import org.apache.toree.magic.MagicManager
 import org.apache.toree.plugins.PluginManager
 import org.apache.toree.utils.LogLike
-
 import scala.collection.JavaConverters._
+import org.apache.toree.plugins.AllInterpretersReady
 
 /**
  * Represents the component initialization. All component-related pieces of the
@@ -89,7 +88,7 @@ trait StandardComponentInitialization extends ComponentInitialization {
 
     interpreterManager.initializeInterpreters(kernel)
     
-    pluginManager.fireEvent("allInterpretersReady")
+    pluginManager.fireEvent(AllInterpretersReady)
 
     val responseMap = initializeResponseMap()
 

http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/63ba1c3c/kernel/src/main/scala/org/apache/toree/kernel/api/Kernel.scala
----------------------------------------------------------------------
diff --git a/kernel/src/main/scala/org/apache/toree/kernel/api/Kernel.scala b/kernel/src/main/scala/org/apache/toree/kernel/api/Kernel.scala
index 6b369b3..087a0fe 100644
--- a/kernel/src/main/scala/org/apache/toree/kernel/api/Kernel.scala
+++ b/kernel/src/main/scala/org/apache/toree/kernel/api/Kernel.scala
@@ -19,7 +19,6 @@ package org.apache.toree.kernel.api
 
 import java.io.{InputStream, PrintStream}
 import java.util.concurrent.ConcurrentHashMap
-
 import com.typesafe.config.Config
 import org.apache.spark.api.java.JavaSparkContext
 import org.apache.spark.sql.{SQLContext, SparkSession}
@@ -39,10 +38,10 @@ import org.apache.toree.kernel.protocol.v5.{KMBuilder, KernelMessage}
 import org.apache.toree.magic.MagicManager
 import org.apache.toree.plugins.PluginManager
 import org.apache.toree.utils.{KeyValuePairUtils, LogLike}
-
 import scala.language.dynamics
 import scala.reflect.runtime.universe._
 import scala.util.{DynamicVariable, Try}
+import org.apache.toree.plugins.SparkReady
 
 /**
  * Represents the main kernel API to be used for interaction.
@@ -357,7 +356,7 @@ class Kernel (
     pluginManager.dependencyManager.add(_sparkContext)
     pluginManager.dependencyManager.add(_javaSparkContext)
 
-    pluginManager.fireEvent("sparkReady")
+    pluginManager.fireEvent(SparkReady)
 
     _sparkContext
   }

http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/63ba1c3c/kernel/src/main/scala/org/apache/toree/kernel/protocol/v5/handler/ExecuteRequestHandler.scala
----------------------------------------------------------------------
diff --git a/kernel/src/main/scala/org/apache/toree/kernel/protocol/v5/handler/ExecuteRequestHandler.scala b/kernel/src/main/scala/org/apache/toree/kernel/protocol/v5/handler/ExecuteRequestHandler.scala
index 3764b8c..a59608d 100644
--- a/kernel/src/main/scala/org/apache/toree/kernel/protocol/v5/handler/ExecuteRequestHandler.scala
+++ b/kernel/src/main/scala/org/apache/toree/kernel/protocol/v5/handler/ExecuteRequestHandler.scala
@@ -30,10 +30,10 @@ import Utilities._
 import org.apache.toree.utils._
 import play.api.data.validation.ValidationError
 import play.api.libs.json.JsPath
-
 import scala.concurrent.ExecutionContext.Implicits.global
 import scala.concurrent._
 import scala.util.{Failure, Success}
+import org.apache.toree.plugins.PreRunCell
 
 /**
  * Receives an ExecuteRequest KernelMessage and forwards the ExecuteRequest
@@ -75,9 +75,9 @@ class ExecuteRequestHandler(
         (executeRequest, km, outputStream)
       ).mapTo[(ExecuteReply, ExecuteResult)]
       
-      if (!executeRequest.silent){
+      if (!executeRequest.silent && kernel.pluginManager != null){
         import org.apache.toree.plugins.Implicits._
-        kernel.pluginManager.fireEvent("preRunCell", "outputStream" -> outputStream)
+        kernel.pluginManager.fireEvent(PreRunCell, "outputStream" -> outputStream)
       }
 
       // Flush the output stream after code execution completes to ensure

http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/63ba1c3c/kernel/src/main/scala/org/apache/toree/kernel/protocol/v5/relay/ExecuteRequestRelay.scala
----------------------------------------------------------------------
diff --git a/kernel/src/main/scala/org/apache/toree/kernel/protocol/v5/relay/ExecuteRequestRelay.scala b/kernel/src/main/scala/org/apache/toree/kernel/protocol/v5/relay/ExecuteRequestRelay.scala
index 5ac3af9..9105841 100644
--- a/kernel/src/main/scala/org/apache/toree/kernel/protocol/v5/relay/ExecuteRequestRelay.scala
+++ b/kernel/src/main/scala/org/apache/toree/kernel/protocol/v5/relay/ExecuteRequestRelay.scala
@@ -18,7 +18,6 @@
 package org.apache.toree.kernel.protocol.v5.relay
 
 import java.io.OutputStream
-
 import akka.actor.Actor
 import akka.pattern._
 import akka.util.Timeout
@@ -29,9 +28,9 @@ import org.apache.toree.kernel.protocol.v5.kernel.ActorLoader
 import org.apache.toree.kernel.protocol.v5.magic.{PostProcessor, MagicParser}
 import org.apache.toree.plugins.PluginManager
 import org.apache.toree.utils.LogLike
-
 import scala.concurrent.Future
 import scala.concurrent.duration._
+import org.apache.toree.plugins.NewOutputStream
 
 case class ExecuteRequestRelay(
   actorLoader: ActorLoader,
@@ -100,7 +99,7 @@ case class ExecuteRequestRelay(
       // Sets the outputStream for this particular ExecuteRequest
       import org.apache.toree.plugins.Implicits._
       pluginManager.fireEventFirstResult(
-        "newOutputStream",
+        NewOutputStream,
         "outputStream" -> outputStream
       )
 


[02/14] incubator-toree git commit: Make sure there is always a cell to write to for the python interpreter

Posted by lr...@apache.org.
Make sure there is always a cell to write to for the python interpreter


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

Branch: refs/heads/sandbox
Commit: 447f0e24a4037ed9bc8a0838d60bdb1bd7678562
Parents: e1dc4e5
Author: David Taieb <da...@us.ibm.com>
Authored: Wed Jan 4 18:17:36 2017 -0500
Committer: David Taieb <da...@us.ibm.com>
Committed: Wed Jan 4 18:17:36 2017 -0500

----------------------------------------------------------------------
 .../src/main/resources/PySpark/pyspark_runner.py               | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/447f0e24/pyspark-interpreter/src/main/resources/PySpark/pyspark_runner.py
----------------------------------------------------------------------
diff --git a/pyspark-interpreter/src/main/resources/PySpark/pyspark_runner.py b/pyspark-interpreter/src/main/resources/PySpark/pyspark_runner.py
index fcb1a06..04d1666 100644
--- a/pyspark-interpreter/src/main/resources/PySpark/pyspark_runner.py
+++ b/pyspark-interpreter/src/main/resources/PySpark/pyspark_runner.py
@@ -151,12 +151,14 @@ kernel = Kernel(bridge.kernel())
 
 while True:
     try:
-        code_info = state.nextCode()
+        next_code_info = state.nextCode()
 
         # If code is not available, try again later
-        if code_info is None:
+        if next_code_info is None:
             sleep(1)
             continue
+            
+        code_info = next_code_info
 
         code_lines = code_info.code().split("\n")
         final_code = None


[04/14] incubator-toree git commit: Updated badge link

Posted by lr...@apache.org.
Updated badge link


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

Branch: refs/heads/sandbox
Commit: e06da57a824a0a1ba2a5aa3ef67b1f308748c502
Parents: fa8f3e3
Author: Chip Senkbeil <ch...@gmail.com>
Authored: Tue Jan 17 11:53:01 2017 -0600
Committer: Chip Senkbeil <ch...@gmail.com>
Committed: Tue Jan 17 11:53:01 2017 -0600

----------------------------------------------------------------------
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/e06da57a/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 6167b7f..27f5844 100644
--- a/README.md
+++ b/README.md
@@ -111,7 +111,7 @@ We are working on porting our documentation into Apache. For the time being, you
 [license-badge]: https://img.shields.io/badge/License-Apache%202-blue.svg?style=flat
 [license-url]: LICENSE
 [gitter-badge]: https://badges.gitter.im/Join%20Chat.svg
-[gitter-url]: https://gitter.im/ibm-et/spark-kernel
+[gitter-url]: https://gitter.im/apache/toree
 [try-jupyter]: http://try.jupyter.org
 [vagrant]: https://www.vagrantup.com/
 [mail-list]: mailto:dev@toree.incubator.apache.org


[14/14] incubator-toree git commit: Update git configuration file

Posted by lr...@apache.org.
Update git configuration file


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

Branch: refs/heads/sandbox
Commit: 55abd44a80878d3c4c4994256edac27d6b94c4e1
Parents: 1a9c11f
Author: Luciano Resende <lr...@apache.org>
Authored: Sat Jan 7 18:09:50 2017 -0800
Committer: Luciano Resende <lr...@apache.org>
Committed: Fri Feb 10 13:03:13 2017 -0500

----------------------------------------------------------------------
 .gitignore | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/55abd44a/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index f692b1a..ef31f57 100644
--- a/.gitignore
+++ b/.gitignore
@@ -40,5 +40,7 @@ dist/
 .ensime
 .ensime_cache/
 
+.jekyll-metadata
+
 Untitled*.ipynb
 .system-test-image


[08/14] incubator-toree git commit: case object for each plugin events

Posted by lr...@apache.org.
case object for each plugin events


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

Branch: refs/heads/sandbox
Commit: b36fa461ef4b5f83634fdee942cc5d2ee4e349f7
Parents: 63ba1c3
Author: David Taieb <da...@us.ibm.com>
Authored: Wed Jan 18 17:24:52 2017 -0500
Committer: David Taieb <da...@us.ibm.com>
Committed: Wed Jan 18 17:24:52 2017 -0500

----------------------------------------------------------------------
 .../org/apache/toree/plugins/PluginEvents.scala | 51 ++++++++++++++++++++
 1 file changed, 51 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/b36fa461/plugins/src/main/scala/org/apache/toree/plugins/PluginEvents.scala
----------------------------------------------------------------------
diff --git a/plugins/src/main/scala/org/apache/toree/plugins/PluginEvents.scala b/plugins/src/main/scala/org/apache/toree/plugins/PluginEvents.scala
new file mode 100644
index 0000000..fd47f4b
--- /dev/null
+++ b/plugins/src/main/scala/org/apache/toree/plugins/PluginEvents.scala
@@ -0,0 +1,51 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.plugins
+
+import scala.language.implicitConversions
+
+sealed trait PluginEvent {
+  def name: String
+  
+  implicit def pluginEventToString(pEvent: PluginEvent) = pEvent.name
+}
+
+/** Signaled when Spark Driver is ready. **/
+case object SparkReady extends PluginEvent{
+  val name = "sparkReady"
+}
+
+/** Signaled when a new OutputStream becomes available. **/
+case object NewOutputStream extends PluginEvent{
+  val name = "newOutputStream"
+}
+
+/** Signaled when all interpreters have been initialized. **/
+case object AllInterpretersReady extends PluginEvent{
+  val name = "allInterpretersReady"
+}
+
+/** Signaled before executing a block of code. **/
+case object PreRunCell extends PluginEvent{
+  val name = "preRunCell"
+}
+
+/** Signaled after executing a block of code. **/
+case object PostRunCell extends PluginEvent{
+  val name = "postRunCell"
+}
\ No newline at end of file


[03/14] incubator-toree git commit: Updated Gitter badge to point to new Gitter channel

Posted by lr...@apache.org.
Updated Gitter badge to point to new Gitter channel


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

Branch: refs/heads/sandbox
Commit: fa8f3e395d27f18ee2c863ceb773184aeee0d616
Parents: 5051d0f
Author: Chip Senkbeil <ch...@gmail.com>
Authored: Tue Jan 17 11:51:54 2017 -0600
Committer: Chip Senkbeil <ch...@gmail.com>
Committed: Tue Jan 17 11:51:54 2017 -0600

----------------------------------------------------------------------
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/fa8f3e39/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index c07eb14..6167b7f 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
 [![Build Status][build-badge]][build-url]
 [![License][license-badge]][license-url]
-[![Join the chat at https://gitter.im/ibm-et/spark-kernel][gitter-badge]][gitter-url]
+[![Join the chat at https://gitter.im/apache/toree][gitter-badge]][gitter-url]
 [![Binder](http://mybinder.org/badge.svg)](http://mybinder.org/repo/apache/incubator-toree)
 
 Apache Toree