Код: Выделить всё
JavaPairRDD allCustomers = ... (customerID, 1)
JavaPairRDD excludedCustomers = ... (customerID, 1)
JavaPairRDD joinedCustomers = allCustomers.leftOuterJoin(excludedCustomers)
JavaPairRDD filteredCustomers = joinedCustomers.filter(t -> !t._2._2.isPresent())
Код: Выделить всё
java.lang.ClassCastException: com.google.common.base.Present cannot be cast to com.google.common.base.Optional
Код: Выделить всё
java.lang.ClassCastException: com.google.common.base.Absent cannot be cast to com.google.common.base.Optional
Код: Выделить всё
JavaPairRDD joinedCustomersBoolean = joinedCustomers.mapValues(t -> t._2.orNull() == null);
Подробнее здесь: https://stackoverflow.com/questions/363 ... -to-option
Мобильная версия