時間:2024-03-09 11:51作者:下載吧人氣:13
編寫MR程序,讓其可以適合大部分的HBase表數(shù)據(jù)導(dǎo)入到HBase表數(shù)據(jù)。其中包括可以設(shè)置版本數(shù)、可以設(shè)置輸入表的列導(dǎo)入設(shè)置(選取其中某幾列)、可以設(shè)置輸出表的列導(dǎo)出設(shè)置(選取其中某幾列)。
原始表test1數(shù)據(jù)如下:
每個row key都有兩個版本的數(shù)據(jù),這里只顯示了row key為1的數(shù)據(jù)
在hbase shell 中創(chuàng)建數(shù)據(jù)表:
create ‘test2’,{NAME => ‘cf1’,VERSIONS => 10} // 保存無版本、無列導(dǎo)入設(shè)置、無列導(dǎo)出設(shè)置的數(shù)據(jù)
create ‘test3’,{NAME => ‘cf1’,VERSIONS => 10} // 保存無版本、無列導(dǎo)入設(shè)置、有列導(dǎo)出設(shè)置的數(shù)據(jù)
create ‘test4’,{NAME => ‘cf1’,VERSIONS => 10} // 保存無版本、有列導(dǎo)入設(shè)置、無列導(dǎo)出設(shè)置的數(shù)據(jù)
create ‘test5’,{NAME => ‘cf1’,VERSIONS => 10} // 保存有版本、無列導(dǎo)入設(shè)置、無列導(dǎo)出設(shè)置的數(shù)據(jù)
create ‘test6’,{NAME => ‘cf1’,VERSIONS => 10} // 保存有版本、無列導(dǎo)入設(shè)置、有列導(dǎo)出設(shè)置的數(shù)據(jù)
create ‘test7’,{NAME => ‘cf1’,VERSIONS => 10} // 保存有版本、有列導(dǎo)入設(shè)置、無列導(dǎo)出設(shè)置的數(shù)據(jù)
create ‘test8’,{NAME => ‘cf1’,VERSIONS => 10} // 保存有版本、有列導(dǎo)入設(shè)置、有列導(dǎo)出設(shè)置的數(shù)據(jù)
網(wǎng)友評論