hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1023423 - in /hadoop/hive/trunk: CHANGES.txt hbase-handler/src/test/results/hbase_stats.q.out ql/src/java/org/apache/hadoop/hive/ql/metadata/Partition.java
Date Sun, 17 Oct 2010 04:49:11 GMT
Author: jvs
Date: Sun Oct 17 04:49:11 2010
New Revision: 1023423

URL: http://svn.apache.org/viewvc?rev=1023423&view=rev
Log:
HIVE-1720. hbase_stats.q is failing
(Ning Zhang via jvs)


Modified:
    hadoop/hive/trunk/CHANGES.txt
    hadoop/hive/trunk/hbase-handler/src/test/results/hbase_stats.q.out
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/Partition.java

Modified: hadoop/hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/CHANGES.txt?rev=1023423&r1=1023422&r2=1023423&view=diff
==============================================================================
--- hadoop/hive/trunk/CHANGES.txt (original)
+++ hadoop/hive/trunk/CHANGES.txt Sun Oct 17 04:49:11 2010
@@ -379,6 +379,9 @@ Trunk -  Unreleased
     HIVE-1707. Bug when different partitions are present in different dfs
     (Yongqiang He via namit)
 
+    HIVE-1720. hbase_stats.q is failing
+    (Ning Zhang via jvs)
+
   TESTS
 
     HIVE-1464. improve  test query performance

Modified: hadoop/hive/trunk/hbase-handler/src/test/results/hbase_stats.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/hbase-handler/src/test/results/hbase_stats.q.out?rev=1023423&r1=1023422&r2=1023423&view=diff
==============================================================================
--- hadoop/hive/trunk/hbase-handler/src/test/results/hbase_stats.q.out (original)
+++ hadoop/hive/trunk/hbase-handler/src/test/results/hbase_stats.q.out Sun Oct 17 04:49:11
2010
@@ -37,11 +37,11 @@ value               	string             
 # Detailed Table Information	 	 
 Database:           	default             	 
 Owner:              	null                	 
-CreateTime:         	Tue Oct 12 15:19:12 PDT 2010	 
+CreateTime:         	Fri Oct 15 23:16:18 PDT 2010	 
 LastAccessTime:     	UNKNOWN             	 
 Protect Mode:       	None                	 
 Retention:          	0                   	 
-Location:           	pfile:/home/thiruvel/projects/hive/hive.test.build/build/hbase-handler/test/data/warehouse/stats_src
 
+Location:           	pfile:/data/users/nzhang/reviews/3/apache-hive/build/hbase-handler/test/data/warehouse/stats_src
 
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	EXTERNAL            	FALSE               
@@ -49,7 +49,7 @@ Table Parameters:	 	 
 	numPartitions       	0                   
 	numRows             	500                 
 	totalSize           	5812                
-	transient_lastDdlTime	1286921961          
+	transient_lastDdlTime	1287209788          
 	 	 
 # Storage Information	 	 
 SerDe Library:      	org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe	 
@@ -96,13 +96,11 @@ POSTHOOK: Lineage: stats_src.key SIMPLE 
 POSTHOOK: Lineage: stats_src.value SIMPLE [(src)src.FieldSchema(name:value, type:string,
comment:default), ]
 PREHOOK: query: analyze table hbase_part partition(ds='2008-04-08', hr=11) compute statistics
 PREHOOK: type: null
-PREHOOK: Input: default@hbase_part@ds=2010-04-08/hr=11
-PREHOOK: Input: default@hbase_part@ds=2010-04-08/hr=12
+PREHOOK: Input: default@hbase_part@ds=2008-04-08/hr=11
 PREHOOK: Output: default@hbase_part
 POSTHOOK: query: analyze table hbase_part partition(ds='2008-04-08', hr=11) compute statistics
 POSTHOOK: type: null
-POSTHOOK: Input: default@hbase_part@ds=2010-04-08/hr=11
-POSTHOOK: Input: default@hbase_part@ds=2010-04-08/hr=12
+POSTHOOK: Input: default@hbase_part@ds=2008-04-08/hr=11
 POSTHOOK: Output: default@hbase_part
 POSTHOOK: Lineage: hbase_part PARTITION(ds=2010-04-08,hr=11).key SIMPLE [(src)src.FieldSchema(name:key,
type:string, comment:default), ]
 POSTHOOK: Lineage: hbase_part PARTITION(ds=2010-04-08,hr=11).value SIMPLE [(src)src.FieldSchema(name:value,
type:string, comment:default), ]
@@ -112,13 +110,11 @@ POSTHOOK: Lineage: stats_src.key SIMPLE 
 POSTHOOK: Lineage: stats_src.value SIMPLE [(src)src.FieldSchema(name:value, type:string,
comment:default), ]
 PREHOOK: query: analyze table hbase_part partition(ds='2008-04-08', hr=12) compute statistics
 PREHOOK: type: null
-PREHOOK: Input: default@hbase_part@ds=2010-04-08/hr=11
-PREHOOK: Input: default@hbase_part@ds=2010-04-08/hr=12
+PREHOOK: Input: default@hbase_part@ds=2008-04-08/hr=12
 PREHOOK: Output: default@hbase_part
 POSTHOOK: query: analyze table hbase_part partition(ds='2008-04-08', hr=12) compute statistics
 POSTHOOK: type: null
-POSTHOOK: Input: default@hbase_part@ds=2010-04-08/hr=11
-POSTHOOK: Input: default@hbase_part@ds=2010-04-08/hr=12
+POSTHOOK: Input: default@hbase_part@ds=2008-04-08/hr=12
 POSTHOOK: Output: default@hbase_part
 POSTHOOK: Lineage: hbase_part PARTITION(ds=2010-04-08,hr=11).key SIMPLE [(src)src.FieldSchema(name:key,
type:string, comment:default), ]
 POSTHOOK: Lineage: hbase_part PARTITION(ds=2010-04-08,hr=11).value SIMPLE [(src)src.FieldSchema(name:value,
type:string, comment:default), ]
@@ -150,11 +146,11 @@ hr                  	string             
 # Detailed Table Information	 	 
 Database:           	default             	 
 Owner:              	null                	 
-CreateTime:         	Tue Oct 12 15:19:22 PDT 2010	 
+CreateTime:         	Fri Oct 15 23:16:29 PDT 2010	 
 LastAccessTime:     	UNKNOWN             	 
 Protect Mode:       	None                	 
 Retention:          	0                   	 
-Location:           	pfile:/home/thiruvel/projects/hive/hive.test.build/build/hbase-handler/test/data/warehouse/hbase_part
 
+Location:           	pfile:/data/users/nzhang/reviews/3/apache-hive/build/hbase-handler/test/data/warehouse/hbase_part
 
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	EXTERNAL            	FALSE               
@@ -162,7 +158,7 @@ Table Parameters:	 	 
 	numPartitions       	2                   
 	numRows             	1000                
 	totalSize           	11624               
-	transient_lastDdlTime	1286921975          
+	transient_lastDdlTime	1287209805          
 	 	 
 # Storage Information	 	 
 SerDe Library:      	org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe	 
@@ -199,15 +195,15 @@ hr                  	string             
 Partition Value:    	[2010-04-08, 11]    	 
 Database:           	default             	 
 Table:              	hbase_part          	 
-CreateTime:         	Tue Oct 12 15:19:25 PDT 2010	 
+CreateTime:         	Fri Oct 15 23:16:33 PDT 2010	 
 LastAccessTime:     	UNKNOWN             	 
 Protect Mode:       	None                	 
-Location:           	pfile:/home/thiruvel/projects/hive/hive.test.build/build/hbase-handler/test/data/warehouse/hbase_part/ds=2010-04-08/hr=11
 
+Location:           	pfile:/data/users/nzhang/reviews/3/apache-hive/build/hbase-handler/test/data/warehouse/hbase_part/ds=2010-04-08/hr=11
 
 Partition Parameters:	 	 
 	numFiles            	1                   
 	numRows             	500                 
 	totalSize           	5812                
-	transient_lastDdlTime	1286921965          
+	transient_lastDdlTime	1287209793          
 	 	 
 # Storage Information	 	 
 SerDe Library:      	org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe	 
@@ -244,15 +240,15 @@ hr                  	string             
 Partition Value:    	[2010-04-08, 12]    	 
 Database:           	default             	 
 Table:              	hbase_part          	 
-CreateTime:         	Tue Oct 12 15:19:28 PDT 2010	 
+CreateTime:         	Fri Oct 15 23:16:37 PDT 2010	 
 LastAccessTime:     	UNKNOWN             	 
 Protect Mode:       	None                	 
-Location:           	pfile:/home/thiruvel/projects/hive/hive.test.build/build/hbase-handler/test/data/warehouse/hbase_part/ds=2010-04-08/hr=12
 
+Location:           	pfile:/data/users/nzhang/reviews/3/apache-hive/build/hbase-handler/test/data/warehouse/hbase_part/ds=2010-04-08/hr=12
 
 Partition Parameters:	 	 
 	numFiles            	1                   
 	numRows             	500                 
 	totalSize           	5812                
-	transient_lastDdlTime	1286921968          
+	transient_lastDdlTime	1287209798          
 	 	 
 # Storage Information	 	 
 SerDe Library:      	org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe	 

Modified: hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/Partition.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/Partition.java?rev=1023423&r1=1023422&r2=1023423&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/Partition.java (original)
+++ hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/Partition.java Sun Oct
17 04:49:11 2010
@@ -488,6 +488,10 @@ public class Partition implements Serial
   public ProtectMode getProtectMode(){
     Map<String, String> parameters = tPartition.getParameters();
 
+    if (parameters == null) {
+      return null;
+    }
+
     if (!parameters.containsKey(ProtectMode.PARAMETER_NAME)) {
       return new ProtectMode();
     } else {
@@ -500,7 +504,12 @@ public class Partition implements Serial
    * @return True protect mode indicates the partition if offline.
    */
   public boolean isOffline(){
-    return getProtectMode().offline;
+    ProtectMode pm = getProtectMode();
+    if (pm == null) {
+      return false;
+    } else {
+      return pm.offline;
+    }
   }
 
   /**



Mime
View raw message