From 01896a7fe8c10e21c0ce60f8d1e427bc52250588 Mon Sep 17 00:00:00 2001 From: darionyaphet Date: Wed, 11 May 2016 15:06:30 +0800 Subject: [PATCH 1/5] fix typos --- .../java/com/alibaba/jstorm/daemon/supervisor/Supervisor.java | 2 +- .../jstorm/daemon/worker/hearbeat/SyncContainerHb.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jstorm-core/src/main/java/com/alibaba/jstorm/daemon/supervisor/Supervisor.java b/jstorm-core/src/main/java/com/alibaba/jstorm/daemon/supervisor/Supervisor.java index 11f030bce..90a355678 100644 --- a/jstorm-core/src/main/java/com/alibaba/jstorm/daemon/supervisor/Supervisor.java +++ b/jstorm-core/src/main/java/com/alibaba/jstorm/daemon/supervisor/Supervisor.java @@ -119,7 +119,7 @@ public SupervisorManger mkSupervisor(Map conf, IContext sharedContext) throws Ex // Step 5 create HeartBeat // every supervisor.heartbeat.frequency.secs, write SupervisorInfo to ZK - // sync hearbeat to nimbus + // sync heartbeat to nimbus Heartbeat hb = new Heartbeat(conf, stormClusterState, supervisorId, localState, checkStatus); hb.update(); AsyncLoopThread heartbeat = new AsyncLoopThread(hb, false, null, Thread.MIN_PRIORITY, true); diff --git a/jstorm-core/src/main/java/com/alibaba/jstorm/daemon/worker/hearbeat/SyncContainerHb.java b/jstorm-core/src/main/java/com/alibaba/jstorm/daemon/worker/hearbeat/SyncContainerHb.java index ab4213fe5..812b77c97 100644 --- a/jstorm-core/src/main/java/com/alibaba/jstorm/daemon/worker/hearbeat/SyncContainerHb.java +++ b/jstorm-core/src/main/java/com/alibaba/jstorm/daemon/worker/hearbeat/SyncContainerHb.java @@ -75,7 +75,7 @@ public void checkNoContainerHbTimes() { } } - public void handlReadDir() { + public void handleReadDir() { if (StringUtils.isBlank(readDir) == true) { return; } @@ -180,7 +180,7 @@ public void run() { handleWriteDir(); - handlReadDir(); + handleReadDir(); } From 120ec4314b64c5cff2d11f4c6eed9c58a351e916 Mon Sep 17 00:00:00 2001 From: lkyprogramer Date: Thu, 2 Jun 2016 21:13:29 +0800 Subject: [PATCH 2/5] fix can't consume zero offset bug --- .../java/com/alibaba/jstorm/kafka/PartitionConsumer.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jstorm-utility/jstorm-kafka/src/main/java/com/alibaba/jstorm/kafka/PartitionConsumer.java b/jstorm-utility/jstorm-kafka/src/main/java/com/alibaba/jstorm/kafka/PartitionConsumer.java index 7dbc77654..caabc05d0 100644 --- a/jstorm-utility/jstorm-kafka/src/main/java/com/alibaba/jstorm/kafka/PartitionConsumer.java +++ b/jstorm-utility/jstorm-kafka/src/main/java/com/alibaba/jstorm/kafka/PartitionConsumer.java @@ -124,8 +124,12 @@ private void fillMessages() { ByteBufferMessageSet msgs; try { long start = System.currentTimeMillis(); - msgs = consumer.fetchMessages(partition, emittingOffset + 1); - + if(config.fromBeginning){ + msgs = consumer.fetchMessages(partition, emittingOffset); + }else { + msgs = consumer.fetchMessages(partition, emittingOffset + 1); + } + if (msgs == null) { short fetchResponseCode = consumer.getAndResetFetchResponseCode(); if (fetchResponseCode == ErrorMapping.OffsetOutOfRangeCode()) { From 249d59fc57dc2c818a7644a79e7bff317d2d360c Mon Sep 17 00:00:00 2001 From: xiaoyao2102 <343082962@qq.com> Date: Mon, 15 Aug 2016 14:40:42 +0800 Subject: [PATCH 3/5] Update Compile.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit compile拼成了comple --- docs/jstorm-doc/quickstart/Compile.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/jstorm-doc/quickstart/Compile.md b/docs/jstorm-doc/quickstart/Compile.md index eaa12aef7..ca01acfdb 100644 --- a/docs/jstorm-doc/quickstart/Compile.md +++ b/docs/jstorm-doc/quickstart/Compile.md @@ -3,7 +3,7 @@ title: "Build JStorm Source Code" # Top-level navigation top-nav-group: QuickStart top-nav-pos: 6 -top-nav-title: Comple JStorm +top-nav-title: Compile JStorm --- * This will be replaced by the TOC @@ -25,4 +25,4 @@ Build install tar ``` mvn package assembly:assembly -``` \ No newline at end of file +``` From d4ec7295505dffb8dad88c7ab5a77389962dbab3 Mon Sep 17 00:00:00 2001 From: Longda-Feng Date: Thu, 18 Aug 2016 14:26:19 +0800 Subject: [PATCH 4/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b176979f0..5de0bcb75 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![jstorm](http://jstorm.io/img/jstorm-small.jpg) -Please refer to http://jstorm.io for all documents +Please refer to [http://jstorm.io](http://120.25.204.125) for all documents # Getting help From 63bb94fd746bcfe946ed0e65ce8b7de4b2f3f881 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=96=E6=9D=A1?= Date: Thu, 18 Aug 2016 20:44:37 +0800 Subject: [PATCH 5/5] add deploy scripts --- docs/jstorm-doc/deploy.bat | 80 ++++++++++++++++++++++++++++++++++++++ docs/jstorm-doc/deploy.sh | 46 ++++++++++++++++++++++ 2 files changed, 126 insertions(+) create mode 100644 docs/jstorm-doc/deploy.bat create mode 100644 docs/jstorm-doc/deploy.sh diff --git a/docs/jstorm-doc/deploy.bat b/docs/jstorm-doc/deploy.bat new file mode 100644 index 000000000..f4474fd48 --- /dev/null +++ b/docs/jstorm-doc/deploy.bat @@ -0,0 +1,80 @@ +::############################################################################### +:: Licensed to the Apache Software Foundation (ASF) under one +:: or more contributor license agreements. See the NOTICE file +:: distributed with this work for additional information +:: regarding copyright ownership. The ASF licenses this file +:: to you under the Apache License, Version 2.0 (the +:: "License"); you may not use this file except in compliance +:: with the License. You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. +::############################################################################### + +@echo off +:start +call jekyll -version >nul 2>&1 +if "%errorlevel%"=="0" goto check_redcarpet +echo ERROR: Could not find jekyll. +echo Please install with 'gem install jekyll' (see http://jekyllrb.com). +exit /b 1 + +:check_redcarpet +call redcarpet -version >nul 2>&1 +if "%errorlevel%"=="0" goto check_pygments +echo ERROR: Could not find redcarpet. +echo Please install with 'gem install redcarpet' (see https://github.com/vmg/redcarpet). +echo Redcarpet is needed for Markdown parsing and table of contents generation. +exit /b 1 + +:check_pygments +call python -c "import pygments" >nul 2>&1 +if "%errorlevel%"=="0" goto check_git +echo ERROR: Could not find pygments. +echo Please install with 'sudo easy_install Pygments' (requires Python; see http://pygments.org). +echo Pygments is needed for syntax highlighting of the code examples. +exit /b 1 + +:check_git +call git --version >nul 2>&1 +if "%errorlevel%"=="0" goto execute +echo ERROR: Could not find Git. +echo Please install Git and add it into $PATH. +echo Git is needed for auto-deploy. +exit /b 1 + +:execute +SET "DOCS_SRC=%cd%" +SET "DOCS_DST=%DOCS_SRC%\_site" +SET "DEPLOY_DATE=%date:~0,10% %time:~0,2%:%time:~3,2%" + +::build doc +echo Start to build doc by Jekyll... +call jekyll build >nul 2>&1 +echo Build complete... + +::push pages to github.com +echo Setting up Git deployment... +call rm -rf .deploy_tmp +call mkdir .deploy_tmp +call cp -r _site/* .deploy_tmp/ >nul 2>&1 +echo Deploying... +call cd .deploy_tmp +call rm -rf jekyll/ +call rm deploy.bat +call git config --global http.postBuffer 8528000 >nul 2>&1 +call git init >nul 2>&1 +call git add -A >nul 2>&1 +call git commit -m "updated: %DEPLOY_DATE%" >nul 2>&1 +call git push -u https://github.com/alibaba/jstorm.git HEAD:documents --force +call cd .. +call rm -rf .deploy_tmp +echo Deploy successfully! +echo Press any key to exit +pause >nul 2>&1 +exit \ No newline at end of file diff --git a/docs/jstorm-doc/deploy.sh b/docs/jstorm-doc/deploy.sh new file mode 100644 index 000000000..ed8fa7d15 --- /dev/null +++ b/docs/jstorm-doc/deploy.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash +HAS_JEKYLL=true + +command -v jekyll > /dev/null +if [ $? -ne 0 ]; then + echo -n "ERROR: Could not find jekyll. " + echo "Please install with 'gem install jekyll' (see http://jekyllrb.com)." + + HAS_JEKYLL=false + exit +fi + +command -v redcarpet > /dev/null +if [ $? -ne 0 ]; then + echo -n "WARN: Could not find redcarpet. " + echo -n "Please install with 'sudo gem install redcarpet' (see https://github.com/vmg/redcarpet). " + echo "Redcarpet is needed for Markdown parsing and table of contents generation." +fi + +command -v pygmentize > /dev/null +if [ $? -ne 0 ]; then + echo -n "WARN: Could not find pygments. " + echo -n "Please install with 'sudo easy_install Pygments' (requires Python; see http://pygments.org). " + echo "Pygments is needed for syntax highlighting of the code examples." +fi + +echo "Start to build doc by Jekyll..." +jekyll build > /dev/null +echo "Build complete..." + +echo "Setting up Git deployment..." +rm -rf .deploy_tmp +mkdir .deploy_tmp +cp -r _site/* .deploy_tmp/ > /dev/null +echo "Deploying..." +cd .deploy_tmp +rm -rf jekyll/ +rm deploy.bat +git config --global http.postBuffer 8528000 > /dev/null +git init > /dev/null +git add -A > /dev/null +git commit -m "updated documents" > /dev/null +git push -u https://github.com/alibaba/jstorm.git HEAD:documents --force +cd .. +rm -rf .deploy_tmp +echo "Deploy successfully!" \ No newline at end of file