[ https://issues.apache.org/jira/browse/HIVE-24981?focusedWorklogId=581647&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-581647 ]
ASF GitHub Bot logged work on HIVE-24981: ----------------------------------------- Author: ASF GitHub Bot Created on: 13/Apr/21 09:07 Start Date: 13/Apr/21 09:07 Worklog Time Spent: 10m Work Description: pvary commented on a change in pull request #2168: URL: https://github.com/apache/hive/pull/2168#discussion_r612270073 ########## File path: ql/src/java/org/apache/hadoop/hive/ql/util/HiveStrictManagedMigrationControlConfig.java ########## @@ -0,0 +1,49 @@ +/* + * 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.hadoop.hive.ql.util; + +import java.util.List; +import java.util.Map; +import java.util.TreeMap; + +public class HiveStrictManagedMigrationControlConfig { + + private Map<String, List<String>> databaseIncludeLists = new TreeMap<String, List<String>>(); + + public Map<String, List<String>> getDatabaseIncludeLists() { + return databaseIncludeLists; + } + + public void setDatabaseIncludeLists(Map<String, List<String>> databaseIncludeLists) { + this.databaseIncludeLists = databaseIncludeLists; + } + + public void putAllFromConfig(HiveStrictManagedMigrationControlConfig other) { + for (String db : other.getDatabaseIncludeLists().keySet()) { + List<String> theseTables = this.databaseIncludeLists.get(db); + List<String> otherTables = other.getDatabaseIncludeLists().get(db); + if (theseTables == null) { + this.databaseIncludeLists.put(db, otherTables); Review comment: Nevemind -- 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 Issue Time Tracking ------------------- Worklog Id: (was: 581647) Time Spent: 40m (was: 0.5h) > Add control file option to HiveStrictManagedMigration for DB/table selection > ---------------------------------------------------------------------------- > > Key: HIVE-24981 > URL: https://issues.apache.org/jira/browse/HIVE-24981 > Project: Hive > Issue Type: Improvement > Reporter: Ádám Szita > Assignee: Ádám Szita > Priority: Major > Labels: pull-request-available > Time Spent: 40m > Remaining Estimate: 0h > > Currently HiveStrictManagedMigration supports db regex and table regex > options that allow the user to specify what Hive entities it should deal > with. In cases where we have thousands of tables across thousands of DBs > iterating through everything takes a lot of time, while specifying a set of > tables/DBs with regexes is cumbersome. > We should make it available for users to prepare control files with the lists > of required items to migrate and feed this to the tool. A directory path > pointing to these control files would be taken as a new option for HSMM. -- This message was sent by Atlassian Jira (v8.3.4#803005)