大数据技术之HBase原理与实战归纳分享-中( 七 )

创建测试类
package cn.itxs.hbasedemo;import java.io.IOException;public class HBaseDemo {public static void main(String[] args) throws IOException {// 创建命名空间HBaseDDL.createNamespace("apitest");// 判断表是否存在System.out.println(HBaseDDL.isTableExists("apitest", "student"));// 创建表//HBaseDDL.createTable("apitest","student","info","msg");// 写入数据HBaseDML.putCell("apitest","student","3001","info","name","hanmeimei");HBaseDML.getCells("apitest","student","3001","info","name");HBaseConnection.closeConnection();}}运行测试程序后查看HBase中的数据

大数据技术之HBase原理与实战归纳分享-中

文章插图
**本人博客网站 **IT小神www.itxiaoshen.com

经验总结扩展阅读