From bfeab9bfa3582093d88e931cf8bc374113f935c1 Mon Sep 17 00:00:00 2001 From: Liang Guo Date: Mon, 2 Jun 2014 16:05:52 -0700 Subject: [PATCH] Update checkpointing api --- py/vtdb/keyrange.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/py/vtdb/keyrange.py b/py/vtdb/keyrange.py index fc2c24d8e9..918217ad50 100644 --- a/py/vtdb/keyrange.py +++ b/py/vtdb/keyrange.py @@ -41,9 +41,8 @@ class KeyRange(codec.BSONCoding): class StreamingTaskMap(object): - def __init__(self, num_tasks, shard_count): + def __init__(self, num_tasks): self.num_tasks = num_tasks - self.shard_count = shard_count self.keyrange_list = [] self.compute_kr_list() @@ -68,7 +67,7 @@ def create_streaming_task_map(num_tasks, shard_count): if num_tasks % shard_count != 0: raise dbexceptions.ProgrammingError('tasks %d should be multiple of shard_count %d' % (num_tasks, shard_count)) - return StreamingTaskMap(num_tasks, shard_count) + return StreamingTaskMap(num_tasks) # We abbreviate the keyranges for ease of use.