Adamic/Adar measures is defined as inverted sum of degrees of common neighbours for given two vertices.

$$A(x,y)=\sum_{u \in N(x) \cap N(y)}\frac{1}{log(|N(u)|)}$$

Where $$N(x)$$ is set of neighbours of vertex $$x$$

For further informations please refer to [Adamic].
import ml.sparkling.graph.operators.OperatorsDSL._
import org.apache.spark.SparkContext
import org.apache.spark.graphx.Graph

implicit ctx:SparkContext=???
// initialize your SparkContext as implicit value
val graph =???

// Graph where each edge is associated with its Adamic/Adar measure


You can also compute closeness centrality for graph treated as undirected one:

import ml.sparkling.graph.operators.OperatorsDSL._
import org.apache.spark.SparkContext
import org.apache.spark.graphx.Graph

implicit ctx:SparkContext=???
// initialize your SparkContext as implicit value
val graph =???