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

    https://github.com/apache/spark/pull/5114#discussion_r26910218
  
    --- Diff: 
streaming/src/main/scala/org/apache/spark/streaming/dstream/ReceiverInputDStream.scala
 ---
    @@ -54,6 +55,14 @@ abstract class ReceiverInputDStream[T: 
ClassTag](@transient ssc_ : StreamingCont
     
       def stop() {}
     
    +  def setPreferredLocation(_preferredLocation: String){
    +    if (null != _preferredLocation){
    +      this._preferredLocation = Some(_preferredLocation)
    +    }
    --- End diff --
    
    This can be simplified as `this._preferredLocation = 
Option(_preferredLocation)`.


---
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