cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [2/3] git commit: Bound CFRR progress to 100%. Patch by brandonwilliams reviewed by jbellis for CASSANDRA-3942
Date Thu, 21 Jun 2012 19:43:21 GMT
Bound CFRR progress to 100%.
Patch by brandonwilliams reviewed by jbellis for CASSANDRA-3942


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

Branch: refs/heads/trunk
Commit: 8128119a04f04a89efaf3808d5ebcc4a06cc12a7
Parents: 65b09c8
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Thu Jun 21 14:41:25 2012 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Thu Jun 21 14:41:25 2012 -0500

----------------------------------------------------------------------
 .../cassandra/hadoop/ColumnFamilyRecordReader.java |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8128119a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java b/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
index f4a2a7b..498b00c 100644
--- a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
+++ b/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
@@ -108,7 +108,8 @@ public class ColumnFamilyRecordReader extends RecordReader<ByteBuffer,
SortedMap
     {
         // TODO this is totally broken for wide rows
         // the progress is likely to be reported slightly off the actual but close enough
-        return ((float)iter.rowsRead()) / totalRowCount;
+        float progress = ((float) iter.rowsRead() / totalRowCount);
+        return progress > 1.0F ? 1.0F : progress;
     }
 
     static boolean isEmptyPredicate(SlicePredicate predicate)


Mime
View raw message