Describe Database

hive> DESCRIBE DATABASE test;
test ??? hdfs://ns1/user/hive/warehouse/test.db wx USER
hive> DESCRIBE DATABASE EXTENDED test;
test ??? hdfs://ns1/user/hive/warehouse/test.db wx 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

Hive desc的更多相关文章

  1. 附录C 编译安装Hive

    如果需要直接安装Hive,可以跳过编译步骤,从Hive的官网下载编译好的安装包,下载地址为http://hive.apache.org/downloads.html . C.1  编译Hive C.1 ...

  2. Hive基本语法操练

    建表规则如下: CREATE [EXTERNAL] TABLE [IF NOT EXISTS] table_name [(col_name data_type [COMMENT col_comment ...

  3. Spark入门实战系列--5.Hive(上)--Hive介绍及部署

    [注]该系列文章以及使用到安装包/测试数据 可以在<倾情大奉送--Spark入门实战系列>获取 .Hive介绍 1.1 Hive介绍 月开源的一个数据仓库框架,提供了类似于SQL语法的HQ ...

  4. Hive介绍、安装(转)

    1.Hive介绍 1.1 Hive介绍 Hive是一个基于Hadoop的开源数据仓库工具,用于存储和处理海量结构化数据.它是Facebook 2008年8月开源的一个数据仓库框架,提供了类似于SQL语 ...

  5. Sqoop_ 从 hive 导到mysql常遇九问题总结(转)

    以前以为版本不同,遇到的问题就不同,后来发现,无论是新版本,还是老版本,遇到的问题大部分都是相同的.下面解决问题的方法仅供借鉴 1.拒绝连接的错误表现是什么?2.表不存在该如何解决?3.null字段填 ...

  6. hive学习3(hive基本操作)

    hive基本操作 hive的数据类型 1)基本数据类型 TINYINT,SMALLINT,INT,BIGINT FLOAT/DOUBLE BOOLEAN STRING 2)复合类型 ARRAY:一组有 ...

  7. HIVE: Map Join Vs Common Join, and SMB

    HIVE  Map Join is nothing but the extended version of Hash Join of SQL Server - just extending Hash ...

  8. Hadoop第9周练习—Hive部署测试(含MySql部署)

    1.1 2 :搭建Hive环境 内容 2.2 3  运行环境说明 1.1  硬软件环境 线程,主频2.2G,6G内存 l  虚拟软件:VMware® Workstation 9.0.0 build-8 ...

  9. hive的常用命令

    #从hive中直接进入hdfs的daas/bstl/term/userinfo目录下 hive> !hadoop fs -ls /daas/bstl/term/userinfo; 查看hive表 ...

随机推荐

  1. ecshop安装

    ECSHOP开发中心(www.68ecshop.com) 1.下载ecshop程序包,下载地址: http://download.ecshop.com/2.7.3/ECShop_V2.7.3_UTF8 ...

  2. 关于修改linux hostname的问题,尤其是redhat 7修改hostname的方式

    http://blog.csdn.net/the_conquer_zzy/article/details/68064149

  3. GoF--适配器设计模式

    1.概念:  适配器模式(Adapter Pattern)把一个类的接口变换成客户端所期待的另一种接口,从而使原本因接口不匹配而无法在一起工作的两个类能够在一起工作. 2.形式  a.类的适配器模式  ...

  4. iOS NSError

    写在前面 在iOS开发中,NSError的使用非常常见,使用也比较简单,也正因为简单,所以对这一部分知识不甚注重.但是近期在做app底层网络封装时发现了一些问题.我使用的网络框架是AFNetworki ...

  5. 本地Chrome测试JS代码报错:XMLHttpRequest cannot load

    这种file跨域问题在火狐下是不存在的 解决Chrome下file跨域问题: 在Chrome应用程序下,右键属性,目标处添加"--allow-file-access-from-files&q ...

  6. WAF Bypass FUZZ小脚本

    分享两个小脚本,用来WAF Bypass简单FUZZ的 第一个:先生成一个字典,带入搭建的环境进行FUZZ,针对某些软WAF挺好用的,可FUZZ出不少姿势出来,记得先把CC攻击加入白名单才行哦... ...

  7. VS2017编译Poco1.9.0的64版本

    需要先准备好OpenSSL1.0.2 下载poco-poco-1.9.0-release.zip,解压,修改buildwin.cmd中的OPENSSL_DIR路径,特别注意OPENSSL_LIB的路径 ...

  8. session会话保持

    #coding=utf-8 from flask import Flask from flask import request from flask import redirect from flas ...

  9. Git和GitHub入门基础

    -----------------------------------------//cd F:/learngit // 创建仓库git init  // 在当前目录下创建空的git仓库------- ...

  10. Android学习之Handler消息

    Android系统规定,一些耗时的操作不能放在UI线程中去执行,这样会报一个ANR错误.所以为了避免该问题,我们需要开启一个新的线程去执行一些耗时操作:开启新的线程,将耗时的操作在新线程里面去执行, ...