You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by balaji9058 <ks...@gmail.com> on 2017/02/28 12:37:43 UTC

graph.vertices.collect().foreach(println)

HI,
Any one have idea about this.

When i use graph.vertices.collect() in the console(spark console) getting
limited vertices data, as i have million records

res34: Array[(org.apache.spark.graphx.VertexId, (Array[Double],
Array[Double], Double, Double))] =
Array((8501952,(Array(-1.0720014023085627, -0.166344
57650848242),Array(-0.6103788820773441,
-0.07786941417473896),-1.3895885415250486,1.0)),
(8502656,(Array(0.4372264795058396, 0.013542308038655674),Arra
y(0.8989895103168658, 0.10203414054868458),0.6711091242883567,1.0)),
(1024388,(Array(0.5121940125583068, 0.023648040456737244)


But when i use like below, as object hashcode is printed, but certianly i
want data in above format to do my further operations

 g.vertices.collect().foreach(println)

(8502417,(*[D@f068ac,[D@16825ec*,0.6711091242883567,1.0))
(8502099,(*[D@91cd94,[D@4fb2ea*,0.6711091242883567,1.0))
(1939777,(*[D@6b48d0,[D@17979f6*,0.6368329031347298,0.0))
(8500191,(*[D@36063b,[D@d3339a*,-0.37782997016492503,1.0))
(8500927,(*[D@1e0e2a8,[D@140ab89*,0.6368329031347298,1.0))
(8500255,(*[D@bde454,[D@d96b14*,0.6528450234389184,1.0))

Any idea is appreciated. 

val newG = g.vertices.collect()
newG.foreach(println) also not working...


thanks




--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/graph-vertices-collect-foreach-println-tp28437.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe e-mail: user-unsubscribe@spark.apache.org