Package com.c12e.cortex.profiles.storage
Class RemoteStorageEnvLocator
- java.lang.Object
-
- com.c12e.cortex.profiles.storage.RemoteStorageEnvLocator
-
- All Implemented Interfaces:
PhoenixRemoteStorage
,java.util.function.Supplier<com.c12e.cortex.phoenix.ObjectStorageConfig>
public class RemoteStorageEnvLocator extends java.lang.Object implements PhoenixRemoteStorage
Provide remote storage configuration for Cortex. Options are taken from Spark config properties with environment variables applied as overrides if set. Refer to the static fields ofPhoenixRemoteStorage
.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Logger
logger
-
Fields inherited from interface com.c12e.cortex.profiles.storage.PhoenixRemoteStorage
AMP_BUCKET, AMP_BUCKET_JSON_PATH, AMP_BUCKET_PROP, ASSUME_AWS_IAM, ASSUME_AWS_IAM_JSON_PATH, ASSUME_AWS_IAM_PROP, AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY_ID_JSON_PATH, AWS_ACCESS_KEY_ID_PROP, AWS_REGION, AWS_REGION_JSON_PATH, AWS_REGION_PROP, AWS_SECRET_KEY, AWS_SECRET_KEY_JSON_PATH, AWS_SECRET_KEY_PROP, CONTENT_BUCKET, CONTENT_BUCKET_JSON_PATH, CONTENT_BUCKET_PROP, FILE_BASE_DIR, FILE_BASE_DIR_PROP, GCS_AUTH_TYPE, GCS_AUTH_TYPE_JSON_PATH, GCS_AUTH_TYPE_PROP, GCS_SERVICE_ACCOUNT_KEY, GCS_SERVICE_ACCOUNT_KEY_JSON_PATH, GCS_SERVICE_ACCOUNT_KEY_PROP, GCS_SERVICE_PATH, GCS_SERVICE_PATH_JSON_PATH, GCS_SERVICE_PATH_PROP, GCS_STORAGE_ROOT, GCS_STORAGE_ROOT_JSON_PATH, GCS_STORAGE_ROOT_PROP, PROFILES_BUCKET, PROFILES_BUCKET_JSON_PATH, PROFILES_BUCKET_PROP, S3_ENDPOINT, S3_ENDPOINT_JSON_PATH, S3_ENDPOINT_PROP, S3_PATH_STYLE_ACCESS, S3_PATH_STYLE_ACCESS_JSON_PATH, S3_PATH_STYLE_ACCESS_PROP, S3_SSL_ENABLED, S3_SSL_ENABLED_JSON_PATH, S3_SSL_ENABLED_PROP, STORAGE_TYPE, STORAGE_TYPE_JSON_PATH, STORAGE_TYPE_PROP
-
-
Constructor Summary
Constructors Constructor Description RemoteStorageEnvLocator(java.util.Map<java.lang.String,java.lang.String> sessionOptions, CortexRemoteStorageClient storageClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.c12e.cortex.phoenix.ObjectStorageConfig
get()
protected com.c12e.cortex.phoenix.spec.ConnectionType
getConnectionType()
protected <T> T
getOrDefault(java.util.function.Supplier<T> function, T defaultValue)
com.c12e.cortex.phoenix.Connection
getPhoenixAmpConnection()
com.c12e.cortex.phoenix.Connection
getPhoenixManagedContentConnection()
com.c12e.cortex.phoenix.Connection
getPhoenixProfileConnection(java.lang.String project)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.c12e.cortex.profiles.storage.PhoenixRemoteStorage
profileDeltaTablePath, sourceDeltaPath
-
-
-
-
Constructor Detail
-
RemoteStorageEnvLocator
@Inject public RemoteStorageEnvLocator(java.util.Map<java.lang.String,java.lang.String> sessionOptions, CortexRemoteStorageClient storageClient)
-
-
Method Detail
-
getOrDefault
protected <T> T getOrDefault(java.util.function.Supplier<T> function, T defaultValue)
-
getConnectionType
protected com.c12e.cortex.phoenix.spec.ConnectionType getConnectionType()
-
getPhoenixProfileConnection
public com.c12e.cortex.phoenix.Connection getPhoenixProfileConnection(java.lang.String project)
- Specified by:
getPhoenixProfileConnection
in interfacePhoenixRemoteStorage
-
getPhoenixManagedContentConnection
public com.c12e.cortex.phoenix.Connection getPhoenixManagedContentConnection()
- Specified by:
getPhoenixManagedContentConnection
in interfacePhoenixRemoteStorage
-
getPhoenixAmpConnection
public com.c12e.cortex.phoenix.Connection getPhoenixAmpConnection()
- Specified by:
getPhoenixAmpConnection
in interfacePhoenixRemoteStorage
-
get
public com.c12e.cortex.phoenix.ObjectStorageConfig get()
- Specified by:
get
in interfacejava.util.function.Supplier<com.c12e.cortex.phoenix.ObjectStorageConfig>
-
-