[Elasticsearch] index vs. indice vs. indices ????

Elastic/Elasticsearch 2015. 3. 18. 12:08

뭘 중요하거나 특별한건 아니지만 용어에 대한 정리가 필요 할 수 있어 그냥 적어 봅니다.


흔히 검색엔진에서는 인덱스(index) 또는 컬렉션(collection) 이라고 합니다.

검색 대상 문서들에 대한 색인 집합(?) 이라고 보시면 될 것 같습니다.


그럼 elasticsearch에서는 어떻게 사용을 할까요?

elasticsearch 뿐만 아니라 대부분의 검색엔진에서는 개별 검색 대상 그룹을 인덱스 또는 컬렉션 이라고 부릅니다.

그렇기 때문에 elasticsearch에서도 인덱스(index)라고 부르고 있고 이런 인덱스들의 복수 묶음을 indices 라고  하고 있습니다.


indice라는 표현이 간혹 나오기도 하는데 현재는 index와 indices로 정리가 된것 같아 동일하게 맞춰 볼까 합니다.

(indice 가 딱히 틀렸다고 하기도 애매 합니다.) 


[표기]

index (O)

indice (△)

indices (O)


아래는 그냥 참고하시라고 퍼왔습니다.


Ref.

http://en.wiktionary.org/wiki/indice

http://grammarist.com/usage/indexes-indices/


Indexes vs. indices

Indexes and indices are both accepted and widely used plurals of the noun index. Both appear throughout the English-speaking world, butindices prevails in varieties of English from outside North America, while indexes is more common in American and Canadian English. Meanwhile,indices is generally preferred in mathematical, financial, and technical contexts, while indexes is relatively common in general usage.

Neither form is wrong. Both have been in English many centuries (and though indexes is now most common in American English, it predates the United States by centuries). It’s true that indices is the plural of index in Latin, but index is an English word when English speakers use it—and it is a longstanding one at that—so we can pluralize it according to the conventions of English.






:

[Intellij] maven 프로젝트 enable(?) 하기

ITWeb/개발일반 2015. 3. 18. 10:53

eclipse를 사용하다 요즘 apache ambari, tajo 관련 코드 및 개발 진행이 필요해 intellij로 넘어 가 볼까 하는데..

영 낯설다.. 


일단 maven project를 많이 사용하니 이것 부터 해보려 하는데.. 

eclipse에서 잘 되던 maven project를 intellij로 import 해서 test code를 일단 실행해 봤다.

뜨악~ 그냥 일단 빨갱이들이.. 쭈욱~~~~


test code도 실행이 안된다.

뭐 당연한 이야기.. ㅋㅋ


그럼 내가 뭘 해줘야 하지???



보이시죠??

해당 프로젝트에서 

Maven -> Generate Sources and Update Folders 

Maven -> Reimport

를 해주시면 됩니다.


이제 intellij도 함 사용해 보지요.

:

로그생성 프로그램 - makelogs

Elastic/Logstash 2015. 3. 11. 16:35

logstash에서 제공하는 generator가 쓸만하지 않아서 아래 도구 사용합니다.


[링크]

https://www.npmjs.com/package/makelogs


to install

npm install -g makelogs
makelogs --count=10m --days=-2,+10


[Command Help]

jeong-ui-MBP:makelogs hwjeong$ makelogs --help

A utility to generate sample log data.


Usage: makelogs [options]


Options:

  --count, -c     Total event that will be created, accepts expressions like "1m" for 1 million (b,m,t,h)       [default: 14000]

  --days, -d      The number of days ± today or two numbers, seperated by a comma, like "-1,+10" or "-10,+100"  [default: 1]

  --host, -h      The host name and port                                                                        [default: "localhost:9200"]

  --auth          user:password when you want to connect to a secured elasticsearch cluster over basic auth     [default: null]

  --shards, -s    The number of primary shards                                                                  [default: 1]

  --replicas, -r  The number of replica shards                                                                  [default: 0]

  --dry           Test/Parse your arguments, but don't actually do anything                                     [default: false]

  --help          This help message

  --reset         Clear all logstash-* indices before genrating logs

  --verbose       Log more info to the console

  --trace         Log every request to elastisearch, including request bodies. BE CAREFULL


[예제]

makelogs -c 100 -d 0 -h localhost:9200 -s 1 -r 0 --reset

makelogs -c 100 --days=-1,+1 -h localhost:9200 -s 1 -r 0 --reset


설명) -d 0 는 오늘 날짜 기준으로 데이터 생성

logstash-20150311


설명) --days=-1,+1 은 오늘 날짜 기준으로 앞뒤로 하나씩 인덱스를 더 생성

logstash-20150310

logstash-20150311

logstash-20150312

:

실무 예제로 배우는 Elasticsearch 검색엔진(활용편)

Elastic/Elasticsearch 2015. 3. 9. 18:43

4월에 종이책이 나옵니다.

그리고 책에 대한 부족한 부분이나 틀린 내용들에 대해서는 지속적으로 업데이트 하도록 하겠습니다.

블로그와 페북 커뮤니티를 통해서 제가 도움 드릴 수 있는 부분들은 열심히 지원도 하겠습니다.


감사합니다.


책소개

eBook & DRM-free

쉽고 빠르게 배울 수 있는 Elasticsearch 검색엔진 활용서


전작인 『실무 예제로 배우는 Elasticsearch 검색엔진 <기본편>』에서는 Elasticsearch의 기본 개념과 설치 방법, 검색서비스 구성을 다뤘고, 이번 <활용편>에서는 <기본편>에서 다루지 못한 확장 기능과 다양한 서비스의 활용 방법, Elasticsearch의 성능 최적화 방법을 소개한다.


검색엔진을 이용한 다양한 기술과의 접목과 활용, 사용자 정의 기능을 구현해서 적용할 수 있는 플러그인 구현 방법까지 Elasticsearch를 적극적으로 활용할 수 있는 방법을 보여주며, 기본적인 성능 최적화 방법과 가이드를 제공하여 대용량 트래픽의 처리와 안정성을 확보하는 데 도움을 줄 수 있도록 구성되어 있다.


이 책은 설치와 구성 등 기본적인 내용은 다루지 않으므로 Elasticsearch의 기본 내용을 알고 싶다면 『실무 예제로 배우는 Elasticsearch 검색엔진(기본편)』(한빛미디어, 2014)이 더 적합하다. 


대상 독자

  • 검색 서비스 개발에 관심 있는 기획자 또는 개발자
  • 상용 검색엔진을 오픈 소스 검색엔진으로 대체하길 원하는 서비스 관리자 또는 개발자
  • Elasticsearch의 고급 기능과 성능 최적화 등 활용 방법을 자세히 알고 싶은 개발자
맨위로

저자소개

[지은이] 정호욱

지난 13년 동안 야후코리아, NHN Technology, 삼성전자에서 커뮤니티, 소셜 검색, 광고 검색 관련 서비스를 개발해 오면서 검색엔진을 활용한 다양한 프로젝트를 수행하였다. 현재 빅 데이터 전문 기업인 그루터에서 오픈 소스 기반 검색엔진 개발자로 근무하고 있다. elasticsearch 기술에 대한 정보와 경험을 현재 개인 블로그(http://jjeong.tistory.com)를 통해 공유하고 있다.



맨위로

목차

chapter 1 검색 기능 확장 
    1.1 자동 완성 
    1.2 Percolator 
    1.3 Join 
    1.4 River 
    1.5 정리 


chapter 2 검색 데이터 분석
    2.1 Bucket Aggregation
    2.2 Metric Aggregation 
    2.3 정리 


chapter 3 Plugin
    3.1 Plugin 제작 
    3.2 REST Plugin 만들기 
    3.3 Analyzer Plugin 만들기 
    3.4 정리 


chapter 4 Hadoop 연동 
    4.1 MapReduce 연동 
    4.2 Hive 연동 
    4.3 정리 


chapter 5 ELK 연동 
    5.1 Logstash 
    5.2 Elasticsearch 
    5.3 Kibana 
    5.4 정리 


chapter 6 SQL 활용하기
    6.1 RDB 관점의 Elasticsearch 
    6.2 SQL 정의하기 
    6.3 SQL 변환하기 
    6.4 JDBC Driver 만들기 
    6.5 정리 


chapter 7 Elasticsearch 성능 최적화 
    7.1 하드웨어 관점 
    7.2 Document 관점 
    7.3 Operation 관점 
    7.4 정리 


:

[Ganglia] RRAs 설정 예제.

ITWeb/개발일반 2015. 3. 4. 12:16

[원문]

http://www.perzl.org/ganglia/bestpractices.html


Best Practices – Ganglia Sampling Intervals

Important to know:

  • The sampling interval is defined in /etc/gmetad.conf.
  • The "RRAs" stanza is used to defined individual settings.
  • The sampling settings are global.
  • If no "RRAs" stanza is defined a default configuration is used.
  • For historic reasons all values are specified in intervals of 15 seconds.

Example: Default settings in Ganglia

RRAs "RRA:AVERAGE:0.5:1:240"    \
     "RRA:AVERAGE:0.5:24:240"   \
     "RRA:AVERAGE:0.5:168:240"  \
     "RRA:AVERAGE:0.5:672:240"  \
     "RRA:AVERAGE:0.5:5760:370"


Translation:

  • Take 240 samples at 1 × 15 seconds intervals (used for display of hour)
  • Take 240 samples at 24 × 15 seconds (= 6 minutes) intervals (used for display of day)
  • Take 240 samples at 168 × 15 seconds (= 42 minutes) intervals (used for display of week)
  • Take 240 samples at 672 × 15 seconds (= 168 minutes) intervals (used for display of month)
  • Take 370 samples at 5760 × 15 seconds (= 24 hours) intervals (used for display of year)

Example: 1-minute sampling for one year

RRAs "RRA:AVERAGE:0.5:4:525600"


Translation:

  • Take 525600 samples at 4 × 15 seconds (= 1 minute) intervals
  • 525600 = 60 (samples/hour) × 24 (hours) × 365 (days) × 1 (year)

Example: 1-minute sampling for 6 months, 5-minute sampling for 2 years

RRAs "RRA:AVERAGE:0.5:4:259200"  \
     "RRA:AVERAGE:0.5:20:210240"


Translation:

  • Take 259200 samples at every 4 × 15 seconds (= 1 minute) intervals
    • 259200 = 60 (samples/hour) × 24 (hours) × 30 (days) × 6 (months)
  • Take 210240 samples at every 20 × 15 seconds (= 5 minutes) intervals
    • 210240 = 12 (samples/hour) × 24 (hours) × 365 (days) × 2 (years)

Example: 15-second sampling for 1 day, 1-minute sampling for 2 months, 10-minute sampling for 1 year

RRAs "RRA:AVERAGE:0.5:1:5760"   \
     "RRA:AVERAGE:0.5:4:86400"  \
     "RRA:AVERAGE:0.5:40:52560"


Translation:

    • Take 5760 samples at every 1 × 15 seconds intervals
    • 5760 = 4 (samples/minute) 60 (samples/hour) × 24 (hours)
  • Take 86400 samples at every 4 × 15 seconds (= 1 minute) intervals
    • 86400 = 60 (samples/hour) × 24 (hours) × 30 (days) × 2 (months)
  • Take 52560 samples at every 40 × 15 seconds (= 10 minutes) intervals
    • 52560 = 6 (samples/hour) × 24 (hours) × 365 (days) × 1 (year)

Example: 1-minute sampling for 2 months, 5-minute sampling for 6 months, 15-minute sampling for 3 years

RRAs "RRA:AVERAGE:0.5:4:86400"   \
     "RRA:AVERAGE:0.5:20:51840"  \
     "RRA:AVERAGE:0.5:60:105120"


Translation:

  • Take 86400 samples at every 4 × 15 seconds (= 1 minute) intervals
    • 86400 = 60 (samples/hour) × 24 (hours) × 30 (days) × 2 (months)
  • Take 210240 samples at every 20 × 15 seconds (= 5 minutes) intervals
    • 51840 = 12 (samples/hour) × 24 (hours) × 30 (days) × 6 (month)
  • Take 105120 samples at every 60 × 15 seconds (= 15 minutes) intervals
    • 105120 = 4 (samples/hour) × 24 (hours) × 365 (days) × 3 (years)


: