Data Units

Data Units

In the order of granularity - Hive data is organized into:

数据库、表、分区、桶

  • Databases: Namespaces that separate tables and other data units from naming confliction.
  • Tables: Homogeneous units of data which have the same schema. An example of a table could be page_views table, where each row could comprise of the following columns (schema):
    • timestamp - which is of INT type that corresponds to a unix timestamp of when the page was viewed.
    • userid - which is of BIGINT type that identifies the user who viewed the page.
    • page_url - which is of STRING type that captures the location of the page.
    • referer_url - which is of STRING that captures the location of the page from where the user arrived at the current page.
    • IP - which is of STRING type that captures the IP address from where the page request was made.
  • Partitions: Each Table can have one or more partition Keys which determines how the data is stored. Partitions - apart from being storage units - also allow the user to efficiently identify the rows that satisfy a certain criteria. For example, a date_partition of type STRING and country_partition of type STRING. Each unique value of the partition keys defines a partition of the Table. For example all "US" data from "2009-12-23" is a partition of the page_views table. Therefore, if you run analysis on only the "US" data for 2009-12-23, you can run that query only on the relevant partition of the table thereby speeding up the analysis significantly. Note however, that just because a partition is named 2009-12-23 does not mean that it contains all or only data from that date; partitions are named after dates for convenience but it is the user‘s job to guarantee the relationship between partition name and data content!). Partition columns are virtual columns, they are not part of the data itself but are derived on load.(分区列是虚拟列,他们不是数据本身的一部分,是在执行load时候加载的得到的)
  • Buckets (or Clusters): Data in each partition may in turn be divided into Buckets based on the value of a hash function of some column of the Table. For example the page_views table may be bucketed by userid, which is one of the columns, other than the partitions columns, of the page_view table. These can be used to efficiently sample the data. 表中的具有的数据列(非分区列),可以基于数据值的Hash方法切分成桶中。如此,可以高效的取样数据。

Note that it is not necessary for tables to be partitioned or bucketed, but these abstractions allow the system to prune large quantities of data during query processing, resulting in faster query execution.表的分区和桶,并不一定是必须,但是这种抽象可以使得系统在进行数据查询,结果集返回时候减少数据的量,提高执行效率。

时间: 2024-10-16 09:56:56

Data Units的相关文章

Hash function

Hash function From Wikipedia, the free encyclopedia A hash function that maps names to integers from 0 to 15. There is a collision between keys "John Smith" and "Sandra Dee". A hash function is any function that maps data of arbitrary

websocket可以做什么

本篇介绍的是websocket,但是并不介绍它的协议格式,一般能看明白http头也能明白websocket在协议切换前的协商,能看明白IP报头也就对websocket在协议切换后通讯格式不陌生.websocket在可靠传输TCP之上,提供了消息包的传输服务,即是在websocket的一端的应用层调用websocket发送指定大小的消息,在另一端的websocket就会向协议处理过程提交同样大小的消息.至于消息的格式客户自定义.本篇将通过http协议文档串联起来,了解websocket想要解决什么

OSI

OSI model ___________________________________________________________________________________ The Open Systems Interconnection model (OSI Model) will group communication functions into seven logical layers. A layer serves the layer above it and is se

The OSI Reference Model

International organization for standardization(ISO) developed a reference model for open system interconnection(OSI). The OSI reference model partitioned the communication process into seven layers and provide a framework for talking about the overal

Lock-less buffer management scheme for telecommunication network applications

A buffer management mechanism in a multi-core processor for use on a modem in a telecommunications network is described herein. The buffer management mechanism includes a buffer module that provides buffer management services for one or more Layer 2

Bluetooth L2CAP介绍

逻辑链路控制和适配协议(Logical Link Control and Adaptation Protocol),是蓝牙系统中的核心协议 相应的规范位于Core Version 4.1的vol 3:Part A L2CAP负责适配基带中的上层协议.它同LM并行工作,向上层协议提供面向连接和无连接的数据服务,并提供多路复用,分段和重组操作 允许高层次的协议和应用能够以64KB的长度发送和接收数据包(L2CAP Serveice Data Units, SDU). L2CAP提供了逻辑信道,名为L

iscsi挂载lun

2016-10-01/21:07:24 http://www.cnblogs.com/wuchanming/p/4019660.htmlhttp://czmmiao.iteye.com/blog/2055805 http://lookingdream.blog.51cto.com/5177800/1825286 还有些细节要仔细看 iSCSI(internet SCSI)技术由IBM公司研究开发,是一个供硬件设备使用的.可以在IP协议的上层运行的SCSI指令集,这种指令集合可以实现在IP网络上运

以太网OAM三兄弟-EFM、CFM和Y.1731

以太网OAM主要功能可分为以下两部分: ·        故障管理 §  通过定时或手动发送检测报文来探测网络的连通性. §  提供类似IP网络中的Ping(Packet Internet Groper)和Traceroute的功能,对以太网进行故障诊断和定位. §  与保护倒换协议配合,在以太网OAM检测到连通性故障后触发设备或者链路的倒换, ·        性能管理 性能管理主要是指对网络传输中的丢包.时延.抖动等参数的衡量,也包括对网络中各类流量(如接收发送字节数.错误帧数量等)进行统计

SNMP Message Format - SNMP Tutorial

30.10 SNMP Message Format Unlike most TCP/IP protocols, SNMP messages do not have fixed fields. Instead, they use the standard ASN.1 encoding. Thus, a message can be difficult for humans to decode and understand. After examining the SNMP message defi