+ | 1 | kongxx | Letmein | +-----+-----------+-----------+ 1 row selected (0.107 seconds) 操作多column-family /sqlline.py # 创建一个表包括两个 column-family:A 和 B,每个 column-family 里包含两个 column 0: jdbc:phoenix:> CREATE TABLE
jdbc:mysql://localhost:3306/test --username root --password root --table point --hbase-table HPoint --column-family info --hbase-row-key pointId --hbase-create-table 参数解析: –hbase-table:指定导入到HBase数据库中某表; –column-family
mysql://repo/test \ --username root \ --password root \ --table student \ --hbase-table h_student \ --column-family mysql://repo/test \ --username root \ --password root \ --table student \ --hbase-table h_student \ --column-family
hbase-create-table \// 导入的表名--hbase-table "t_emp" \// mysql的哪一列作为rowkey--hbase-row-key "id" \//导入的列族名--column-family password 123456 \--table t_emp \--hbase-create-table \--hbase-table "t_emp" \--hbase-row-key "id" \--column-family
mysql_sqoop_test 传入hbase中的表名 --column-family hbase表中的列族 --hbase-row-key 在hbase中那一列作为rowkey username sqoop --password sqoop --table test --hbase-create-table --hbase-table mysql_sqoop_test --column-family
三、HBase按column-family进行自动分裂,存放不同的服务器的HDFS文件中,支持大容量的水平自动扩展。
就有自己的查询语言 通常是开源项目 为集群运行而生 弱结构化——不会严格的限制数据结构类型 NoSQL数据库的类型 NoSQL可以大体上分为4个种类:Key-value、Document-Oriented、Column-Family 三、 列存储(Wide Column Store/Column-Family)数据库 列存储数据库将数据储存在列族(column family)中,一个列族存储经常被一起查询的相关数据。
postgresql://localhost:5432/test --username test --password test --table users --hbase-table user --column-family
就有自己的查询语言 通常是开源项目 为集群运行而生 弱结构化——不会严格的限制数据结构类型 NoSQL数据库的类型 NoSQL可以大体上分为4个种类:Key-value、Document-Oriented、Column-Family 三、 列存储(Wide Column Store/Column-Family)数据库 列存储数据库将数据储存在列族(column family)中,一个列族存储经常被一起查询的相关数据。
Using different column families for materialized views is a common feature of column-family databases
(译者曰:其实就是说这样做是为了查询方便而已) When modeling for column-family stores, we have the benefit of the columns being there are multiple ways to model the data; one way is to store the Customer and Order in different column-family
hbase-create-table \ // 导入的表名 --hbase-table "t_emp" \ // mysql的哪一列作为rowkey --hbase-row-key "id" \ //导入的列族名 --column-family
:3306/company \ --username root \ --password 000000 \ --table company \ --columns "id,name,sex" \ --column-family
Dmapreduce.local.map.tasks.maximum=8 --connect jdbc:mysql://$mysqlURL:3306/$database --table $table --hbase-table $hbaseTable --column-family Dmapreduce.local.map.tasks.maximum=8 --connect jdbc:mysql://$mysqlURL:3306/$database --table $table --hbase-table $hbaseTable --column-family 常用参数说明 --connect JDBC连接字符串 --table 要导入的mysql表名 --columns 要导入的列 --where 过滤条件 --hbase-table hbase表名 --column-family
-table TEST_GOODS --columns ID,GOODS_NAME,GOODS_PRICE --hbase-create-table --hbase-table tt_goods --column-family -hbase-create-table如果hbase中该表不存在则创建 --hbase-table对应的hbase表名 --hbase-row-key hbase表中的rowkey,注意格式 --column-family
1.3 数据导入到HBase中 参数 描述 --column-family <family> 设置导入的目标列族 --hbase-row-key
3306/sq_import \ --username root \ --password 123456 \ --table tb_user \ --columns "id,user_name" \ --column-family
1.3 数据导入到HBase中 参数 描述 --column-family <family> 设置导入的目标列族 --hbase-row-key
HBasearguments: Argument Description --column-family <family> Sets the target column family for the import
--username root \ --password 123456 \ --table adviceMessage \ --hbase-table pzz_adviceMessage \ --column-family