Hello,
    I wrote a class named BooleanPair:

public static class BooleanPairet implements Serializable{
        public Boolean elementBool1;
        public Boolean elementBool2;
        BooleanPair(Boolean bool1, Boolean bool2){elementBool1 = bool1;
elementBool2 = bool2;}
        public String toString(){return new String("(" + elementBool1 + ","
+ elementBool2 + ")");}
    }

And I create a RDD like this: javaRDD<BooleanPair[]>, a RDD of a
BooleanPair array, when I use the method saveAsTextFile, and it gives me
something like this"[Lmy.package.name.MyClassName$BooleanPair;@5b777a88",
while it goes well with a javaRDD<BooleanPair>, just a value instead of an
array.

What should I do to save it in a format like "(true, false), (false,
false)..."?

My Spark version is 1.0.0, and I use the CDH-5.1.0 distribution.

Thanks & Best Regards,
Gefei

Reply via email to