Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#5803] feat(docker-image): Change username in `hive` Dockerfile from datastrato to gravitino (#7040)

Eric Changa4b0d7a4d321
diff --git a/build.gradle.kts b/build.gradle.kts
index 7f6420b3c2..3676d95771 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -172,8 +172,8 @@ allprojects {
param.environment("PROJECT_VERSION", project.version)
// Gravitino CI Docker image
- param.environment("GRAVITINO_CI_HIVE_DOCKER_IMAGE", "apache/gravitino-ci:hive-0.1.19")
- param.environment("GRAVITINO_CI_KERBEROS_HIVE_DOCKER_IMAGE", "apache/gravitino-ci:kerberos-hive-0.1.5")
+ param.environment("GRAVITINO_CI_HIVE_DOCKER_IMAGE", "apache/gravitino-ci:hive-0.1.20")
+ param.environment("GRAVITINO_CI_KERBEROS_HIVE_DOCKER_IMAGE", "apache/gravitino-ci:kerberos-hive-0.1.6")
param.environment("GRAVITINO_CI_DORIS_DOCKER_IMAGE", "apache/gravitino-ci:doris-0.1.5")
param.environment("GRAVITINO_CI_TRINO_DOCKER_IMAGE", "apache/gravitino-ci:trino-0.1.6")
param.environment("GRAVITINO_CI_RANGER_DOCKER_IMAGE", "apache/gravitino-ci:ranger-0.1.2")
diff --git a/catalogs/catalog-hive/src/test/java/org/apache/gravitino/catalog/hive/integration/test/ProxyCatalogHiveIT.java b/catalogs/catalog-hive/src/test/java/org/apache/gravitino/catalog/hive/integration/test/ProxyCatalogHiveIT.java
index 36307f3ba4..a1194c6105 100644
--- a/catalogs/catalog-hive/src/test/java/org/apache/gravitino/catalog/hive/integration/test/ProxyCatalogHiveIT.java
+++ b/catalogs/catalog-hive/src/test/java/org/apache/gravitino/catalog/hive/integration/test/ProxyCatalogHiveIT.java
@@ -71,7 +71,7 @@ public class ProxyCatalogHiveIT extends BaseIT {
public static final String SCHEMA_PREFIX = "ProxyCatalogHiveIT_schema";
public static final String TABLE_PREFIX = "ProxyCatalogHiveIT_table";
private static final String PROVIDER = "hive";
- private static final String EXPECT_USER = "datastrato";
+ private static final String EXPECT_USER = "gravitino";
private static final String HADOOP_USER_NAME = "HADOOP_USER_NAME";
private static final ContainerSuite containerSuite = ContainerSuite.getInstance();
@@ -94,7 +94,7 @@ public class ProxyCatalogHiveIT extends BaseIT {
originHadoopUser = System.getenv(HADOOP_USER_NAME);
setEnv(HADOOP_USER_NAME, null);
- System.setProperty("user.name", "datastrato");
+ System.setProperty("user.name", "gravitino");
Map<String, String> configs = Maps.newHashMap();
configs.put(Configs.AUTHENTICATORS.getKey(), AuthenticatorType.SIMPLE.name().toLowerCase());
@@ -147,7 +147,7 @@ public class ProxyCatalogHiveIT extends BaseIT {
@Test
public void testOperateSchema() throws Exception {
- // create schema normally using user datastrato
+ // create schema normally using user gravitino
String schemaName = GravitinoITUtils.genRandomName(SCHEMA_PREFIX);
String anotherSchemaName = GravitinoITUtils.genRandomName(SCHEMA_PREFIX);
@@ -202,7 +202,7 @@ public class ProxyCatalogHiveIT extends BaseIT {
@Test
public void testOperateTable() throws Exception {
- // create table normally using user datastrato
+ // create table normally using user gravitino
Column[] columns = createColumns();
String schemaName = GravitinoITUtils.genRandomName(SCHEMA_PREFIX);
String tableName = GravitinoITUtils.genRandomName(TABLE_PREFIX);
@@ -308,7 +308,7 @@ public class ProxyCatalogHiveIT extends BaseIT {
Transforms.identity(columns[1].name()), Transforms.identity(columns[2].name())
});
- // add partition "col2=2023-01-02/col3=gravitino_it_test2" by user datastrato
+ // add partition "col2=2023-01-02/col3=gravitino_it_test2" by user gravitino
String[] field1 = new String[] {"col2"};
String[] field2 = new String[] {"col3"};
Literal<?> primaryPartition = Literals.dateLiteral(LocalDate.parse("2023-01-02"));
diff --git a/dev/docker/hive/Dockerfile b/dev/docker/hive/Dockerfile
index 4aa5aac817..671452a721 100644
--- a/dev/docker/hive/Dockerfile
+++ b/dev/docker/hive/Dockerfile
@@ -182,16 +182,16 @@ ADD packages/mysql-connector-java-${MYSQL_JDBC_DRIVER_VERSION}.tar.gz /opt/
# add users and groups
RUN groupadd hdfs && groupadd hadoop && groupadd hive && groupadd mapred
-RUN useradd -g hadoop datastrato && echo "datastrato:ds123" | chpasswd && adduser datastrato sudo
-RUN usermod -s /bin/bash datastrato
+RUN useradd -g hadoop gravitino && echo "gravitino:ds123" | chpasswd && adduser gravitino sudo
+RUN usermod -s /bin/bash gravitino
-RUN usermod -a -G hdfs datastrato
-RUN usermod -a -G hadoop datastrato
-RUN usermod -a -G hive datastrato
-RUN usermod -a -G mapred datastrato
+RUN usermod -a -G hdfs gravitino
+RUN usermod -a -G hadoop gravitino
+RUN usermod -a -G hive gravitino
+RUN usermod -a -G mapred gravitino
-RUN mkdir /home/datastrato
-RUN chown -R datastrato:hadoop /home/datastrato
+RUN mkdir /home/gravitino
+RUN chown -R gravitino:hadoop /home/gravitino
################################################################################
# removed install packages and cache
diff --git a/dev/docker/hive/hive-dependency.sh b/dev/docker/hive/hive-dependency.sh
index 52967c6118..f6c8aa8509 100755
--- a/dev/docker/hive/hive-dependency.sh
+++ b/dev/docker/hive/hive-dependency.sh
@@ -55,10 +55,8 @@ ZOOKEEPER_PACKAGE_NAME="zookeeper-${ZOOKEEPER_VERSION}.tar.gz"
ZOOKEEPER_DOWNLOAD_URL="https://archive.apache.org/dist/zookeeper/zookeeper-${ZOOKEEPER_VERSION}/${ZOOKEEPER_PACKAGE_NAME}"
RANGER_HIVE_PACKAGE_NAME="ranger-${RANGER_VERSION}-hive-plugin.tar.gz"
-RANGER_HIVE_DOWNLOAD_URL=https://github.com/datastrato/ranger/releases/download/v${RANGER_VERSION}/ranger-${RANGER_VERSION}-hive-plugin.tar.gz
RANGER_HDFS_PACKAGE_NAME="ranger-${RANGER_VERSION}-hdfs-plugin.tar.gz"
-RANGER_HDFS_DOWNLOAD_URL=https://github.com/datastrato/ranger/releases/download/v${RANGER_VERSION}/ranger-${RANGER_VERSION}-hdfs-plugin.tar.gz
# Prepare download packages
if [[ ! -d "${hive_dir}/packages" ]]; then
diff --git a/dev/docker/kerberos-hive/Dockerfile b/dev/docker/kerberos-hive/Dockerfile
index 2dbb3af58a..a556f7dba9 100644
--- a/dev/docker/kerberos-hive/Dockerfile
+++ b/dev/docker/kerberos-hive/Dockerfile
@@ -163,16 +163,16 @@ RUN tar -xz -C ${HIVE_HOME}/lib --strip-components 1 -f /tmp/packages/${JDBC_DIV
# add users and groups
RUN groupadd hdfs && groupadd hadoop && groupadd hive && groupadd mapred
-RUN useradd -g hadoop datastrato && echo "datastrato:ds123" | chpasswd && adduser datastrato sudo
-RUN usermod -s /bin/bash datastrato
+RUN useradd -g hadoop gravitino && echo "gravitino:ds123" | chpasswd && adduser gravitino sudo
+RUN usermod -s /bin/bash gravitino
-RUN usermod -a -G hdfs datastrato
-RUN usermod -a -G hadoop datastrato
-RUN usermod -a -G hive datastrato
-RUN usermod -a -G mapred datastrato
+RUN usermod -a -G hdfs gravitino
+RUN usermod -a -G hadoop gravitino
+RUN usermod -a -G hive gravitino
+RUN usermod -a -G mapred gravitino
-RUN mkdir /home/datastrato
-RUN chown -R datastrato:hadoop /home/datastrato
+RUN mkdir /home/gravitino
+RUN chown -R gravitino:hadoop /home/gravitino
################################################################################
# removed install packages
diff --git a/dev/docker/ranger/ranger-dependency.sh b/dev/docker/ranger/ranger-dependency.sh
index 164889f069..bd6204235b 100755
--- a/dev/docker/ranger/ranger-dependency.sh
+++ b/dev/docker/ranger/ranger-dependency.sh
@@ -24,11 +24,10 @@ ranger_dir="$(cd "${ranger_dir}">/dev/null; pwd)"
# Environment variables definition
RANGER_VERSION=2.4.0
RANGER_PACKAGE_NAME="ranger-${RANGER_VERSION}-admin.tar.gz" # Must export this variable for Dockerfile
-RANGER_DOWNLOAD_URL=https://github.com/datastrato/apache-ranger/releases/download/release-ranger-${RANGER_VERSION}/ranger-${RANGER_VERSION}-admin.tar.gz
MYSQL_CONNECTOR_VERSION=8.0.28
MYSQL_CONNECTOR_PACKAGE_NAME="mysql-connector-java-${MYSQL_CONNECTOR_VERSION}.jar"
-MYSQL_CONNECTOR_DOWNLOAD_URL=https://search.maven.org/remotecontent?filepath=mysql/mysql-connector-java/${MYSQL_CONNECTOR_VERSION}/mysql-connector-java-${MYSQL_CONNECTOR_VERSION}.jar
+MYSQL_CONNECTOR_DOWNLOAD_URL="https://search.maven.org/remotecontent?filepath=mysql/mysql-connector-java/${MYSQL_CONNECTOR_VERSION}/mysql-connector-java-${MYSQL_CONNECTOR_VERSION}.jar"
# Prepare download packages
if [[ ! -d "${ranger_dir}/packages" ]]; then
diff --git a/docs/docker-image-details.md b/docs/docker-image-details.md
index dbab9ee8c2..41dbf9e8dd 100644
--- a/docs/docker-image-details.md
+++ b/docs/docker-image-details.md
@@ -159,6 +159,10 @@ You can use this kind of image to test the catalog of Apache Hive with kerberos
Changelog
+- apache/gravitino-ci:kerberos-hive-0.1.6
+ - Change username from `datastrato` to `gravitino`.
+ For more information, see [PR](https://github.com/apache/gravitino/pull/7040)
+
- apache/gravitino-ci:kerberos-hive-0.1.5 (Switch to Apache official DockerHub repository)
- Use Gravitino release 0.6.0 Dockerfile to build the image.
@@ -193,9 +197,13 @@ You can use this kind of image to test the catalog of Apache Hive.
Changelog
+- apache/gravitino-ci:hive-0.1.20
+ - Change username from `datastrato` to `gravitino`.
+ For more information, see [PR](https://github.com/apache/gravitino/pull/7040)
+
- apache/gravitino-ci:hive-0.1.19
- Build ranger packages from source.
-
+
- apache/gravitino-ci:hive-0.1.18
- Support UTF-8 encoding for the `hive-site.xml` file and Hive Metastore.
For more information, please see [PR](https://github.com/apache/gravitino/pull/6625)