Example #1
0
def download():
    """Downloads the VoltDB binaray and extract.
    """
    fablib.download_tarball(URL, output='voltdb-%s.tar.gz' % VERSION)
    fablib.download_tarball(API_URL)
    api_dir = fablib.base_dir(API_URL)
    local('rm -rf %s/include/boost' % api_dir)
Example #2
0
def load_config():
    """Initialize configurations.
    """
    if not 'JAVA_HOME' in os.environ:
        raise UserWarning("You must define JAVA_HOME in bash environment.")

    env.hadoop_dir = os.path.join(SCRIPT_DIR, base_dir(HADOOP_URL))
    env.hadoop_bin = os.path.join(env.hadoop_dir, 'bin')
    env.hadoop_sbin = os.path.join(env.hadoop_dir, 'sbin')
    env.hadoop_conf = os.path.join(env.hadoop_dir, 'conf')
    env.hbase_dir = os.path.join(SCRIPT_DIR, base_dir(HBASE_URL))
    env.hbase_bin = os.path.join(env.hbase_dir, 'bin')
    env.hbase_conf = os.path.join(env.hbase_dir, 'conf')
    env.hive_dir = os.path.join(SCRIPT_DIR, base_dir(HIVE_URL))
    env.hive_bin = os.path.join(env.hive_dir, 'bin')
    env.hive_conf = os.path.join(env.hive_dir, 'conf')
    env.mapred_tracker_port = MAPRED_TRACKER_PORT

    if not os.path.exists(NODE_FILE):
        raise UserWarning("You must create a node list file {}"
                          .format(NODE_FILE))
    with open(NODE_FILE) as fobj:
        node_list = [line.strip() for line in fobj]
    env.head = node_list[0]
    env.workers = node_list[1:]

    env.roledefs = {}
    env.roledefs['head'] = [env.head]

    if os.path.exists('config.yaml'):
        global DATA_DIR, NAME_DIR, ZOOKEEPER_DIR
        user_configs = {}
        with open('config.yaml') as config_file:
            user_configs = yaml.load(config_file)
        DATA_DIR = user_configs.get('datadir', DATA_DIR)
        NAME_DIR = user_configs.get('namedir', NAME_DIR)
        ZOOKEEPER_DIR = user_configs.get('zookeeper_dir', ZOOKEEPER_DIR)
Example #3
0
def load_config():
    """Initialize configurations.
    """
    env.mysql_dir = os.path.join(SCRIPT_DIR, base_dir(URL))
    env.bin_dir = os.path.join(env.mysql_dir, 'bin')
    env.data_dir = os.path.abspath('mysql_data')
    env.config_dir = os.path.abspath('mysql_config')

    with open(NODES_FILE) as fobj:
        node_list = [line.strip() for line in fobj]
    env.head = node_list[0]
    env.workers = node_list[1:]
    env.head_node_id = len(env.workers) + 2
    env.head_ip = socket.gethostbyname(env.head)

    env.roledefs = {}
    env.roledefs['head'] = [env.head]
Example #4
0
import subprocess
import sys
sys.path.append('../..')
from vsbench import fablib

SCRIPT_DIR = os.path.dirname(__file__)
TRITON_SORT_GOOD_URL = 'http://www.macesystems.org/wp-uploads/2012/04/' \
                       'tritonsort_log_without_bad_node.tar.bz2'
TRITON_SORT_URL = 'http://www.macesystems.org/wp-uploads/2012/04/' \
                  'tritonsort_log_with_bad_node.tar.bz2'
HBASE_TRACE_URL = 'http://www.macesystems.org/wp-uploads/2012/03/' \
                  'wloadd_run11_hbase90-seeklog-Xmx2G-treemap.tar.bz2'

env['testdata'] = os.path.join(SCRIPT_DIR, 'testdata')
TESTDATA_DIR = os.path.join(SCRIPT_DIR, 'testdata')
TRITON_DIR = os.path.join(SCRIPT_DIR, fablib.base_dir(TRITON_SORT_URL))
# Distalyzer executable
DISTALYZER_EXEC = os.path.join(SCRIPT_DIR, 'distalyzer/Distalyzer.py')
HBASE_EXEC = os.path.join(SCRIPT_DIR,
                          'distalyzer/parsers/HBaseExecDistalyzer.py')
HBASE_DIR = os.path.join(SCRIPT_DIR, fablib.base_dir(HBASE_TRACE_URL))
DEPENDENCY_NETWORK_EXEC = os.path.join(SCRIPT_DIR,
                                       'distalyzer/DependencyNetwork.py')


@task
def download_traces():
    """Download traces
    """
    fablib.download_tarball(TRITON_SORT_URL)
    fablib.download_tarball(TRITON_SORT_GOOD_URL)
Example #5
0
def hbase_dir():
    """Show hbase directory.
    """
    print base_dir(HBASE_URL)
Example #6
0
def download():
    download_tarball(URL)
    with lcd(base_dir(URL)):
        local('make')