메뉴 건너뛰기

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

번호 제목 글쓴이 날짜 조회 수
479 Lagom에서 제공하는 Maven을 이용한 Hello프로젝트 자동생성 및 실행 총관리자 2018.01.19 81
» lagom에서 제공하는 초기 생성기능을 이용하여 생성한 프로젝트의 소스 파악 총관리자 2018.01.16 111
477 spark stream처리할때 두개의 client프로그램이 동일한 checkpoint로 접근할때 발생하는 오류 내용 총관리자 2018.01.16 1115
476 shard3가 있는 서버에 문제가 있는 상태에서 solr query를 요청하는 경우 "no servers hosting shard: shard3" 오류가 발생하는 경우 조치사항 총관리자 2018.01.04 174
475 solr 데몬이 떠있는 동안 hadoop이 다운되는 경우 Index dir 'hdfs://mycluster/user/../core_node2/data/index/' of core 'gc_shard1_replica2' is already locked라논 오류가 발생하는데 이에 대한 조치사항 총관리자 2018.01.04 268
474 [Decommission]시 시간이 많이 걸리면서(수일) Decommission이 완료되지 않는 경우 조치 총관리자 2018.01.03 5278
473 [2.7.2] distribute-exclude.sh사용할때 ssh 포트변경에 따른 오류발생시 조치사항 총관리자 2018.01.02 89
472 hadoop cluster에 포함된 노드중에서 문제있는 decommission하는 방법및 절차 file 총관리자 2017.12.28 660
471 windows7에서 lagom의 hello world를 빌드하여 실행하는 경우의 로그(mvn lagom:runAll -Dscala.binary.version=2.11) 총관리자 2017.12.22 152
470 Lagom프레임웍에서 제공하는 HelloWorld 테스트를 수행시 [unknown-version]오류가 발생하면서 빌드가 되지 않는 경우 조치사항 총관리자 2017.12.22 56
469 [DBeaver 4.3.0]import/export시 "Client home is not specified for connection" 오류발생시 조치사항 총관리자 2017.12.21 753
468 전체 컨택스트 내용 file 총관리자 2017.12.19 66
467 [gson]mongodb의 api를 이용하여 데이타를 가져올때 "com.google.gson.stream.MalformedJsonException: Unterminated object at line..." 오류발생시 조치사항 총관리자 2017.12.11 4382
466 컴퓨터 무한 재부팅 원인및 조치방법 file 총관리자 2017.12.05 104
465 권한회수 및 권한부여 명령 몇가지 총관리자 2017.11.16 63
464 db를 통째로 새로운 이름의 db로 복사하는 방법/절차 총관리자 2017.11.14 428
463 oneM2M Specification(Draft Release 3, 2, 1), Draft Technical Reports 총관리자 2017.10.25 81
462 Windows7 64bit 환경에서 ElasticSearch 5.6.3설치하기 총관리자 2017.10.13 63
461 windows 혹은 mac에서 docker설치하기 위한 파일 총관리자 2017.10.13 42
460 lagom-windows용 build.sbt파일 내용 총관리자 2017.10.12 60

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.

위로