def subtract_by_key(other, num_partitions=nil)
      create_combiner = 'lambda{|item| [[item]]}'
      merge_value     = 'lambda{|combiner, item| combiner.first << item; combiner}'
      merge_combiners = 'lambda{|combiner_1, combiner_2| combiner_1 += combiner_2; combiner_1}'

      self.union(other)
          .combine_by_key(create_combiner, merge_value, merge_combiners, num_partitions)
          .filter('lambda{|(key,values)| values.size == 1}')
          .flat_map_values('lambda{|item| item.first}')
    end
def subtract_by_key(other, num_partitions=nil)
      create_combiner = 'lambda{|item| [[item]]}'
      merge_value     = 'lambda{|combiner, item| combiner.first << item; combiner}'
      merge_combiners = 'lambda{|combiner_1, combiner_2| combiner_1 += combiner_2; combiner_1}'

      self.union(other)
          .combine_by_key(create_combiner, merge_value, merge_combiners, num_partitions)
          .filter('lambda{|(key,values)| values.size == 1}')
          .flat_map_values('lambda{|item| item.first}')
    end
Return each (key, value) pair in self RDD that has no pair with matching
 key in other RDD.

 == Example:
   rdd1 = $sc.parallelize([["a", 1], ["a", 2], ["b", 3], ["c", 4]])
   rdd2 = $sc.parallelize([["b", 5], ["c", 6]])
   rdd1.subtract_by_key(rdd2).collect
   # => [["a", 1], ["a", 2]]