Package com.logicalclocks.hsfs.metadata
Class HopsworksExternalClient
java.lang.Object
com.logicalclocks.hsfs.metadata.HopsworksExternalClient
- All Implemented Interfaces:
HopsworksHttpClient
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Stringprotected org.apache.http.impl.conn.PoolingHttpClientConnectionManagerprotected org.apache.http.impl.client.CloseableHttpClientprotected org.apache.http.HttpHostprotected static final Stringprotected Stringprotected static final org.slf4j.Loggerprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected String -
Constructor Summary
ConstructorsConstructorDescriptionHopsworksExternalClient(org.apache.http.impl.client.CloseableHttpClient httpClient, org.apache.http.HttpHost httpHost) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.http.config.Registry<org.apache.http.conn.socket.ConnectionSocketFactory>createConnectionFactory(org.apache.http.HttpHost httpHost, boolean hostnameVerification, String trustStorePath) protected String<T> ThandleRequest(org.apache.http.HttpRequest request, org.apache.http.client.ResponseHandler<T> responseHandler) readApiKey(SecretStore secretStore, software.amazon.awssdk.regions.Region region, String apiKeyFilepath) Read API key.protected StringreadApiKeyParamStore(software.amazon.awssdk.regions.Region region, String secretKey) protected StringreadApiKeySecretManager(software.amazon.awssdk.regions.Region region, String secretKey) protected static StringreadCertKey(String materialPwd) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.logicalclocks.hsfs.metadata.HopsworksHttpClient
getCertKey, getKeyStorePath, getTrustStorePath, setCertKey, setKeyStorePath, setTrustStorePath
-
Field Details
-
LOGGER
protected static final org.slf4j.Logger LOGGER -
PARAM_NAME_SECRET_STORE
- See Also:
-
PARAM_NAME_PARAMETER_STORE
- See Also:
-
MATERIAL_PASSWD
- See Also:
-
T_CERTIFICATE
- See Also:
-
K_CERTIFICATE
- See Also:
-
connectionPool
protected org.apache.http.impl.conn.PoolingHttpClientConnectionManager connectionPool -
httpHost
protected org.apache.http.HttpHost httpHost -
httpClient
protected org.apache.http.impl.client.CloseableHttpClient httpClient -
apiKey
-
trustStorePath
-
keyStorePath
-
certKey
-
-
Constructor Details
-
HopsworksExternalClient
public HopsworksExternalClient(org.apache.http.impl.client.CloseableHttpClient httpClient, org.apache.http.HttpHost httpHost)
-
-
Method Details
-
createConnectionFactory
protected org.apache.http.config.Registry<org.apache.http.conn.socket.ConnectionSocketFactory> createConnectionFactory(org.apache.http.HttpHost httpHost, boolean hostnameVerification, String trustStorePath) throws IOException, KeyStoreException, CertificateException, NoSuchAlgorithmException, KeyManagementException -
readCertKey
-
readApiKey
public String readApiKey(SecretStore secretStore, software.amazon.awssdk.regions.Region region, String apiKeyFilepath) throws IOException, FeatureStoreException Read API key. We currently support 3 options: - AWS Parameter store - AWS Secrets manager - FIle on the local file system- Parameters:
secretStore- SecretStore PARAMETER_STORE or SECRET_MANAGERregion- AWS regionsapiKeyFilepath- path to API key file- Returns:
- String
- Throws:
IOException- IOExceptionFeatureStoreException- FeatureStoreException
-
readApiKeyParamStore
protected String readApiKeyParamStore(software.amazon.awssdk.regions.Region region, String secretKey) throws FeatureStoreException - Throws:
FeatureStoreException
-
readApiKeySecretManager
protected String readApiKeySecretManager(software.amazon.awssdk.regions.Region region, String secretKey) throws FeatureStoreException, IOException - Throws:
FeatureStoreExceptionIOException
-
getAssumedRole
- Throws:
FeatureStoreException
-
handleRequest
public <T> T handleRequest(org.apache.http.HttpRequest request, org.apache.http.client.ResponseHandler<T> responseHandler) throws IOException - Specified by:
handleRequestin interfaceHopsworksHttpClient- Throws:
IOException
-