Skip to content

Commit

Permalink
Fixed --seed argument handling so that it actually works, now
Browse files Browse the repository at this point in the history
  • Loading branch information
stotch committed Jul 12, 2012
1 parent a560629 commit 3aa9d12
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/generate_cluster_xml.py
Expand Up @@ -5,7 +5,7 @@
import argparse

# Get a random seed
seed = int(random.randint(00000000001,99999999999))
rseed = int(random.randint(00000000001,99999999999))

# Setup and argument parser
parser = argparse.ArgumentParser(description='Build a voldemort cluster.xml.')
Expand All @@ -23,7 +23,7 @@
parser.add_argument('-H', '--http-port', type=int, default=6665,
dest='http_port', help='http port number')
genType = parser.add_mutually_exclusive_group()
genType.add_argument('-S', '--seed', type=int, default=seed, dest='seed',
genType.add_argument('-S', '--seed', type=int, default=rseed, dest='seed',
help='seed for randomizing partition distribution')
genType.add_argument('-l', '--loops', type=int, default=1000, dest='loops',
help='loop n times, using a different random seed every \
Expand All @@ -50,6 +50,7 @@
http_port = args.http_port
sock_port = args.sock_port
admin_port = args.admin_port
seed = args.seed

# Generate the full list of partition IDs
part_ids = range(nodes * partitions)
Expand Down

0 comments on commit 3aa9d12

Please sign in to comment.