Skip to content

Commit 3d21fc4

Browse files
authored
HIVE-29579: Add K8s Operator (apache#6452)
1 parent 9e316c3 commit 3d21fc4

64 files changed

Lines changed: 6266 additions & 1 deletion

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packaging/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
<hive.path.to.root>..</hive.path.to.root>
2828
<hive.jdbc.driver.jar>apache-hive-${project.version}-jdbc.jar</hive.jdbc.driver.jar>
2929
</properties>
30+
<modules>
31+
<module>src/kubernetes</module>
32+
</modules>
3033
<profiles>
3134
<profile>
3235
<id>dist</id>
@@ -272,6 +275,10 @@
272275
</plugins>
273276
</build>
274277
</profile>
278+
<profile>
279+
<id>kubernetes</id>
280+
<!-- Builds the operator Docker image; the module itself is compiled unconditionally -->
281+
</profile>
275282
</profiles>
276283
<dependencies>
277284
<!-- dependencies are always listed in sorted order by groupId, artifactId -->

packaging/src/docker/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ function run_tezam {
153153
exit 1
154154
fi
155155
# service_plugins_descriptor.json references org.apache.hadoop.hive.llap.tezplugins.* (hive-llap-tez, etc.)
156-
tezam_cp="${HADOOP_CONF_DIR}:${TEZ_CONF_DIR}:${TEZ_SNAPSHOT_HOME}/*:${TEZ_HOME}/*:${TEZ_HOME}/lib/*:${HIVE_HOME}/lib/*:${HADOOP_HOME}/share/hadoop/common/*:${HADOOP_HOME}/share/hadoop/common/lib/*:${HADOOP_HOME}/share/hadoop/yarn/*:${HADOOP_HOME}/share/hadoop/yarn/lib/*:${HADOOP_HOME}/share/hadoop/hdfs/*:${HADOOP_HOME}/share/hadoop/hdfs/lib/*:${HADOOP_HOME}/share/hadoop/mapreduce/*:${HADOOP_HOME}/share/hadoop/mapreduce/lib/*:${HADOOP_CLASSPATH:-}"
156+
tezam_cp="${HADOOP_CONF_DIR}:${TEZ_CONF_DIR}:${TEZ_SNAPSHOT_HOME}/*:${TEZ_HOME}/*:${TEZ_HOME}/lib/*:${HIVE_HOME}/lib/*:$("${HADOOP_HOME}/bin/hadoop" classpath)"
157157

158158
local java_bin
159159
local tezam_java_opts

packaging/src/docker/start-hive.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ for arg in "$@"; do
4444
export S3_ENDPOINT_URL="http://s3.ozone:9878"
4545
export AWS_ACCESS_KEY_ID="ozone"
4646
export AWS_SECRET_ACCESS_KEY="secret"
47+
export HADOOP_OPTIONAL_TOOLS="hadoop-aws"
4748
;;
4849
*)
4950
echo "Unknown option: $arg"
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to you under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
FROM eclipse-temurin:21-jre-ubi9-minimal
17+
18+
ARG OPERATOR_JAR=target/hive-kubernetes-operator-*-shaded.jar
19+
20+
WORKDIR /opt/hive-operator
21+
22+
COPY ${OPERATOR_JAR} operator.jar
23+
24+
USER 1000:1000
25+
26+
ENTRYPOINT ["java", "-jar", "operator.jar"]

0 commit comments

Comments
 (0)