开发者学堂课程【分布式数据库 HBase 快速入门:测试】学习笔记,与课程紧密联系,让用户快速学习知识。
课程地址:https://developer.aliyun.com/learning/course/101/detail/1780
测试
package con. atguigu . weibo ;
import org . apache . hadoop . hbase . filter . FilterList ;
import java . io . IOException ;
public class weibo {
public static void init() throws IOException {
//创建命名空问
WeiBoUti1.createNamespace ( Constant . NANESPACE );
//创建内容表
WeiBoUtil . createTable ( Constant . CONTENT , versions :1,. cfs :" info ");
//创建用户关系表
WeiBoUtil. createTable (Constant .RELATIaNS , versions :1,.… cfs :" attends "," fans ");
//创建收件箱表(多版本)
WeiBoUtil . createTable ( Constant . INBOX , versions :2. . cfs :" info ");
}
Public static void main ( String[] args ) throws I0Exception{
//测试
initial();
//1001,1002 发布微博
}
WeiBoltil . createlata (“1001”,“今天天气还可以!!!”);
WeiBoltil . createlata (“1002”,“今天天气不好!!!);
//1001 关注 1002 和 1003
WeiBoUtil . addAttend (“1001”,”1002”,”1003”);
//获取 1001 初始化页面信息
WeiBoUtil . getInit ("1001");
//1003 发布微博
WeiBoltil . createlata (1003,“今天天气真不好!!!”);
WeiBoUtil . createData ( uid :"1003", content :“今天不想上课!!!");
WeiBoUtil . ereateData ( uid :"1003, content :“明天想上课!!!")
System .out .printIn();
//获取 1001 初始化页面信息
WeiBoUtil . getInit ( uid :"1001”);
//取关
WeiBoUtil . delAttend ( uid :"1001",...uids :"1002”);
System. out .println();
WeiBoUtil . getInit ( uid :"1001”);
}