Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions bin/hbase
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,14 @@ if [ "$HBASE_DISABLE_HADOOP_CLASSPATH_LOOKUP" != "true" ] ; then
HADOOP_IN_PATH=$(PATH="${HADOOP_HOME:-${HADOOP_PREFIX}}/bin:$PATH" which hadoop 2>/dev/null)
fi

#If Hadoop is not specified with HADOOP_HOME, check that the assembly includes Hadoop
if [[ -z "${HADOOP_IN_PATH}" && ! -e "lib/hadoop-common*" ]] ; then
Copy link
Member

Choose a reason for hiding this comment

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

@stoty I just noticed that I'm unable to start hbase in the local dev environment (after mvn install) because of this. How about adding this condition?

diff --git a/bin/hbase b/bin/hbase
index 8f58bf578a..5f1b845110 100755
--- a/bin/hbase
+++ b/bin/hbase
@@ -222,7 +222,7 @@ if [ "$HBASE_DISABLE_HADOOP_CLASSPATH_LOOKUP" != "true" ] ; then
 fi
 
 #If Hadoop is not specified with HADOOP_HOME, check that the assembly includes Hadoop
-if [[ -z "${HADOOP_IN_PATH}" && ! -e "lib/hadoop-common*" ]] ; then
+if [[ $in_dev_env = false && -z "${HADOOP_IN_PATH}" && ! -e "lib/hadoop-common*" ]] ; then
   echo Installation does not contain Hadoop, and HADOOP_HOME does not point to a Hadoop installation.
   echo Specify a compatible Hadoop installation via HADOOP_HOME, or use the HBase assembly variant
   echo that includes Hadoop.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, opened HBASE-29106

Copy link
Contributor

Choose a reason for hiding this comment

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

This also breaks the integration test in nightly...

Maybe we should review the condition here?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the problem here is that, we should not directly use 'lib/hadoop-common*', since we may execute the script in any directory...

Let's add the ${HBASE_HOME} prefix here... @stoty

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks.
Opened #6665 for the fix.

echo Installation does not contain Hadoop, and HADOOP_HOME does not point to a Hadoop installation.
echo Specify a compatible Hadoop installation via HADOOP_HOME, or use the HBase assembly variant
echo that includes Hadoop.
exit 1
fi

# Add libs to CLASSPATH
declare shaded_jar

Expand Down
Loading