您的位置:首页 > 其它

Hive desc

2015-07-25 21:12 465 查看

Describe Database

hive> DESCRIBE DATABASE test;

test ??? hdfs://ns1/user/hive/warehouse/test.db huai USER

hive> DESCRIBE DATABASE EXTENDED test;

test ??? hdfs://ns1/user/hive/warehouse/test.db huai USER {date=2015-07-18, creator=wx}

Describe Table/View/Column

hive> DESCRIBE user_info_bucketed;

user_id bigint

firstname string

lastname string

ds string

# Partition Information

# col_name data_type comment

ds string

hive> DESCRIBE FORMATTED user_info_bucketed.firstname

hive> DESCRIBE FORMATTED user_info_bucketed firstname;

# col_name data_type min max num_nulls distinct_count avg_col_len max_col_len num_trues num_falses comment

firstname string from deserializer

hive> DESCRIBE EXTENDED user_info_bucketed.firstname;
firstname string from deserializer

hive> DESCRIBE FORMATTED user_info_bucketed;

# col_name data_type comment

user_id bigint

firstname string

lastname string

# Partition Information

# col_name data_type comment

ds string

# Detailed Table Information

Database: test

Owner: huai

CreateTime: Sat Jul 25 10:56:50 CST 2015

LastAccessTime: UNKNOWN

Protect Mode: None

Retention: 0

Location: hdfs://ns1/user/hive/warehouse/test.db/user_info_bucketed

Table Type: MANAGED_TABLE

Table Parameters:

comment A bucketed copy of user_info

transient_lastDdlTime 1437793010

# Storage Information

SerDe Library: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe

InputFormat: org.apache.hadoop.mapred.TextInputFormat

OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat

Compressed: No

Num Buckets: 3

Bucket Columns: [user_id]

Sort Columns: [Order(col:firstname, order:1)]

Storage Desc Params:

serialization.format 1

hive> DESCRIBE EXTENDED user_info_bucketed;

user_id bigint

firstname string

lastname string

ds string

# Partition Information

# col_name data_type comment

ds string

Detailed Table Information Table(tableName:user_info_bucketed, dbName:test, owner:huai, createTime:1437793010, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:user_id, type:bigint, comment:null), FieldSchema(name:firstname, type:string, comment:null), FieldSchema(name:lastname, type:string, comment:null), FieldSchema(name:ds, type:string, comment:null)], location:hdfs://ns1/user/hive/warehouse/test.db/user_info_bucketed, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:3, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[user_id], sortCols:[Order(col:firstname, order:1)], parameters:{}, skewedInfo:SkewedInfo(skewedColNames:[], skewedColValues:[], skewedColValueLocationMaps:{}), storedAsSubDirectories:false), partitionKeys:[FieldSchema(name:ds, type:string, comment:null)], parameters:{transient_lastDdlTime=1437793010, comment=A bucketed copy of user_info}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE)

Describe Partition

hive> DESCRIBE FORMATTED user_info_bucketed PARTITION (ds='2015-07-25');

# col_name data_type comment

user_id bigint

firstname string

lastname string

# Partition Information

# col_name data_type comment

ds string

# Detailed Partition Information

Partition Value: [2015-07-25]

Database: test

Table: user_info_bucketed

CreateTime: Sat Jul 25 10:59:28 CST 2015

LastAccessTime: UNKNOWN

Protect Mode: None

Location: hdfs://ns1/user/hive/warehouse/test.db/user_info_bucketed/ds=2015-07-25

Partition Parameters:

COLUMN_STATS_ACCURATE true

numFiles 3

numRows 4

rawDataSize 68

totalSize 72

transient_lastDdlTime 1437793168

# Storage Information

SerDe Library: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe

InputFormat: org.apache.hadoop.mapred.TextInputFormat

OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat

Compressed: No

Num Buckets: 3

Bucket Columns: [user_id]

Sort Columns: [Order(col:firstname, order:1)]

Storage Desc Params:

serialization.format 1
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: