У меня есть два RDD: содержание и удаление
Оба являются RDD с несколькими словами за строкой.То, что я хочу, это отфильтровать все слова в содержании, которые появляются в удалении RDD.Я пытаюсь с этим:
filter = contents.filter(lambda line: line[0] not in remove.collect()).collect()
Но это дает мне это:
Exception: It appears that you are attempting to broadcast an RDD or reference an RDD from an action or transformation. RDD transformations and actions can only be invoked by the driver, not inside of other transformations; for example, rdd1.map(lambda x: rdd2.values.count() * x) is invalid because the values transformation and count action cannot be performed inside of the rdd1.map transformation. For more information, see SPARK-5063.
Не могу сделать это с помощью фильтра и оператора Not In?
Спасибо!