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 Object
coerce(org.apache.arrow.vector.FieldVector vector, Object value)
static String
createUri(String path)
Builds a GCS uristatic String
createUri(String bucketName, String path)
Builds a GCS uristatic software.amazon.awssdk.services.glue.model.Table
getGlueTable(TableName tableName, software.amazon.awssdk.services.glue.GlueClient awsGlue)
Get AWS Glue table objectstatic void
installCaCertificate()
Write out the cacerts that we trust from the default java truststore.static void
installGoogleCredentialsJsonFile(Map<String,String> configOptions)
Install/place Google cloud platform credentials from AWS secret manager to temp location This is required for dataset apistatic void
setupNativeEnvironmentVariables()
-
-
-
Method Detail
-
installCaCertificate
public static void installCaCertificate() throws IOException, NoSuchAlgorithmException, KeyStoreException, CertificateEncodingException
Write 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()
-
-