@Test public void testFilterOptions() throws Exception { IdentityHashSet<ConfigOption> optionSet = getOptionsViaReflection(); Set<String> keySet = SpillableOptions.filter(new Configuration()).toMap().keySet(); assertEquals(optionSet.size(), keySet.size()); for (ConfigOption option : optionSet) { assertTrue(keySet.contains(option.key())); } }
public static Configuration filter(ReadableConfig readableConfig) { Configuration conf = new Configuration(); conf.set(SPACE_TYPE, readableConfig.get(SPACE_TYPE)); conf.set(CHUNK_SIZE, readableConfig.get(CHUNK_SIZE)); conf.set(MAX_MMAP_FILES, readableConfig.get(MAX_MMAP_FILES)); conf.set(HEAP_STATUS_CHECK_INTERVAL, readableConfig.get(HEAP_STATUS_CHECK_INTERVAL)); conf.set(GC_TIME_THRESHOLD, readableConfig.get(GC_TIME_THRESHOLD)); conf.set(SPILL_SIZE_RATIO, readableConfig.get(SPILL_SIZE_RATIO)); conf.set(LOAD_START_RATIO, readableConfig.get(LOAD_START_RATIO)); conf.set(LOAD_END_RATIO, readableConfig.get(LOAD_END_RATIO)); conf.set(TRIGGER_INTERVAL, readableConfig.get(TRIGGER_INTERVAL)); conf.set(RESOURCE_CHECK_INTERVAL, readableConfig.get(RESOURCE_CHECK_INTERVAL)); conf.set(CANCEL_CHECKPOINT, readableConfig.get(CANCEL_CHECKPOINT)); return conf; }
SpillableOptions { public static Configuration filter(ReadableConfig readableConfig) { Configuration conf = new Configuration(); conf.set(SPACE_TYPE, readableConfig.get(SPACE_TYPE)); conf.set(CHUNK_SIZE, readableConfig.get(CHUNK_SIZE)); conf.set(MAX_MMAP_FILES, readableConfig.get(MAX_MMAP_FILES)); conf.set(HEAP_STATUS_CHECK_INTERVAL, readableConfig.get(HEAP_STATUS_CHECK_INTERVAL)); conf.set(GC_TIME_THRESHOLD, readableConfig.get(GC_TIME_THRESHOLD)); conf.set(SPILL_SIZE_RATIO, readableConfig.get(SPILL_SIZE_RATIO)); conf.set(LOAD_START_RATIO, readableConfig.get(LOAD_START_RATIO)); conf.set(LOAD_END_RATIO, readableConfig.get(LOAD_END_RATIO)); conf.set(TRIGGER_INTERVAL, readableConfig.get(TRIGGER_INTERVAL)); conf.set(RESOURCE_CHECK_INTERVAL, readableConfig.get(RESOURCE_CHECK_INTERVAL)); conf.set(CANCEL_CHECKPOINT, readableConfig.get(CANCEL_CHECKPOINT)); return conf; } }
SpillableOptions { public static Configuration filter(ReadableConfig readableConfig) { Configuration conf = new Configuration(); conf.set(SPACE_TYPE, readableConfig.get(SPACE_TYPE)); conf.set(CHUNK_SIZE, readableConfig.get(CHUNK_SIZE)); conf.set(MAX_MMAP_FILES, readableConfig.get(MAX_MMAP_FILES)); conf.set(HEAP_STATUS_CHECK_INTERVAL, readableConfig.get(HEAP_STATUS_CHECK_INTERVAL)); conf.set(GC_TIME_THRESHOLD, readableConfig.get(GC_TIME_THRESHOLD)); conf.set(SPILL_SIZE_RATIO, readableConfig.get(SPILL_SIZE_RATIO)); conf.set(LOAD_START_RATIO, readableConfig.get(LOAD_START_RATIO)); conf.set(LOAD_END_RATIO, readableConfig.get(LOAD_END_RATIO)); conf.set(TRIGGER_INTERVAL, readableConfig.get(TRIGGER_INTERVAL)); conf.set(RESOURCE_CHECK_INTERVAL, readableConfig.get(RESOURCE_CHECK_INTERVAL)); conf.set(CANCEL_CHECKPOINT, readableConfig.get(CANCEL_CHECKPOINT)); return conf; }  }
SpillableOptions { public static Configuration filter(ReadableConfig readableConfig) { Configuration conf = new Configuration(); conf.set(SPACE_TYPE, readableConfig.get(SPACE_TYPE)); conf.set(CHUNK_SIZE, readableConfig.get(CHUNK_SIZE)); conf.set(MAX_MMAP_FILES, readableConfig.get(MAX_MMAP_FILES)); conf.set(HEAP_STATUS_CHECK_INTERVAL, readableConfig.get(HEAP_STATUS_CHECK_INTERVAL)); conf.set(GC_TIME_THRESHOLD, readableConfig.get(GC_TIME_THRESHOLD)); conf.set(SPILL_SIZE_RATIO, readableConfig.get(SPILL_SIZE_RATIO)); conf.set(LOAD_START_RATIO, readableConfig.get(LOAD_START_RATIO)); conf.set(LOAD_END_RATIO, readableConfig.get(LOAD_END_RATIO)); conf.set(TRIGGER_INTERVAL, readableConfig.get(TRIGGER_INTERVAL)); conf.set(RESOURCE_CHECK_INTERVAL, readableConfig.get(RESOURCE_CHECK_INTERVAL)); conf.set(CANCEL_CHECKPOINT, readableConfig.get(CANCEL_CHECKPOINT)); return conf; }  static Configuration filter(ReadableConfig readableConfig); }
SpillableOptions { public static Configuration filter(ReadableConfig readableConfig) { Configuration conf = new Configuration(); conf.set(SPACE_TYPE, readableConfig.get(SPACE_TYPE)); conf.set(CHUNK_SIZE, readableConfig.get(CHUNK_SIZE)); conf.set(MAX_MMAP_FILES, readableConfig.get(MAX_MMAP_FILES)); conf.set(HEAP_STATUS_CHECK_INTERVAL, readableConfig.get(HEAP_STATUS_CHECK_INTERVAL)); conf.set(GC_TIME_THRESHOLD, readableConfig.get(GC_TIME_THRESHOLD)); conf.set(SPILL_SIZE_RATIO, readableConfig.get(SPILL_SIZE_RATIO)); conf.set(LOAD_START_RATIO, readableConfig.get(LOAD_START_RATIO)); conf.set(LOAD_END_RATIO, readableConfig.get(LOAD_END_RATIO)); conf.set(TRIGGER_INTERVAL, readableConfig.get(TRIGGER_INTERVAL)); conf.set(RESOURCE_CHECK_INTERVAL, readableConfig.get(RESOURCE_CHECK_INTERVAL)); conf.set(CANCEL_CHECKPOINT, readableConfig.get(CANCEL_CHECKPOINT)); return conf; }  static Configuration filter(ReadableConfig readableConfig); static final ConfigOption<String> SPACE_TYPE; static final ConfigOption<MemorySize> CHUNK_SIZE; static final ConfigOption<Integer> MAX_MMAP_FILES; static final ConfigOption<Duration> HEAP_STATUS_CHECK_INTERVAL; static final ConfigOption<Duration> GC_TIME_THRESHOLD; static final ConfigOption<Float> SPILL_SIZE_RATIO; static final ConfigOption<Float> LOAD_START_RATIO; static final ConfigOption<Float> LOAD_END_RATIO; static final ConfigOption<Duration> TRIGGER_INTERVAL; static final ConfigOption<Duration> RESOURCE_CHECK_INTERVAL; static final ConfigOption<Boolean> CANCEL_CHECKPOINT; static final ConfigOption[] SUPPORTED_CONFIG; }