cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [39/50] [abbrv] git commit: fix loader progress bar display when the transfer was lightning fast
Date Thu, 05 Jan 2012 20:00:30 GMT
fix loader progress bar display when the transfer was lightning fast

git-svn-id: https://svn.apache.org/repos/asf/cassandra/branches/cassandra-0.8@1211000 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/2ffe87e9
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2ffe87e9
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2ffe87e9

Branch: refs/heads/trunk
Commit: 2ffe87e9d257e0c6cc584c11a4b55a3bb7fa1470
Parents: 8480f06
Author: Sylvain Lebresne <slebresne@apache.org>
Authored: Tue Dec 6 16:30:53 2011 +0000
Committer: Sylvain Lebresne <slebresne@apache.org>
Committed: Tue Dec 6 16:30:53 2011 +0000

----------------------------------------------------------------------
 .../org/apache/cassandra/tools/BulkLoader.java     |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2ffe87e9/src/java/org/apache/cassandra/tools/BulkLoader.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/BulkLoader.java b/src/java/org/apache/cassandra/tools/BulkLoader.java
index f57ebfe..e18dd67 100644
--- a/src/java/org/apache/cassandra/tools/BulkLoader.java
+++ b/src/java/org/apache/cassandra/tools/BulkLoader.java
@@ -69,12 +69,14 @@ public class BulkLoader
                 ProgressIndicator indicator = new ProgressIndicator(future.getPendingFiles());
                 indicator.start();
                 System.out.println("");
+                boolean printEnd = false;
                 while (!future.isDone())
                 {
                     if (indicator.printProgress())
                     {
                         // We're done with streaming
                         System.out.println("\nWaiting for targets to rebuild indexes ...");
+                        printEnd = true;
                         future.get();
                         assert future.isDone();
                     }
@@ -83,6 +85,8 @@ public class BulkLoader
                         try { Thread.sleep(1000L); } catch (Exception e) {}
                     }
                 }
+                if (!printEnd)
+                    indicator.printProgress();
             }
 
             System.exit(0); // We need that to stop non daemonized threads


Mime
View raw message