메뉴 건너뛰기

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

번호 제목 글쓴이 날짜 조회 수
540 spark-shell을 실행하면 "Attempted to request executors before the AM has registered!"라는 오류가 발생하면 총관리자 2018.06.08 542
539 SCM서비스를 추가하는 동안 Unexpected error. Unable to verify database connection. 오류발생시 확인 사항 총관리자 2018.06.08 196
538 Cloudera Manager에서 "Mismatched CDH versions: host has NONE but role expects 5 Suppress..."와 같이 오류 발생시 확인사항 총관리자 2018.06.06 228
537 JAVA_HOME을 명시적으로 지정하는 방법 총관리자 2018.06.04 165
536 spark 시동중 applicationHistory 로그 디렉토리가 없다고 하면서 기동되지 않는 경우 총관리자 2018.06.01 153
535 impala2를 Cloudera Manager가 아닌 수동으로 설치하는 방법 총관리자 2018.05.30 280
534 MapReduce2.0(YARN)기반의 CDH5 설치시 생성되는 사용자및 권한 부여 총관리자 2018.05.30 190
533 HUE를 사용할 사용자를 추가 하는 절차 총관리자 2018.05.29 367
532 JobHistory 서버 기동시 HDFS상에 특정 폴더를 생성할 수 없어서 기동하지 못하는 경우 조치 총관리자 2018.05.29 2898
531 DataNode를 기동할때 "Block pool ID needed, but service not yet registered with NN" 오류 발생에 따른 조치사항 총관리자 2018.05.28 961
530 Cloudera Manager설치및 Uninstall 방법(순서) 총관리자 2018.05.28 1642
529 우분투 서버에 GUI로 접속하기 file 총관리자 2018.05.27 212
528 Cloudera Manager재설치하는 동안 "Host is in bad health"오류가 발생하는 경우 확인/조치 사항 총관리자 2018.05.24 88
527 "You are running Cloudera Manager in non-production mode.." warning메세지가 나타나지 않게 조치하는 방법 총관리자 2018.05.23 64
526 oozie db변경후 재기동시 "Table 'oozie.VALIDATE_CONN' doesn't exist" 오류 발생시 조치방법 총관리자 2018.05.23 244
525 Embedded PostgreSql설정을 외부의 MariaDB로변경하기 [1] 총관리자 2018.05.22 169
524 CDH 5.14.2 설치중 agent설치에서 실패하는 경우 확인/조치 총관리자 2018.05.22 450
523 Cluster Install -> Provide Login Credentials에서 root가 아닌 다른 사용자를 지정하는 경우 "Exhausted available authentication methods"오류 발생시 조치방법 총관리자 2018.05.22 141
522 Cloudera Hadoop and Spark Developer Certification 준비(참고) 총관리자 2018.05.16 32
521 tar를 이용한 리눅스 백업 총관리자 2018.05.13 35

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.

위로