[
https://issues.apache.org/jira/browse/HIVE-24509?focusedWorklogId=532073&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-532073
]
ASF GitHub Bot logged work on HIVE-24509:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 06/Jan/21 19:01
Start Date: 06/Jan/21 19:01
Worklog Time Spent: 10m
Work Description: miklosgergely commented on a change in pull request
#1756:
URL: https://github.com/apache/hive/pull/1756#discussion_r552905387
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/lock/show/ShowDbLocksAnalyzer.java
##########
@@ -23,9 +23,6 @@
import org.apache.hadoop.hive.ql.ddl.DDLWork;
import org.apache.hadoop.hive.ql.exec.Task;
import org.apache.hadoop.hive.ql.exec.TaskFactory;
-import org.apache.hadoop.hive.ql.lockmgr.HiveTxnManager;
-import org.apache.hadoop.hive.ql.lockmgr.LockException;
-import org.apache.hadoop.hive.ql.lockmgr.TxnManagerFactory;
Review comment:
Removed.
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/partition/add/AlterTableAddPartitionDesc.java
##########
@@ -234,7 +233,7 @@ public void setWriteId(long writeId) {
@Override
public String getFullTableName() {
- return AcidUtils.getFullTableName(dbName,tableName);
+ return AcidUtils.getFullTableName(dbName, tableName);
Review comment:
Removed.
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/storage/skewed/AlterTableSetSkewedLocationAnalyzer.java
##########
@@ -20,7 +20,6 @@
import java.net.URI;
import java.net.URISyntaxException;
-import java.util.ArrayList;
Review comment:
Removed.
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/ddl/view/create/AlterViewAsAnalyzer.java
##########
@@ -84,7 +84,7 @@ private void validateCreateView(AlterViewAsDesc desc,
SemanticAnalyzer analyzer)
if (oldView == null) {
String viewNotExistErrorMsg = "The following view does not exist: " +
desc.getViewName();
- throw new SemanticException(
ErrorMsg.ALTER_VIEW_AS_SELECT_NOT_EXIST.getMsg(viewNotExistErrorMsg));
+ throw new
SemanticException(ErrorMsg.ALTER_VIEW_AS_SELECT_NOT_EXIST.getMsg(viewNotExistErrorMsg));
Review comment:
Removed.
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MapBuilder.java
##########
@@ -17,51 +17,53 @@
*/
package org.apache.hadoop.hive.ql.metadata.formatting;
-import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* Helper class to build Maps consumed by the JSON formatter. Only
* add non-null entries to the Map.
*/
-public class MapBuilder {
- private Map<String, Object> map = new LinkedHashMap<String, Object>();
+public final class MapBuilder {
+ private Map<String, Object> map = new LinkedHashMap<String, Object>();
- private MapBuilder() {}
+ private MapBuilder() {
+ }
- public static MapBuilder create() {
- return new MapBuilder();
- }
+ public static MapBuilder create() {
+ return new MapBuilder();
+ }
- public MapBuilder put(String name, Object val) {
- if (val != null)
- map.put(name, val);
- return this;
+ public MapBuilder put(String name, Object val) {
+ if (val != null) {
+ map.put(name, val);
}
+ return this;
+ }
- public MapBuilder put(String name, boolean val) {
- map.put(name, Boolean.valueOf(val));
- return this;
- }
+ public MapBuilder put(String name, boolean val) {
+ map.put(name, Boolean.valueOf(val));
+ return this;
+ }
- public MapBuilder put(String name, int val) {
- map.put(name, Integer.valueOf(val));
- return this;
- }
+ public MapBuilder put(String name, int val) {
+ map.put(name, Integer.valueOf(val));
+ return this;
+ }
- public MapBuilder put(String name, long val) {
- map.put(name, Long.valueOf(val));
- return this;
- }
+ public MapBuilder put(String name, long val) {
+ map.put(name, Long.valueOf(val));
+ return this;
+ }
- public <T> MapBuilder put(String name, T val, boolean use) {
- if (use)
- put(name, val);
- return this;
+ public <T> MapBuilder put(String name, T val, boolean use) {
+ if (use) {
+ put(name, val);
}
+ return this;
+ }
- public Map<String, Object> build() {
- return map;
- }
+ public Map<String, Object> build() {
+ return map;
+ }
Review comment:
Removed.
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 532073)
Time Spent: 7h 50m (was: 7h 40m)
> Move show specific codes under DDL and cut MetaDataFormatter classes to pieces
> ------------------------------------------------------------------------------
>
> Key: HIVE-24509
> URL: https://issues.apache.org/jira/browse/HIVE-24509
> Project: Hive
> Issue Type: Sub-task
> Components: Hive
> Reporter: Miklos Gergely
> Assignee: Miklos Gergely
> Priority: Major
> Labels: pull-request-available
> Time Spent: 7h 50m
> Remaining Estimate: 0h
>
> Lot of show ... specific codes are under theĀ
> org.apache.hadoop.hive.ql.metadata.formatting package which are used only by
> these commands. Also the two MetaDataFormatters (JsonMetaDataFormatter,
> TextMetaDataFormatter) are trying to do everything, while they contain a lot
> of code duplications. Their functionalities should be put under the
> directories of the appropriate show commands.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)