diff options
| -rw-r--r-- | python/londiste/compare.py | 7 | ||||
| -rw-r--r-- | python/londiste/handlers/dispatch.py | 14 | ||||
| -rw-r--r-- | python/skytools/__init__.py | 1 | ||||
| -rw-r--r-- | python/skytools/hashtext.py | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/python/londiste/compare.py b/python/londiste/compare.py index 067a6b49..ff304f0a 100644 --- a/python/londiste/compare.py +++ b/python/londiste/compare.py @@ -12,11 +12,11 @@ __all__ = ['Comparator'] from londiste.syncer import Syncer class Comparator(Syncer): - """Simple checker based in Syncer. + """Simple checker based on Syncer. When tables are in sync runs simple SQL query on them. """ def process_sync(self, t1, t2, src_db, dst_db): - """Actual comparision.""" + """Actual comparison.""" src_tbl = t1.dest_table dst_tbl = t2.dest_table @@ -43,7 +43,7 @@ class Comparator(Syncer): q = self.cf.get('compare_sql', q) q = q.replace("_COLS_", cols) src_q = q.replace('_TABLE_', skytools.quote_fqident(src_tbl)) - if src_where: + if src_where: src_q = src_q + " WHERE " + src_where dst_q = q.replace('_TABLE_', skytools.quote_fqident(dst_tbl)) if dst_where: @@ -109,4 +109,3 @@ class Comparator(Syncer): if __name__ == '__main__': script = Comparator(sys.argv[1:]) script.start() - diff --git a/python/londiste/handlers/dispatch.py b/python/londiste/handlers/dispatch.py index eafa201f..ecbc6285 100644 --- a/python/londiste/handlers/dispatch.py +++ b/python/londiste/handlers/dispatch.py @@ -43,11 +43,15 @@ table_mode: * direct - non-partitioned table * ignore - all events are ignored +part_func: + database function to use for creating partition table. if not found then + parent table is cloned. default is {londiste|public}.create_partition + part_mode: - * batch_time - paritioned by batch creation time (default) + * batch_time - partitioned by batch creation time (default) * event_time - partitioned by event creation time - * date_field - paritioned by date_field value. part_field required - * current_time - paritioned by current time + * date_field - partitioned by date_field value. part_field required + * current_time - partitioned by current time part_field: date_field to use for partition. Required when part_mode=date_field @@ -878,7 +882,7 @@ class Dispatcher(BaseHandler): curs.execute(pfcall, vals) else: # - # Otherwise crete simple clone. + # Otherwise create simple clone. # # FixMe: differences from create_partitions(): # - check constraints @@ -893,7 +897,7 @@ class Dispatcher(BaseHandler): def real_copy(self, tablename, src_curs, dst_curs, column_list): """do actual table copy and return tuple with number of bytes and rows - copyed + copied """ _src_cols = _dst_cols = column_list condition = '' diff --git a/python/skytools/__init__.py b/python/skytools/__init__.py index c49dcb65..8f2c52a3 100644 --- a/python/skytools/__init__.py +++ b/python/skytools/__init__.py @@ -215,4 +215,3 @@ else: for k in xall: if k not in __all__: print '%s missing from top-level?' % k - diff --git a/python/skytools/hashtext.py b/python/skytools/hashtext.py index bc7ac024..3fb46394 100644 --- a/python/skytools/hashtext.py +++ b/python/skytools/hashtext.py @@ -89,7 +89,6 @@ def hashtext_old_py(k): return int(c) - # # New Postgres hashtext() - hacked lookup3: # - custom initval @@ -160,4 +159,3 @@ except ImportError: if __name__ == '__main__': import doctest doctest.testmod() - |
