[ https://issues.apache.org/jira/browse/HIVE-25667?focusedWorklogId=706461&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-706461 ]
ASF GitHub Bot logged work on HIVE-25667: ----------------------------------------- Author: ASF GitHub Bot Created on: 10/Jan/22 20:57 Start Date: 10/Jan/22 20:57 Worklog Time Spent: 10m Work Description: mbathori-cloudera commented on a change in pull request #2919: URL: https://github.com/apache/hive/pull/2919#discussion_r781541161 ########## File path: standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/dbinstall/rules/Mariadb.java ########## @@ -18,19 +18,31 @@ package org.apache.hadoop.hive.metastore.dbinstall.rules; +import org.apache.hadoop.hive.metastore.dbinstall.AbstractDatabase; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; -public class Mariadb extends DatabaseRule { +public class Mariadb extends AbstractDatabase { @Override public String getDockerImageName() { return "mariadb:10.2"; } @Override - public String[] getDockerAdditionalArgs() { - return buildArray("-p", "3306:3306", "-e", "MYSQL_ROOT_PASSWORD=" + getDbRootPassword(), "-d"); + public String getDockerDatabaseArg() { + return "MARIADB_DATABASE=" + getDb(); + } + + @Override + public List<String> getDockerBaseArgs() { + return new ArrayList(Arrays.asList("-p", "3309:3306", Review comment: I was wrapping this because further database argumentum can be added in the AbstractDatabase class, so the list can’t be immutable. -- 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 Issue Time Tracking ------------------- Worklog Id: (was: 706461) Time Spent: 50m (was: 40m) > Unify code managing JDBC databases in tests > ------------------------------------------- > > Key: HIVE-25667 > URL: https://issues.apache.org/jira/browse/HIVE-25667 > Project: Hive > Issue Type: Task > Components: Testing Infrastructure > Affects Versions: 4.0.0 > Reporter: Stamatis Zampetakis > Assignee: Mark Bathori > Priority: Major > Labels: pull-request-available > Time Spent: 50m > Remaining Estimate: 0h > > Currently there are two class hierarchies managing JDBC databases in tests, > [DatabaseRule|https://github.com/apache/hive/blob/d35de014dd49fdcfe0aacb68e6c587beff6d1dea/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/dbinstall/rules/DatabaseRule.java] > and > [AbstractExternalDB|https://github.com/apache/hive/blob/d35de014dd49fdcfe0aacb68e6c587beff6d1dea/itests/util/src/main/java/org/apache/hadoop/hive/ql/externalDB/AbstractExternalDB.java]. > There are many similarities between these hierarchies and certain parts are > duplicated. > The goal of this JIRA is to refactor the aforementioned hierarchies to reduce > code duplication and improve extensibility. -- This message was sent by Atlassian Jira (v8.20.1#820001)