摘要: #include#includetypedef struct{char s[20][20];int top;}SQ;void copystr(char *a,char *b){ int i=0; do { b[i]=a[i]; i++; } while(a[i]!='\0'); b[i]='\0';}void voidSQ(SQ *s){ s->top=-1;}int ifempty(SQ *s){ return(s->top==-1);}void push(SQ *S,char *c){ if(S->top==... 阅读全文
posted @ 2013-09-10 15:05 kivi 阅读(625) 评论(0) 推荐(0) 编辑
摘要: 算术异常类:ArithmeticExecption空指针异常类:NullPointerException类型强制转换异常:ClassCastException数组负下标异常:NegativeArrayException数组下标越界异常:ArrayIndexOutOfBoundsException违背安全原则异常:SecturityException文件已结束异常:EOFException文件未找到异常:FileNotFoundException字符串转换为数字异常:NumberFormatException 操作数据库异常:SQLException 输入输出异常:IOException 方法未 阅读全文
posted @ 2013-09-01 14:04 kivi 阅读(695) 评论(0) 推荐(0) 编辑
摘要: 版本说明Hadoop1.0.1HBase 0.94.9Hive 0.8.1一、Hive over HBase1. 拷贝hbase-0.94.9.jar、zookeeper-3.4.5.jar、protobuf-java-2.4.0a.jar到hive/lib下。注意:如何hive/lib下已经存在这两个文件的其他版本(例如zookeeper-3.3.1.jar),建议删除后使用hbase下的相关版本。2. 修改hive/conf下hive-site.xml文件(红色部分) hive.metastore.local true ja... 阅读全文
posted @ 2013-07-30 12:40 kivi 阅读(1659) 评论(0) 推荐(0) 编辑
摘要: 本文转自:http://www.orzota.com/sql-for-hbase/HBase provides random, read-write access to Big Data stored in very large tables as a distributed columnar store. HBase thus gained immediately popularity as a Big Data technology that unlike Hadoop which was primarily used in the backend data warehousing inf 阅读全文
posted @ 2013-07-25 12:17 kivi 阅读(840) 评论(0) 推荐(0) 编辑
摘要: 本文转自http://phoenix-hbase.blogspot.com/Today the Phoenix blog is brought to you by my esteemed colleague and man of many hats, Mujtaba Chohan, who today is wearing his performance engineer hat.SKIP SCANPhoenix 1.2uses a Skip Scan for intra-row scanning which allows for significant performance improve 阅读全文
posted @ 2013-07-25 10:41 kivi 阅读(644) 评论(0) 推荐(0) 编辑
摘要: DDLData Definition Language(DDL) statements are used to define the database structure or schema. Some examples:CREATE - to create objects in the databaseALTER - alters the structure of the databaseDROP - delete objects from the databaseTRUNCATE - remove all records from a table, including all spaces 阅读全文
posted @ 2013-07-25 10:25 kivi 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 一、安装memcached服务端1. 下载memcached的windows稳定版,解压放某个盘下面,比如在c:\memcached2. 在CMD下输入 "c:\memcached\memcached.exe -d install" 安装.3. 再输入:"c:\memcached\memcached.exe -d start" 启动,可以看到进程中多了memcached。NOTE:1、 一定要开启memcached服务;2、以后memcached将作为windows的一个服务每次开机时自动启动。二、导包commons-codec-1.3.jarhiber 阅读全文
posted @ 2013-07-20 18:55 kivi 阅读(2552) 评论(2) 推荐(1) 编辑
摘要: 一、JVM的内存模型:从大的方面来讲,JVM的内存模型分为两大块:永久区内存(Permanent space)和堆内存(heap space)。栈内存(stack space)一般都不归在JVM内存模型中,因为栈内存属于线程级别。每个线程都有个独立的栈内存空间。Permanent space里存放加载的Class类级对象如class本身,method,field等等。heap space主要存放对象实例和数组。heap space由OldGeneration和NewGeneration组成,OldGeneration存放生命周期长久的实例对象,而新的对象实例一般放在NewGeneration。 阅读全文
posted @ 2013-07-18 11:23 kivi 阅读(5753) 评论(0) 推荐(0) 编辑
摘要: 有时搞web开发的时候经常会出现OOM(out of memory)、permGen space不足的情况,其实就是jvm的内存不足了,下面的方法可以监视jvm的使用情况(原方法来自http://developer.51cto.com/art/200907/134171.htm)import java.util.Timer; import java.util.TimerTask; import java.util.Calendar; import java.util.GregorianCalendar; public class GCTimerTask extends Time... 阅读全文
posted @ 2013-07-18 10:45 kivi 阅读(305) 评论(0) 推荐(0) 编辑
摘要: 进程和线程的关系:网上有一副很经典的图可以让我们来理解进程和线程的关系:下面这副图是一个双向多车道的道路图,假如我们把整条道路看成是一个“进程”的话,那么图中由白色虚线分隔开来的各个车道就是进程中的各个“线程”了。这副图出自:http://www.blogjava.net/pengpenglin/archive/2008/09/02/226292.html一些说明:这些线程(车道)共享了进程(道路)的公共资源(土地资源)。这些线程(车道)必须依赖于进程(道路),也就是说,线程不能脱离于进程而存在(就像离开了道路,车道也就没有意义了)。这些线程(车道)之间可以并发执行(各个车道你走你的,我走我的 阅读全文
posted @ 2013-07-17 21:41 kivi 阅读(235) 评论(0) 推荐(0) 编辑