DataNode: removing the dependency to the data_dir (#18483)

* removing the dependency to the data_dir

* removing the dependency to the data_dir

* adding native lib dir
This commit is contained in:
Jan Heise
2024-03-06 15:04:16 +01:00
committed by GitHub
parent c4afe7d146
commit d12a6dd478
5 changed files with 25 additions and 13 deletions

View File

@@ -55,7 +55,7 @@ import java.util.Optional;
import java.util.Set;
/**
* Helper class to hold configuration of Graylog
* Helper class to hold configuration of DataNode
*/
@SuppressWarnings("FieldMayBeFinal")
public class Configuration extends BaseConfiguration {
@@ -100,6 +100,9 @@ public class Configuration extends BaseConfiguration {
@Parameter(value = "config_location", validators = DirectoryReadableValidator.class)
private Path configLocation = null;
@Parameter(value = "native_lib_dir", required = true)
private Path nativeLibDir = Path.of("native_libs");
@Parameter(value = "process_logs_buffer_size")
private Integer opensearchProcessLogsBufferSize = 500;
@@ -245,7 +248,7 @@ public class Configuration extends BaseConfiguration {
@Parameter(value = "node_search_cache_size")
private String searchCacheSize = "10gb";
/**
* https://opensearch.org/docs/latest/tuning-your-cluster/availability-and-recovery/snapshots/snapshot-restore/#shared-file-system
*/
@@ -437,6 +440,10 @@ public class Configuration extends BaseConfiguration {
return metricsPolicy;
}
public Path getNativeLibDir() {
return nativeLibDir;
}
public static class NodeIdFileValidator implements Validator<String> {
@Override
public void validate(String name, String path) throws ValidationException {
@@ -663,7 +670,7 @@ public class Configuration extends BaseConfiguration {
public String getNodeSearchCacheSize() {
return searchCacheSize;
}
public List<String> getPathRepo() {
return pathRepo;
}