본문 바로가기

Big Data/Storm

Apache Storm #3 (Stream windows API: Trident) Apache StormStream windows API (Trident) Trident의 Stream API중 window()가 있다. 이는 Streaming의 특징인 windowing 을 지원하는 메소드이다.간단히 설명해 windowing은 batch 처리를 할때 Tuple의 양을 일정 기준에 따라 정해서 처리하는 것이다.Storm 공식 문서에는 아래와 같이 설명하고 있다. Trident streams can process tuples in batches which are of the same window and emit aggregated result to the next operation. There are two kinds of windowing supported which are based on.. 더보기
Apache Storm #2 (WordCount 샘플 Topology 만들기) Apache StormWordCount 샘플 Topology 만들기 1. 프로젝트 생성IDE로 IntelliJ를 사용하여 Java Maven 프로젝트를 생성한다. Java 버젼은 1.8로 선택했다. 프로젝트가 만들어지면 pom.xml에서 storm-core 디펜던시를 추가한다. org.apache.storm storm-core 1.0.2 이렇게 하면 Storm 코드를 local에서 테스트하기 위한 모든 준비가 끝이다. 2. WordCounting 샘플 Word Counting은 가장 많이 사용되는 샘플이다. Storm으로 해당 샘플을 작성해본다. 2.1 Spout Spout는 데이터를 읽어오는 역할을 한다. 스톰은 Tuple 형식으로 데이터를 다룬다.아래 작성한 SentenceSpout는 5줄의 미리 작.. 더보기
Apache Storm #1 (Cluster 환경 구축) Storm Cluster 환경 구축 1. Zookeeper 설치https://zookeeper.apache.org/ 에서 Zookeeper를 다운로드 하고 압축을 푼다. 설정은 ~/conf/zoo_sample.cfg 파일을 그대로 ~/conf/zoo.cfg 로 복사한다. 따로 변경할건 없지만 dataDir만 변경하여 저장했다. 1.1 Zookeeper 실행 sudo sh zkServer.sh start 명령어를 통해 Zookeeper 를 실행시킨다. ZooKeeper JMX enabled by defaultUsing config: /Users/jiminsub/Apps/Dev/zookeeper-3.4.9/bin/../conf/zoo.cfg-n Starting zookeeper ... STARTED 2. S.. 더보기