public class ConfigUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
FILE_SEPARATOR |
static String |
RESOURCES_SUBDIR |
static String |
STORM_HOME |
Constructor and Description |
---|
ConfigUtils() |
public static final String FILE_SEPARATOR
public static final String STORM_HOME
public static final String RESOURCES_SUBDIR
public static ConfigUtils setInstance(ConfigUtils u)
Provide an instance of this class for delegates to use. To mock out delegated methods, provide an instance of a subclass that overrides the implementation of the delegated method.
u
- a ConfigUtils instancepublic static Collection<String> readDirContents(String dir)
Returns a Collection of file names found under the given directory.
dir
- a directorypublic static Collection<File> readDirFiles(String dir)
Returns a Collection of files found under the given directory.
dir
- a directorypublic static String workerArtifactsRoot(Map<String,Object> conf, String id, Integer port)
public static String getLogDir()
public static BooleanSupplier mkStatsSampler(Map<String,Object> conf)
public static BooleanSupplier evenSampler(int samplingFreq)
public static StormTopology readSupervisorTopology(Map<String,Object> conf, String stormId, AdvancedFSOps ops) throws IOException
IOException
public static String supervisorStormDistRoot(Map<String,Object> conf) throws IOException
IOException
public static String supervisorStormDistRoot(Map<String,Object> conf, String stormId) throws IOException
IOException
public static StormTopology readSupervisorStormCodeGivenPath(String stormCodePath, AdvancedFSOps ops) throws IOException
IOException
public static String workerArtifactsPidPath(Map<String,Object> conf, String id, Integer port)
public static Map<String,Object> readSupervisorStormConf(Map<String,Object> conf, String stormId) throws IOException
IOException
public static Map<String,Object> readSupervisorStormConfGivenPath(Map<String,Object> conf, String topoConfPath) throws IOException
IOException
public static Map<String,Object> overrideLoginConfigWithSystemProperty(Map<String,Object> conf)
public static LocalState workerState(Map<String,Object> conf, String id) throws IOException
IOException
public static String supervisorLocalDir(Map<String,Object> conf) throws IOException
IOException
public static File getWorkerDirFromRoot(String logRoot, String id, Integer port)
public static List<String> getValueAsList(String name, Map<String,Object> conf)
Get the given config value as a List <String>, if possible.
name
- conf
- IllegalArgumentException
- if conf is nullNullPointerException
- if name is null and the conf map doesn’t support null keyspublic StormTopology readSupervisorTopologyImpl(Map<String,Object> conf, String stormId, AdvancedFSOps ops) throws IOException
IOException
public String supervisorStormDistRootImpl(Map<String,Object> conf, String stormId) throws IOException
IOException
public String supervisorStormDistRootImpl(Map<String,Object> conf) throws IOException
IOException
public Map<String,Object> readSupervisorStormConfImpl(Map<String,Object> conf, String stormId) throws IOException
IOException
public String supervisorLocalDirImpl(Map<String,Object> conf) throws IOException
IOException
Copyright © 2022 The Apache Software Foundation. All rights reserved.