Skip to content

Commit

Permalink
GEOMESA-3425 CLI - Fix older Hadoop versions jar downloads (#3247)
Browse files Browse the repository at this point in the history
  • Loading branch information
elahrvivaz authored Dec 16, 2024
1 parent f8b6dc7 commit b048860
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ function dependencies() {
"commons-configuration:commons-configuration:1.6:jar"
)
fi
if ! version_ge "${hadoop_version}" 3.4.0; then
gavs+=(
"commons-collections:commons-collections:3.2.2:jar"
)
fi

# compare the version of zookeeper to determine if we need zookeeper-jute (version >= 3.5.5)
JUTE_FROM_VERSION="3.5.5"
Expand Down
5 changes: 5 additions & 0 deletions geomesa-fs/geomesa-fs-tools/conf-filtered/dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ function dependencies() {
"com.google.guava:guava:11.0.2:jar"
)
fi
if ! version_ge "${hadoop_version}" 3.4.0; then
gavs+=(
"commons-collections:commons-collections:3.2.2:jar"
)
fi

# aws sdk
if version_ge "${hadoop_version}" 3.4.0; then
Expand Down
13 changes: 10 additions & 3 deletions geomesa-gt/geomesa-gt-tools/conf-filtered/dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,20 @@ function dependencies() {
)

# add hadoop 3+ jars if needed
local hadoop_maj_ver
hadoop_maj_ver="$([[ "$hadoop_version" =~ ([0-9][0-9]*)\. ]] && echo "${BASH_REMATCH[1]}")"
if [[ "$hadoop_maj_ver" -ge 3 ]]; then
if version_ge "${hadoop_version}" 3.0.0; then
gavs+=(
"org.apache.hadoop:hadoop-client-api:${hadoop_version}:jar"
"org.apache.hadoop:hadoop-client-runtime:${hadoop_version}:jar"
)
else
gavs+=(
"commons-configuration:commons-configuration:1.6:jar"
)
fi
if ! version_ge "${hadoop_version}" 3.4.0; then
gavs+=(
"commons-collections:commons-collections:3.2.2:jar"
)
fi

echo "${gavs[@]}" | tr ' ' '\n' | sort | tr '\n' ' '
Expand Down
13 changes: 10 additions & 3 deletions geomesa-hbase/geomesa-hbase-tools/conf-filtered/dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,20 @@ function dependencies() {
fi

# add hadoop 3+ jars if needed
local hadoop_maj_ver
hadoop_maj_ver="$([[ "$hadoop_version" =~ ([0-9][0-9]*)\. ]] && echo "${BASH_REMATCH[1]}")"
if [[ "$hadoop_maj_ver" -ge 3 ]]; then
if version_ge "${hadoop_version}" 3.0.0; then
gavs+=(
"org.apache.hadoop:hadoop-client-api:${hadoop_version}:jar"
"org.apache.hadoop:hadoop-client-runtime:${hadoop_version}:jar"
)
else
gavs+=(
"commons-configuration:commons-configuration:1.6:jar"
)
fi
if ! version_ge "${hadoop_version}" 3.4.0; then
gavs+=(
"commons-collections:commons-collections:3.2.2:jar"
)
fi

# compare the version of zookeeper to determine if we need zookeeper-jute (version >= 3.5.5)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ function dependencies() {
fi

# add hadoop 3+ jars if needed
local hadoop_maj_ver
hadoop_maj_ver="$([[ "$hadoop_version" =~ ([0-9][0-9]*)\. ]] && echo "${BASH_REMATCH[1]}")"
if [[ "$hadoop_maj_ver" -ge 3 ]]; then
if version_ge "${hadoop_version}" 3.0.0; then
gavs+=(
"org.apache.hadoop:hadoop-client-api:${hadoop_version}:jar"
"org.apache.hadoop:hadoop-client-runtime:${hadoop_version}:jar"
Expand All @@ -97,6 +95,11 @@ function dependencies() {
"commons-configuration:commons-configuration:1.6:jar"
)
fi
if ! version_ge "${hadoop_version}" 3.4.0; then
gavs+=(
"commons-collections:commons-collections:3.2.2:jar"
)
fi

# compare the version of zookeeper to determine if we need zookeeper-jute (version >= 3.5.5)
JUTE_FROM_VERSION="3.5.5"
Expand Down
5 changes: 5 additions & 0 deletions geomesa-tools/conf-filtered/parquet-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ function dependencies() {
"commons-configuration:commons-configuration:1.6:jar"
)
fi
if ! version_ge "${hadoop_version}" 3.4.0; then
gavs+=(
"commons-collections:commons-collections:3.2.2:jar"
)
fi

echo "${gavs[@]}" | tr ' ' '\n' | sort | tr '\n' ' '
}
Expand Down

0 comments on commit b048860

Please sign in to comment.