[jira] [Work logged] (HIVE-24526) Get grouped locations of external table data using metatool.

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


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

ASF GitHub Bot logged work on HIVE-24526:
-

Author: ASF GitHub Bot
Created on: 14/Mar/21 00:53
Start Date: 14/Mar/21 00:53
Worklog Time Spent: 10m 
  Work Description: github-actions[bot] closed pull request #1768:
URL: https://github.com/apache/hive/pull/1768


   



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

> Get grouped locations of external table data using metatool.
> 
>
> Key: HIVE-24526
> URL: https://issues.apache.org/jira/browse/HIVE-24526
> Project: Hive
>  Issue Type: Task
>Reporter: Arko Sharma
>Assignee: Arko Sharma
>Priority: Major
>  Labels: pull-request-available
> Attachments: HIVE-24526.01.patch, HIVE-24526.02.patch, 
> HIVE-24526.03.patch, HIVE-24526.04.patch, HIVE-24526.05.patch, 
> HIVE-24526.06.patch, HIVE-24526.07.patch
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> This task adds two new functionalities to metatool.
> The first option, -listExtTblLocs generates a json-file containing a set of 
> locations which cover all external-table data-locations for a database 
> specified by user.
> The second option, -diffExtTblLocs creates a diff from two jsons generated 
> using the first option.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (HIVE-24526) Get grouped locations of external table data using metatool.

2021-03-06 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-24526:
-

Author: ASF GitHub Bot
Created on: 07/Mar/21 00:52
Start Date: 07/Mar/21 00:52
Worklog Time Spent: 10m 
  Work Description: github-actions[bot] commented on pull request #1768:
URL: https://github.com/apache/hive/pull/1768#issuecomment-792135250


   This pull request has been automatically marked as stale because it has not 
had recent activity. It will be closed if no further activity occurs.
   Feel free to reach out on the d...@hive.apache.org list if the patch is in 
need of reviews.



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

> Get grouped locations of external table data using metatool.
> 
>
> Key: HIVE-24526
> URL: https://issues.apache.org/jira/browse/HIVE-24526
> Project: Hive
>  Issue Type: Task
>Reporter: Arko Sharma
>Assignee: Arko Sharma
>Priority: Major
>  Labels: pull-request-available
> Attachments: HIVE-24526.01.patch, HIVE-24526.02.patch, 
> HIVE-24526.03.patch, HIVE-24526.04.patch, HIVE-24526.05.patch, 
> HIVE-24526.06.patch, HIVE-24526.07.patch
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> This task adds two new functionalities to metatool.
> The first option, -listExtTblLocs generates a json-file containing a set of 
> locations which cover all external-table data-locations for a database 
> specified by user.
> The second option, -diffExtTblLocs creates a diff from two jsons generated 
> using the first option.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (HIVE-24526) Get grouped locations of external table data using metatool.

2021-01-03 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-24526:
-

Author: ASF GitHub Bot
Created on: 04/Jan/21 07:49
Start Date: 04/Jan/21 07:49
Worklog Time Spent: 10m 
  Work Description: pkumarsinha commented on a change in pull request #1768:
URL: https://github.com/apache/hive/pull/1768#discussion_r551156543



##
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/tools/metatool/MetaToolTaskDiffExtTblLocs.java
##
@@ -0,0 +1,165 @@
+/*
+ * 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.metastore.tools.metatool;
+
+import org.codehaus.jettison.json.JSONArray;
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+public class MetaToolTaskDiffExtTblLocs extends MetaToolTask {
+  private static final Logger LOG = 
LoggerFactory.getLogger(MetaToolTaskDiffExtTblLocs.class);
+  @Override
+  void execute() {
+String[] args = getCl().getDiffExtTblLocsParams();
+try {
+  File file1 = new File(args[0]);
+  File file2 = new File(args[1]);
+  String ouputDir = args[2];

Review comment:
   Validate for args count, print usage message on failure.

##
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/tools/metatool/MetaToolTaskDiffExtTblLocs.java
##
@@ -0,0 +1,165 @@
+/*
+ * 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.metastore.tools.metatool;
+
+import org.codehaus.jettison.json.JSONArray;
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+public class MetaToolTaskDiffExtTblLocs extends MetaToolTask {
+  private static final Logger LOG = 
LoggerFactory.getLogger(MetaToolTaskDiffExtTblLocs.class);
+  @Override
+  void execute() {
+String[] args = getCl().getDiffExtTblLocsParams();
+try {
+  File file1 = new File(args[0]);
+  File file2 = new File(args[1]);
+  String ouputDir = args[2];
+  String outFileName = "diff_" + System.currentTimeMillis();
+  System.out.println("Writing diff to " + outFileName);
+  if (!file1.exists()) {
+System.out.println("Input " + args[0] + " does not exist.");
+return;
+  }
+  if (!file2.exists()) {
+System.out.println("Inpu

[jira] [Work logged] (HIVE-24526) Get grouped locations of external table data using metatool.

2020-12-15 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-24526:
-

Author: ASF GitHub Bot
Created on: 16/Dec/20 07:54
Start Date: 16/Dec/20 07:54
Worklog Time Spent: 10m 
  Work Description: pkumarsinha commented on a change in pull request #1768:
URL: https://github.com/apache/hive/pull/1768#discussion_r544076223



##
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/tools/metatool/MetaToolTaskListExtTblLocs.java
##
@@ -0,0 +1,439 @@
+/*
+ * 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.metastore.tools.metatool;
+
+import com.google.common.annotations.VisibleForTesting;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hive.metastore.ObjectStore;
+import org.apache.hadoop.hive.metastore.TableType;
+import org.apache.hadoop.hive.metastore.Warehouse;
+import org.apache.hadoop.hive.metastore.api.Table;
+import org.apache.hadoop.hive.metastore.utils.MetaStoreUtils;
+import org.apache.thrift.TException;
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONArray;
+import org.codehaus.jettison.json.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.*;

Review comment:
   Remove wild card import.

##
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/tools/metatool/MetaToolTaskListExtTblLocs.java
##
@@ -0,0 +1,439 @@
+/*
+ * 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.metastore.tools.metatool;
+
+import com.google.common.annotations.VisibleForTesting;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hive.metastore.ObjectStore;
+import org.apache.hadoop.hive.metastore.TableType;
+import org.apache.hadoop.hive.metastore.Warehouse;
+import org.apache.hadoop.hive.metastore.api.Table;
+import org.apache.hadoop.hive.metastore.utils.MetaStoreUtils;
+import org.apache.thrift.TException;
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONArray;
+import org.codehaus.jettison.json.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.*;
+
+public class MetaToolTaskListExtTblLocs extends MetaToolTask {
+
+  private static final Logger LOG = 
LoggerFactory.getLogger(MetaToolTaskListExtTblLocs.class);
+  private final HashMap> coverageList = new 
HashMap<>();

Review comment:
   Replace reference type with Map.

##
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/tools/metatool/MetaToolTaskListExtTblLocs.java
##
@@ -0,0 +1,439 @@
+/*
+ * 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 th

[jira] [Work logged] (HIVE-24526) Get grouped locations of external table data using metatool.

2020-12-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-24526:
-

Author: ASF GitHub Bot
Created on: 11/Dec/20 17:46
Start Date: 11/Dec/20 17:46
Worklog Time Spent: 10m 
  Work Description: ArkoSharma opened a new pull request #1768:
URL: https://github.com/apache/hive/pull/1768


   



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

> Get grouped locations of external table data using metatool.
> 
>
> Key: HIVE-24526
> URL: https://issues.apache.org/jira/browse/HIVE-24526
> Project: Hive
>  Issue Type: Task
>Reporter: Arko Sharma
>Assignee: Arko Sharma
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Add a functionality to metatool to get a list of locations which cover all 
> external-table data-locations for a database specified by user.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)