@Test public void testEnableSampling() { SamplerConfiguration sha1SamplerConfig = new SamplerConfiguration("com.mysampler"); sha1SamplerConfig.setOptions(options); NewTableConfiguration ntcSample2 = new NewTableConfiguration().enableSampling(sha1SamplerConfig); assertEquals("com.mysampler", ntcSample2.getProperties().get("table.sampler")); assertEquals("5", ntcSample2.getProperties().get("table.sampler.opt.modulus")); assertEquals("murmur3_32", ntcSample2.getProperties().get("table.sampler.opt.hasher")); }
public NewTableConfiguration enableSampling(SamplerConfiguration samplerConfiguration) { requireNonNull(samplerConfiguration); Map<String,String> tmp = new SamplerConfigurationImpl(samplerConfiguration).toTablePropertiesMap(); checkDisjoint(properties, tmp, "sampler"); this.samplerProps = tmp; return this; }
NewTableConfiguration { public NewTableConfiguration enableSampling(SamplerConfiguration samplerConfiguration) { requireNonNull(samplerConfiguration); Map<String,String> tmp = new SamplerConfigurationImpl(samplerConfiguration).toTablePropertiesMap(); checkDisjoint(properties, tmp, "sampler"); this.samplerProps = tmp; return this; } }
NewTableConfiguration { public NewTableConfiguration enableSampling(SamplerConfiguration samplerConfiguration) { requireNonNull(samplerConfiguration); Map<String,String> tmp = new SamplerConfigurationImpl(samplerConfiguration).toTablePropertiesMap(); checkDisjoint(properties, tmp, "sampler"); this.samplerProps = tmp; return this; }  }
NewTableConfiguration { public NewTableConfiguration enableSampling(SamplerConfiguration samplerConfiguration) { requireNonNull(samplerConfiguration); Map<String,String> tmp = new SamplerConfigurationImpl(samplerConfiguration).toTablePropertiesMap(); checkDisjoint(properties, tmp, "sampler"); this.samplerProps = tmp; return this; }  NewTableConfiguration setTimeType(TimeType tt); TimeType getTimeType(); NewTableConfiguration withoutDefaultIterators(); NewTableConfiguration createOffline(); InitialTableState getInitialTableState(); NewTableConfiguration setProperties(Map<String,String> props); Map<String,String> getProperties(); Collection<Text> getSplits(); NewTableConfiguration enableSampling(SamplerConfiguration samplerConfiguration); NewTableConfiguration enableSummarization(SummarizerConfiguration... configs); NewTableConfiguration setLocalityGroups(Map<String,Set<Text>> groups); NewTableConfiguration withSplits(final SortedSet<Text> splits); NewTableConfiguration attachIterator(IteratorSetting setting); NewTableConfiguration attachIterator(IteratorSetting setting,
      EnumSet<IteratorScope> scopes); }
NewTableConfiguration { public NewTableConfiguration enableSampling(SamplerConfiguration samplerConfiguration) { requireNonNull(samplerConfiguration); Map<String,String> tmp = new SamplerConfigurationImpl(samplerConfiguration).toTablePropertiesMap(); checkDisjoint(properties, tmp, "sampler"); this.samplerProps = tmp; return this; }  NewTableConfiguration setTimeType(TimeType tt); TimeType getTimeType(); NewTableConfiguration withoutDefaultIterators(); NewTableConfiguration createOffline(); InitialTableState getInitialTableState(); NewTableConfiguration setProperties(Map<String,String> props); Map<String,String> getProperties(); Collection<Text> getSplits(); NewTableConfiguration enableSampling(SamplerConfiguration samplerConfiguration); NewTableConfiguration enableSummarization(SummarizerConfiguration... configs); NewTableConfiguration setLocalityGroups(Map<String,Set<Text>> groups); NewTableConfiguration withSplits(final SortedSet<Text> splits); NewTableConfiguration attachIterator(IteratorSetting setting); NewTableConfiguration attachIterator(IteratorSetting setting,
      EnumSet<IteratorScope> scopes);  }