Skip to content

Conversation

@cnauroth
Copy link
Contributor

Description of PR

Generate hadoop-gcp shell profile.

How was this patch tested?

Build the distro:

mvn -Pdist -Dtar clean package -DskipTests

Untar the distro and verify the presence of a new shell profile:

> cat libexec/shellprofile.d/hadoop-gcp.sh
#!/usr/bin/env bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
#
# IMPORTANT: This file is automatically generated by hadoop-dist at
#            -Pdist time.
#
#
if hadoop_verify_entry HADOOP_TOOLS_OPTIONS "hadoop-gcp"; then
  hadoop_add_profile "hadoop-gcp"
fi

function _hadoop-gcp_hadoop_classpath
{
  hadoop_add_classpath "${HADOOP_TOOLS_HOME}/${HADOOP_TOOLS_LIB_JARS_DIR}/hadoop-gcp-3.5.0-SNAPSHOT.jar"
}

By default, hadoop-gcp is not on the classpath:

> bin/hadoop fs -ls gs://cnauroth-hive-metastore-proxy-dist
-ls: Fatal internal error
java.lang.RuntimeException: java.lang.ClassNotFoundException: Class org.apache.hadoop.fs.gs.GoogleHadoopFileSystem not found
	at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2724)
	at org.apache.hadoop.fs.FileSystem.getFileSystemClass(FileSystem.java:3569)
	at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:3612)
	at org.apache.hadoop.fs.FileSystem.access$300(FileSystem.java:172)
	at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:3716)
	at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:3667)
	at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:557)
	at org.apache.hadoop.fs.Path.getFileSystem(Path.java:373)
	at org.apache.hadoop.fs.shell.PathData.expandAsGlob(PathData.java:347)
	at org.apache.hadoop.fs.shell.Command.expandArgument(Command.java:265)
	at org.apache.hadoop.fs.shell.Command.expandArguments(Command.java:248)
	at org.apache.hadoop.fs.shell.FsCommand.processRawArguments(FsCommand.java:105)
	at org.apache.hadoop.fs.shell.Command.run(Command.java:192)
	at org.apache.hadoop.fs.FsShell.run(FsShell.java:327)
	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:82)
	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:97)
	at org.apache.hadoop.fs.FsShell.main(FsShell.java:390)
Caused by: java.lang.ClassNotFoundException: Class org.apache.hadoop.fs.gs.GoogleHadoopFileSystem not found
	at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:2628)
	at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2722)
	... 16 more

Add this line to etc/hadoop/hadoop-env.sh:

export HADOOP_OPTIONAL_TOOLS=hadoop-gcp

Now it's on the classpath:

bin/hadoop fs -ls gs://cnauroth-bucket

Found 80 items
...

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

@cnauroth
Copy link
Contributor Author

@ayushtkn or @mukund-thakur , could I please get your review? Thank you.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 14m 27s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 xmllint 0m 0s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ HADOOP-19343 Compile Tests _
+1 💚 mvninstall 49m 20s HADOOP-19343 passed
+1 💚 compile 0m 30s HADOOP-19343 passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 compile 0m 29s HADOOP-19343 passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 mvnsite 0m 33s HADOOP-19343 passed
+1 💚 javadoc 0m 35s HADOOP-19343 passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 30s HADOOP-19343 passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 shadedclient 86m 55s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 11m 10s the patch passed
+1 💚 compile 0m 21s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javac 0m 20s the patch passed
+1 💚 compile 0m 19s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 javac 0m 19s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 mvnsite 0m 22s the patch passed
+1 💚 javadoc 0m 21s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 19s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 shadedclient 36m 18s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 28s hadoop-gcp in the patch passed.
+1 💚 asflicense 0m 39s The patch does not generate ASF License warnings.
152m 26s
Subsystem Report/Notes
Docker ClientAPI=1.51 ServerAPI=1.51 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7921/1/artifact/out/Dockerfile
GITHUB PR #7921
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint
uname Linux 15d63c428ef0 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision HADOOP-19343 / 48e1043
Default Java Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7921/1/testReport/
Max. process+thread count 556 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-gcp U: hadoop-tools/hadoop-gcp
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7921/1/console
versions git=2.25.1 maven=3.6.3
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

Copy link
Member

@ayushtkn ayushtkn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

cnauroth added a commit that referenced this pull request Sep 2, 2025
@cnauroth
Copy link
Contributor Author

cnauroth commented Sep 2, 2025

@ayushtkn , thank you for the review. I committed this to the feature branch.

@cnauroth cnauroth closed this Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants