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. nginx隐藏server信息和版本信息

    1.隐藏版本信息 在nginx.conf里面添加 server_tokens off; 2.隐藏server信息 需要重新编译ngnix进入解压出来的nginx 源码目录 vi src/http/ng ...

  2. SpringMVC由浅入深day01_8springmvc和mybatis整合

    8 springmvc和mybatis整合 为了更好的学习 springmvc和mybatis整合开发的方法,需要将springmvc和mybatis进行整合. 整合目标:控制层采用springmvc ...

  3. ios开发之--armv7,armv7s,arm64,i386,x86_64详解

    有时候在运行的时候,经常出现诸如i386的错误,最新一些可能会出现 No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch ...

  4. MySQL开发面试题

    ……继上一篇MySQL的开发总结之后,适当的练习还是很有必要的…… SQL语法多变,不敢保证唯一,也不敢保证全对,如果错误欢迎指出,即刻修改. 一.现有表结构如下图 TABLENAME:afinfo ...

  5. Axis2发布服务,支持Tomcat和Weblogic的SSHWeb项目部署

    先说下遇到的问题,在SSHWeb项目中使用JDK自带的jar发布WebService(Endpoint.publish),在tomcat下可以正常发布,但是在Weblogic报奇葩错误,如Struts ...

  6. Websphere安装配置与项目部署

    0x01 下载安装 1.在IBM官网下载安装包 打开下载地址,需注册账户,登录后,选择Windows 64-bit下载 2.解压缩,运行install.exe文件 3.输入刚才注册的用户名和密码,并输 ...

  7. python卸载或者安装时提示There is a problem with this Windows Installer package.A program required for this install to complete could not be run. Contact your support personnel or package vendor

    1.卸载时报这个错,先进行下修复,再执行卸载: 2.安装时报这个错,安装的过程中,没有取得管理员的权限. Msi格式的文件,点右键后,也没有“以管理员身份运行”的菜单项,那怎么办呢?你可以点“开始”菜 ...

  8. Java中获取资源文件的方法总结

    这里总结3中方法获取资源文件的 ServletContext Class ClassLoader 文件的位置 1. ServletContext public void doGet(HttpServl ...

  9. [Ubuntu] APT - Advanced Packaging Tool 简明指南

    Advanced Packaging Tool,一般简称为apt,是Debian GNU/Linux distribution及其变体版本中与核心库一道处理软件的安装和卸载. Ubuntu是Debia ...

  10. lua中的字符串操作(模式匹配)

    (一). 模式匹配函数在string库中功能最强大的函数是:string.find(字符串查找)string.gsub(全局字符串替换)string.gfind(全局字符串查找)string.gmat ...