Skip to content
Snippets Groups Projects
Commit 3119206b authored by Kousuke Saruta's avatar Kousuke Saruta Committed by Reynold Xin
Browse files

[SPARK-12692][BUILD][GRAPHX] Scala style: Fix the style violation (Space before "," or ":")

Fix the style violation (space before `,` and `:`).
This PR is a followup for #10643.

Author: Kousuke Saruta <sarutak@oss.nttdata.co.jp>

Closes #10683 from sarutak/SPARK-12692-followup-graphx.
parent e5904bb5
No related branches found
No related tags found
No related merge requests found
...@@ -21,7 +21,6 @@ import scala.reflect.ClassTag ...@@ -21,7 +21,6 @@ import scala.reflect.ClassTag
import scala.util.Random import scala.util.Random
import org.apache.spark.SparkException import org.apache.spark.SparkException
import org.apache.spark.SparkContext._
import org.apache.spark.graphx.lib._ import org.apache.spark.graphx.lib._
import org.apache.spark.rdd.RDD import org.apache.spark.rdd.RDD
...@@ -379,7 +378,7 @@ class GraphOps[VD: ClassTag, ED: ClassTag](graph: Graph[VD, ED]) extends Seriali ...@@ -379,7 +378,7 @@ class GraphOps[VD: ClassTag, ED: ClassTag](graph: Graph[VD, ED]) extends Seriali
* @see [[org.apache.spark.graphx.lib.PageRank$#runUntilConvergenceWithOptions]] * @see [[org.apache.spark.graphx.lib.PageRank$#runUntilConvergenceWithOptions]]
*/ */
def personalizedPageRank(src: VertexId, tol: Double, def personalizedPageRank(src: VertexId, tol: Double,
resetProb: Double = 0.15) : Graph[Double, Double] = { resetProb: Double = 0.15): Graph[Double, Double] = {
PageRank.runUntilConvergenceWithOptions(graph, tol, resetProb, Some(src)) PageRank.runUntilConvergenceWithOptions(graph, tol, resetProb, Some(src))
} }
...@@ -392,7 +391,7 @@ class GraphOps[VD: ClassTag, ED: ClassTag](graph: Graph[VD, ED]) extends Seriali ...@@ -392,7 +391,7 @@ class GraphOps[VD: ClassTag, ED: ClassTag](graph: Graph[VD, ED]) extends Seriali
* @see [[org.apache.spark.graphx.lib.PageRank$#runWithOptions]] * @see [[org.apache.spark.graphx.lib.PageRank$#runWithOptions]]
*/ */
def staticPersonalizedPageRank(src: VertexId, numIter: Int, def staticPersonalizedPageRank(src: VertexId, numIter: Int,
resetProb: Double = 0.15) : Graph[Double, Double] = { resetProb: Double = 0.15): Graph[Double, Double] = {
PageRank.runWithOptions(graph, numIter, resetProb, Some(src)) PageRank.runWithOptions(graph, numIter, resetProb, Some(src))
} }
......
...@@ -41,8 +41,8 @@ class ReplicatedVertexView[VD: ClassTag, ED: ClassTag]( ...@@ -41,8 +41,8 @@ class ReplicatedVertexView[VD: ClassTag, ED: ClassTag](
* shipping level. * shipping level.
*/ */
def withEdges[VD2: ClassTag, ED2: ClassTag]( def withEdges[VD2: ClassTag, ED2: ClassTag](
edges_ : EdgeRDDImpl[ED2, VD2]): ReplicatedVertexView[VD2, ED2] = { _edges: EdgeRDDImpl[ED2, VD2]): ReplicatedVertexView[VD2, ED2] = {
new ReplicatedVertexView(edges_, hasSrcId, hasDstId) new ReplicatedVertexView(_edges, hasSrcId, hasDstId)
} }
/** /**
......
...@@ -102,8 +102,8 @@ class ShippableVertexPartition[VD: ClassTag]( ...@@ -102,8 +102,8 @@ class ShippableVertexPartition[VD: ClassTag](
extends VertexPartitionBase[VD] { extends VertexPartitionBase[VD] {
/** Return a new ShippableVertexPartition with the specified routing table. */ /** Return a new ShippableVertexPartition with the specified routing table. */
def withRoutingTable(routingTable_ : RoutingTablePartition): ShippableVertexPartition[VD] = { def withRoutingTable(_routingTable: RoutingTablePartition): ShippableVertexPartition[VD] = {
new ShippableVertexPartition(index, values, mask, routingTable_) new ShippableVertexPartition(index, values, mask, _routingTable)
} }
/** /**
......
...@@ -32,7 +32,7 @@ import org.apache.spark.util.collection.BitSet ...@@ -32,7 +32,7 @@ import org.apache.spark.util.collection.BitSet
* example, [[VertexPartition.VertexPartitionOpsConstructor]]). * example, [[VertexPartition.VertexPartitionOpsConstructor]]).
*/ */
private[graphx] abstract class VertexPartitionBaseOps private[graphx] abstract class VertexPartitionBaseOps
[VD: ClassTag, Self[X] <: VertexPartitionBase[X] : VertexPartitionBaseOpsConstructor] [VD: ClassTag, Self[X] <: VertexPartitionBase[X]: VertexPartitionBaseOpsConstructor]
(self: Self[VD]) (self: Self[VD])
extends Serializable with Logging { extends Serializable with Logging {
......
...@@ -138,7 +138,7 @@ object PageRank extends Logging { ...@@ -138,7 +138,7 @@ object PageRank extends Logging {
// edge partitions. // edge partitions.
prevRankGraph = rankGraph prevRankGraph = rankGraph
val rPrb = if (personalized) { val rPrb = if (personalized) {
(src: VertexId , id: VertexId) => resetProb * delta(src, id) (src: VertexId, id: VertexId) => resetProb * delta(src, id)
} else { } else {
(src: VertexId, id: VertexId) => resetProb (src: VertexId, id: VertexId) => resetProb
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment