Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Commit test.

  • Loading branch information...
commit f644a1ecf35edc9b3b3b4eab6284563cd36eb81a 1 parent 6d61e75
@Taehui Taehui authored
View
14 bin/all_restart_test.sh
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-## This script is just for Hudson test
-
-echo "KILL ALL THE JAVA PROCESSES EXCEPT HUDSON PROCESS"
-ps -ef | grep "java" | grep -v "hudson" | grep -v "grep" | awk '{print $2}' | xargs kill -9
-
-echo "SLEEP 2 SEC"
-sleep 2
-
-echo "RUN PLEIADES"
-./bin/start-all.sh
-
-echo "TEST IS READY..."
View
16 bin/blobmanager-start.sh
@@ -1,16 +0,0 @@
-#!/usr/bin/env bash
-
-# Start cloudataloudata-fs web server.
-
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-. "$bin"/cloudata-config.sh
-
-if [ -f "${CLOUDATA_CONF_DIR}/cloudata-env.sh" ]; then
- . "${CLOUDATA_CONF_DIR}/cloudata-env.sh"
-fi
-
-. "$bin"/cloudata-config.sh
-
-"$bin"/cloudata-daemon.sh start blobmanager
View
10 bin/blobmanager-stop.sh
@@ -1,10 +0,0 @@
-#!/usr/bin/env bash
-
-# Stop cloudata-fs web server.
-
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-. "$bin"/cloudata-config.sh
-
-"$bin"/cloudata-daemon.sh stop blobmanager
View
80 bin/cconf.py
@@ -1,80 +0,0 @@
-#!/usr/bin/python
-
-import sys
-import os.path
-import xml.parsers.expat
-
-class Configuration:
- map={}
-
- def __init__(self, parentDir, defaultFileName, siteFileName):
- self.parse(parentDir, defaultFileName)
- self.parse(parentDir, siteFileName)
-
- def parse(self, parentDir, fileName):
- file = open(parentDir + '/' + fileName, 'r')
-
- parser = xml.parsers.expat.ParserCreate()
- parser.StartElementHandler = self.start_element
- parser.EndElementHandler = self.end_element
- parser.CharacterDataHandler = self.char_data
-
- parser.ParseFile(file)
-
- def start_element(self, name, attrs):
- self.currentTagName = name
-
- def end_element(self, name):
- if self.currentTagName == 'value':
- self.currentConfName=None
-
- self.currentTagName=None
-
- def char_data(self, data):
- if self.currentTagName == 'name':
- self.currentConfName = data
- elif self.currentTagName == 'value':
- if self.currentConfName == None:
- print "shit : ", data
- exit(1)
-
- self.map[self.currentConfName] = data
-
- def get(self, name):
- return self.map[name]
-
-
- def print_all(self):
- maxLen=0
- keyList=self.map.keys()
- keyList.sort()
- for k in keyList:
- if len(k) > maxLen:
- maxLen=len(k)
-
- maxTabCount= maxLen / 8 + 1
- #print "KEY%sVALUE" % self.get_tabs(maxTabCount)
- #print ""
-
- for k in keyList:
- tabCount = maxTabCount - (len(k) / 8)
- print '%s%s%s' % (k, self.get_tabs(tabCount), self.map[k])
-
- def get_tabs(self, tabCount):
- tabs=''
- i=0
- while(i < tabCount):
- i=i+1
- tabs +='\t'
-
- return tabs;
-
-
-if __name__ == "__main__":
- confPath = os.path.abspath(os.path.dirname(sys.argv[0])) + '/../conf'
-
- conf = Configuration(confPath, "cloudata-default.xml", "cloudata-site.xml")
- if len(sys.argv) == 1:
- conf.print_all()
- elif len(sys.argv) > 1:
- map(lambda f: sys.stdout.write(f + '\n'), map(lambda f: conf.get(f), sys.argv[1:]))
View
169 bin/cloudata
@@ -1,169 +0,0 @@
-#!/usr/bin/env bash
-#
-# The Cloudata command script
-#
-# Environment Variables
-#
-# JAVA_HOME The java implementation to use. Overrides JAVA_HOME.
-#
-# CLOUDATA_HEAPSIZE The maximum amount of heap to use, in MB.
-# Default is 2000.
-#
-# CLOUDATA_OPTS Extra Java runtime options.
-#
-# CLOUDATA_CONF_DIR Alternate conf dir. Default is ${CLOUDATA_HOME}/conf.
-#
-# CLOUDATA_ROOT_LOGGER The root appender. Default is INFO,console
-#
-
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-. "$bin"/cloudata-config.sh
-
-# if no args specified, show usage
-if [ $# = 0 ]; then
- echo "Usage: cloudata COMMAND"
- echo "where COMMAND is one of:"
- echo " localcluster run a all in one server for testing"
- echo " cloudatamaster run a cloudata master"
- echo " commitlogserver run a commitlogserver"
- echo " tabletserver run a tabletserver"
- echo " restserver run a RESTful HTTP server"
- echo " thriftserver run a thrift server"
- echo " blobmanager run a blob manager"
- echo " balancer run a balancer"
- echo " cloudatafs run a cloudata-fs"
- echo " shell run a shell"
- echo " fshell run cloudata-fs shell"
- echo " zshell run a zookeeper client <hostname:port> <command(help, ls, ...)>"
- echo " scan scan data"
- echo " zookeeper run a zookeeper server"
- exit 1
-fi
-
-# get arguments
-COMMAND=$1
-shift
-
-if [ -f "${CLOUDATA_CONF_DIR}/cloudata-env.sh" ]; then
- . "${CLOUDATA_CONF_DIR}/cloudata-env.sh"
-fi
-
-# some Java parameters
-if [ "$JAVA_HOME" != "" ]; then
- #echo "run java in $JAVA_HOME"
- JAVA_HOME=$JAVA_HOME
-fi
-
-if [ "$JAVA_HOME" = "" ]; then
- echo "Error: JAVA_HOME is not set."
- exit 1
-fi
-
-JAVA=$JAVA_HOME/bin/java
-
-# CLASSPATH initially contains $CLOUDATA_CONF_DIR
-CLASSPATH="${CLOUDATA_CONF_DIR}"
-CLASSPATH=${CLASSPATH}:"${HADOOP_CONF_DIR}"
-CLASSPATH=${CLASSPATH}:$JAVA_HOME/lib/tools.jar
-
-# for developers, add Cloudata classes to CLASSPATH
-#if [ -d "$CLOUDATA_HOME/build/classes" ]; then
-# CLASSPATH=${CLASSPATH}:$CLOUDATA_HOME/build/classes
-#fi
-
-# so that filenames w/ spaces are handled correctly in loops below
-IFS=
-
-for f in $CLOUDATA_HOME/cloudata-*core.jar; do
- CLASSPATH=${CLASSPATH}:$f;
-done
-
-# add libs to CLASSPATH
-for f in $CLOUDATA_HOME/lib/*.jar; do
- CLASSPATH=${CLASSPATH}:$f;
-done
-
-for f in $CLOUDATA_HOME/lib/jetty-ext/*.jar; do
- CLASSPATH=${CLASSPATH}:$f;
-done
-
-#add hadoop CLASSPATH
-for f in $HADOOP_HOME/hadoop-*.jar; do
- CLASSPATH=${CLASSPATH}:$f;
-done
-
-# add libs to CLASSPATH
-#for f in $HADOOP_HOME/lib/*.jar; do
-# CLASSPATH=${CLASSPATH}:$f;
-#done
-
-#for f in $HADOOP_HOME/lib/jetty-ext/*.jar; do
-# CLASSPATH=${CLASSPATH}:$f;
-#done
-
-# add user-specified CLASSPATH last
-if [ "$CLOUDATA_CLASSPATH" != "" ]; then
- CLASSPATH=${CLASSPATH}:${CLOUDATA_CLASSPATH}
-fi
-
-# default log directory & file
-if [ "$CLOUDATA_LOG_DIR" = "" ]; then
- CLOUDATA_LOG_DIR="$CLOUDATA_HOME/logs"
-fi
-if [ "$CLOUDATA_LOGFILE" = "" ]; then
- CLOUDATA_LOGFILE='cloudata.log'
-fi
-
-# restore ordinary behaviour
-unset IFS
-
-# figure out which class to run
-if [ "$COMMAND" = "cloudatamaster" ] ; then
- CLASS='org.cloudata.core.master.CloudataMaster'
- CLOUDATA_OPTS="$CLOUDATA_OPTS $CLOUDATA_MASTERNODE_OPTS"
-elif [ "$COMMAND" = "tabletserver" ] ; then
- CLASS='org.cloudata.core.tabletserver.TabletServer'
- CLOUDATA_OPTS="$CLOUDATA_OPTS $CLOUDATA_TABLETSERVER_OPTS"
-elif [ "$COMMAND" = "commitlogserver" ] ; then
- CLASS='org.cloudata.core.commitlog.CommitLogServer'
- CLOUDATA_OPTS="$CLOUDATA_OPTS $CLOUDATA_COMMITLOG_OPTS"
-elif [ "$COMMAND" = "thriftserver" ] ; then
- CLASS='org.cloudata.core.thrift.CloudataThriftServer'
-elif [ "$COMMAND" = "restserver" ] ; then
- CLASS='org.cloudata.core.rest.RestWebServer'
-elif [ "$COMMAND" = "blobmanager" ] ; then
- CLASS='org.cloudata.core.client.blob.BlobManager'
-elif [ "$COMMAND" = "balancer" ] ; then
- CLASS='org.cloudata.core.master.TabletBalancer'
-elif [ "$COMMAND" = "cloudatafs" ] ; then
- CLASS='org.cloudata.tools.cloudatafs.CloudataFSWebServer'
-elif [ "$COMMAND" = "shell" ] ; then
- CLASS='org.cloudata.core.client.Shell'
- CLOUDATA_OPTS="$CLOUDATA_OPTS -Dfile.encoding=EUC-KR"
-elif [ "$COMMAND" = "fshell" ] ; then
- CLASS='org.cloudata.tools.cloudatafs.CloudataFSShell'
-elif [ "$COMMAND" = "scan" ] ; then
- CLASS='org.cloudata.core.client.scanner.SingleTabletMultiColumnScanner'
-elif [ "$COMMAND" = "zookeeper" ] ; then
- CLASS='org.apache.zookeeper.server.quorum.QuorumPeerMain'
-elif [ "$COMMAND" = "zshell" ] ; then
- CLASS='org.apache.zookeeper.ZooKeeperMain'
-elif [ "$COMMAND" = "jar" ] ; then
- CLASS='org.cloudata.core.common.util.CRunJar'
-elif [ "$COMMAND" = "localcluster" ] ; then
- CLASS='org.cloudata.core.AllInOneServer'
-else
- CLASS=$COMMAND
-fi
-
-CLOUDATA_OPTS="$CLOUDATA_OPTS -Dcloudata.log.dir=$CLOUDATA_LOG_DIR"
-CLOUDATA_OPTS="$CLOUDATA_OPTS -Dcloudata.log.file=$CLOUDATA_LOGFILE"
-CLOUDATA_OPTS="$CLOUDATA_OPTS -Dcloudata.home.dir=$CLOUDATA_HOME"
-CLOUDATA_OPTS="$CLOUDATA_OPTS -Dcloudata.id.str=$CLOUDATA_IDENT_STRING"
-CLOUDATA_OPTS="$CLOUDATA_OPTS -Dcloudata.root.logger=${CLOUDATA_ROOT_LOGGER:-INFO,console}"
-
-# run it
-exec "$JAVA" $CLOUDATA_OPTS -Djava.security.policy=$CLOUDATA_HOME/conf/policy.all -classpath "$CLASSPATH" $CLASS "$@"
-
View
69 bin/cloudata-config.sh
@@ -1,69 +0,0 @@
-# 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.
-
-# included in all the cloudata scripts with source command
-# should not be executable directly
-# also should not be passed any arguments, since we need original $*
-
-# resolve links - $0 may be a softlink
-
-this="$0"
-while [ -h "$this" ]; do
- ls=`ls -ld "$this"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '.*/.*' > /dev/null; then
- this="$link"
- else
- this=`dirname "$this"`/"$link"
- fi
-done
-
-# convert relative path to absolute path
-bin=`dirname "$this"`
-
-script=`basename "$this"`
-bin=`cd "$bin"; pwd`
-this="$bin/$script"
-
-# the root of the Cloudata installation
-export CLOUDATA_HOME=`dirname "$this"`/..
-
-#check to see if the conf dir is given as an optional argument
-if [ $# -gt 1 ]
-then
- if [ "--config" = "$1" ]
- then
- shift
- confdir=$1
- shift
- CLOUDATA_CONF_DIR=$confdir
- fi
-fi
-
-# Allow alternate conf dir location.
-CLOUDATA_CONF_DIR="${CLOUDATA_CONF_DIR:-$CLOUDATA_HOME/conf}"
-
-#check to see it is specified whether to use the slaves or the
-# masters file
-if [ $# -gt 1 ]
-then
- if [ "--hosts" = "$1" ]
- then
- shift
- slavesfile=$1
- shift
- export CLOUDATA_SLAVES="${CLOUDATA_CONF_DIR}/$slavesfile"
- fi
-fi
View
115 bin/cloudata-daemon.sh
@@ -1,115 +0,0 @@
-#!/usr/bin/env bash
-#
-# Runs a Cloudata command as a daemon.
-#
-# Environment Variables
-#
-# CLOUDATA_CONF_DIR Alternate conf dir. Default is ${CLOUDATA_HOME}/conf.
-# CLOUDATA_LOG_DIR Where log files are stored. PWD by default.
-##
-
-usage="Usage: cloudata-daemon.sh (start|stop) <command>"
-
-# if no args specified, show usage
-if [ $# -le 1 ]; then
- echo $usage
- exit 1
-fi
-
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-. "$bin"/cloudata-config.sh
-
-if [ -f "${CLOUDATA_CONF_DIR}/cloudata-env.sh" ]; then
- . "${CLOUDATA_CONF_DIR}/cloudata-env.sh"
-fi
-
-startStop=$1
-shift
-command=$1
-shift
-
-cloudata_rotate_log ()
-{
- log=$1;
- num=5;
- if [ -n "$2" ]; then
- num=$2
- fi
- if [ -f "$log" ]; then # rotate logs
- while [ $num -gt 1 ]; do
- prev=`expr $num - 1`
- [ -f "$log.$prev" ] && mv "$log.$prev" "$log.$num"
- num=$prev
- done
- mv "$log" "$log.$num";
- fi
-}
-
-if [ "$CLOUDATA_LOG_DIR" = "" ]; then
- export CLOUDATA_LOG_DIR="$CLOUDATA_HOME/logs"
-fi
-mkdir -p "$CLOUDATA_LOG_DIR"
-
-if [ "$CLOUDATA_PID_DIR" = "" ]; then
- CLOUDATA_PID_DIR=/tmp
-fi
-
-if [ "$CLOUDATA_IDENT_STRING" = "" ]; then
- export CLOUDATA_IDENT_STRING="$USER"
-fi
-
-# some variables
-export CLOUDATA_LOGFILE=cloudata-$CLOUDATA_IDENT_STRING-$command-`hostname`.log
-export CLOUDATA_ROOT_LOGGER="INFO,DRFA"
-log=$CLOUDATA_LOG_DIR/cloudata-$CLOUDATA_IDENT_STRING-$command-`hostname`.out
-pid=$CLOUDATA_PID_DIR/cloudata-$CLOUDATA_IDENT_STRING-$command.pid
-
-if [ ! -e $CLOUDATA_PID_DIR ]; then
- mkdir $CLOUDATA_PID_DIR
-fi
-
-# Set default scheduling priority
-if [ "$CLOUDATA_NICENESS" = "" ]; then
- export CLOUDATA_NICENESS=0
-fi
-
-case $startStop in
-
- (start)
-
- if [ -f $pid ]; then
- if kill -0 `cat $pid` > /dev/null 2>&1; then
- echo $command running as process `cat $pid`. Stop it first.
- exit 1
- fi
- fi
-
- cloudata_rotate_log $log
- echo starting $command, logging to $log
- nohup nice -n $CLOUDATA_NICENESS "$CLOUDATA_HOME"/bin/cloudata $command "$@" > "$log" 2>&1 < /dev/null &
- echo $! > $pid
- sleep 1; head "$log"
- ;;
-
- (stop)
-
- if [ -f $pid ]; then
- if kill -0 `cat $pid` > /dev/null 2>&1; then
- echo stopping $command
- kill `cat $pid`
- else
- echo no $command to stop
- fi
- else
- echo no $command to stop
- fi
- ;;
-
- (*)
- echo $usage
- exit 1
- ;;
-
-esac
View
11 bin/cloudata-start.sh
@@ -1,11 +0,0 @@
-#!/usr/bin/env bash
-
-# Start cloudata daemons. Run this on master node.
-
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-. "$bin"/cloudata-config.sh
-
-"$bin"/cloudata-daemon.sh start cloudatamaster
-exec "$bin/tabletservers.sh" cd "$CLOUDATA_HOME" \; "$bin/cloudata-daemon.sh" start tabletserver
View
14 bin/cloudata-stop.sh
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-# Start cloudata daemons. Run this on master node.
-
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-. "$bin"/cloudata-config.sh
-
-# start cloudata daemons
-# start namenode after datanodes, to minimize time namenode is up w/o data
-# note: datanodes will log connection errors until namenode starts
-"$bin"/cloudata-daemon.sh stop cloudatamaster
-exec "$bin/tabletservers.sh" cd "$CLOUDATA_HOME" \; "$bin/cloudata-daemon.sh" stop tabletserver
View
29 bin/cloudata.bat
@@ -1,29 +0,0 @@
-@echo off
-set JAVA_HOME="C:\Program Files\Java\jdk1.5.0_07"
-set HADOOP_HOME=D:\temp
-set CLOUDATA_HOME=%~f0\..\..
-
-set CLASSPATH=%CLOUDATA_HOME%;%CLOUDATA_HOME%\conf
-
-for %%f in (%CLOUDATA_HOME%\cloudata*.jar) do call :oneStep %%f
-
-for %%f in (%CLOUDATA_HOME%\lib\*.jar) do call :oneStep %%f
-
-for %%f in (%CLOUDATA_HOME%\lib\jetty-ext\*.jar) do call :oneStep %%f
-
-for %%f in (%HADOOP_HOME%\hadoop*.jar) do call :oneStep %%f
-
-
-goto :theEnd1
-
-:oneStep
-REM echo "ARG: %1"
-if "%CLASSPATH%" == "" (set CLASSPATH=%1) else (set CLASSPATH=%CLASSPATH%;%1)
-exit /B
-
-:theEnd1
-
-for %%f in (%HADOOP_HOME%\hadoop*.jar) do call :oneStep %%f
-
-rem echo %CLASSPATH%
-call java -Xms256m -Xmx512m -Duser.dir=%CLOUDATA_HOME% -cp %CLASSPATH% %1 %2 %3 %4 %5 %6 %7
View
16 bin/cloudatafs-start.sh
@@ -1,16 +0,0 @@
-#!/usr/bin/env bash
-
-# Start cloudata-fs web server.
-
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-. "$bin"/cloudata-config.sh
-
-if [ -f "${CLOUDATA_CONF_DIR}/cloudata-env.sh" ]; then
- . "${CLOUDATA_CONF_DIR}/cloudata-env.sh"
-fi
-
-. "$bin"/cloudata-config.sh
-
-"$bin"/cloudata-daemon.sh start cloudatafs
View
10 bin/cloudatafs-stop.sh
@@ -1,10 +0,0 @@
-#!/usr/bin/env bash
-
-# Stop blobmerger
-
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-. "$bin"/cloudata-config.sh
-
-"$bin"/cloudata-daemon.sh stop cloudatafs
View
35 bin/collect_logs.sh
@@ -1,35 +0,0 @@
-#!/usr/bin/env bash
-
-BIN=`dirname "$0"`
-CONF=`cd "$BIN/../conf"; pwd`
-
-DIR_NAME="./slave_logs"
-
-if [ ! -e $DIR_NAME ]
-then
- mkdir $DIR_NAME
-else
- rm -rf $DIR_NAME/*
-fi
-
-SLAVE_LIST=`cat $CONF/tablet_servers`
-COMMITLOGSERVER_LIST=`cat $CONF/commitlog_servers`
-
-LOG_PATH=$CLOUDATA_LOG_DIR
-
-if [ "$LOG_PATH" = "" ]
-then
- LOG_PATH=`cd "$BIN/../logs"; pwd`
-fi
-
-for HOST in $SLAVE_LIST
-do
- scp $HOST:$LOG_PATH/*tabletserver*.log ./$DIR_NAME/
- scp $HOST:$LOG_PATH/*tabletserver*.out ./$DIR_NAME/
-done
-
-for HOST in $COMMITLOGSERVER_LIST
-do
- scp $HOST:$LOG_PATH/*commitlogserver*.log ./$DIR_NAME/
- scp $HOST:$LOG_PATH/*commitlogserver*.out ./$DIR_NAME/
-done
View
10 bin/commitlog-start.sh
@@ -1,10 +0,0 @@
-#!/usr/bin/env bash
-
-# Start cloudata daemons. Run this on master node.
-
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-. "$bin"/cloudata-config.sh
-
-exec "$bin/commitlogserver.sh" cd "$CLOUDATA_HOME" \; "$bin/cloudata-daemon.sh" start commitlogserver
View
10 bin/commitlog-stop.sh
@@ -1,10 +0,0 @@
-#!/usr/bin/env bash
-
-# Start cloudata daemons. Run this on master node.
-
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-. "$bin"/cloudata-config.sh
-
-exec "$bin/commitlogserver.sh" cd "$CLOUDATA_HOME" \; "$bin/cloudata-daemon.sh" stop commitlogserver
View
48 bin/commitlogserver.sh
@@ -1,48 +0,0 @@
-#!/usr/bin/env bash
-#
-# Run a shell command on all slave hosts.
-#
-# Environment Variables
-#
-# CLOUDATA_SLAVES File naming remote hosts.
-# Default is ${CLOUDATA_CONF_DIR}/tablet_servers.
-# CLOUDATA_CONF_DIR Alternate conf dir. Default is ${CLOUDATA_HOME}/conf.
-# CLOUDATA_SLAVE_SLEEP Seconds to sleep between spawning remote commands.
-# CLOUDATA_SSH_OPTS Options passed to ssh when running remote commands.
-##
-
-usage="Usage: commitlogserver.sh command..."
-
-# if no args specified, show usage
-if [ $# -le 0 ]; then
- echo $usage
- exit 1
-fi
-
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-. "$bin"/cloudata-config.sh
-
-# If the slaves file is specified in the command line,
-# then it takes precedence over the definition in
-# cloudata-env.sh. Save it here.
-HOSTLIST=$CLOUDATA_SLAVES
-
-if [ "$HOSTLIST" = "" ]; then
- if [ "$CLOUDATA_SLAVES" = "" ]; then
- export HOSTLIST="${CLOUDATA_CONF_DIR}/commitlog_servers"
- else
- export HOSTLIST="${CLOUDATA_SLAVES}"
- fi
-fi
-
-for slave in `cat "$HOSTLIST"`; do
- ssh $CLOUDATA_SSH_OPTS $slave $"${@// /\\ }" \
- 2>&1 | sed "s/^/$slave: /" &
- if [ "$CLOUDATA_SLAVE_SLEEP" != "" ]; then
- sleep $CLOUDATA_SLAVE_SLEEP
- fi
-done
-
-wait
View
17 bin/compact_mon.sh
@@ -1,17 +0,0 @@
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-SLEEP=5
-
-if [ $# -gt 0 ]
-then
- SLEEP=$1
-fi
-
-while(true)
-do
-DATE=`date +%R:%S`
- $bin/cloudata pshell -listAll | awk -v date_var="$DATE" 'BEGIN{mc=0;sc=0;} /minor-compaction-lock/{mc++} /split-compaction-lock/{sc++} END{print date_var, ", minor compaction:", mc, ", split&major compaction:", sc}'
- sleep $SLEEP
-done
-
View
19 bin/copy.sh
@@ -1,19 +0,0 @@
-#!/usr/bin/env bash
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-. "$bin"/cloudata-config.sh
-
-HOSTLIST=${CLOUDATA_CONF_DIR}/tablet_servers
-if [ 2 -gt "$#" ]
-then
- echo "usage: $0 \"local_file remote_file\""
- exit 1
-fi
-
-
-for i in `cat $HOSTLIST`
-do
- echo $i
- scp "$1" $i:"$2"
-done
View
18 bin/exec.sh
@@ -1,18 +0,0 @@
-#!/usr/bin/env bash
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-. "$bin"/cloudata-config.sh
-
-HOSTLIST=${CLOUDATA_CONF_DIR}/tablet_servers
-if [ ! -n "$1" ]
-then
- echo "usage: $0 \"command arg1 arg2 \""
- exit 1
-fi
-
-for i in `cat $HOSTLIST`
-do
- echo "exec" $i "$*"
- ssh $i "$*"
-done
View
10 bin/rest-start.sh
@@ -1,10 +0,0 @@
-#!/usr/bin/env bash
-
-# Start cloudata daemons. Run this on master node.
-
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-. "$bin"/cloudata-config.sh
-
-exec "$bin/restserver.sh" cd "$CLOUDATA_HOME" \; "$bin/cloudata-daemon.sh" start restserver
View
10 bin/rest-stop.sh
@@ -1,10 +0,0 @@
-#!/usr/bin/env bash
-
-# Start cloudata daemons. Run this on master node.
-
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-. "$bin"/cloudata-config.sh
-
-exec "$bin/restserver.sh" cd "$CLOUDATA_HOME" \; "$bin/cloudata-daemon.sh" stop restserver
View
48 bin/restserver.sh
@@ -1,48 +0,0 @@
-#!/usr/bin/env bash
-#
-# Run a shell command on all slave hosts.
-#
-# Environment Variables
-#
-# CLOUDATA_REST_SLAVES File naming remote hosts.
-# Default is ${CLOUDATA_CONF_DIR}/rest_servers.
-# CLOUDATA_CONF_DIR Alternate conf dir. Default is ${CLOUDATA_HOME}/conf.
-# CLOUDATA_SLAVE_SLEEP Seconds to sleep between spawning remote commands.
-# CLOUDATA_SSH_OPTS Options passed to ssh when running remote commands.
-##
-
-usage="Usage: restserver.sh command..."
-
-# if no args specified, show usage
-if [ $# -le 0 ]; then
- echo $usage
- exit 1
-fi
-
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-. "$bin"/cloudata-config.sh
-
-# If the slaves file is specified in the command line,
-# then it takes precedence over the definition in
-# cloudata-env.sh. Save it here.
-HOSTLIST=$CLOUDATA_REST_SLAVES
-
-if [ "$HOSTLIST" = "" ]; then
- if [ "$CLOUDATA_REST_SLAVES" = "" ]; then
- export HOSTLIST="${CLOUDATA_CONF_DIR}/rest_servers"
- else
- export HOSTLIST="${CLOUDATA_REST_SLAVES}"
- fi
-fi
-
-for slave in `cat "$HOSTLIST"`; do
- ssh $CLOUDATA_SSH_OPTS $slave $"${@// /\\ }" \
- 2>&1 | sed "s/^/$slave: /" &
- if [ "$CLOUDATA_SLAVE_SLEEP" != "" ]; then
- sleep $CLOUDATA_SLAVE_SLEEP
- fi
-done
-
-wait
View
26 bin/rmlog.sh
@@ -1,26 +0,0 @@
-#!/usr/bin/env bash
-
-BIN=`dirname "$0"`
-CONF=`cd "$BIN/../conf"; pwd`
-
-SLAVE_LIST=`cat $CONF/tablet_servers`
-COMMITLOGSERVER_LIST=`cat $CONF/commitlog_servers`
-
-LOG_PATH=$CLOUDATA_LOG_DIR
-
-if [ "$LOG_PATH" = "" ]
-then
- LOG_PATH=`cd "$BIN/../logs"; pwd`
-fi
-
-for HOST in $SLAVE_LIST
-do
- echo ssh $HOST "rm -rf $LOG_PATH/*"
- ssh $HOST "rm -rf $LOG_PATH/*"
-done
-
-for HOST in $COMMITLOGSERVER_LIST
-do
- echo ssh $HOST "rm -rf $LOG_PATH/*"
- ssh $HOST "rm -rf $LOG_PATH/*"
-done
View
42 bin/start.sh
@@ -1,42 +0,0 @@
-#!/usr/bin/env bash
-
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-. "$bin"/cloudata-config.sh
-
-# run zookeeper
-#"$bin"/zookeeper-start.sh
-
-# release zk memory lock
-"$bin"/cloudata cloudatamaster -releaseLock
-
-if [ -f "${CLOUDATA_CONF_DIR}/cloudata-env.sh" ]; then
- . "${CLOUDATA_CONF_DIR}/cloudata-env.sh"
-fi
-
-#delete all lock
-if [ "$#" != "0" ]; then
- if [ $1 = "-format" ]; then
- "$bin"/cloudata cloudatamaster -formatLock
- elif [ $1 = "-format-f" ]; then
- "$bin"/cloudata cloudatamaster -formatLock -noPrompt
- fi
-else
- sleep 10
-fi
-
-#run commit logs servers
-"$bin"/commitlog-start.sh
-
-sleep 2
-
-#delete commitlog/data file
-if [ "$#" != "0" ]; then
- if [ $1 = "-format" -o $1 = "-format-f" ]; then
- "$bin"/cloudata cloudatamaster -formatFile -noPrompt
- fi
-fi
-
-#run CloudataMaster, TabletServer
-"$bin"/cloudata-start.sh
View
11 bin/stop.sh
@@ -1,11 +0,0 @@
-#!/usr/bin/env bash
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-. "$bin"/cloudata-config.sh
-
-"$bin"/blobmanager-stop.sh
-"$bin"/cloudatafs-stop.sh
-"$bin"/commitlog-stop.sh
-"$bin"/cloudata-stop.sh
-#"$bin"/zookeeper-stop.sh
View
52 bin/tabletservers.sh
@@ -1,52 +0,0 @@
-#!/usr/bin/env bash
-#
-# Run a shell command on all slave hosts.
-#
-# Environment Variables
-#
-# CLOUDATA_SLAVES File naming remote hosts.
-# Default is ${CLOUDATA_CONF_DIR}/tablet_servers.
-# CLOUDATA_CONF_DIR Alternate conf dir. Default is ${CLOUDATA_HOME}/conf.
-# CLOUDATA_SLAVE_SLEEP Seconds to sleep between spawning remote commands.
-# CLOUDATA_SSH_OPTS Options passed to ssh when running remote commands.
-##
-
-usage="Usage: tabletservers.sh command..."
-
-# if no args specified, show usage
-if [ $# -le 0 ]; then
- echo $usage
- exit 1
-fi
-
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-. "$bin"/cloudata-config.sh
-
-# If the slaves file is specified in the command line,
-# then it takes precedence over the definition in
-# cloudata-env.sh. Save it here.
-HOSTLIST=$CLOUDATA_SLAVES
-
-if [ -f "${CLOUDATA_CONF_DIR}/cloudata-env.sh" ]; then
- . "${CLOUDATA_CONF_DIR}/cloudata-env.sh"
-fi
-
-if [ "$HOSTLIST" = "" ]; then
- if [ "$CLOUDATA_SLAVES" = "" ]; then
- export HOSTLIST="${CLOUDATA_CONF_DIR}/tablet_servers"
- else
- export HOSTLIST="${CLOUDATA_SLAVES}"
- fi
-fi
-
-for slave in `cat "$HOSTLIST"`; do
- ssh $CLOUDATA_SSH_OPTS $slave $"${@// /\\ }" \
- 2>&1 | sed "s/^/$slave: /" &
- if [ "$CLOUDATA_SLAVE_SLEEP" != "" ]; then
- sleep $CLOUDATA_SLAVE_SLEEP
- fi
-done
-
-wait
View
11 bin/thrift-start.sh
@@ -1,11 +0,0 @@
-#!/usr/bin/env bash
-
-# Start cloudata daemons. Run this on master node.
-
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-. "$bin"/cloudata-config.sh
-
-exec "$bin/thriftserver.sh" cd "$CLOUDATA_HOME" \; "$bin/cloudata-daemon.sh" start thriftserver
-
View
10 bin/thrift-stop.sh
@@ -1,10 +0,0 @@
-#!/usr/bin/env bash
-
-# Start cloudata daemons. Run this on master node.
-
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-. "$bin"/cloudata-config.sh
-
-exec "$bin/thriftserver.sh" cd "$CLOUDATA_HOME" \; "$bin/cloudata-daemon.sh" stop thriftserver
View
48 bin/thriftserver.sh
@@ -1,48 +0,0 @@
-#!/usr/bin/env bash
-#
-# Run a shell command on all slave hosts.
-#
-# Environment Variables
-#
-# CLOUDATA_THRIFT_SLAVES File naming remote hosts.
-# Default is ${CLOUDATA_CONF_DIR}/thrift_servers.
-# CLOUDATA_CONF_DIR Alternate conf dir. Default is ${CLOUDATA_HOME}/conf.
-# CLOUDATA_SLAVE_SLEEP Seconds to sleep between spawning remote commands.
-# CLOUDATA_SSH_OPTS Options passed to ssh when running remote commands.
-##
-
-usage="Usage: thriftserver.sh command..."
-
-# if no args specified, show usage
-if [ $# -le 0 ]; then
- echo $usage
- exit 1
-fi
-
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-. "$bin"/cloudata-config.sh
-
-# If the slaves file is specified in the command line,
-# then it takes precedence over the definition in
-# cloudata-env.sh. Save it here.
-HOSTLIST=$CLOUDATA_THRIFT_SLAVES
-
-if [ "$HOSTLIST" = "" ]; then
- if [ "$CLOUDATA_THRIFT_SLAVES" = "" ]; then
- export HOSTLIST="${CLOUDATA_CONF_DIR}/thrift_servers"
- else
- export HOSTLIST="${CLOUDATA_THRIFT_SLAVES}"
- fi
-fi
-
-for slave in `cat "$HOSTLIST"`; do
- ssh $CLOUDATA_SSH_OPTS $slave $"${@// /\\ }" \
- 2>&1 | sed "s/^/$slave: /" &
- if [ "$CLOUDATA_SLAVE_SLEEP" != "" ]; then
- sleep $CLOUDATA_SLAVE_SLEEP
- fi
-done
-
-wait
View
16 bin/zookeeper-start.sh
@@ -1,16 +0,0 @@
-#!/usr/bin/env bash
-
-# Start cloudata daemons. Run this on master node.
-
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-. "$bin"/cloudata-config.sh
-
-if [ -f "${CLOUDATA_CONF_DIR}/cloudata-env.sh" ]; then
- . "${CLOUDATA_CONF_DIR}/cloudata-env.sh"
-fi
-
-. "$bin"/cloudata-config.sh
-
-"$bin"/cloudata-daemon.sh start zookeeper ${ZOOKEEPER_CONF}
View
10 bin/zookeeper-stop.sh
@@ -1,10 +0,0 @@
-#!/usr/bin/env bash
-
-# Start cloudata daemons. Run this on master node.
-
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-. "$bin"/cloudata-config.sh
-
-"$bin"/cloudata-daemon.sh stop zookeeper
View
6 conf/cloudata-env.sh
@@ -11,10 +11,10 @@ export JAVA_HOME=/usr/java/jdk1.6.0_06
#Cloudata home dir
export CLOUDATA_HOME=/home/cloudata
-#Neptune conf dis
+#Cloudata conf dis
export CLOUDATA_CONF_DIR="${CLOUDATA_HOME}/conf"
-# JVM Heap Size (MB) of each Neptune component
+# JVM Heap Size (MB) of each Cloudata component
#export CLOUDATA_MASTER_HEAPSIZE=`heapsize 512 1024`
#export CLOUDATA_TABLETSERVER_HEAPSIZE=`heapsize 2048 2048`
#export CLOUDATA_COMMITLOGSERVER_HEAPSIZE=`heapsize 512 512`
@@ -45,7 +45,7 @@ export HADOOP_HOME=/home/hadoop
# Hadoop Conf dir
export HADOOP_CONF_DIR="${HADOOP_HOME}/conf"
-# JVM Options of each Neptune component
+# JVM Options of each Cloudata component
export CLOUDATA_MASTERNODE_OPTS="$CLOUDATA_MASTER_HEAPSIZE -Dcom.sun.management.jmxremote"
export CLOUDATA_TABLETSERVER_OPTS="-XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent -XX:+CMSClassUnloadingEnabled -XX:CMSInitiatingOccupancyFraction=50 -server -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=$TABLETSERVER_JMX_PORT $CLOUDATA_TABLETSERVER_HEAPSIZE"
export CLOUDATA_COMMITLOG_OPTS="-XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent -XX:+CMSClassUnloadingEnabled -XX:CMSInitiatingOccupancyFraction=50 -server $CLOUDATA_COMMITLOGSERVER_HEAPSIZE"

0 comments on commit f644a1e

Please sign in to comment.
Something went wrong with that request. Please try again.