当前位置: 首页 > news >正文

腾讯云服务器可以做传奇网站吗wordpress 安卓主题

腾讯云服务器可以做传奇网站吗,wordpress 安卓主题,北京网站建设价钱,php 做视频网站1. 用Hadoop提供的HBase Shell命令完成以下任务 (1)列出HBase所有表的相关信息,如表名、创建时间等。 启动HBase: cd /usr/local/hbase bin/start-hbase.sh bin/hbase shell列出HBase所有表的信息: hbase(main):001:0 list(2)在终端输出指定表的所有记录数据。 …1. 用Hadoop提供的HBase Shell命令完成以下任务 (1)列出HBase所有表的相关信息,如表名、创建时间等。 启动HBase: cd /usr/local/hbase bin/start-hbase.sh bin/hbase shell列出HBase所有表的信息: hbase(main):001:0 list(2)在终端输出指定表的所有记录数据。 查看记录数据: scan 'student' 查看表的信息: describe 'student'(3)向已经创建好的表添加和删除指定的列族或列。 添加列族或列: alter 'student','NAME'='Sid' 删除列族或列: alter 'student','NAME'='Sid',METHOD='delete'(4)清空指定的表的所有记录数据; create 'teacher','Tname','Tsex','Tage','Tdept','Tcourse' 禁用表 teacher disable 'teacher' 删除表 drop 'teacher'(5)统计表的行数。 count 'student'2. 现有以下关系型数据库中的表和数据,要求将其转换为适合于 HBase 存储的表并插入数据: 表 A-1 学生表(Student) 学号(S_No)姓名(S_Name)性别(S_Sex)年龄(S_Age)2015001Zhangsanmale232015002Maryfemale222015003Lisimale24表 A-2 课程表(Course) 课程号(C_No)课程名(C_Name)学分(C_Credit)123001Math2.0123002Computer Science5.0123003English3.0表 A-3 选课表(SC) 学号(SC_Sno)课程号(SC_Cno)成绩(SC_Score)201500112300186201500112300369201500212300277201500212300399201500312300198201500312300295创建三张表: create 'Student','S_No','S_Name','S_Sex','S_Age' create 'Course','C_No','C_Name','C_Credit' create 'SC','SC_Sno','SC_Cno','SC_Score'插入数据: put 'Student','1','S_No','2015001' put 'Student','1','S_Name','Zhangsan' put 'Student','1','S_Sex','male' put 'Student','1','S_Age','23' put 'Student','2','S_No','2015002' put 'Student','2','S_Name','Mary' put 'Student','2','S_Sex','female' put 'Student','2','S_Age','22' put 'Student','3','S_No','2015003' put 'Student','3','S_Name','Lisi' put 'Student','3','S_Sex','male' put 'Student','3','S_Age','24'put 'Course','1','C_No','123001' put 'Course','1','C_Name','Math' put 'Course','1','C_Credit','2.0' put 'Course','2','C_No','123002' put 'Course','2','C_Name','Computer Science' put 'Course','2','C_Credit','5.0' put 'Course','3','C_No','123003' put 'Course','3','C_Name','English' put 'Course','3','C_Credit','3.0'put 'SC','1','SC_Sno','2015001' put 'SC','1','SC_Cno','123001' put 'SC','1','SC_Score','86' put 'SC','2','SC_Sno','2015001' put 'SC','2','SC_Cno','12303' put 'SC','2','SC_Score','69' put 'SC','3','SC_Sno','2015002' put 'SC','3','SC_Cno','123002' put 'SC','3','SC_Score','77' put 'SC','4','SC_Sno','2015002' put 'SC','4','SC_Cno','123003' put 'SC','4','SC_Score','99' put 'SC','5','SC_Sno','2015003' put 'SC','5','SC_Cno','123001' put 'SC','5','SC_Score','98' put 'SC','6','SC_Sno','2015003' put 'SC','6','SC_Cno','123002' put 'SC','6','SC_Score','95'请编程实现以下功能: createTable(String tableName, String[] fields) 创建表,参数 tableName 为表的名称,字符串数组 fields 为存储记录各个字段名称的数组。要求当 HBase 已经存在名为 tableName 的表的时候,先删除原有的表,然后再创建新的表。 打开eclipse cd /usr/local cd eclipse ls ./eclipsepackage ops; import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.Admin; import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor; import org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.client.ConnectionFactory; import org.apache.hadoop.hbase.client.TableDescriptorBuilder; import org.apache.hadoop.hbase.util.Bytes; public class CreateTable { public static Configuration configuration; public static Connection connection; public static Admin admin; //建立连接 public static void init(){ configuration = HBaseConfiguration.create(); configuration.set("hbase.rootdir","hdfs://localhost:9000/hbase"); try{ connection = ConnectionFactory.createConnection(configuration); admin = connection.getAdmin(); }catch(IOException e){ e.printStackTrace(); } } //关闭连接 public static void close(){ try{ if(admin != null){ admin.close(); } if(connection != null){ connection.close(); } }catch(IOException e){ e.printStackTrace(); } } public static void createTable(String tableName,String[] fields) throws IOException{ init(); TableName tablename = TableName.valueOf(tableName);//table name:tableName // If tableName exists,then disable that,then delete that. if(admin.tableExists(tablename)){ System.out.println("table is exists!"); admin.disableTable(tablename); admin.deleteTable(tablename);//before delete table,must disable table } TableDescriptorBuilder tableDescriptor = TableDescriptorBuilder.newBuilder(tablename); for(int i=0;ifields.length;i++){ //每个字段被转换为列族描述符,并添加到表描述符中 ColumnFamilyDescriptor family = ColumnFamilyDescriptorBuilder.newBuilder(Bytes.toBytes(fields[i])).build(
http://www.pierceye.com/news/102568/

相关文章:

  • 金科网站建设ps做网站难吗
  • 如何在年报网站上做遗失公告wordpress默认摘要
  • 中国网站服务器哪个好有哪些做公司网站
  • 做宠物的网站有哪些如何做电商生意
  • 具有品牌的常州做网站关于网站建设的广告词
  • 孝感网站推广品牌策划公司都有哪些
  • 保洁公司用哪些网站做推广wordpress aj提交评论
  • 互联网金融p2p网站建设模板简历模板免费下载网站
  • 绍兴建设网站制作3免费做网站
  • 东莞运营推广网站建设费用wordpress 单栏 主题
  • 律师事务所网站制作WordPress 经典博客
  • 建立网站功能wordpress微博头条
  • 多就能自己做网站取名网站怎么做
  • 网站域名百度云网站环境建设国家城乡建设规划部网站
  • 网站设计的实例wordpress 微博备份
  • 网络推销黑河网站seo
  • 天津市建设工程管理总队网站wordpress 自媒体模版
  • 用网站做宣传的方案郴州买房网站
  • 微信网站前景wordpress 主题开发教程
  • 基于php旅游网站的毕业设计太原网站建设主页
  • 硅谷网站开发薪酬网站建设 数据可视化
  • 绍兴网站建设设计制作高端的网站开发公司
  • 网站建设包括内容南阳网站建设价格
  • 天津平台网站建设哪里好深圳网络营销推广专员
  • 手机网站建设哪家好嘉定房地产网站建设
  • 酒店网站建设需求分析wordpress 文档模板
  • 品牌微信网站定制wordpress企业cms
  • 郑州网站推广效果免费的个人网页
  • 安徽平台网站建设找哪家安阳实力网站建设首选
  • 企业网站的建设要注意哪些方面免费字体下载网站