katta初体验 - 疯子的遐想 - JavaEye技术网站

来源:百度文库 编辑:神马文学网 时间:2024/04/28 15:45:28

katta初体验

近来在研究分布式,在网上看到Katta,是个很强悍的东西,拿来分享下....
Katta is a scalable, failure tolerant, distributed, indexed, data storage.
Katta serves large, replicated, Lucene indexes as shards to serve high loads and very large data sets.

Makes serving large or high load Lucene indexes easy
Serves very large Lucene indexes as index shards on many servers
Replicate shards on different servers for performance and fault-tolerance
Supports pluggable network topologies
Master fail-over
Fast, lightweight, easy to integrate
Plays well with Hadoop clusters
Apache Version 2 License

总的来说,Katta是用来作为分布式的索引管理的,底层使用了hadoop的子项目Zookeeper,Zookeeper是一个针对大型分布式系统的可靠协调系统,是用来协调分布式系统的。

首先去Katta的官网下载:http://sourceforge.net/project/showfiles.php?group_id=225750

下载下来后解压到本地,我的Linux版本是Centos 5
打开三个窗口,然后都进入解压下来的目录
在第一个窗口:
sh bin/katta startMaster
启动Master
第二个窗口:
sh bin/katta startNode
启动Node
第三个窗口:
sh bin/katta addIndex testIndex src/test/testIndexA org.apache.lucene.analysis.KeywordAnalyzer 2
把Katta自带的索引testIndexA加入到Katta中进行管理

最后,我们可以查找了:
bin/katta search testIndex foo:bar 4

在窗口上会出现查找的结果。

以上操作是在一台机器上的运行的,所以完全没有体现Katta的分布式应用,以后会继续更新。