Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
pull latest from apache spark #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
pull latest from apache spark #6
Changes from 1 commit
645c3a870f6f969a48c65511d492cf95d72ce58e9952035d1941b2703edcc40ad0de99b373a88d06258715d57f9f6ac7c3465c665dd83c2027e88fac04dc27204b02be617508c8f254583302c3b7d41475f42c28a6e2bd3f19228eadce5ee82900048ff8809ee913e6bc7a3ec4b1389603f57a6d7eac9d4896411ef77003e72914fa3ec50ab6071a7e9e67b3e1fb85785772600eea12ae720dda46f25c2da7bfac25bba58017cdf2e52e5977771c739bf76dd9e86e6e7d05d02ca1a7b954040f878d3b60ad3c9a946881b49740954d5ce617d57daf1076009b1e28840e43061481f54acd8813fa982ef2bcc4ab37035d3acf3201ae2c5af7dcbff280c3689bc8e8633e53ba6d69634e177791d0c256704c23369c3cad29a40dd06483dc9ae2c6aa356e1772d3dbf2a7c37fcda340e0676238447d5f7dbdba4a0add926e9c47906461aa0eba28a3acb78bcad283e3c3d59525c569fe38ab927e22e74267bed24801a235f4ac19f4ac6747d2f53d2b6f581d485391fed8e020ff8c27fe6ba1d5427888fa866416e71ac3a62694d535d1560489f6871cc874c4e26e33bc67d18276c6ca990f0b713e0234f7818fff0f907f1c546d37e1e99b7187eb650a8ff776b2073bf9d42afd7266d9d0e2ef4c59ba8c86d4eace4dc079420db88d02515e4afc7e68c3f3daa09473263f1840852e58fa19acdf21931d069d250832c9a1680c9a87afd45f805363f642a6a4bfcd07cb323310981d9f13f0fe06493c23385e8a48296f38529d88301fad06dec37992142b17eec0a4bf46098e0b030b5e3bd8e76679a9256840f72743de64958043304b1a51f877276c2d599bd2f010251a7dafd70fbd5365b48978ab5e6f2f4d89c71450e3644dddf2f241eaabf643649dbbd887f52b6a89421f6c236652943c578c59202479431a3d005ab2943b461d956d88241d95fb6496d2a294125475f6bdf9eacd9d8d9e8f26d9670f891984971d1de28c4bd576ae6c6773f06eb76fc2b6585c42fd27e1f384ce2d24b90c020f96997b77ba302d4d849392b7057ca9ef86917f400c100d317eef246c890c35d1c193ade1a84e5faba9f82066a130c1884204c9de357d82dea9ca6f8ef33991974d1d65b75e6637a78f5f3bda63ee7996828213dedf8b874c08e2cb39e80d1614485453455c6037ed06c2d89490a1d8d10ef4f3750ed64bb1fda07783b6f0f1015f53f32a20acb32a14c72369c23c81File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
…leading We have a recoverable Spark streaming job with checkpoint enabled, it could be executed correctly at first time, but throw following exception when restarted and recovered from checkpoint. ``` org.apache.spark.SparkException: RDD transformations and actions can only be invoked by the driver, not inside of other transformations; for example, rdd1.map(x => rdd2.values.count() * x) is invalid because the values transformation and count action cannot be performed inside of the rdd1.map transformation. For more information, see SPARK-5063. at org.apache.spark.rdd.RDD.org$apache$spark$rdd$RDD$$sc(RDD.scala:87) at org.apache.spark.rdd.RDD.withScope(RDD.scala:352) at org.apache.spark.rdd.RDD.union(RDD.scala:565) at org.apache.spark.streaming.Repo$$anonfun$createContext$1.apply(Repo.scala:23) at org.apache.spark.streaming.Repo$$anonfun$createContext$1.apply(Repo.scala:19) at org.apache.spark.streaming.dstream.DStream$$anonfun$foreachRDD$1$$anonfun$apply$mcV$sp$3.apply(DStream.scala:627) ``` According to exception, it shows I invoked transformations and actions in other transformations, but I did not. The real reason is that I used external RDD in DStream operation. External RDD data is not stored in checkpoint, so that during recovering, the initial value of _sc in this RDD is assigned to null and hit above exception. But you can find the error message is misleading, it indicates nothing about the real issue Here is the code to reproduce it. ```scala object Repo { def createContext(ip: String, port: Int, checkpointDirectory: String):StreamingContext = { println("Creating new context") val sparkConf = new SparkConf().setAppName("Repo").setMaster("local[2]") val ssc = new StreamingContext(sparkConf, Seconds(2)) ssc.checkpoint(checkpointDirectory) var cached = ssc.sparkContext.parallelize(Seq("apple, banana")) val words = ssc.socketTextStream(ip, port).flatMap(_.split(" ")) words.foreachRDD((rdd: RDD[String]) => { val res = rdd.map(word => (word, word.length)).collect() println("words: " + res.mkString(", ")) cached = cached.union(rdd) cached.checkpoint() println("cached words: " + cached.collect.mkString(", ")) }) ssc } def main(args: Array[String]) { val ip = "localhost" val port = 9999 val dir = "/home/maowei/tmp" val ssc = StreamingContext.getOrCreate(dir, () => { createContext(ip, port, dir) }) ssc.start() ssc.awaitTermination() } } ``` Author: mwws <wei.mao@intel.com> Closes apache#11595 from mwws/SPARK-MissleadingLog.Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing