cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [2/6] cassandra git commit: Revive missing code from CASSANDRA-7229
Date Wed, 16 Sep 2015 02:23:58 GMT
Revive missing code from CASSANDRA-7229

Patch by brandonwilliams for CASSANDRA-10067


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

Branch: refs/heads/cassandra-2.2
Commit: 2cd59b87527f00d2b41dc85ae61159e8eeb4b3b8
Parents: 7fba3d2
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Tue Sep 15 20:20:35 2015 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Tue Sep 15 20:20:35 2015 -0500

----------------------------------------------------------------------
 .../cassandra/hadoop/cql3/CqlInputFormat.java    | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2cd59b87/src/java/org/apache/cassandra/hadoop/cql3/CqlInputFormat.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hadoop/cql3/CqlInputFormat.java b/src/java/org/apache/cassandra/hadoop/cql3/CqlInputFormat.java
index 09bd80c..36da92d 100644
--- a/src/java/org/apache/cassandra/hadoop/cql3/CqlInputFormat.java
+++ b/src/java/org/apache/cassandra/hadoop/cql3/CqlInputFormat.java
@@ -19,7 +19,9 @@ package org.apache.cassandra.hadoop.cql3;
 
 import java.io.IOException;
 
+import org.apache.cassandra.hadoop.HadoopCompat;
 import org.apache.cassandra.hadoop.AbstractColumnFamilyInputFormat;
+import org.apache.cassandra.hadoop.ReporterWrapper;
 import org.apache.hadoop.mapred.InputSplit;
 import org.apache.hadoop.mapred.JobConf;
 import org.apache.hadoop.mapred.RecordReader;
@@ -53,14 +55,15 @@ public class CqlInputFormat extends AbstractColumnFamilyInputFormat<Long,
Row>
     public RecordReader<Long, Row> getRecordReader(InputSplit split, JobConf jobConf,
final Reporter reporter)
             throws IOException
     {
-        TaskAttemptContext tac = new TaskAttemptContext(jobConf, TaskAttemptID.forName(jobConf.get(MAPRED_TASK_ID)))
-        {
-            @Override
-            public void progress()
-            {
-                reporter.progress();
-            }
-        };
+        TaskAttemptContext tac = HadoopCompat.newMapContext(
+                jobConf,
+                TaskAttemptID.forName(jobConf.get(MAPRED_TASK_ID)),
+                null,
+                null,
+                null,
+                new ReporterWrapper(reporter),
+                null);
+
 
         CqlRecordReader recordReader = new CqlRecordReader();
         recordReader.initialize((org.apache.hadoop.mapreduce.InputSplit)split, tac);


Mime
View raw message