摘要: 一、段合并过程总论 IndexWriter中与段合并有关的成员变量有: HashSet<SegmentInfo> mergingSegments = new HashSet<SegmentInfo>(); //保存正在合并的段,以防止合并期间再次选中被合并。 MergePolicy mergePolicy = new LogByteSizeMergePolicy(this);//合并策略,也即选取哪些段来进行合并。 MergeScheduler mergeScheduler = new ConcurrentMergeScheduler();//段合并器,背后有一个线程负 阅读全文
posted @ 2010-03-06 00:49 刘超觉先 阅读(15006) 评论(1) 推荐(3) 编辑
摘要: 配置java环境变量: JAVA_HOME:配置JDK的目录 CLASSPATH:指定到哪里去找运行时需要用到的类代码(字节码) PATH:指定可执行程序的位置 LINUX系统(在" .bash_profile "下的环境变量设置) JAVA_HOME=/opt/jdk1.5.0_06 CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar PATH=$PATH:$JAVA_HOME/bin:. export JAVA_HOME CLASSPATH PATH (将指定的环境变量声明为全局的) windows系统: 阅读全文
posted @ 2010-03-02 15:35 刘超觉先 阅读(2683) 评论(0) 推荐(0) 编辑
摘要: 1. Introduction to HDFS 1.1. HDFS Concepts 1.1.1. Blocks l HDFS too has the concept of a block, but it is a much larger unit 64 MB by default. l Like in a filesystem for a single disk, files in HDFS are broken into block-sized chunks, which are stored as independent units. l Unlike a filesystem for. 阅读全文
posted @ 2010-02-27 23:01 刘超觉先 阅读(5438) 评论(0) 推荐(3) 编辑
摘要: 问题1. public static void append(String str){ str += " Append!"; } public static void append(StringBuffer sBuffer){ sBuffer.append(" Append!"); } public void test(){ String str = "Nothing"; append(str); System.out.println(str); StringBuffer sBuffer = new StringBuffer(&quo 阅读全文
posted @ 2010-02-27 15:47 刘超觉先 阅读(1556) 评论(1) 推荐(1) 编辑
摘要: 由于原书是英文的,因而笔记是英文的,大家敬请谅解吧。 1. Getting Started http://www.cnblogs.com/forfuture1978/archive/2010/02/11/1667457.html 2. Writing Good GNU/Linux Software http://www.cnblogs.com/forfuture1978/archive/2010/02/11/1667458.html 3. Processes http://www.cnblogs.com/forfuture1978/archive/2010/02/12/1667789.ht.. 阅读全文
posted @ 2010-02-25 13:08 刘超觉先 阅读(1274) 评论(0) 推荐(1) 编辑
摘要: 本系列文章将详细描述几乎最新版本的Lucene的基本原理和代码分析。其中总体架构和索引文件格式是Lucene 2.9的,索引过程分析是Lucene 3.0的。鉴于索引文件格式没有太大变化,因而原文没有更新,原理和架构的文章中引用了前辈的一些图,可能属于早期的Lucene,但不影响对原理和架构的理解。本系列文章尚在撰写之中,将会有分词器,段合并,QueryParser,查询语句与查询对象,搜索过程,打分公式的推导等章节。提前给大家分享,希望大家批评指正。Lucene学习总结之一:全文检索的基本原理http://www.cnblogs.com/forfuture1978/archive/2009/ 阅读全文
posted @ 2010-02-22 20:25 刘超觉先 阅读(8975) 评论(8) 推荐(7) 编辑
摘要: 译者序:Web 2.0这一概念,由O'Reilly媒体公司总裁兼CEO提姆·奥莱理提出。他是美国IT业界公认的传奇式人物,是“开放源码”概念的缔造者,一直倡导开放标准,并活跃在开放源码运动的最前沿。 这篇由提姆·奥莱理亲自执笔、创作于上个月由他主办的Web 2.0会议前夕的文章,一经发出就引发了热烈的讨论,被视为Web 2.0迄今为止的经典之作。 Web2.0的一个关键原则是用户越多,服务越好 (作者|提姆·奥莱理(Tim O'Reilly) 翻译作者|玄伟剑) 2001年秋天互联网公司(dot-com)泡沫的破灭标志着互联网的一个转折点。许多人断 阅读全文
posted @ 2010-02-15 20:49 刘超觉先 阅读(1137) 评论(0) 推荐(1) 编辑
摘要: 6. Devices A device driver hides the hardware device’s communication protocols from the operating system and allows the system to interact with the device through a standardized interface. Processes can communicate with a device driver via file-like objects. 6.1 Device Types A character device re... 阅读全文
posted @ 2010-02-12 11:10 刘超觉先 阅读(819) 评论(0) 推荐(0) 编辑
摘要: 5. Interprocess Communication Five types of interprocess communication: Shared memory permits processes to communicate by simply reading and writing to a specified memory location. Mapped memory is similar to shared memory, except that it is associated with a file in the filesystem. Pipes permit... 阅读全文
posted @ 2010-02-12 11:06 刘超觉先 阅读(844) 评论(0) 推荐(0) 编辑
摘要: 4. Threads To use the POSIX standard thread API (pthreads), link libpthread.so to your program. 4.1. Thread Creation Each thread in a process is identified by a thread ID, pthread_t. The pthread_self function returns the thread ID of the current thread. This thread IDs can be compared with the p... 阅读全文
posted @ 2010-02-12 11:00 刘超觉先 阅读(1297) 评论(0) 推荐(0) 编辑