zabetak commented on a change in pull request #1347:
URL: https://github.com/apache/hive/pull/1347#discussion_r525194182



##########
File path: 
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/dbinstall/rules/PostgresTPCDS.java
##########
@@ -0,0 +1,50 @@
+/*
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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.hadoop.hive.metastore.dbinstall.rules;
+
+/**
+ * JUnit TestRule for Postgres metastore with TPCDS schema and stat 
information.
+ */
+public class PostgresTPCDS extends Postgres {
+  @Override
+  public String getDockerImageName() {
+    return "zabetak/postgres-tpcds-metastore:1.1";
+  }
+
+  @Override
+  public String getJdbcUrl() {
+    return "jdbc:postgresql://localhost:5432/metastore";
+  }
+
+  @Override
+  public String getHiveUser() {
+    return "hive";
+  }
+
+  @Override
+  public String getHivePassword() {
+    return "hive";
+  }
+
+  @Override
+  public void install() {
+    // Do not do anything since the postgres container contains a fully 
initialized

Review comment:
       I agree that is not the most convenient thing but doable; this is 
actually what I did to put TPCDS tables under the `default` Hive database. 
   
   DockerHub is configured to automatically build master and tags in 
https://github.com/zabetak/hive-postgres-metastore so it would be sufficient to 
commit the change there and change image name in the rule. In most cases I 
think that it will be sufficient to update the following file: 
https://github.com/zabetak/hive-postgres-metastore/blob/master/upgrades/3.1.3000-to-4.0.0.sql
   
   Apart from that, we could also explore other options like bringing in the 
Hive code base the upgrade script that I mentioned above and that way we don't 
need to rebuild the image for every change in the metastore. On a second though 
this might be the best option, WDYT?




----------------------------------------------------------------
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.

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

Reply via email to