- Somehow I always got error trying to execute hadoop fs -ls gs://bucket-name/: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class com.google.cloud.hadoop.fs.gcs.GoogleHadoopFileSystem not found;
I found the solution is to add ~/.hadooprc with content: hadoop_add_classpath “/usr/local/hadoop/lib/gcs-connector-hadoop3-latest.jar” where the jar is the GCS connector. This does not require restarting any daemon.
2. It’s possible to download a JSON service account key but core-site.xml will need to use the following:
<property>
<name>google.cloud.auth.service.account.json.keyfile</name>
<value>/path/to/keyfile</value>
<description>
The JSON key file of the service account used for GCS
access when google.cloud.auth.service.account.enable is true.
</description>
</property>