Skip to content

Commit f51f6f7

Browse files
committed
Fix #32
1 parent 565048c commit f51f6f7

File tree

9 files changed

+38
-34
lines changed

9 files changed

+38
-34
lines changed

charts/hive-metastore/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ sources:
1313
- https://github.com/apache/hive
1414
- https://github.com/gradiant/charts
1515
- https://github.com/big-data-europe/docker-hive
16-
version: 0.1.1
16+
version: 0.1.2

charts/hive-metastore/templates/configmap.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ data:
3636
<value>thrift://{{ include "hiveMetastore.fullname" . }}:9083</value>
3737
</property>
3838
{{- end }}
39+
{{- if not (index .Values.conf "hiveSite" "hive.metastore.warehouse.dir") }}
40+
<property>
41+
<name>hive.metastore.warehouse.dir</name>
42+
<value>hdfs://{{ .Release.Name }}-hdfs:8020/user/hive/warehouse</value>
43+
</property>
44+
{{- end }}
3945
{{- if index .Values.conf "hiveSite" }}
4046
{{- range $key, $value := index .Values.conf "hiveSite" }}
4147
<property><name>{{ $key }}</name><value>{{ $value }}</value></property>

charts/hive-metastore/values.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@ image:
1515
resources: {}
1616
conf:
1717
hiveSite:
18-
hive_metastore_uris: thrift://hive-metastore:9083
18+
hive_metastore_uris: thrift://hive-metastore:9083
19+
# if not set, default hive.metastore.warehouse.dir is default to: "hdfs://{{.Release.Name}}-hdfs:8020/user/hive/warehouse"
20+
#hive.metastore.warehouse.dir:

charts/hive/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ sources:
1313
- https://github.com/apache/hive
1414
- https://github.com/gradiant/charts
1515
- https://github.com/big-data-europe/docker-hive
16-
version: 0.1.3
16+
version: 0.1.4

charts/hive/requirements.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
dependencies:
22
- name: hive-metastore
33
alias: metastore
4-
version: ~0.1.0
4+
version: ~0.1.2
55
repository: file://../hive-metastore
66
condition: metastore.enabled
77
- name: hdfs

charts/hive/resources/config/hive-site.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0"?>
22
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
3+
34
<configuration>
45
{{- if not (index .Values.conf "hiveSite" "hive.metastore.uris") }}
56
<property>

charts/hive/resources/startup.sh

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,44 @@
11
#!/bin/bash
22

3-
: ${HADOOP_PREFIX:=/usr/local/hadoop}
3+
#: ${HADOOP_PREFIX:=/usr/local/hadoop}
44

5-
. $HADOOP_PREFIX/etc/hadoop/hadoop-env.sh
5+
#. $HADOOP_PREFIX/etc/hadoop/hadoop-env.sh
66

77
# Directory to find config artifacts
8-
CONFIG_DIR="/tmp/hadoop-config"
8+
#CONFIG_DIR="/tmp/hadoop-config"
99

1010
set -x
1111

1212
# Copy config files from volume mount
13-
for f in slaves core-site.xml hdfs-site.xml mapred-site.xml yarn-site.xml; do
14-
if [[ -e ${CONFIG_DIR}/$f ]]; then
15-
cp ${CONFIG_DIR}/$f $HADOOP_HOME/etc/hadoop/$f
16-
else
17-
echo "ERROR: Could not find $f in $CONFIG_DIR"
18-
exit 1
19-
fi
20-
done
13+
#for f in slaves core-site.xml hdfs-site.xml mapred-site.xml yarn-site.xml; do
14+
# if [[ -e ${CONFIG_DIR}/$f ]]; then
15+
# cp ${CONFIG_DIR}/$f $HADOOP_HOME/etc/hadoop/$f
16+
# else
17+
# echo "ERROR: Could not find $f in $CONFIG_DIR"
18+
# exit 1
19+
# fi
2120

2221
# Note. This script set hive paths in hdfs with user hive and ensures hiveServer is runAsUser hive
2322

2423
HADOOP_USER_NAME={{ .Values.conf.hdfsAdminUser }} hdfs dfs -mkdir /tmp
2524
HADOOP_USER_NAME={{ .Values.conf.hdfsAdminUser }} hdfs dfs -mkdir -p /user/hive/warehouse
2625
HADOOP_USER_NAME={{ .Values.conf.hdfsAdminUser }} hdfs dfs -chmod g+w /tmp
2726
HADOOP_USER_NAME={{ .Values.conf.hdfsAdminUser }} hdfs dfs -chmod g+w /user/hive/warehouse
28-
HADOOP_USER_NAME={{ .Values.conf.hdfsAdminUser }} hdfs dfs -chown hive:hive /tmp
2927
HADOOP_USER_NAME={{ .Values.conf.hdfsAdminUser }} hdfs dfs -chown hive:hive /user/hive/warehouse
3028

3129

32-
if id -u hive ; then
33-
echo "hive user exists";
34-
else
35-
echo "Creating hive user";
36-
groupadd -g 500 -r hive && \
37-
useradd --comment "Hive user" -u 500 --shell /bin/bash -M -r -g hive hive
38-
fi
30+
#if id -u hive ; then
31+
# echo "hive user exists";
32+
#else
33+
# echo "Creating hive user";
34+
# groupadd -g 500 -r hive && \
35+
# useradd --comment "Hive user" -u 500 --shell /bin/bash -M -r -g hive hive
36+
#fi
3937

40-
if [[ whoami != hive ]]
41-
then
42-
echo "Switching to hive user";
43-
su hive -c "cd $HIVE_HOME/bin; ./hiveserver2 --hiveconf hive.server2.enable.doAs=false"
44-
else
38+
#if [[ whoami != hive ]]
39+
#then
40+
# echo "Switching to hive user";
41+
# su hive -c "cd $HIVE_HOME/bin; ./hiveserver2 --hiveconf hive.server2.enable.doAs=false"
42+
#else
4543
cd $HIVE_HOME/bin; ./hiveserver2 --hiveconf hive.server2.enable.doAs=false
46-
fi
44+
#fi

charts/hive/templates/hive-statefulset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ spec:
4646
- name: hive-config
4747
mountPath: /opt/hive/conf
4848
- name: hadoop-config
49-
mountPath: /tmp/hadoop-config
49+
mountPath: /opt/hadoop/etc/hadoop
5050
volumes:
5151
- name: hadoop-config
5252
configMap:

charts/hive/values.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44

55
image:
6-
repository: bde2020/hive
6+
repository: gradiant/hive
77
tag: 2.3.2-postgresql-metastore
88
pullPolicy: IfNotPresent
99

@@ -31,6 +31,3 @@ conf:
3131
# fs.defaultFS: hdfs://hdfs-cluster:8020
3232
# hdfsSite:
3333
# ...
34-
35-
36-

0 commit comments

Comments
 (0)