`
文章列表

Java 多线程

    博客分类:
  • java
ThreadLocal http://blog.csdn.net/qjyong/article/details/2158097   http://lavasoft.blog.51cto.com/62575/51926/   http://lujh99.iteye.com/blog/103804   http://javarevisited.blogspot.hk/2012/05/how-to-use-threadlocal-in-java-benefits.html   http://javapapers.com/core-java/threadlocal/   htt ...

Java容器类

    博客分类:
  • java
Java 容器快速报错(fail-fast)机制        如果你在迭代容器元素的过程时,有别的方法添加,删除或者修改了元素的值,这个时候就会抛出ConcurrentModificationException.       实现机制:以ArrayList为例,它调用iterator方法时候,其实是调用 ...
    cluster setting  shards : 5 replica : 0 There are 3 ES nodes. NODE_1 master NODE_2 NODE_3 After some indices are completed, using the segment api we can see that there are 5 primary active shards. NODE_1 (master)  shard1, shard2 NODE_2           shard3 NO ...
// make sure the index existing before putting the mapping Map map = client.admin().cluster() .health(new ClusterHealthRequest(indexName)).actionGet() .getIndices(); // map is always empty!!?? boolean exists = map.containsKey(indexName); if (!exists) { client.admin().ind ...
  #get all the log events by logtype with a single value tomcat curl -XGET 'http://ES_HOST_SERVER:9200/INDEX_NAME/153299/_search' -d '{     "query" : {         "term" : { "logtype" : "tomcat" }      } } '    #get all the log events by logtype with valu ...
  http://www.elasticsearch.org/ http://elasticsearch-users.115913.n3.nabble.com/ https://groups.google.com/forum/?fromgroups=#!forum/elasticsearch       ##### index settings #####  http://ES_HOST_SERVER:9200/INDEX_NAME/_settings   #####  pretty format #####  http://ES_HOST_SERVER:9200/15 ...
Q1 Sometimes SCM manger lose connection with agent because the agent is dead. A1 You should start the agent service. $cd /etc/init.d $./cloudera-scm-agent status $./cloudera-scm-agent start   Cloudera distribution (CDH3 & CDH4) uses an agnet to control and monitor nodes. If the agent st ...
1. Find out what the current open file descriptor limit is.   $more /proc/sys/fs/file-max 753825  or    $sysctl -a | grep fs.file-max fs.file-max = 753825 2. View how many open file descriptors are currently being used.   $more /proc/sys/fs/file-nr 4080    0       753825 3. Edit the kerne ...
ENV list OS : redhat linux enterprise server 5.6   Install Jenkins 1. download rpm installer from http://pkg.jenkins-ci.org/redhat/ 2. logon your system, scsu to root  $pwd /root $ls apache-ant-1.8.4-bin.tar.bz2  jenkins-1.488-1.1.noarch.rpm $ 3. install it   rpm -ivh jenkins-1.488-1.1.no ...

YAML

http://www.yaml.org/   YAML: YAML Ain't Markup Language What It Is: YAML is a human friendly data serialization standard for all programming languages. YAML Resources: YAML 1.2 (3rd Edition): http://yaml.org/spec/1.2/spec.html YAML 1.1 (2nd Edition): http://yaml.org/spec/1.1/ YA ...

Jenkins SVN

    $pwd /root/.jenkins/jobs/projectName_wasce/workspace $ls -a .                         build-parser.xml  .project ..                        build.xml         solr-projectName build                     .classpath        src build-collector.xml       conf              .svn build-common.xml ...

Java 字符串本质

    博客分类:
  • java
Java字符串本质上是char序列组成.char是一个采用UTF-16编码表示Unicode代码点的代码单元.大多数的常用Unicode字符使用一个代码元就可以表示,而辅助字符需要一对代码元表示.具体编码规范见 http://ilnba.iteye.com/admin/blogs/1612414  length方法将返回采用UTF-16编码表示的给定字符串所需要的代码单元数量.    public class StringTest { public static void main(String[] args){ String greeting="\uD9 ...
FAQ 1. Lease does not exist http://www.linuxlefty.com/SysAdmin/lease-does-not-exist-error-hbase-export.html Hbase Performance Tool http://wiki.apache.org/hadoop/Hbase/PerformanceEvaluation Optimizing HBase MapReduce scans (for Hive) http://gbif.blogspot.hk/2012/05/optimizing-hbase-mapreduce-sca ...
http://www.shaunabram.com/multiple-tomcat-instances/ http://www.coderanch.com/t/550067/Tomcat/Starting-Stopping-multiple-instances-apache http://kief.com/running-multiple-tomcat-instances-on-one-server.html http://stackoverflow.com/questions/1794444/use-multiple-catalina-base-to-setup-tomcat-6-ins ...

GET VS POST

http://mzhou.me/?p=77001 http://www.diffen.com/difference/Get_vs_Post http://stevenclark.com.au/2008/01/12/get-vs-post-for-the-beginner/ http://www.cs.tut.fi/~jkorpela/forms/methods.html http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url
Global site tag (gtag.js) - Google Analytics