自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(34)
  • 收藏
  • 关注

原创 centos上安装git 服务(转)

CentOS安装Git服务器 Centos 6.4 + Git 1.8.2.2 + gitosis (实测 笔记) 1.显示服务器版本cat /etc/redhat-release#CentOS release 6.4 (Final)ipconfig#服务器IP192.168.1.225 域名www.domain.com  SSH端口8200(默认为22)2.安装gityum ...

2015-03-18 13:46:20 83

原创 传说比protocolbuffer快4倍的msgpack

msgpack, 传说比protocolbuffer快4倍,比json快10倍的序列化lib. 有空用下。 官网:http://msgpack.org/git   :https://github.com/msgpack

2014-11-07 08:58:56 176

提高elasticsearch索引速度

提高索引性能和速度从几下方面着手: 1. 增大索引实时时间设置:index.engine.robin.refresh_interval :10s (默认为1s)  2. 增大内存缓冲区: indices.memory.index_buffer_size:20% (默认为heap大小的10%) 3. 增加translog方面的设置: index.translog.flush_thres...

2013-11-20 13:45:06 208

Elasticsearch Data Migration

本文介绍ES的数据迁移方案: 由于ES更新速度比较快,很大程度上, 我们需要更新版本、插件、甚至更新分词器, 单纯的upgrade很有可能不能满足业务需求, 更坏的情况下, 可能需要重建索引。本文从Java API 的角度来介绍ES的数据迁移(或数据重新索引)。基于以下逻辑实现,个人已测试过2亿数据的迁移,可以放心使用。 1. 获取clientl连接。本文选择transport...

2013-11-11 11:48:05 198

原创 Elasticsearch查询之TermsFilterBuilder

Lucene在做大量term值查询时, 如果这值过多, 超1024个term的话, 会出现TooManyClauses[maxClauseCount is set to 1024] 的异常,因此建议在term过多的情况下采用filter, 而不是query。以下是该情形在ES中的测试。  Settings defaultSettings = ImmutableSetting...

2013-05-07 11:51:27 811

原创 Tomcat内存溢出

Tomcat内存溢出的三种类型: 1.OutOfMemoryError: Java heap space --堆溢出2.OutOfMemoryError: PermGen space --永久保存区域溢出3.OutOfMemoryError: unable to create new native thread --无法创建新的线程(不是在JVM中创建,实际上是在操作系统中...

2013-03-20 09:31:08 116

原创 Linux Too many open files

解决方法:1./etc/pam.d/login 添加    /lib/security/pam_limits.so 2. /etc/security/limits.conf 添加 *          –    nofile       1006154 3.重启机器。

2013-01-12 16:53:48 59

原创 M9手机桌面图标文字模糊解决办法

解决步骤如下: 1.输入*#*#6961#*#*开启一些隐藏的设置2.进入 “设置”->“辅助功能”->“应用程序”->“全部”,找到"Flyme桌面",点“清除数据”...

2013-01-12 13:25:35 448

原创 Elasticsearch改变默认的分词器

ES默认的分词器为standard, 想要改变这个, 可以设置成自定义的analyzer. 例,想要改变成配置好的ik分词器, 在config/elasticsearch.yml文件中添加如下配置即可: index.analysis.analyzer.default.type:ik   前提当然是你已经安装了ik分词。...

2013-01-08 15:46:29 1086

Drools5 开发环境搭建

1. 下载drools.  http://www.jboss.org/drools/downloads 2.安装eclipse plugin.  在线安装地址:http://download.jboss.org/drools/release/5.5.0.Final/org.drools.updatesite/ 3.配置drools runtime. Eclipse--&...

2013-01-08 13:30:44 107

Elasticsearch Suggest 插件使用

插件作用: 用于做搜索提示,如搜索 ’中‘ 时, 提示’中国‘,’中华‘,’中央‘等以’中‘开头的词。 安装: plugin -url https://github.com/downloads/spinscale/elasticsearch-suggest-plugin/elasticsearch-suggest-0.0.4-0.19.0.zip -install suggest   ...

2012-12-14 17:18:02 592

原创 Eclipse 插件地址

git 插件:http://download.eclipse.org/egit/updates svn 插件: http://subclipse.tigris.org/update_1.6.x maven 插件: http://m2eclipse.sonatype.org/sites/m2e http://download.eclipse.org/technology/...

2012-11-06 21:05:36 108

原创 Elasticsearch TermFacet 耗内存问题

解决方案有下: 1.设置cache大小和过期时间。   index.cache.field.max_size   index.cache.field.expire 例如设置:  index.cache.field.max_size: 50000 //index中每个segment中可包含的最大的entries数目 index.cache.field.expire: 10...

2012-11-01 15:02:01 111

原创 Jquery autoComplete自动完成 转

http://blog.csdn.net/baolong47/article/details/6661909

2012-10-25 17:02:45 105

原创 Elasticsearch 10版本插件安装

进入elasticsearch安装目录下的bin目录:1.安装head插件 plugin -install mobz/elasticsearch-head  验证:  http://localhost:9200/_plugin/head/ *利用head查看关键字分词后的结果:导航到any request->query:  填写三个域:a. http://12...

2012-10-23 16:20:49 73

原创 apache 经典项目

[code="html"]Apache Shiro安全框架http://shiro.apache.org/Apache Shiro is a powerful and easy-to-use Java security framework that performs authentication, authorization, cryptography, and session...

2012-10-22 15:06:16 78

原创 Elasticsearch初始化配置

[code="java"]构建ES集群环境经常用到的配置:1.action.auto_create_index --配置是否自动创建索引(true OR false);2.gateway.type -- (fs, none, local);3.cluster.routing.schedule 如(50ms), 发现新节点时间Settings settings = s...

2012-10-22 15:03:45 320

原创 linux防火墙关闭

查看状态 /etc/init.d/iptables status关闭/etc/init.d/iptables stop永久关闭:chkconfig --level 35 iptables off/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT /etc/rc.d/init.d/iptables...

2012-10-19 13:05:19 53

原创 Elasticsearch mongodb river同步大量数据内存溢出

插件安装见鸿智兄的博客http://blog.csdn.net/laigood12345/article/details/7691068安装目前最新的插件命令如下:1../plugin  -install elasticsearch/elasticsearch-mapper-attachments/1.6.02../plugin -install richardwilly98/elasticsea...

2012-10-19 12:57:24 273

原创 centos下搭建mongodb集群

安装前先同步服务器时间: a.yum install ntpb.ntpdate 210.72.145.44同步时间方式2:yum install rdaterdate -t 60 -s stdtime.gov.hkhwclock -wrdate的命令使用方法介绍功能说明:显示其他主机的日期与时间。语  法:rdate [-ps][主机名称或IP地址....

2012-10-17 16:10:02 83

原创 set up Bugzilla on centos

[code="html"]Install PerlBugzilla 4.0.2 requires Perl version 5.8.1 or higher. Check with the following.perl -vIf perl is not installed, then:yum install perlBefore accepting, check if v...

2012-10-08 15:29:51 82

原创 Centos6 network configuration

vi /etc/sysconfig/network-scripts/ifc..eth0DEVICE="eth0"BOOTPROTO=noneNM_CONTROLLED="yes"ONBOOT="yes"TYPE="Ethernet"UUID="3965e64a-da5d-4414-871f-a9c3a63932f0"HWADDR=30:85:A9:43:38:4...

2012-09-14 15:25:05 136

原创 MYSQL改目录

[code="java"][root@mailsvr home]# /etc/init.d/mysql stop 停止服务[root@mailsvr home]# vi /etc/my.cnf 没有的话, cp /usr/share/mysql/my-medium.cnf /etc/my.cnf修改以下的相当内容:[mysqld]datadir=/mysqlhome/mys...

2012-09-11 12:49:46 60

Centos6 下搭建wiki服务器

搭建步骤如下:(root下执行)[code="java"]1. yum install httpd php pcre php-mysql php-pear php-pecl-apc mysql-server ImageMagick sendmail php-intl wget system-config-firewall-tui2. service mysqld start...

2012-09-10 17:08:52 181

原创 set up mysql on centos/linux

Refer to:http://smilemonkey.iteye.com/blog/673848http://heimuad.iteye.com/blog/129932 http://www.cnblogs.com/smalldirector/archive/2011/12/27/2303648.html # portset up mysql 5.5 using by mak...

2012-09-05 09:42:36 106

原创 install svn server on centos

Source URL:[url]http://www.if-not-true-then-false.com/2010/install-svn-subversion-server-on-fedora-centos-red-hat-rhel/[/url]Let's getting started now:[code="java"]1. Change root users...

2012-09-04 17:33:10 103

原创 Set up chrome on centos

way one:download the chrome rpm and run it, download url:[url]http://rpmfind.net/linux/rpm2html/search.php?query=chromium[/url].if you don't get permission, see this:[url]http://enetq.blog.5...

2012-09-04 16:32:21 109

原创 Set up chinese wubi input method on centos

Set up chinese wubi input method on centos1.wget http://www.xiit.cn/wp-content/uploads/2011/03/vissible-ibus.tar.gz2.tar -zxvf vissible-ibus.tar.gz3.cp vissible.db /usr/share/ibus-table/tables...

2012-09-04 16:27:55 92

原创 To make the input method icon show in Centos

1. kill the process [code="java"]killall ibus-daemon [/code]2. start the process [code="java"]ibus-daemon -d[/code] *CENTOS 6.0 开放端口[code="java"]/sbin/iptables -I INPUT -p tcp --dport ...

2012-09-04 13:37:08 81

为类属性赋值

写了个公共方法,用新对象中非NULL属性值去取代老对象中的同名属性值,备忘。[code="java"]import java.lang.reflect.Field;import java.lang.reflect.Method;public class Test{ /** * @param args */ public static void m...

2012-03-02 10:22:23 151

原创 struts2 filters configuration sequence in web.xml

struts 2、sitemesh、urlrewrite configuration sequence should be like below:1.struts-cleanup:2.sitemesh3.UrlRewriteFilter This should be after sitemesh,or the pages after rewrote can not be ...

2011-09-19 14:46:14 68

原创 Partition index solution

There are six types of maintenance operations that mark index partitions INDEXUNUSABLE (IU). Solution Explanation: Maintenance operations causing index partitions to become INDEX UNUSABLE ...

2011-09-19 14:41:29 80

原创 Spring3, Hibernate3.6与Proxool连接池配置

鉴于Spring3.0不采用Servlet启动,改用listener,并且针对Mysql与DBCP连接池在linux服务器上超时连接的Bug,现简要地做Spring3与Proxool连接池的配置:1.Web.xml配置:[code="java"] ServletConfigurator org.logicalcobwebs.p...

2011-08-05 10:27:27 96

最新SH、Lucene3、IKAnalyzer3.2.3整合实例

Spring3.1, Hibernate3.6,Lucene3.0.3以及IKAnalyzer3.2.3, 数据库采用Mysql,连接池采用dbcp.主要Jar如下:[img]http://dl.iteye.com/upload/attachment/531117/f64f9320-6fd5-38b0-ae19-6de33722bf7d.jpg[/img]Spring重要Bea...

2011-08-05 10:08:32 127

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除