Class GcsUtil
- java.lang.Object
-
- com.amazonaws.athena.connectors.gcs.GcsUtil
-
public class GcsUtil extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Objectcoerce(org.apache.arrow.vector.FieldVector vector, Object value)static StringcreateUri(String path)Builds a GCS uristatic StringcreateUri(String bucketName, String path)Builds a GCS uristatic software.amazon.awssdk.services.glue.model.TablegetGlueTable(TableName tableName, software.amazon.awssdk.services.glue.GlueClient awsGlue)Get AWS Glue table objectstatic voidinstallCaCertificate()Write out the cacerts that we trust from the default java truststore.static voidinstallGoogleCredentialsJsonFile(Map<String,String> configOptions)Install/place Google cloud platform credentials from AWS secret manager to temp location This is required for dataset apistatic voidsetupNativeEnvironmentVariables()
-
-
-
Method Detail
-
installCaCertificate
public static void installCaCertificate() throws IOException, NoSuchAlgorithmException, KeyStoreException, CertificateEncodingExceptionWrite out the cacerts that we trust from the default java truststore. Code adapted from: https://stackoverflow.com/a/63678794
-
installGoogleCredentialsJsonFile
public static void installGoogleCredentialsJsonFile(Map<String,String> configOptions) throws IOException
Install/place Google cloud platform credentials from AWS secret manager to temp location This is required for dataset api- Throws:
IOException
-
createUri
public static String createUri(String bucketName, String path)
Builds a GCS uri- Parameters:
bucketName- bucket namepath- folder path- Returns:
- String representation uri
-
createUri
public static String createUri(String path)
Builds a GCS uri- Parameters:
path- bucket path- Returns:
- String representation uri
-
getGlueTable
public static software.amazon.awssdk.services.glue.model.Table getGlueTable(TableName tableName, software.amazon.awssdk.services.glue.GlueClient awsGlue)
Get AWS Glue table object- Parameters:
tableName- table infoawsGlue- AWS Glue client- Returns:
- Table object
-
setupNativeEnvironmentVariables
public static void setupNativeEnvironmentVariables()
-
-