본문 바로가기

전체 글

solr cloud 적용해 보기 wget http://mirror.navercorp.com/apache/zookeeper/zookeeper-3.4.8/zookeeper-3.4.8.tar.gz 1번 서버mkdir -p /home/eclipse4j/tmp/zookeeperecho '1'> /home/eclipse4j/tmp/zookeeper/myid 2번 서버mkdir -p /home/eclipse4j/tmp/zookeeperecho '2'> /home/eclipse4j/tmp/zookeeper/myid ----------------------------------------------------------------------------------------Step 1:Node 1:zoo.cfgserver.1= 0.0.0.0::serve.. 더보기
joda time 날짜를 00시로 변환하기. 간혹 날짜 관련한 작업중 시작일 종료일등을 구할때 특정일+00:00:00 로 변환하고 싶을 때가 있다. 예로 이글을 쓰는 시간인 "2016/06/01 10:33:24"를 "2016/06/01 00:00:00"로.. joda 에서는 roundFloorCopy()를 이용하여 다음과 같이 처리하면 된다. DateTime basicDateTime = DateTime.now();DateTime basicDate = basicDateTime.dayOfMonth().roundFloorCopy();System.out.println(basicDate.toString("yyyyMMdd HH:mm:ss")); >> 2016/06/01 00:00:00 그외.basicDateTime.hourOfDay().roundFloorCo.. 더보기
List의 특정 키를 기준으로 Map으로 변환 - 2 : java 7/8 public class Employee {..private Integer age;private String name; List employees = Lists.ne...;.... JSDK 7 Guava 위의 리스트에서 Entity의 id를 Key로 갖는 Map으로 전환 하고 싶다면 guava에서 다음과 같이 하자. Map employeeMap = Maps.uniqueIndex(employees, new Function() {public Integer apply(Employee employee) {return employee.getAge;}}); JSDK 8 Lambda // 중복의 경우 Map employeeMap = employees.stream().collect(Collectors.groupingBy.. 더보기
Netflix:Hystrix 사용해보기 주소 https://github.com/Netflix/Hystrix/wikiIn a distributed environment, inevitably some of the many service dependencies will fail. Hystrix is a library that helps you control the interactions between these distributed services by adding latency tolerance and fault tolerance logic. Hystrix does this by isolating points of access between the services, stopping cascading failures across them, and .. 더보기
Ubuntu 14.04의 mysql 5.5 -> 5.6 Ubuntu 14.04의 mysql 기본 버전 - 5.5 sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-5.5 mysql-client-core-5.5 sudo rm -rf /etc/mysql /var/lib/mysql sudo apt-get autoremove sudo apt-get autoclean Ubuntu 14.04의 mysql 기본 버전 - 5.6으로 변경 $ sudo apt-get install software-properties-common $ sudo add-apt-repository -y ppa:ondrej/mysql-5.6 $ sudo apt-get update $ sudo apt-get insta.. 더보기