public class ArtifactoryConfigLoader extends Object implements IConfigLoader
A dynamic loader that can load scheduler configurations for user resource guarantees from Artifactory (an artifact repository manager). This is not thread-safe.
Modifier and Type | Field and Description |
---|---|
protected static String |
LOCAL_ARTIFACT_DIR |
Constructor and Description |
---|
ArtifactoryConfigLoader(Map<String,Object> conf) |
Modifier and Type | Method and Description |
---|---|
protected String |
doGet(String api,
String artifact,
String host,
Integer port)
Protected so we can override this in unit tests.
|
Map<String,Object> |
load(String configKey)
Load the configs associated with the configKey from the targetURI.
|
protected static final String LOCAL_ARTIFACT_DIR
public Map<String,Object> load(String configKey)
Load the configs associated with the configKey from the targetURI.
load
in interface IConfigLoader
configKey
- The key from which we want to get the scheduler config.protected String doGet(String api, String artifact, String host, Integer port)
Protected so we can override this in unit tests.
api
- null if we are trying to download artifact, otherwise a string to call REST api, e.g. “/api/storage”artifact
- location of artifacthost
- Artifactory hostnameport
- Artifactory portCopyright © 2022 The Apache Software Foundation. All rights reserved.