hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ekoif...@apache.org
Subject [1/3] hive git commit: HIVE-16084 SHOW COMPACTIONS should display CompactionID (Eugene Koifman, reviewed by Alan Gates)
Date Tue, 26 Sep 2017 16:16:47 GMT
Repository: hive
Updated Branches:
  refs/heads/master 1a7f853f3 -> a0d3aca51


HIVE-16084 SHOW COMPACTIONS should display CompactionID (Eugene Koifman, reviewed by Alan
Gates)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/a0d3aca5
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/a0d3aca5
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/a0d3aca5

Branch: refs/heads/master
Commit: a0d3aca51c7bf3d4d037fa0d99483f40f0491d1f
Parents: c396cd2
Author: Eugene Koifman <ekoifman@hortonworks.com>
Authored: Tue Sep 26 09:11:45 2017 -0700
Committer: Eugene Koifman <ekoifman@hortonworks.com>
Committed: Tue Sep 26 09:16:22 2017 -0700

----------------------------------------------------------------------
 ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java         | 4 ++++
 .../org/apache/hadoop/hive/ql/plan/ShowCompactionsDesc.java     | 5 +++--
 ql/src/test/results/clientpositive/dbtxnmgr_showlocks.q.out     | 4 ++--
 3 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/a0d3aca5/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
index 443be54..fd91974 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
@@ -2926,6 +2926,8 @@ public class DDLTask extends Task<DDLWork> implements Serializable
{
     DataOutputStream os = getOutputStream(desc.getResFile());
     try {
       // Write a header
+      os.writeBytes("CompactionId");
+      os.write(separator);
       os.writeBytes("Database");
       os.write(separator);
       os.writeBytes("Table");
@@ -2947,6 +2949,8 @@ public class DDLTask extends Task<DDLWork> implements Serializable
{
 
       if (rsp.getCompacts() != null) {
         for (ShowCompactResponseElement e : rsp.getCompacts()) {
+          os.writeBytes(Long.toString(e.getId()));
+          os.write(separator);
           os.writeBytes(e.getDbname());
           os.write(separator);
           os.writeBytes(e.getTablename());

http://git-wip-us.apache.org/repos/asf/hive/blob/a0d3aca5/ql/src/java/org/apache/hadoop/hive/ql/plan/ShowCompactionsDesc.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/ShowCompactionsDesc.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/ShowCompactionsDesc.java
index dc47a38..c524607 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/plan/ShowCompactionsDesc.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/ShowCompactionsDesc.java
@@ -27,8 +27,9 @@ import java.io.Serializable;
 public class ShowCompactionsDesc extends DDLDesc implements Serializable {
 
   private static final long serialVersionUID = 1L;
-  private static final String schema = "dbname,tabname,partname,type,state,workerid," +
-      "starttime,duration,hadoopjobid#string:string:string:string:string:string:string:string:string";
+  private static final String schema =
+    "compactionid,dbname,tabname,partname,type,state,workerid,starttime,duration,hadoopjobid#"
+
+      "string:string:string:string:string:string:string:string:string:string";
 
   private String resFile;
 

http://git-wip-us.apache.org/repos/asf/hive/blob/a0d3aca5/ql/src/test/results/clientpositive/dbtxnmgr_showlocks.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/dbtxnmgr_showlocks.q.out b/ql/src/test/results/clientpositive/dbtxnmgr_showlocks.q.out
index a9814f3..90ab961 100644
--- a/ql/src/test/results/clientpositive/dbtxnmgr_showlocks.q.out
+++ b/ql/src/test/results/clientpositive/dbtxnmgr_showlocks.q.out
@@ -67,8 +67,8 @@ PREHOOK: query: show compactions
 PREHOOK: type: SHOW COMPACTIONS
 POSTHOOK: query: show compactions
 POSTHOOK: type: SHOW COMPACTIONS
-Database	Table	Partition	Type	State	Worker	Start Time	Duration(ms)	HadoopJobId
-default	partitioned_acid_table	p=abc	MINOR	initiated	 --- 	 --- 	 --- 	 --- 
+CompactionId	Database	Table	Partition	Type	State	Worker	Start Time	Duration(ms)	HadoopJobId
+1	default	partitioned_acid_table	p=abc	MINOR	initiated	 --- 	 --- 	 --- 	 --- 
 PREHOOK: query: drop table partitioned_acid_table
 PREHOOK: type: DROPTABLE
 PREHOOK: Input: default@partitioned_acid_table


Mime
View raw message