JoinerConfig extends PluginConfig { public JoinerConfig() { this.joinKeys = ""; this.selectedFields = ""; this.requiredInputs = null; } JoinerConfig(); @VisibleForTesting  JoinerConfig(String joinKeys, String selectedFields, String requiredInputs); @Nullable Integer getNumPartitions(); @Nullable Schema getOutputSchema(FailureCollector collector); @Nullable Integer getDistributionFactor(); @Nullable String getDistributionStageName(); boolean isDistributionValid(FailureCollector collector); boolean distributionContainsMacro(); static final String SELECTED_FIELDS; static final String REQUIRED_INPUTS; static final String JOIN_KEYS; static final String OUTPUT_SCHEMA; static final String DISTRIBUTION_FACTOR; static final String DISTRIBUTION_STAGE; static final String MEMORY_INPUTS; }
@Test public void testJoinerConfig() { JoinerConfig config = new JoinerConfig("film.film_id=filmActor.film_id=filmCategory.film_id&" + "film.film_name=filmActor.film_name=filmCategory.film_name", SELECTED_FIELDS, "film,filmActor,filmCategory"); Joiner joiner = new Joiner(config); FailureCollector collector = new MockFailureCollector(); AutoJoinerContext autoJoinerContext = new MockAutoJoinerContext(INPUT_STAGES, collector); JoinDefinition joinDefinition = joiner.define(autoJoinerContext); Assert.assertEquals(OUTPUT_SCHEMA, joinDefinition.getOutputSchema()); Assert.assertEquals(0, collector.getValidationFailures().size()); }