Skip to content

Commit

Permalink
remove redundant check
Browse files Browse the repository at this point in the history
  • Loading branch information
xushiyan committed Nov 4, 2022
1 parent f99516e commit d9aae32
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,10 @@ public class HoodieMemoryConfig extends HoodieConfig {
.defaultValue(16 * 1024 * 1024)
.withDocumentation("Property to control the max memory in bytes for dfs input stream buffer size");

public static final String MEMORY_SPILLABLE_MAP_BASE_PATH = "hoodie.memory.spillable.map.path";
public static final ConfigProperty<String> SPILLABLE_MAP_BASE_PATH = ConfigProperty
.key(MEMORY_SPILLABLE_MAP_BASE_PATH)
.key("hoodie.memory.spillable.map.path")
.defaultValue("/tmp/")
.withInferFunction(cfg -> {
// if user doesn't configure it, infer the path from env var
// if nothing to infer from, return Option.empty() then it will fallback to the default /tmp/
if (cfg.contains(MEMORY_SPILLABLE_MAP_BASE_PATH)) {
return Option.of(cfg.getString(MEMORY_SPILLABLE_MAP_BASE_PATH));
}
String[] localDirs = FileIOUtils.getConfiguredLocalDirs();
return (localDirs != null && localDirs.length > 0) ? Option.of(localDirs[0]) : Option.empty();
})
Expand Down

0 comments on commit d9aae32

Please sign in to comment.