본문 바로가기

Computer82

pig 실행시 오류 https://issues.apache.org/jira/browse/PIG-4164 pig를 실행할 때, 다음과 같은 메시지를 확인할 수 있다. 2014-09-10 15:13:55,370 [main] INFO org.apache.hadoop.ipc.Client - Retrying connect to server: daijymacpro-2.local/10.11.2.30:55223. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=3, sleepTime=1000 MILLISECONDS) 2014-09-10 15:13:56,371 [main] INFO org.apache.hadoop.ipc.Client.. 2015. 5. 26.
jquery 이용해서 키보드 입력시 input에 포커스 설정 및 블록 선택하기 123456789101112131415161718192021 $is_focused = false; $("body").keydown(function() { $("#query_input").focus(); }); $("#query_input").focus(function() { if($is_focused == false) { this.select(); $is_focused = true; }; }); $("#query_input").focusout(function() { if($is_focused == true) { $is_focused = false; }; });Colored by Color Scriptercs 2015. 5. 14.
ArrayList를 List로 선언하는 이유 List terms = new ArrayList(); 이렇게 선언해야 한다. 왜? List는 인터페이스ArrayList는 List의 구현체로 볼 수 있다. 그렇다면, 좀 더 큰 개념으로 선언해서 사용하는것인데... 그 이유는 다형성(polymorphism)의 개념으로 이해할 수 있다.List 인터페이스는 여러가지 구현체로 변경될 수 있는 형태이고,ArrayList는 List 인터페이스의 구현체 중 하나이다. 이 때, List로 선언해서 사용하면 차후에 다른 구현체로 변경하고자 할 때, 실제로 구현체를 이용하는 세부 코드(?)만 변경해 줄 수 있다. (반대로, ArrayList = new ArrayList()로 선언했다면 ArrayList로 선언한 모든 부분을 찾아 변경해줘야 한다.) 이런 부분이 다형성의.. 2015. 5. 12.
elasticsearch thread pool http://www.elastic.co/guide/en/elasticsearch/reference/1.x/modules-threadpool.html node는 thread memory consumption의 관리를 위해 several thread pools을 가진다.이 pool들은 queues를 가지고, request를 폐기하는대신 대기할 수 있다. index : fixed # of available processors, queue_size of 200search : fixed 3x # of available processors, queue_size of 1000suggest : fixed # of available processors, queue_size of 1000get : fixed # of av.. 2015. 5. 7.