You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by br...@apache.org on 2014/05/28 18:34:06 UTC
[3/6] git commit: Use HadoopCompat to get job context Patch by Ben
Coverston, reviewed by brandonwilliams for CASSANDRA-7315
Use HadoopCompat to get job context
Patch by Ben Coverston, reviewed by brandonwilliams for CASSANDRA-7315
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a3b9d569
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a3b9d569
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a3b9d569
Branch: refs/heads/trunk
Commit: a3b9d569f3d6108612cc80d92ba98fd6f4d38b37
Parents: 0c96f99
Author: Brandon Williams <br...@apache.org>
Authored: Wed May 28 11:33:13 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Wed May 28 11:33:13 2014 -0500
----------------------------------------------------------------------
src/java/org/apache/cassandra/hadoop/cql3/CqlRecordReader.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/a3b9d569/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordReader.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordReader.java b/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordReader.java
index 8b0ba83..88c5c33 100644
--- a/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordReader.java
+++ b/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordReader.java
@@ -27,6 +27,7 @@ import java.util.*;
import com.google.common.collect.AbstractIterator;
import com.google.common.collect.Maps;
+import org.apache.cassandra.hadoop.HadoopCompat;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.cassandra.db.marshal.AbstractType;
@@ -85,14 +86,14 @@ public class CqlRecordReader extends RecordReader<Long, Row>
public void initialize(InputSplit split, TaskAttemptContext context) throws IOException
{
this.split = (ColumnFamilySplit) split;
- Configuration conf = context.getConfiguration();
+ Configuration conf = HadoopCompat.getConfiguration(context);
totalRowCount = (this.split.getLength() < Long.MAX_VALUE)
? (int) this.split.getLength()
: ConfigHelper.getInputSplitSize(conf);
cfName = quote(ConfigHelper.getInputColumnFamily(conf));
keyspace = quote(ConfigHelper.getInputKeyspace(conf));
cqlQuery = CqlConfigHelper.getInputCql(conf);
- partitioner = ConfigHelper.getInputPartitioner(context.getConfiguration());
+ partitioner = ConfigHelper.getInputPartitioner(HadoopCompat.getConfiguration(context));
try
{
if (cluster != null)