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

    https://github.com/apache/spark/pull/5563#discussion_r33377507
  
    --- Diff: 
core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerUtils.scala
 ---
    @@ -17,15 +17,18 @@
     
     package org.apache.spark.scheduler.cluster.mesos
     
    -import java.util.List
     import java.util.concurrent.CountDownLatch
    +import java.util.{List => JList}
     
     import scala.collection.JavaConversions._
     
    -import org.apache.mesos.Protos.{FrameworkInfo, Resource, Status}
    -import org.apache.mesos.{MesosSchedulerDriver, Scheduler}
    -import org.apache.spark.Logging
    +import com.google.common.base.Splitter
    +
    +import org.apache.mesos.Protos._
    +import org.apache.mesos.{MesosSchedulerDriver, Protos, Scheduler}
     import org.apache.spark.util.Utils
    +import org.apache.spark.{Logging, SparkContext}
    --- End diff --
    
    Do you have a script to check/do this? It would be much faster if i knew 
what rules to follow and the scala import organizer plugin doesn't seem to 
follow the doc (even after i update my intellij config with the one in the 
style guide).
    
    Currently applying the autoformat imports i get:
    
    ```scala
    package org.apache.spark.scheduler.cluster.mesos
    
    import java.util.concurrent.CountDownLatch
    import java.util.{List => JList}
    
    import com.google.common.base.Splitter
    import org.apache.mesos.Protos._
    import org.apache.mesos.{MesosSchedulerDriver, Protos, Scheduler}
    import org.apache.spark.util.Utils
    import org.apache.spark.{Logging, SparkContext}
    
    import scala.collection.JavaConversions._
    ````
    
    But as per the guide and your comments i should have:
    
    ```scala
    package org.apache.spark.scheduler.cluster.mesos
    
    import java.util.{List => JList}
    import java.util.concurrent.CountDownLatch
    
    import scala.collection.JavaConversions._
    
    import com.google.common.base.Splitter
    import org.apache.mesos.{MesosSchedulerDriver, Protos, Scheduler}
    import org.apache.mesos.Protos._
    
    import org.apache.spark.{Logging, SparkContext}
    import org.apache.spark.util.Utils
    ```


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