Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TEST3] #5

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
2 changes: 1 addition & 1 deletion catalogs/catalog-hadoop/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ tasks.test {

doFirst {
environment("GRAVITINO_CI_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-hive:0.1.12")
environment("GRAVITINO_CI_KERBEROS_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-kerberos-hive:0.1.0")
environment("GRAVITINO_CI_KERBEROS_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-kerberos-hive:0.1.2")
}

val init = project.extra.get("initIntegrationTest") as (Test) -> Unit
Expand Down
2 changes: 1 addition & 1 deletion catalogs/catalog-hive/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ tasks.test {

doFirst {
environment("GRAVITINO_CI_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-hive:0.1.12")
environment("GRAVITINO_CI_KERBEROS_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-kerberos-hive:0.1.1")
environment("GRAVITINO_CI_KERBEROS_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-kerberos-hive:0.1.2")
}

val init = project.extra.get("initIntegrationTest") as (Test) -> Unit
Expand Down
31 changes: 30 additions & 1 deletion dev/docker/kerberos-hive/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
# start ssh
HOSTNAME=`hostname`
service ssh start
ssh-keyscan localhost > /root/.ssh/known_hosts
ssh-keyscan ${HOSTNAME} >> /root/.ssh/known_hosts
ssh-keyscan localhost >> /root/.ssh/known_hosts
ssh-keyscan 0.0.0.0 >> /root/.ssh/known_hosts
ssh-keyscan 127.0.0.1 >> /root/.ssh/known_hosts

# init the Kerberos database
echo -e "${PASS}\n${PASS}" | kdb5_util create -s
Expand Down Expand Up @@ -65,6 +67,33 @@ ${HADOOP_HOME}/sbin/hadoop-daemon.sh start namenode

echo "Starting DataNode..."
${HADOOP_HOME}/sbin/start-secure-dns.sh
sleep 5

# Check if the DataNode is running
ps -ef | grep DataNode | grep -v "color=auto"
if [[ $? -ne 0 ]]; then
echo "DataNode failed to start, please check the logs"
exit 1
fi

retry_times=0
ready=0
while [[ ${retry_times} -lt 10 ]]; do
hdfs_ready=$(hdfs dfsadmin -report | grep "Live datanodes" | awk '{print $3}')
if [[ ${hdfs_ready} == "(1):" ]]; then
echo "HDFS is ready, retry_times = ${retry_times}"
let "ready=0"
break
fi
retry_times=$((retry_times+1))
done

if [[ ${ready} -ne 0 ]]; then
echo "HDFS is not ready"
cat ${HADOOP_HOME}/bin/logs/hadoop-root-datanode-*.log
exit 1
fi


# start mysql and create databases/users for hive
chown -R mysql:mysql /var/lib/mysql
Expand Down
Loading