Use Hive

// See Mac current Path
echo $PATH

// Add a path to the Mac current Path
export PATH=${PATH}:/Users/chen668/hadoop

// Set Hadoop_home Env
export HADOOP_HOME=/Users/chen668/hadoop

//Start hive
bin/hive

//Create Table
CREATE TABLE tcss(domain_id INT,lgo_time STRING, log_date STRING, log_type INT, uin BIGINT ) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' LOCATION '/user/hivestest/tcss';

create table cite (citing INT, cited INT)
    > row format delimited
    > fields terminated by ','
    > stored as textfile;

// Other hive command
show tables;
describe tcss;

你可能感兴趣的:(Use Hive)