[jira] [Work logged] (HIVE-24981) Add control file option to HiveStrictManagedMigration for DB/table selection

2021-04-13 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-24981?focusedWorklogId=581689=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-581689
 ]

ASF GitHub Bot logged work on HIVE-24981:
-

Author: ASF GitHub Bot
Created on: 13/Apr/21 10:51
Start Date: 13/Apr/21 10:51
Worklog Time Spent: 10m 
  Work Description: szlta merged pull request #2168:
URL: https://github.com/apache/hive/pull/2168


   


-- 
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: 581689)
Time Spent: 1h  (was: 50m)

> 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: 1h
>  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)


[jira] [Work logged] (HIVE-24981) Add control file option to HiveStrictManagedMigration for DB/table selection

2021-04-13 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-24981?focusedWorklogId=581687=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-581687
 ]

ASF GitHub Bot logged work on HIVE-24981:
-

Author: ASF GitHub Bot
Created on: 13/Apr/21 10:49
Start Date: 13/Apr/21 10:49
Worklog Time Spent: 10m 
  Work Description: szlta commented on a change in pull request #2168:
URL: https://github.com/apache/hive/pull/2168#discussion_r612337484



##
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> databaseIncludeLists = new TreeMap>();
+
+  public Map> getDatabaseIncludeLists() {
+return databaseIncludeLists;
+  }
+
+  public void setDatabaseIncludeLists(Map> 
databaseIncludeLists) {
+this.databaseIncludeLists = databaseIncludeLists;
+  }
+
+  public void putAllFromConfig(HiveStrictManagedMigrationControlConfig other) {
+for (String db : other.getDatabaseIncludeLists().keySet()) {
+  List theseTables = this.databaseIncludeLists.get(db);
+  List otherTables = other.getDatabaseIncludeLists().get(db);
+  if (theseTables == null) {
+this.databaseIncludeLists.put(db, otherTables);

Review comment:
   I want to merge the lists if they're present. To do this, checking their 
existence is something I need to do anyway, so putIfAbsent cannot make my code 
more compact here unfortunately.




-- 
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: 581687)
Time Spent: 50m  (was: 40m)

> 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: 50m
>  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)


[jira] [Work logged] (HIVE-24981) Add control file option to HiveStrictManagedMigration for DB/table selection

2021-04-13 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-24981?focusedWorklogId=581647=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> databaseIncludeLists = new TreeMap>();
+
+  public Map> getDatabaseIncludeLists() {
+return databaseIncludeLists;
+  }
+
+  public void setDatabaseIncludeLists(Map> 
databaseIncludeLists) {
+this.databaseIncludeLists = databaseIncludeLists;
+  }
+
+  public void putAllFromConfig(HiveStrictManagedMigrationControlConfig other) {
+for (String db : other.getDatabaseIncludeLists().keySet()) {
+  List theseTables = this.databaseIncludeLists.get(db);
+  List 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)


[jira] [Work logged] (HIVE-24981) Add control file option to HiveStrictManagedMigration for DB/table selection

2021-04-13 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-24981?focusedWorklogId=581641=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-581641
 ]

ASF GitHub Bot logged work on HIVE-24981:
-

Author: ASF GitHub Bot
Created on: 13/Apr/21 09:06
Start Date: 13/Apr/21 09:06
Worklog Time Spent: 10m 
  Work Description: pvary commented on a change in pull request #2168:
URL: https://github.com/apache/hive/pull/2168#discussion_r612268649



##
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> databaseIncludeLists = new TreeMap>();
+
+  public Map> getDatabaseIncludeLists() {
+return databaseIncludeLists;
+  }
+
+  public void setDatabaseIncludeLists(Map> 
databaseIncludeLists) {
+this.databaseIncludeLists = databaseIncludeLists;
+  }
+
+  public void putAllFromConfig(HiveStrictManagedMigrationControlConfig other) {
+for (String db : other.getDatabaseIncludeLists().keySet()) {
+  List theseTables = this.databaseIncludeLists.get(db);
+  List otherTables = other.getDatabaseIncludeLists().get(db);
+  if (theseTables == null) {
+this.databaseIncludeLists.put(db, otherTables);

Review comment:
   Maybe: putIfAbsent?




-- 
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: 581641)
Time Spent: 0.5h  (was: 20m)

> 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: 0.5h
>  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)


[jira] [Work logged] (HIVE-24981) Add control file option to HiveStrictManagedMigration for DB/table selection

2021-04-13 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-24981?focusedWorklogId=581640=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-581640
 ]

ASF GitHub Bot logged work on HIVE-24981:
-

Author: ASF GitHub Bot
Created on: 13/Apr/21 09:02
Start Date: 13/Apr/21 09:02
Worklog Time Spent: 10m 
  Work Description: pvary commented on a change in pull request #2168:
URL: https://github.com/apache/hive/pull/2168#discussion_r612266398



##
File path: ql/src/test/resources/hsmm/hsmm_cfg_01.yaml
##
@@ -0,0 +1,9 @@
+databaseIncludeLists:

Review comment:
   It took me some time to understand that `databaseIncludeLists` controls 
the tables too.
   Maybe `migrationLists`? or something like this?




-- 
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: 581640)
Time Spent: 20m  (was: 10m)

> 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: 20m
>  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)


[jira] [Work logged] (HIVE-24981) Add control file option to HiveStrictManagedMigration for DB/table selection

2021-04-12 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-24981?focusedWorklogId=580854=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-580854
 ]

ASF GitHub Bot logged work on HIVE-24981:
-

Author: ASF GitHub Bot
Created on: 12/Apr/21 09:52
Start Date: 12/Apr/21 09:52
Worklog Time Spent: 10m 
  Work Description: szlta opened a new pull request #2168:
URL: https://github.com/apache/hive/pull/2168


   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 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: 580854)
Remaining Estimate: 0h
Time Spent: 10m

> 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
>  Time Spent: 10m
>  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)