-- 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. set datanucleus.cache.collections=false set hive.stats.autogather=false set hive.exec.dynamic.partition=true set hive.exec.dynamic.partition.mode=nonstrict create table analyze_srcpart like srcpart insert overwrite table analyze_srcpart partition (ds, hr) select * from srcpart where ds is not null explain analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr=11) compute statistics ABSTRACT SYNTAX TREE: (TOK_ANALYZE (TOK_TAB (TOK_TABNAME analyze_srcpart) (TOK_PARTSPEC (TOK_PARTVAL ds '2008-04-08') (TOK_PARTVAL hr 11)))) STAGE DEPENDENCIES: Stage-0 is a root stage Stage-1 depends on stages: Stage-0 STAGE PLANS: Stage: Stage-0 Map Reduce Alias -> Map Operator Tree: analyze_srcpart TableScan alias: analyze_srcpart Stage: Stage-1 Stats-Aggr Operator analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr=11) compute statistics describe extended analyze_srcpart PARTITION(ds='2008-04-08',hr=11) key string value string ds string hr string Detailed Partition Information Partition(values:[2008-04-08, 11], dbName:default, tableName:analyze_srcpart, createTime:1301678572, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null)], location:hdfs://monster01.sf.cloudera.com:17020/user/hive/warehouse/analyze_srcpart/ds=2008-04-08/hr=11, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1301678579, numRows=0, totalSize=5812}) describe extended analyze_srcpart key string value string ds string hr string Detailed Table Information Table(tableName:analyze_srcpart, dbName:default, owner:hudson, createTime:1301678564, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null), FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], location:hdfs://monster01.sf.cloudera.com:17020/user/hive/warehouse/analyze_srcpart, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], parameters:{numPartitions=1, numFiles=1, transient_lastDdlTime=1301678579, numRows=0, totalSize=5812}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) explain analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr=12) compute statistics ABSTRACT SYNTAX TREE: (TOK_ANALYZE (TOK_TAB (TOK_TABNAME analyze_srcpart) (TOK_PARTSPEC (TOK_PARTVAL ds '2008-04-08') (TOK_PARTVAL hr 12)))) STAGE DEPENDENCIES: Stage-0 is a root stage Stage-1 depends on stages: Stage-0 STAGE PLANS: Stage: Stage-0 Map Reduce Alias -> Map Operator Tree: analyze_srcpart TableScan alias: analyze_srcpart Stage: Stage-1 Stats-Aggr Operator analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr=12) compute statistics describe extended analyze_srcpart PARTITION(ds='2008-04-08',hr=12) key string value string ds string hr string Detailed Partition Information Partition(values:[2008-04-08, 12], dbName:default, tableName:analyze_srcpart, createTime:1301678572, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null)], location:hdfs://monster01.sf.cloudera.com:17020/user/hive/warehouse/analyze_srcpart/ds=2008-04-08/hr=12, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1301678584, numRows=0, totalSize=5812}) explain analyze table analyze_srcpart PARTITION(ds='2008-04-09',hr=11) compute statistics ABSTRACT SYNTAX TREE: (TOK_ANALYZE (TOK_TAB (TOK_TABNAME analyze_srcpart) (TOK_PARTSPEC (TOK_PARTVAL ds '2008-04-09') (TOK_PARTVAL hr 11)))) STAGE DEPENDENCIES: Stage-0 is a root stage Stage-1 depends on stages: Stage-0 STAGE PLANS: Stage: Stage-0 Map Reduce Alias -> Map Operator Tree: analyze_srcpart TableScan alias: analyze_srcpart Stage: Stage-1 Stats-Aggr Operator analyze table analyze_srcpart PARTITION(ds='2008-04-09',hr=11) compute statistics describe extended analyze_srcpart PARTITION(ds='2008-04-09',hr=11) key string value string ds string hr string Detailed Partition Information Partition(values:[2008-04-09, 11], dbName:default, tableName:analyze_srcpart, createTime:1301678572, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null)], location:hdfs://monster01.sf.cloudera.com:17020/user/hive/warehouse/analyze_srcpart/ds=2008-04-09/hr=11, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1301678590, numRows=0, totalSize=5812}) explain analyze table analyze_srcpart PARTITION(ds='2008-04-09',hr=12) compute statistics ABSTRACT SYNTAX TREE: (TOK_ANALYZE (TOK_TAB (TOK_TABNAME analyze_srcpart) (TOK_PARTSPEC (TOK_PARTVAL ds '2008-04-09') (TOK_PARTVAL hr 12)))) STAGE DEPENDENCIES: Stage-0 is a root stage Stage-1 depends on stages: Stage-0 STAGE PLANS: Stage: Stage-0 Map Reduce Alias -> Map Operator Tree: analyze_srcpart TableScan alias: analyze_srcpart Stage: Stage-1 Stats-Aggr Operator analyze table analyze_srcpart PARTITION(ds='2008-04-09',hr=12) compute statistics describe extended analyze_srcpart PARTITION(ds='2008-04-09',hr=12) key string value string ds string hr string Detailed Partition Information Partition(values:[2008-04-09, 12], dbName:default, tableName:analyze_srcpart, createTime:1301678572, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null)], location:hdfs://monster01.sf.cloudera.com:17020/user/hive/warehouse/analyze_srcpart/ds=2008-04-09/hr=12, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1301678595, numRows=0, totalSize=5812}) explain analyze table analyze_srcpart PARTITION(ds, hr) compute statistics ABSTRACT SYNTAX TREE: (TOK_ANALYZE (TOK_TAB (TOK_TABNAME analyze_srcpart) (TOK_PARTSPEC (TOK_PARTVAL ds) (TOK_PARTVAL hr)))) STAGE DEPENDENCIES: Stage-0 is a root stage Stage-1 depends on stages: Stage-0 STAGE PLANS: Stage: Stage-0 Map Reduce Alias -> Map Operator Tree: analyze_srcpart TableScan alias: analyze_srcpart Stage: Stage-1 Stats-Aggr Operator analyze table analyze_srcpart PARTITION(ds, hr) compute statistics describe extended analyze_srcpart PARTITION(ds='2008-04-08',hr=11) key string value string ds string hr string Detailed Partition Information Partition(values:[2008-04-08, 11], dbName:default, tableName:analyze_srcpart, createTime:1301678572, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null)], location:hdfs://monster01.sf.cloudera.com:17020/user/hive/warehouse/analyze_srcpart/ds=2008-04-08/hr=11, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1301678602, numRows=0, totalSize=5812}) describe extended analyze_srcpart PARTITION(ds='2008-04-08',hr=12) key string value string ds string hr string Detailed Partition Information Partition(values:[2008-04-08, 12], dbName:default, tableName:analyze_srcpart, createTime:1301678572, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null)], location:hdfs://monster01.sf.cloudera.com:17020/user/hive/warehouse/analyze_srcpart/ds=2008-04-08/hr=12, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1301678602, numRows=0, totalSize=5812}) describe extended analyze_srcpart PARTITION(ds='2008-04-09',hr=11) key string value string ds string hr string Detailed Partition Information Partition(values:[2008-04-09, 11], dbName:default, tableName:analyze_srcpart, createTime:1301678572, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null)], location:hdfs://monster01.sf.cloudera.com:17020/user/hive/warehouse/analyze_srcpart/ds=2008-04-09/hr=11, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1301678602, numRows=0, totalSize=5812}) describe extended analyze_srcpart PARTITION(ds='2008-04-09',hr=12) key string value string ds string hr string Detailed Partition Information Partition(values:[2008-04-09, 12], dbName:default, tableName:analyze_srcpart, createTime:1301678572, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null)], location:hdfs://monster01.sf.cloudera.com:17020/user/hive/warehouse/analyze_srcpart/ds=2008-04-09/hr=12, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1301678602, numRows=0, totalSize=5812}) describe extended analyze_srcpart key string value string ds string hr string Detailed Table Information Table(tableName:analyze_srcpart, dbName:default, owner:hudson, createTime:1301678564, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null), FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], location:hdfs://monster01.sf.cloudera.com:17020/user/hive/warehouse/analyze_srcpart, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], parameters:{numPartitions=4, numFiles=4, transient_lastDdlTime=1301678602, numRows=0, totalSize=23248}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE)