コード例 #1
0
ファイル: restore.py プロジェクト: awakeinng33/cassandras3
def do_restore(region, host, hostname,  port, backup, keyspace, bucket, datadir,
               jmxusername, jmxpassword, kmskeyid):
    setup_logging(logging.WARN)

    clients = ClientCache(region)

    node = NodeTool(clients, host, port, datadir, jmxusername, jmxpassword, kmskeyid)
    node.restore(hostname, keyspace, bucket, backup)
コード例 #2
0
def do_view(region, keyspace, hostname, bucket):
    setup_logging(logging.WARN)

    clients = ClientCache(region)
    if not hostname:
        hostname = socket.gethostname()

    node = NodeTool(clients, hostname)
    node.view(keyspace, bucket)
コード例 #3
0
def do_view(region, keyspace, hostname, bucket, s3endpoint, loglevel):
    setup_logging(logging.getLevelName(loglevel))

    clients = ClientCache(region, s3endpoint)
    if not hostname:
        hostname = socket.gethostname()

    node = NodeTool(clients, hostname)
    node.view(keyspace, bucket)
コード例 #4
0
def do_restore(region, host, port, backup, keyspace, hostname, bucket):
    setup_logging(logging.WARN)

    clients = ClientCache(region)
    if not hostname:
        hostname = socket.gethostname()

    node = NodeTool(clients, hostname, host, port)
    node.restore(keyspace, bucket, backup)
コード例 #5
0
ファイル: backup.py プロジェクト: sarathcakurathi/cassandras3
def do_backup(region, host, port, keyspace, bucket):
    setup_logging(logging.WARN)

    clients = ClientCache(region)
    hostname = socket.gethostname()

    timestamp = int(time.time())

    node = NodeTool(clients, hostname, host, port)
    node.backup(keyspace, bucket, timestamp)
コード例 #6
0
def do_backup(region, host, port, keyspace, bucket, datadir, jmxusername,
              jmxpassword, kmskeyid):
    setup_logging(logging.WARN)

    clients = ClientCache(region)
    hostname = socket.gethostname()

    timestamp = int(time.time())

    node = NodeTool(clients, hostname, host, port, datadir, jmxusername,
                    jmxpassword, kmskeyid)
    node.backup(keyspace, bucket, timestamp)
コード例 #7
0
def do_backup(host, hostname, port, keyspace, datadir, jmxusername,
              jmxpassword, region, bucket, kmskeyid, s3endpoint, loglevel):
    setup_logging(logging.getLevelName(loglevel))
    clients = ClientCache(region, s3endpoint)
    if not hostname:
        logger.critical("Not hostname given, using default hostname")
        hostname = socket.gethostname()

    logger.info('Hostname is : ' + hostname)
    timestamp = time.strftime("%Z-%Y-%m-%d-%H:%M:%S", time.localtime())

    node = NodeTool(clients, hostname, host, port, datadir, jmxusername,
                    jmxpassword, kmskeyid)
    node.backup(keyspace, bucket, timestamp)