메뉴 건너뛰기

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

번호 제목 글쓴이 날짜 조회 수
619 CM의 Impala->Query tab에서 FINISHED query가 보이지 않는 현상 총관리자 2021.08.31 35
618 tablet별 disk사용량 확인하는 방법 총관리자 2021.08.27 117
617 AnalysisException: Incomplatible return type 'DECIMAL(38,0)' and 'DECIMAL(38,5)' of exprs가 발생시 조치 총관리자 2021.07.26 33
616 drop table로 삭제했으나 tablet server에는 여전히 존재하는 테이블 삭제방법 총관리자 2021.07.09 7544
615 impala session type별 표시되는 정보로 구분하는 방법 총관리자 2021.05.25 90
614 Hive JDBC Connection과 유형별 에러및 필요한 jar파일 총관리자 2021.05.24 823
613 [Kudu] tablet server 혹은 kudu master가 어떤 원인에 의해서 replica가 failed상태인 경우 복구하는 방법 총관리자 2021.05.24 310
612 impald에서 idle_query_timeout 와 idle_session_timeout 구분 총관리자 2021.05.20 1630
611 missing block및 관련 파일명 찾는 명령어 총관리자 2021.02.20 155
610 lombok설치방법 총관리자 2020.06.20 49
609 [sap] Error: java.io.IOException: SQLException in nextKeyValue 오류 발생 총관리자 2020.06.08 266
608 [kudu]테이블 drop이 안되고 timeout이 걸리는 경우 조치 방법 총관리자 2020.06.08 346
607 [oozie] oozie shell action에서 shellscript수행결과의 2개 변수를 decision 액션에서 사용하기 총관리자 2020.06.05 133
606 [Sentry]HDFS의 ACL을 Sentry와 연동후 테스트 총관리자 2020.06.02 610
605 [sqoop] mapper를 2이상으로 설정하기 위한 split-by컬럼을 찾을때 유용하게 활용할 수 있는 쿼리 총관리자 2020.05.13 329
604 mysql sqoop작업을 위해서 mysql-connector-java.jar을 추가하는 경우 확실하게 인식시키는 방법 총관리자 2020.05.11 62
603 W/F수행후 Logs not available for 1. Aggregation may not to complete. 표시되며 로그내용이 보이지 않은 경우 총관리자 2020.05.08 2110
602 A Cluster의 HDFS 디렉토리및 파일을 사용자및 권한 유지 하여 다운 받아서 B Cluster에 넣기 총관리자 2020.05.06 77
601 impala external 테이블 생성시 컬럼과 라인 구분자를 지정하여 테이블 생성하는 예시 총관리자 2020.02.20 107
600 [Kerberos]Kerberos상태의 클러스터에 JDBC로 접근할때 케이스별 오류내용 총관리자 2020.02.14 754

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.

위로