[ARVADOS] updated: 38141f7261a7a2fa29f9cf3281cc46c1d845c1c3

Git user git at public.curoverse.com
Thu Mar 30 16:38:44 EDT 2017


Summary of changes:
 sdk/python/arvados/commands/migrate19.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

       via  38141f7261a7a2fa29f9cf3281cc46c1d845c1c3 (commit)
      from  acb0bd431ced4814b37f703ca63f2b39ad29c5df (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 38141f7261a7a2fa29f9cf3281cc46c1d845c1c3
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Thu Mar 30 19:40:28 2017 +0000

    8567: Log total bytes to migrate

diff --git a/sdk/python/arvados/commands/migrate19.py b/sdk/python/arvados/commands/migrate19.py
index b792cb2..9ff0b78 100644
--- a/sdk/python/arvados/commands/migrate19.py
+++ b/sdk/python/arvados/commands/migrate19.py
@@ -125,17 +125,19 @@ def main(arguments=None):
     uuid_to_collection = {i["uuid"]: i for i in items}
 
     need_migrate = {}
+    totalbytes = 0
     biggest = 0
     biggest_pdh = None
     for img in old_images:
         i = uuid_to_collection[img["collection"]]
         pdh = i["portable_data_hash"]
-        if pdh not in already_migrated and (only_migrate is None or pdh in only_migrate):
+        if pdh not in already_migrated and pdh not in need_migrate and (only_migrate is None or pdh in only_migrate):
             need_migrate[pdh] = img
             with CollectionReader(i["manifest_text"]) as c:
                 if c.values()[0].size() > biggest:
                     biggest = c.values()[0].size()
                     biggest_pdh = pdh
+                totalbytes += c.values()[0].size()
 
 
     if args.storage_driver == "vfs":
@@ -153,6 +155,7 @@ def main(arguments=None):
     logger.info("Need to migrate %i images", len(need_migrate))
     logger.info("Using tempdir %s", tempfile.gettempdir())
     logger.info("Biggest image %s is about %i MiB", biggest_pdh, biggest/(2**20))
+    logger.info("Total data to migrate about %i MiB", totalbytes/(2**20))
 
     df_out = subprocess.check_output(["df", "-B1", tempfile.gettempdir()])
     ln = df_out.splitlines()[1]

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list