Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a cluster generator to automatically create and test clusters #494

Merged
merged 11 commits into from
Nov 13, 2017
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
language: c
script: bash ./travis.sh

addons:
apt:
packages:
- python3
- python3-pip
20 changes: 0 additions & 20 deletions conf/a_dc1.yml

This file was deleted.

21 changes: 0 additions & 21 deletions conf/a_dc2_rack1_node1.yml

This file was deleted.

22 changes: 0 additions & 22 deletions conf/a_dc2_rack1_node2.yml

This file was deleted.

20 changes: 0 additions & 20 deletions conf/a_dc2_rack2_node1.yml

This file was deleted.

21 changes: 0 additions & 21 deletions conf/a_dc2_rack2_node2.yml

This file was deleted.

26 changes: 13 additions & 13 deletions scripts/dynomite/dyn_mc_test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from optparse import OptionParser
import ConfigParser
import configparser
import logging
import time
import os
Expand Down Expand Up @@ -62,7 +62,7 @@ def main():
help="Number of keys\n")

if len(sys.argv) == 1:
print "Learn some usages: " + sys.argv[0] + " -h"
print("Learn some usages: " + sys.argv[0] + " -h")
sys.exit(1)


Expand All @@ -78,7 +78,7 @@ def main():
#fh.setFormatter(formatter)
#logger.addHandler(fh)

print options
print(options)

logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(levelname)s %(message)s',
Expand All @@ -91,7 +91,7 @@ def main():
numkeys = int(options.numkeys)
start = int(options.skipkeys)
end = int(options.numkeys)
print 'start: ' + str(start) + ' and end: ' + str(end)
print('start: ' + str(start) + ' and end: ' + str(end))

if 'write' == options.operation :
for i in range(start, end ) :
Expand All @@ -103,14 +103,14 @@ def main():
value = mc.get('key_' + str(i))
if value is None:
error_count = error_count + 1
print 'No value for key: ' + 'key_' + str(i)
print('No value for key: ' + 'key_' + str(i))
else :
print 'key_' + str(i) + ' has value : ' + value
print 'Errour count: ' + str(error_count)
print('key_' + str(i) + ' has value : ' + value)
print('Errour count: ' + str(error_count))
elif 'mread' == options.operation :
n = (end - start) / 10
n = min(n, 10)
print n
print(n)
keys = []
i = 0
while (i < n) :
Expand All @@ -119,13 +119,13 @@ def main():
if key not in keys :
keys.append(key)
i = i + 1
print keys
print(keys)

#values = mc.get_multi(['key_1', 'key_2', 'key_3'])
while (len(keys) > 0) :
values = mc.get_multi(keys)
print values
for key in values.keys() :
print(values)
for key in values.keys():
keys.remove(key)


Expand All @@ -143,7 +143,7 @@ def main():
if value != None :
is_stop = True

print 'Estimated elapsed time : ' + str(current_milli_time() - int(value))
print('Estimated elapsed time : ' + str(current_milli_time() - int(value)))

elif 'sdel' == options.operation :
mc.delete('key_time')
Expand Down
16 changes: 8 additions & 8 deletions scripts/dynomite/dyn_redis_purge.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from optparse import OptionParser
import ConfigParser
import configparser
import logging
import time
import os
Expand Down Expand Up @@ -40,7 +40,7 @@ def run(self):
host = self.options.host
port = self.options.port

print "Starting thread: " + self.name + ", filename: " + self.filename
print("Starting thread: " + self.name + ", filename: " + self.filename)

# Get lock to synchronize threads
#threadLock.acquire()
Expand Down Expand Up @@ -69,7 +69,7 @@ def rebalance_ops(filename, host, port, db):
i = 0
for line in open(filename,'r').readlines():
if line != '':
print line
print(line)
line = line.strip('\n')
if line == '':
continue
Expand All @@ -81,7 +81,7 @@ def rebalance_ops(filename, host, port, db):
if (i % 5000 == 0):
time.sleep(1)
except redis.exceptions.ResponseError:
print "reconnecting ..."
print("reconnecting ...")
r1 = redis.StrictRedis(host, port, db=0)


Expand Down Expand Up @@ -123,13 +123,13 @@ def main():


if len(sys.argv) == 1:
print "Learn some usages: " + sys.argv[0] + " -h"
print("Learn some usages: " + sys.argv[0] + " -h")
sys.exit(1)


(options, args) = parser.parse_args()

print options
print(options)

num_threads = int(options.th)

Expand All @@ -147,7 +147,7 @@ def main():
for t in threads:
t.join()

print ""
print()


if __name__ == '__main__':
Expand Down
Loading