spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bonsen <hengbohe...@126.com>
Subject deal with datas' structure
Date Sat, 27 Feb 2016 14:15:07 GMT
Now,I have a map
    val ji =
scala.collection.mutable.Map[String,scala.collection.mutable.ArrayBuffer[String]]()
there are so many datas like:
    ji =
map("a"->ArrayBuffer["1","2","3"],"b"->ArrayBuffer["1","2","3"],"c"->ArrayBuffer["2","3"])

if "a" choose "1","b" and "c" can't choose "1",
for example,
    ji = map("b"->ArrayBuffer["2","3"],"c"->ArrayBuffer["2","3"])
if "b" choose "2","c" can't choose "2",
for example,
    ji = map("c"->ArrayBuffer["3"])

And I need get all the Possibilities and sort them from small to big and
ouput them to result.txt.
Results Like:
    a:1  b:2  c:3
    a:1  c:2  b:3
    b:1  a:2  c:3
    b:1  c:2  a:3

Finally,we can get result.txt:
 a b c
 a c b
 b a c
 b c a
   
What should I do? I think it is difficult to me.....



--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/deal-with-datas-structure-tp26349.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


Mime
View raw message