11 2012 档案

摘要:进入root权限:su root进入相应用户:su zxp在Linux里用adduser和groupadd建立用户和账号时,不能建立出现提示bash: adduser: command not found:这是因为linux中有些命令在执行的时候会根据当前用户的PATH所定义的路径去执行命令,但是PATH定义的路径中没有这些命令,所以找不到是正常的。这时候一般在执行命令前加上/usr/sbin/就行。 阅读全文
posted @ 2012-11-22 13:52 hdu2012 阅读(192) 评论(0) 推荐(0)
摘要:You have to provide a row key when creating an instannce of Get,using one of these constructors。Get(byte[] row)Get (byte[] row, RowLock rowlock)A get() operation is bound to one specific row,but can retrieve any number of columns and/or cells contained therein.View Code package client;// cc GetExamp 阅读全文
posted @ 2012-11-21 19:21 hdu2012 阅读(308) 评论(0) 推荐(0)
摘要:昨天看了hbase的一些使用方法,发现对hbase的低层机制理解不是太透彻,所以我把hadoop权威指南中的hbase章节看了一遍。相当简洁给力啊!http://www.searchtb.com/2011/01/understanding-hbase.html 阅读全文
posted @ 2012-11-21 15:22 hdu2012 阅读(169) 评论(0) 推荐(0)
摘要:Things to remember:1.Create HTable instances only once, usually when your application starts.2.Create a seperate HTable instance for every thread you execute(or use HTablePool).3.Updates are atomic(原子性的) on a per row basis.Put MehtodA row in HBase is identified by a unique row key and -as is the cas 阅读全文
posted @ 2012-11-20 22:30 hdu2012 阅读(259) 评论(0) 推荐(0)
摘要:轻松了一个月,被老师拉来搞hadoop和hbase,而且时间紧,任务重。每天要上交大于100字的学习日记。先草草看了下hadoop权威指南,记录下。Hadoop提供了一个可靠的共享存储和分析系统,HDFS实现存储,而MapReduce实现分析处理。这两个是核心。HBase使用HDFS作为底层存储,同时支持MapReduce的批量式计算和点查询(随即读取)。MapReduce作业(job)是客户端需要执行的一个工作单元:它包括输入数据、MapReduce程序和配置信息。Hadoop将作业分成若干个小任务(task)来执行,其中包括两类任务:map任务和reduce任务。有两类节点控制着作业执行过 阅读全文
posted @ 2012-11-12 22:11 hdu2012 阅读(513) 评论(0) 推荐(0)
摘要:srand(设置随机数种子)相关函数rand表头文件#include<stdlib.h>定义函数voidsrand(unsignedintseed);函数说明srand()用来设置rand()产生随机数时的随机数种子。参数seed必须是个整数,通常可以利用geypid()或time(0)的返回值来当做seed。如果每次seed都设相同值,rand()所产生的随机数值每次就会一样。返回值范例#include<time.h>#include<stdlib.h>main(){inti,j;srand((int)time(0));for(i=0;i<10;i+ 阅读全文
posted @ 2012-11-06 19:42 hdu2012 阅读(15309) 评论(0) 推荐(0)