Repository: spark
Updated Branches:
  refs/heads/master 7b70a7071 -> 1811ba8cc


SPARK-1878: Fix the incorrect initialization order

JIRA: https://issues.apache.org/jira/browse/SPARK-1878

Author: zsxwing <zsxw...@gmail.com>

Closes #822 from zsxwing/SPARK-1878 and squashes the following commits:

4a47e27 [zsxwing] SPARK-1878: Fix the incorrect initialization order


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/1811ba8c
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/1811ba8c
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/1811ba8c

Branch: refs/heads/master
Commit: 1811ba8ccb580979aa2e12019e6a82805f09ab53
Parents: 7b70a70
Author: zsxwing <zsxw...@gmail.com>
Authored: Mon May 19 16:41:31 2014 -0700
Committer: Tathagata Das <tathagata.das1...@gmail.com>
Committed: Mon May 19 16:41:31 2014 -0700

----------------------------------------------------------------------
 .../apache/spark/streaming/api/java/JavaStreamingContext.scala | 6 +++---
 .../src/test/java/org/apache/spark/streaming/JavaAPISuite.java | 4 ++++
 2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/1811ba8c/streaming/src/main/scala/org/apache/spark/streaming/api/java/JavaStreamingContext.scala
----------------------------------------------------------------------
diff --git 
a/streaming/src/main/scala/org/apache/spark/streaming/api/java/JavaStreamingContext.scala
 
b/streaming/src/main/scala/org/apache/spark/streaming/api/java/JavaStreamingContext.scala
index 75a3e93..18605ca 100644
--- 
a/streaming/src/main/scala/org/apache/spark/streaming/api/java/JavaStreamingContext.scala
+++ 
b/streaming/src/main/scala/org/apache/spark/streaming/api/java/JavaStreamingContext.scala
@@ -142,12 +142,12 @@ class JavaStreamingContext(val ssc: StreamingContext) {
    */
   def this(path: String, hadoopConf: Configuration) = this(new 
StreamingContext(path, hadoopConf))
 
-  @deprecated("use sparkContext", "0.9.0")
-  val sc: JavaSparkContext = sparkContext
-
   /** The underlying SparkContext */
   val sparkContext = new JavaSparkContext(ssc.sc)
 
+  @deprecated("use sparkContext", "0.9.0")
+  val sc: JavaSparkContext = sparkContext
+
   /**
    * Create an input stream from network source hostname:port. Data is 
received using
    * a TCP socket and the receive bytes is interpreted as UTF8 encoded \n 
delimited

http://git-wip-us.apache.org/repos/asf/spark/blob/1811ba8c/streaming/src/test/java/org/apache/spark/streaming/JavaAPISuite.java
----------------------------------------------------------------------
diff --git 
a/streaming/src/test/java/org/apache/spark/streaming/JavaAPISuite.java 
b/streaming/src/test/java/org/apache/spark/streaming/JavaAPISuite.java
index ce58cb1..4efeb8d 100644
--- a/streaming/src/test/java/org/apache/spark/streaming/JavaAPISuite.java
+++ b/streaming/src/test/java/org/apache/spark/streaming/JavaAPISuite.java
@@ -55,6 +55,10 @@ public class JavaAPISuite extends LocalJavaStreamingContext 
implements Serializa
       equalIterator(a.iterator(), b.iterator());
   }
 
+  @Test
+  public void testInitialization() {
+    Assert.assertNotNull(ssc.sc());
+  }
 
   @SuppressWarnings("unchecked")
   @Test

Reply via email to