메뉴 건너뛰기

Bigdata, Semantic IoT, Hadoop, NoSQL

Bigdata, Hadoop ecosystem, Semantic IoT등의 프로젝트를 진행중에 습득한 내용을 정리하는 곳입니다.
필요한 분을 위해서 공개하고 있습니다. 문의사항은 gooper@gooper.com로 메일을 보내주세요.


stream-api
 StreamService.java : 가. stream 인터페이스를 정의함
                      나. Lagom이 어떻게 서비스하는지와 HelloStream서비스를 이용하기 위한 모든것을 정의함.(현재 autonomousStream()가 정의되어 있음)

stream-impl
 StreamModule.java : 가. StreamService와 StreamServiceImpl클래스를 바인딩함
                     나. bindService, bindClient, bind메서를 이용하여 바인딩함
      
    StreamRepository.java : 가. Cassandra에 대한 session정보를 가지고 있음
                            나. session정보가 없으면 Cassandra에 테이블을 생성하고 session정보를 확득하여 가지고 있음(greeting_message테이블을 생성함)
       다. updateMessage(), getMessage()메서스를 가지고 있음
    StreamServiceImpl.java : 가. StreamService에 대한 구현클래스
                          나. HelloService및 StreamRepository를 상태로 가지고 있음
        다. directStrem(), autonomousStream()메서드(서비스)를 가지고 있음
    StreamSubscriber.java : 가. HelloService event stream을 구독한다.
                         나. GreetingMessageChanged가 되면 repository의 updateMessage를 호출한다.
 
 resources/application.conf
     play.modules.enabled += com.example.hello.stream.impl.StreamModule
  lagom.persistence.ask-timeout = 10s
  stream.cassandra.keyspace = stream
  cassandra-journal.keyspace = ${stream.cassandra.keyspace}
  cassandra-snapshot-store.keyspace = ${stream.cassandra.keyspace}
  lagom.persistence.read-side.cassandra.keyspace = ${stream.cassandra.keyspace}


  
  
  
hello-api
 HelloEvent.java : HelloEvent인터페이스를 상속한 GreetingMessageChanged라는 event클래스(name과 message를 가짐)를 가지고 있는 클래스 파일
 HelloService.java : Hello가 제공하는 서비스에 대하여 Lagom이 알아야 하는 모든것을 기술(hello, useGreeting, helloEvents메서드가 정의되어 있음)
 GreatingMessage.java : message를 담고 있는 클래스 파일

hello-impl
 HellpEvent.java : 가. hello-api에 있는 HelloEvent클래스와 상관없는거 같음
       나. Hello entity가 제공하는 모든 event를 정의한 HelloEvent 인터페이스를 이용하여 GreetingMessageChanged클래스를 정의함
       다. Tags는 event의 stream을 get하고 publish하는데 사용됨, 각 event는 이 태그를 가지게 된다.
      (이 경우는 tag를 4개의 shard로 partitioning하여 event가 4개의 동시적인 processor/publisher를 가지게 된다)
        
      
 HelloServiceImpl.java : HelloService의 구현 클래스 파일
 HelloState.java   : event의 message를 가지고 있는 클래스(message와 timestamp속성을 가짐)
 HelloCommand.java : Hello entity가 제공하는 모든 명령을 정의하는 클래스 파일(UseGreetingMessage와 Hello 클래스 두개가 정의되어있음)
 HelloEntity.java : 가. event sourced entity로서 어떤 인사를 해야 하는지를 알려주는 값을 저장하고 있는 상태를 가지고 있다.
                    나. event sourced entity는 command를 보냄으로서 상호작용을 한다.
        다. 두개의 command(UserGreetingMessage(greeting을 변경할때 사용하는 command), Hello(읽기전용 command로 이름으로 구분된는 command에게 보내는 greeting을 리턴한다 ))
        라. command는 event로 변환되며 entity에 의해서 연속성을 갖게된다. 그리고 event handler는 단순하게 event를 현재상태에 적용한다. 이것은 event가 처음 생성될때 이루어지며
            entity가 데이타베이스로부터 적재될때 이루어진다. 각각의 이벤트는 entity의 상태를 재생성하기 위해서 replay된다.
        마. 이 entity는 한개의 event를 정의한다. 즉 GreetingMessageChangedㄹ는 이벤트는 UseGreetingMessage라는 command를 받으면 emit된다.
        바. entity는 다른 상태에 따른 른 behaviours를 정의할 수 있으나 항상 initialBehavior에서 시작한다.
 HelloModule.java : 서비스가 가능하도록 HelloService와 HelloServiceImpl 클래스를 바인드하는 모듈 클래스
 
resources/application.conf
  play.modules.enabled += com.example.hello.hello.impl.HelloModule
  lagom.persistence.ask-timeout = 10s
  hello.cassandra.keyspace = hello
  cassandra-journal.keyspace = ${hello.cassandra.keyspace}
  cassandra-snapshot-store.keyspace = ${hello.cassandra.keyspace}
  lagom.persistence.read-side.cassandra.keyspace = ${hello.cassandra.keyspace}

intergration-tests


my-first-system

번호 제목 글쓴이 날짜 조회 수
599 cloudera서비스 중지및 기동순서 총관리자 2020.02.14 178
598 impala테이블 쿼리시 max_row_size 관련 오류가 발생할때 조치사항 총관리자 2020.02.12 216
597 hue.axes_accessattempt테이블 데이터 샘플 총관리자 2020.02.10 108
596 hue.desktop_document2의 type의 종류 총관리자 2020.02.10 631
595 hue db에서 사용자가 가지는 정보 확인 총관리자 2020.02.10 1644
594 Cloudera의 CMS각 컴포넌트의 역할 총관리자 2020.02.10 71
593 Namenode Metadata백업하는 방법 총관리자 2020.02.10 368
592 cloudera의 hue에서 사용자가 사용한 쿼리 목록 총관리자 2020.02.07 154
591 hive metadata(hive, impala, kudu 정보가 있음) 테이블에서 db, table, owner, location를 조회하는 쿼리 총관리자 2020.02.07 379
590 쿠버네티스(k8s) 설치 및 클러스터 구성하기 총관리자 2019.10.19 336
589 [kubernetes]우분투 Kubernetes 설치 방법 file 총관리자 2019.07.24 1205
588 LAGOM 1.4 AND KUBERNETES ORCHESTRATION 총관리자 2019.07.19 78
587 oozie WF에서 참고할만한 내용 총관리자 2019.07.18 168
586 [shellscript] 함수에 배열을 인자로 주어서 처리하는 방법 총관리자 2019.07.16 191
585 [shellscript]엑셀파일에서 여러줄에 존재하는 단어를 한줄의 문자열로 합치는 방법(comma로 구분) 총관리자 2019.07.15 811
584 원격에 있는 git를 받은후 기존repository삭제후 새로운 리포지토리에 연결하여 소스 등록 총관리자 2019.07.13 96
583 기준일자 이전의 hdfs 데이타를 지우는 shellscript 샘플 총관리자 2019.06.14 359
582 embedded-cassandra의 data 저장위치 총관리자 2019.06.09 336
581 elasticsearch에서 모든 인덱스(색인)을 삭제하는 방법 총관리자 2019.06.09 97
580 scala-eclipse 다운로드 총관리자 2019.06.09 174

A personal place to organize information learned during the development of such Hadoop, Hive, Hbase, Semantic IoT, etc.
We are open to the required minutes. Please send inquiries to gooper@gooper.com.

위로