[ARVADOS] updated: 221c7d2f37a7a83a424597b11e13b638d6e1c21a
Git user
git at public.curoverse.com
Wed Jan 18 11:32:14 EST 2017
Summary of changes:
sdk/python/arvados/arvfile.py | 2 +-
sdk/python/arvados/collection.py | 17 ++++++++++-------
sdk/python/arvados/commands/put.py | 6 ++++--
3 files changed, 15 insertions(+), 10 deletions(-)
via 221c7d2f37a7a83a424597b11e13b638d6e1c21a (commit)
from b0e6c00576257cef24cfd0599073f58904a2b85c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 221c7d2f37a7a83a424597b11e13b638d6e1c21a
Author: Lucas Di Pentima <lucas at curoverse.com>
Date: Wed Jan 18 13:29:46 2017 -0300
10813: Fixed typo on argument documentation.
Added only_committed parameter to Collection.manifest_text() so it passes along to _get_manifest_text().
Corrected put_queue's size back to 2 on BlockManager.
diff --git a/sdk/python/arvados/arvfile.py b/sdk/python/arvados/arvfile.py
index 9a86a8d..8446fb6 100644
--- a/sdk/python/arvados/arvfile.py
+++ b/sdk/python/arvados/arvfile.py
@@ -501,7 +501,7 @@ class _BlockManager(object):
# blocks pending. If they are full 64 MiB blocks, that means up to
# 256 MiB of internal buffering, which is the same size as the
# default download block cache in KeepClient.
- self._put_queue = Queue.Queue(maxsize=1)
+ self._put_queue = Queue.Queue(maxsize=2)
self._put_threads = []
for i in xrange(0, self.num_put_threads):
diff --git a/sdk/python/arvados/collection.py b/sdk/python/arvados/collection.py
index 599e91d..debe7de 100644
--- a/sdk/python/arvados/collection.py
+++ b/sdk/python/arvados/collection.py
@@ -905,7 +905,8 @@ class RichCollectionBase(CollectionBase):
return self._get_manifest_text(stream_name, True, True)
@synchronized
- def manifest_text(self, stream_name=".", strip=False, normalize=False):
+ def manifest_text(self, stream_name=".", strip=False, normalize=False,
+ only_committed=False):
"""Get the manifest text for this collection, sub collections and files.
This method will flush outstanding blocks to Keep. By default, it will
@@ -924,10 +925,15 @@ class RichCollectionBase(CollectionBase):
is not modified, return the original manifest text even if it is not
in normalized form.
+ :only_committed:
+ If True, don't commit pending blocks.
+
"""
- self._my_block_manager().commit_all()
- return self._get_manifest_text(stream_name, strip, normalize)
+ if not only_committed:
+ self._my_block_manager().commit_all()
+ return self._get_manifest_text(stream_name, strip, normalize,
+ only_committed=only_committed)
@synchronized
def _get_manifest_text(self, stream_name, strip, normalize, only_committed=False):
@@ -973,10 +979,7 @@ class RichCollectionBase(CollectionBase):
if stream:
buf.append(" ".join(normalize_stream(stream_name, stream)) + "\n")
for dirname in [s for s in sorted_keys if isinstance(self[s], RichCollectionBase)]:
- if only_committed:
- buf.append(self[dirname]._get_manifest_text(stream_name=os.path.join(stream_name, dirname), strip=strip, normalize=True, only_committed=only_committed))
- else:
- buf.append(self[dirname].manifest_text(stream_name=os.path.join(stream_name, dirname), strip=strip, normalize=True))
+ buf.append(self[dirname].manifest_text(stream_name=os.path.join(stream_name, dirname), strip=strip, normalize=True, only_committed=only_committed))
return "".join(buf)
else:
if strip:
diff --git a/sdk/python/arvados/commands/put.py b/sdk/python/arvados/commands/put.py
index d57ef4c..d57b2b7 100644
--- a/sdk/python/arvados/commands/put.py
+++ b/sdk/python/arvados/commands/put.py
@@ -139,7 +139,7 @@ Set the number of upload threads to be used. Take into account that
using lots of threads will increase the RAM requirements. Default is
to use 2 threads.
On high latency installations, using a greater number will improve
-overall troughput.
+overall throughput.
""")
run_opts = argparse.ArgumentParser(add_help=False)
@@ -520,7 +520,9 @@ class ArvPutUploadJob(object):
manifest = self._local_collection.manifest_text()
else:
# Get the manifest text without comitting pending blocks
- manifest = self._local_collection._get_manifest_text(".", strip=False, normalize=False, only_committed=True)
+ manifest = self._local_collection.manifest_text(".", strip=False,
+ normalize=False,
+ only_committed=True)
# Update cache
with self._state_lock:
self._state['manifest'] = manifest
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list