[ARVADOS] updated: 8c5f7a869e1d7a7c8f6338d1836987567c32f626

git at public.curoverse.com git at public.curoverse.com
Wed Sep 17 11:31:01 EDT 2014


Summary of changes:
 sdk/python/arvados/commands/copy.py | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

       via  8c5f7a869e1d7a7c8f6338d1836987567c32f626 (commit)
      from  9cff4a0bf758ebb2e1a63df6a25c83f11752f8d8 (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 8c5f7a869e1d7a7c8f6338d1836987567c32f626
Author: Tim Pierce <twp at curoverse.com>
Date:   Wed Sep 17 11:30:20 2014 -0400

    3699: code review
    
    * More feedback when copying collections and blocks
    * Drop default DEBUG log level
    * Rename --project_uuid -> --project-uuid

diff --git a/sdk/python/arvados/commands/copy.py b/sdk/python/arvados/commands/copy.py
index 9f9b134..e857cf2 100755
--- a/sdk/python/arvados/commands/copy.py
+++ b/sdk/python/arvados/commands/copy.py
@@ -40,8 +40,6 @@ logger = logging.getLogger('arvados.arv-copy')
 local_repo_dir = {}
 
 def main():
-    logger.setLevel(logging.DEBUG)
-
     parser = argparse.ArgumentParser(
         description='Copy a pipeline instance from one Arvados instance to another.')
 
@@ -61,7 +59,7 @@ def main():
         '--dst-git-repo', dest='dst_git_repo',
         help='The name of the destination git repository. Required when copying a pipeline recursively.')
     parser.add_argument(
-        '--project_uuid', dest='project_uuid',
+        '--project-uuid', dest='project_uuid',
         help='The UUID of the project at the destination to which the pipeline should be copied.')
     parser.add_argument(
         'object_uuid',
@@ -322,12 +320,13 @@ def copy_collection(obj_uuid, src, dst):
         filters=[['portable_data_hash', '=', colhash]]
     ).execute()
     if dstcol['items_available'] > 0:
+        logger.info("Skipping collection %s (already at dst)", obj_uuid)
         return dstcol['items'][0]
 
+    logger.info("Copying collection %s", obj_uuid)
+
     # Fetch the collection's manifest.
     manifest = c['manifest_text']
-    logging.debug('copying collection %s', obj_uuid)
-    logging.debug('manifest_text = %s', manifest)
 
     # Enumerate the block locators found in the manifest.
     collection_blocks = sets.Set()
@@ -342,9 +341,9 @@ def copy_collection(obj_uuid, src, dst):
     # Copy each block from src_keep to dst_keep.
     dst_keep = arvados.keep.KeepClient(dst)
     for locator in collection_blocks:
+        parts = locator.split('+')
+        logger.info("Copying block %s (%s bytes)", locator, parts[1])
         data = src_keep.get(locator)
-        logger.debug('copying block %s', locator)
-        logger.info("Retrieved %d bytes", len(data))
         dst_keep.put(data)
 
     # Copy the manifest and save the collection.

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list