2
我想实现一个Reshuffle
变换,以防止excessive fusion,但我不知道如何改变版本<KV<String,String>>
处理简单PCollections。 (描述here如何洗牌PCollection <KV<String,String>>
。)如何重新洗牌PCollection <T>?
我怎么会加入我的管道更多的步骤之前展开正式的Avro I/O example code重新洗牌?
PipelineOptions options = PipelineOptionsFactory.create();
Pipeline p = Pipeline.create(options);
Schema schema = new Schema.Parser().parse(new File("schema.avsc"));
PCollection<GenericRecord> records =
p.apply(AvroIO.Read.named("ReadFromAvro")
.from("gs://my_bucket/path/records-*.avro")
.withSchema(schema));
你能详细说一下'AddArbitaryKey'吗?为什么“AddArbitraryKey”的必要性和特殊实现是重要的,即它是否会影响密钥空间在工作人员中分布的方式? – harveyxia
应该引起再分配一样了'Redistribution'变换一种武断的方式(参见:https://github.com/apache/incubator-beam/pull/1036)。随机选择的整数键应导致随机分布。 – Tobi
谢谢,你的'Redistribution'的用例是什么? – harveyxia