dengzhhu653 commented on code in PR #5992: URL: https://github.com/apache/hive/pull/5992#discussion_r2230537744
########## itests/test-jdbc/src/test/java/org/apache/hive/jdbc/ItHiveServer2.java: ########## @@ -0,0 +1,270 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hive.jdbc; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.sql.Connection; +import java.sql.DriverManager; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Properties; +import java.util.concurrent.TimeUnit; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.minikdc.MiniKdc; +import org.apache.hadoop.security.UserGroupInformation; +import org.testcontainers.containers.BindMode; +import org.testcontainers.containers.GenericContainer; +import org.testcontainers.containers.wait.strategy.AbstractWaitStrategy; +import org.testcontainers.utility.DockerImageName; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +public class ItHiveServer2 extends ItAbstractContainer { + protected File workDir; + private final MiniJdbcKdc miniKdc; + protected GenericContainer<?> container; + protected final String imageName = "apache/hive:4.0.1"; Review Comment: Starting the HS2 locally means we have to add the classes needed to the classpath, then we have no way to tell whether a class is needed for the standalone jdbc or not, the Docker provides a way to isolate the HS2 from the standalone jdbc. Detecting the compatibility issue, then fixing it early, is also a purpose of this PR. I think we need to avoid in the compatibility issue in the future releases, especially for the jdbc, we cannot always make sure the upgrade of client will keep pace with the HS2. For the CI, last run of the same PR took about 2.5h, the image size is 1.6gb, which is near to the size of Oracle(1.9gb) in https://github.com/apache/hive/blob/master/itests/util/src/main/java/org/apache/hadoop/hive/ql/externalDB/Oracle.java. I think it's ok from the pipeline history regarding the timeout or failure on installing the Oracle db. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org