Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11735#discussion_r56219892
  
    --- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala ---
    @@ -1278,12 +1278,8 @@ class SparkContext(config: SparkConf) extends 
Logging with ExecutorAllocationCli
        */
       def broadcast[T: ClassTag](value: T): Broadcast[T] = {
         assertNotStopped()
    -    if (classOf[RDD[_]].isAssignableFrom(classTag[T].runtimeClass)) {
    -      // This is a warning instead of an exception in order to avoid 
breaking user programs that
    -      // might have created RDD broadcast variables but not used them:
    -      logWarning("Can not directly broadcast RDDs; instead, call collect() 
and "
    -        + "broadcast the result (see SPARK-5063)")
    -    }
    +    require(!classOf[RDD[_]].isAssignableFrom(classTag[T].runtimeClass), 
"Can not directly " +
    --- End diff --
    
    Nit: rather than break this string just ...
    
    ```
    require(!classOf[RDD[_]].isAssignableFrom(classTag[T].runtimeClass), 
      "Can not directly broadcast RDDs; instead, call collect() and broadcast 
the result.")
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to