17

The most complete list of -XX options for Java 6 JVM

  • product flags are always settable / visible
  • develop flags are settable / visible only during development and are constant in the PRODUCT version
  • notproduct flags are settable / visible only during development and are not declared in the PRODUCT version
  • diagnostic options not meant for VM tuning or for product modes. They are to be used for VM quality assurance or field diagnosis of VM bugs. They are hidden so that users will not be encouraged to try them as if they were VM ordinary execution options. However, they are available in the product version of the VM. Under instruction from ... (全文...)
24

LinkedIn 发布了一个 key-value 存储(发布?)系统 Voldemort,详细介绍在
http://project-voldemort.com/blog/2009/06/building-a-1-tb-data-cycle-at-linkedin-with-hadoop-and-project-voldemort/

抽空看了一下,写了个 ppt 简单介绍:

26

在 linux shell 下经常使用的一个命令组合: grep [-v] "filter" filePath | tail -n needLines,用来查看文件中符合条件的最后 n 行记录,尤其在监控 server 的 log 的时候。
现在有一个需求:从 web 管理后台向 search server 发送一个 stat 命令,查看搜索索引的各项统计信息,其中就包括索引更新,查询的 log 的最后 n 条记录。于是需要在 search server 里实现这样一个功能。

PS:如果是 php,我肯定会选用 exec 一条外部 shell 命令,获取命令的输出 的方式来做,但 java,只好自己动手,重复发明轮子了。
PS2:stl 的 rotate 代码真是太精炼了。有空需要多看看(全文...)

11

测试代码:http://code.google.com/p/fulin/source/browse/JAVA/lucene/imobile/search2/src/search/test/IndexTest.java

结论:

1。lucene 索引删除条目的时候(不 调用 optimize),会修改索引目录的以下文件:segments.gen, segments_N, ***.del

2。lucene 索引目录发生改变后,如果不 reopen index reader,则改变对于 searcher 来说是不可见的。(甚至可以将 idx 目录删除,searcher 仍然能返回结果。测试:idx 目录大小为 1.2G,删除目录后, searcher 搜索热门词仍然正常返回结果,返回结果条数超过4万条)

... (全文...)
17

机器配置:

uname -a :

Linux eshequn-SV06-A11 2.6.21.5-smp #1 SMP Sun Jan 27 23:51:02 CST 2008 i686 Intel(R) Xeon(TM) CPU 3.06GHz GenuineIntel GNU/Linux

cpuinfo:

processor        : 2
model name    : Intel(R) Xeon(TM) CPU 3.06GHz

meminfo:

MemTotal:      6234308 kB

disk info:

/dev/sda1 on / type reiserfs (rw,noatime)

lucene 配置

writer = new IndexWriter(indexDir, paodingAnalyzer, true, IndexWriter.MaxFieldLength.UNLIMITED);
writer.setMaxBufferedDocs(10000);
writer.setUseCompoundFile(true);

(全文...)

03

一. php client 端:

1. update 与 rebuild 分开

2. update 准实时:insert,update,delete 实时调用更新索引接口(带 primery key 的update 和 delete)

3. rebuild 使用命令行或者 cron 运行,不能使用 web 页面(有运行时间限制),但可以在后台管理系统中作触发(如何防止重复触发?)

二. Java IndexServer:(接受 client 发过来的数据,输出为临时 xml 文件)

1. 日常 update 的 xml 临时文件可以考虑保存在内存文件系统中(保留最近n天的文件debug使用)

2. 更多的处理过程 log (debug 使用,日常监控使用)

3. rebuild 的 xml 临时文件一定要保存在内存文件系统中

4. xml 文件按年或月分目录

... (全文...)
05

        1996 年初,欧洲安全电子市场(EU SEMPER)项目组决定编写自己的日志记录API,后来这个API演变成了Log4j。Log4j是一个开放源码项目,一个非常流行的Java日志记录包。它允许开发者向代码中插入日志记录语句,还允许在不修改应用程序源码的情况下修改日志记录的行为。

几乎每一个项目都会使用日志记录,但是由于日志记录不是项目的核心,因此受重视的程度一般不是很高。我们认为使用日志记录是一件非常严肃的事情,而且做好使用日志记录的规划比单纯记录日志本身更加重要。

本文将比较全面的阐述Log4j的设计原理和使用方法。

日志记录

日志记录记录 ... (全文...)