create 'aipai', : 建立表
describe 'aipai' :檢視表結構
scan 'aipai' , :檢視表前二十條資料
count 'aipai', :統計表資料
hadoop fs –put /tmp/hbasedata/1-20w.txt /hbasedata/1.txt :把txt檔案放到hdfs /hbasedata目錄上
bin/hbase org.apache.hadoop.hbase.mapreduce.importtsv -dimporttsv.columns=info:username,hbase_row_key,info:email -dimporttsv.separator=, aipai /hbasedata/1.txt
進入hbase目錄:執行該命令,每行記錄以逗號分隔。
***,***x,***x
aipai:表名
txt檔案匯入mysql
load data low priority concurrent local infile file name replace ignore into tabletbl name character setcharset name terminated by string optionally e...
txt檔案匯入mysql
mysql寫入資料通常用insert語句,如 c sharp view plain copy insert into person values 張三,20 李四,21 王五,70 但有時為了更快速地插入大批量資料或交換資料,需要從文字中匯入資料或匯出資料到文字。一 建立測試表,準備資料 首先建立乙...
txt檔案匯入mysql
mysql寫入資料通常用insert語句,如 insert into person values 張三,20 李四,21 王五,70 但有時為了更快速地插入大批量資料或交換資料,需要從文字中匯入資料或匯出資料到文字。一 建立測試表,準備資料 首先建立乙個用於測試的表示學生資訊的表,欄位有id 姓名 ...