This repository has been archived by the owner on Jun 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
zhongyan.feng
committed
Aug 5, 2015
1 parent
ae1f5dd
commit e935da9
Showing
1,761 changed files
with
173,959 additions
and
125,912 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
JAVA_HOME=/opt/taobao/java | ||
export PATH=$PATH:$JAVA_HOME/bin | ||
|
||
LOG=/home/admin/logs/check.log | ||
SP=`ps -ef |grep com.alibaba.jstorm.daemon.supervisor.Supervisor |grep -v grep |wc -l` | ||
if [ $SP -lt 1 ];then | ||
mkdir -p /home/admin/logs | ||
echo -e "`date` [ERROR] no process and restart Jstorm Suppervisor" >>$LOG | ||
cd /home/admin/bin; nohup /home/admin/jstorm/bin/jstorm supervisor >/dev/null 2>&1 & | ||
else | ||
echo -e "`date` [INFO:] return $SP Jstorm Supervisor ok " >>$LOG | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
#!/bin/sh | ||
|
||
if [ -e ~/.bashrc ] | ||
then | ||
source ~/.bashrc | ||
fi | ||
|
||
if [ -e ~/.bash_profile ] | ||
then | ||
source ~/.bash_profile | ||
fi | ||
|
||
if [ "x$JAVA_HOME" != "x" ] | ||
then | ||
echo "JAVA_HOME has been set " | ||
else | ||
export JAVA_HOME=/opt/taobao/java | ||
fi | ||
echo "JAVA_HOME =" $JAVA_HOME | ||
|
||
if [ "x$JSTORM_HOME" != "x" ] | ||
then | ||
echo "JSTORM_HOME has been set " | ||
else | ||
export JSTORM_HOME=/home/admin/jstorm | ||
fi | ||
echo "JSTORM_HOME =" $JSTORM_HOME | ||
|
||
if [ "x$JSTORM_CONF_DIR_PATH" != "x" ] | ||
then | ||
echo "JSTORM_CONF_DIR_PATH has been set " | ||
else | ||
export JSTORM_CONF_DIR_PATH=$JSTORM_HOME/conf | ||
fi | ||
echo "JSTORM_CONF_DIR_PATH =" $JSTORM_CONF_DIR_PATH | ||
|
||
|
||
|
||
export PATH=$JAVA_HOME/bin:$JSTORM_HOME/bin:$PATH | ||
|
||
|
||
which java | ||
|
||
if [ $? -eq 0 ] | ||
then | ||
echo "Find java" | ||
else | ||
echo "No java, please install java firstly !!!" | ||
exit 1 | ||
fi | ||
|
||
function startJStorm() | ||
{ | ||
PROCESS=$1 | ||
echo "start $PROCESS" | ||
cd $JSTORM_HOME/bin; nohup $JSTORM_HOME/bin/jstorm $PROCESS >/dev/null 2>&1 & | ||
sleep 4 | ||
rm -rf nohup | ||
ps -ef|grep $2 | ||
} | ||
|
||
|
||
|
||
HOSTNAME=`hostname -i` | ||
NIMBUS_HOST=`grep "nimbus.host:" $JSTORM_CONF_DIR_PATH/storm.yaml | grep -w $HOSTNAME` | ||
SUPERVISOR_HOST_START=`grep "supervisor.host.start:" $JSTORM_CONF_DIR_PATH/storm.yaml | grep -w "false"` | ||
|
||
if [ "X${NIMBUS_HOST}" != "X" ] | ||
then | ||
startJStorm "nimbus" "NimbusServer" | ||
fi | ||
|
||
if [ "X${SUPERVISOR_HOST_START}" == "X" ] | ||
then | ||
startJStorm "supervisor" "Supervisor" | ||
fi | ||
|
||
echo "Successfully start jstorm daemon...." |
0
jstorm-server/bin/stop.sh → bin/stop.sh
100644 → 100755
File renamed without changes.
0
jstorm-server/conf/cgconfig.conf → conf/cgconfig.conf
100644 → 100755
File renamed without changes.
0
jstorm-server/conf/aloha_log4j.properties → conf/client_log4j.properties
100644 → 100755
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<configuration scan="true" scanPeriod="30 seconds"> | ||
<appender name="A1" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder> | ||
<pattern>%-4r [%t] %-5p %c - %m%n</pattern> | ||
</encoder> | ||
</appender> | ||
<logger name="org.apache.zookeeper" level="ERROR" /> | ||
<logger name="com.netflix.curator" level="ERROR" /> | ||
<logger name="com.alibaba.jstorm.common.metric" level="ERROR" /> | ||
<logger name="com.alibaba.jstorm.daemon.nimbus.TopologyMetricsRunnable" level="ERROR" /> | ||
<logger name="com.alibaba.jstorm.metric" level="ERROR" /> | ||
|
||
<root level="INFO"> | ||
<appender-ref ref="A1" /> | ||
</root> | ||
</configuration> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0
jstorm-server/conf/storm.yaml → conf/storm.yaml
100644 → 100755
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
find . -name \*.java -exec sh -c "if ! grep -q 'LICENSE-2.0' '{}';then mv '{}' tmp && cp LICENSEHEADER.txt '{}' && cat tmp >> '{}' && rm tmp;fi" \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* 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. | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env python | ||
# | ||
# 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. | ||
|
Oops, something went wrong.