zoukankan      html  css  js  c++  java
  • habse的CopyTable

    需求:对hbase的一张表进行拷贝

    一、table1的内容如下

    hbase(main):018:0> scan 'table1'
    ROW                                              COLUMN+CELL                                                                                                                                 
     1                                               column=f1:age, timestamp=1469069255119, value=10                                                                                            
     1                                               column=f1:gender, timestamp=1469069255119, value=male                                                                                       
     1                                               column=f1:name, timestamp=1469069255119, value=zhangsan                                                                                     
     2                                               column=f1:name, timestamp=1469069255119, value=lisi                                                                                         
     3                                               column=f1:name, timestamp=1469069255119, value=wangwu                                                                                       
     4                                               column=f1:birthday, timestamp=1469069255119, value=1993                                                                                     
     4                                               column=f1:name, timestamp=1469069255119, value=zhaoliu                                                                                      
    4 row(s) in 0.0300 seconds

    二、现在将table1拷贝

    hbase org.apache.hadoop.hbase.mapreduce.CopyTable --new.name=table2 table1

    三、scan table2中的数据

    hbase(main):026:0> scan 'table2'
    ROW                                              COLUMN+CELL                                                                                                                                 
     1                                               column=f1:age, timestamp=1469069255119, value=10                                                                                            
     1                                               column=f1:gender, timestamp=1469069255119, value=male                                                                                       
     1                                               column=f1:name, timestamp=1469069255119, value=zhangsan                                                                                     
     2                                               column=f1:name, timestamp=1469069255119, value=lisi                                                                                         
     3                                               column=f1:name, timestamp=1469069255119, value=wangwu                                                                                       
     4                                               column=f1:birthday, timestamp=1469069255119, value=1993                                                                                     
     4                                               column=f1:name, timestamp=1469069255119, value=zhaoliu                                                                                      
    4 row(s) in 0.0260 seconds
  • 相关阅读:
    PHP中get请求中参数的key不能是para
    js对数组中的数字排序
    js 数组不重复添加元素
    Controllers
    Views
    Models
    Requirements
    Pull Requests
    Upgrade Guide
    Overview & Change Log
  • 原文地址:https://www.cnblogs.com/dongdone/p/5691196.html
Copyright © 2011-2022 走看看