Title
Create new category
Edit page index title
Edit category
Edit link
Configuring ODP with GCS
To configure access to your GCS buckets from your cluster, start by adding the GCS connector jar. Ensure to include the gcs-connector-hadoop3-3.1.17-shaded.jar, as it not only contains the classes and resources for the GCS Connector for Hadoop but also includes its dependencies.
Once you have downloaded the jar mentioned above to your Hadoop cluster, you can go ahead with the following configuration steps to include the gcs-connector jar into the classpath for the relevant files.
Configuration Steps for Respective Classpaths
Hadoop-env.sh
Hive-env.sh
Mapreduce.application.classpath
Core-Site.xml
Configure Access using Core-Site.xml
Core-Site.xml
Configure Access using Hadoop Credential JCEKS
After successfully crafting the JCEKS file, you can validate its functionality by attempting to access your GCS buckets, as shown in the code below.
To make the above changes work, you must start the required components on your cluster.
Access to Google Cloud Storage via ADC
Validate connectivity between ODP 3.3.6.x and Google Cloud Storage, and confirm whether the bundled Google GCS connector supports Application Default Credentials.
Scope
Validated
ODP 3.3.6.x connectivity to GCS
Hadoop filesystem access using
gs://GCS connector availability and filesystem implementation
ADC authentication using
GOOGLE_APPLICATION_CREDENTIALSConfiguration using:
google.cloud.auth.type=APPLICATION_DEFAULT
Not Validated
Workload Identity Federation
fs.gs.auth.type=APPLICATION_DEFAULTfs.gs.auth.type=ACCESS_TOKEN_PROVIDERSpark BigQuery Connector
Hive BigQuery Storage Handler
BigQuery read/write operations
Environment
Component | Details |
|---|---|
ODP Version | 3.3.6.x |
Hadoop Version | ODP Hadoop Client |
GCS Connector |
|
Cloud Provider | Google Cloud Platform |
Storage | Google Cloud Storage Bucket |
Authentication Tested | Application Default Credentials |
Authentication Not Tested | Workload Identity Federation |
Connector Discovery
The GCS connector was found under the Spark client jars:
Example Output:
Because the connector was not available in the Hadoop runtime classpath by default, it was manually copied into the Hadoop client library path:
GCP Setup
The following GCP resources were created:
GCS test bucket
GCP service account
Service account JSON credential file
Required IAM permissions on the bucket
The credential file was placed on the ODP host:
Network Validation
Connectivity from ODP to GCS was verified:
Output:
This confirms:
DNS resolution is successful
HTTPS connectivity is available
No firewall restrictions are blocking access to GCS endpoints
Hadoop Configuration
core-site.xml
In Ambari UI, go to HDFS → Configs → Custom core-site.xml.
In Custom core-site.xml, add the following properties:
hadoop-env.sh
Configure the following variable:
Configure Workload Identity Federation
Use Google Workload Identity Federation (WIF) to authenticate ODP with Google Cloud Storage (GCS) without using long-lived service account keys.
Before You Begin
Ensure that you have:
A configured Google Cloud Workload Identity Pool and Provider.
A WIF credential configuration file.
Access to the GCS bucket that you want ODP to access.
Download the GCS Connector
Download the latest supported GCS connector:
Replace the GCS Connector
Copy the connector JAR to every node that accesses Google Cloud Storage, such as:
Edge nodes
Hadoop client nodes
Spark gateway or driver nodes
HiveServer2 nodes
For example:
If you are replacing an existing connector, use the same connector version on all applicable nodes.
Verify the Hadoop Configuration
Verify that the following properties are configured in the core-site.xml file.
No additional Workload Identity Federation-specific Hadoop properties are required.
Configure the Hadoop Classpath
Configure the Hadoop classpath to use the updated connector.
Configure Spark Jobs
If Spark jobs access Google Cloud Storage, complete one of the following actions:
Install the connector JAR on every Spark node.
Pass the connector JAR when submitting the Spark job.
For example:
Configure Workload Identity Federation Credentials
Set the GOOGLE_APPLICATION_CREDENTIALS environment variable to point to the Workload Identity Federation credential configuration file.
Validate the Configuration
Run the following command to verify that ODP can access the GCS bucket using Workload Identity Federation.
If the configuration is successful, the command lists the contents of the specified bucket.
If the command fails, verify that the connector version is 3.1.17 or later, the WIF credential configuration file is valid, and the Hadoop classpath references the updated connector JAR.
Validation Steps
Verify GCS Connector Classes
Command:
Output:
Result:
The connector contains the required Hadoop filesystem implementation class.
Validate Hadoop Filesystem Access to GCS
Command:
Output:
Result: Hadoop successfully listed objects from the GCS bucket.
Findings
The validation confirms that:
ODP 3.3.6.x can successfully connect to Google Cloud Storage.
The bundled GCS connector supports:
google.cloud.auth.type=APPLICATION_DEFAULT
Application Default Credentials are successfully consumed using:
GOOGLE_APPLICATION_CREDENTIALS=/etc/gcp/odp-gcs-sa.json
Hadoop filesystem access to GCS using
gs://is functional.
Additional Connector Inspection
The connector JAR was inspected and contains classes related to:
Access token providers
External account credentials
STS token exchange
Identity pool subject token suppliers
Examples:
These components are commonly associated with:
Application Default Credentials
Workload Identity Federation
External account authentication
Token exchange authentication
Limitations
Workload Identity Federation was not tested end-to-end. The presence of WIF-related authentication classes indicates potential support, but this should not be treated as validated until tested using a GCP-generated WIF credential configuration file.
Example not tested:
Conclusion
The lab validation successfully confirmed that ODP 3.3.6.x can access Google Cloud Storage using Application Default Credentials (ADC) with:
and
While Workload Identity Federation (WIF) was not tested end-to-end, inspection of the bundled GCS connector indicates the presence of Google authentication libraries commonly used for WIF and external account authentication flows.
A future validation can be performed using a GCP-generated WIF credential configuration file (wif-config.json) to confirm end-to-end WIF support.