cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject git commit: make CqlRecordReader/Writer autocloseable
Date Wed, 20 Aug 2014 19:59:51 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 7269e465b -> e6668bee4


make CqlRecordReader/Writer autocloseable


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

Branch: refs/heads/trunk
Commit: e6668bee488f6749068d35f9c6b142cb09b40d82
Parents: 7269e46
Author: Dave Brosius <dbrosius@mebigfatguy.com>
Authored: Wed Aug 20 15:59:03 2014 -0400
Committer: Dave Brosius <dbrosius@mebigfatguy.com>
Committed: Wed Aug 20 15:59:03 2014 -0400

----------------------------------------------------------------------
 src/java/org/apache/cassandra/hadoop/cql3/CqlRecordReader.java | 3 +--
 src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e6668bee/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 3908662..a31f013 100644
--- a/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordReader.java
+++ b/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordReader.java
@@ -34,7 +34,6 @@ import com.google.common.collect.Maps;
 
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
-
 import org.apache.cassandra.hadoop.HadoopCompat;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -67,7 +66,7 @@ import com.datastax.driver.core.Session;
  *       token(partition_key1, ... , partition_keyn) <= ?  (in the right order) 
  */
 public class CqlRecordReader extends RecordReader<Long, Row>
-        implements org.apache.hadoop.mapred.RecordReader<Long, Row>
+        implements org.apache.hadoop.mapred.RecordReader<Long, Row>, AutoCloseable
 {
     private static final Logger logger = LoggerFactory.getLogger(CqlRecordReader.class);
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e6668bee/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java b/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java
index 5075be4..5bac2fc 100644
--- a/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java
+++ b/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java
@@ -60,7 +60,7 @@ import org.apache.thrift.transport.TTransport;
  *
  * @see CqlOutputFormat
  */
-class CqlRecordWriter extends AbstractColumnFamilyRecordWriter<Map<String, ByteBuffer>,
List<ByteBuffer>>
+class CqlRecordWriter extends AbstractColumnFamilyRecordWriter<Map<String, ByteBuffer>,
List<ByteBuffer>> implements AutoCloseable
 {
     private static final Logger logger = LoggerFactory.getLogger(CqlRecordWriter.class);
 


Mime
View raw message