Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[기능개선] timestamp 의 형식을 ISOFormat 으로 변경 #4

Open
maxmin93 opened this issue Jul 1, 2020 · 0 comments
Open

[기능개선] timestamp 의 형식을 ISOFormat 으로 변경 #4

maxmin93 opened this issue Jul 1, 2020 · 0 comments

Comments

@maxmin93
Copy link
Contributor

maxmin93 commented Jul 1, 2020

이유

  • spark 에서 date 필드 인식을 위해 필요
    • ISO8601: "T"로 date 와 time 이 구분되는 기본 형식
    • ES-Hadoop can work only with ISO8601 dates link
  • es-hadoop 설정시 custom date 필드를 Long 또는 String 으로 변환해서 사용해야 함
    • es option : es.mapping.date.rich=false ==> joda 라이브러리 적용 안함 doc
  • 현재 포맷은 "yyyy-MM-dd HH:mm:ss" ==> 변경 요청 포맷은 "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
    • ex) "2014-06-01 03:02:13" ==> "2014-06-01T03:02:13.552Z"
    • millisecond 가 불필요한 낭비라고 생각해서 보기도 좋은 포맷으로 custom 설정 했었음 (my mistake)
    • custom 처리를 위해 많은 부분, 특히 agens-alert 에서 ISOFormatPattern 처리와 javascript 에서의 날짜 계산에서 손해가 큼

변경 범위

  • agenspop-es : mapping 과 jackson module 등 날짜 관련 코드들
  • agenspop-spark : es-option 과 schemaType 관련 코드들
  • agens-alert : 날짜 범위 계산 등 API 호출시 date/time 파라미터 관련 코드들 ==> 변경사항이 가장 많음

작업 계획

  • 최종 데모 끝나고 하는 것으로 계획
  • 일단은 spark-hive-es 연결 기능 테스트부터 하고

참고문서

  • es.mapping.date.rich=false doc
  • Z/ZZ/ZZZ 차이 doc
    • 'Z' outputs offset without a colon,
    • 'ZZ' outputs the offset with a colon,
    • 'ZZZ' or more outputs the zone id.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant