flume部署安装以及案例运行(27)

source:netcat

channel:Memory

sink:hive

启动hive的元数据服务:

/opt/bigdata/apache-hive-1.2.1-bin/bin/hive --service metastore &

创建库和表  (表必须是CLUSTERED BY INTO  BUCKETS)

create database flume_test;

use flume_test;

create table flume_user(

user_id int

user_name string

user_age int

)CLUSTERED BY (user_id) INTO 2 BUCKETS

row format delimited fields terminated by '\\t'

stored as orc;

推荐阅读