cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [01/19] git commit: Fix IncompatibleClassChangeError from hadoop2
Date Wed, 06 Aug 2014 18:30:02 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 7fa93a2ca -> b6b8a285e
  refs/heads/cassandra-2.1 821a2fe06 -> 54d2e8e2d
  refs/heads/cassandra-2.1.0 38eb2320b -> d9b7d4432
  refs/heads/trunk b8b377603 -> e607d944d


Fix IncompatibleClassChangeError from hadoop2

Patch by Mariusz KryƄski, reviewed by brandonwilliams for CASSANDRA-7229


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

Branch: refs/heads/cassandra-2.1.0
Commit: f83909e04161675addcf7454cea52aa8122dcfef
Parents: d1c4d50
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Wed Aug 6 09:06:42 2014 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Wed Aug 6 09:06:42 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                      |  1 +
 .../cassandra/hadoop/cql3/CqlInputFormat.java    | 19 +++++++++++--------
 2 files changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f83909e0/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 87b1bb3..dcc5bf8 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.10
+ * Fix IncompatibleClassChangeError from hadoop2 (CASSANDRA-7229)
  * Add 'nodetool sethintedhandoffthrottlekb' (CASSANDRA-7635)
  * Update java driver (for hadoop) (CASSANDRA-7618)
  * Fix truncate to always flush (CASSANDRA-7511)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f83909e0/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