accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From md...@apache.org
Subject [2/3] git commit: ACCUMULO-2807 Use deprecated SequenceFile.Reader
Date Wed, 14 May 2014 19:30:26 GMT
ACCUMULO-2807 Use deprecated SequenceFile.Reader

Use the old method
Of creating a reader
To retain compat


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

Branch: refs/heads/master
Commit: c57bc8d5d509e368bc0d4a4b8e2f80503efade26
Parents: 366aef1
Author: Mike Drob <mdrob@cloudera.com>
Authored: Wed May 14 15:29:23 2014 -0400
Committer: Mike Drob <mdrob@cloudera.com>
Committed: Wed May 14 15:29:23 2014 -0400

----------------------------------------------------------------------
 .../org/apache/accumulo/tserver/log/LocalWALRecovery.java     | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/c57bc8d5/server/tserver/src/main/java/org/apache/accumulo/tserver/log/LocalWALRecovery.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/LocalWALRecovery.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/LocalWALRecovery.java
index 2adb52d..31f4f14 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/LocalWALRecovery.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/LocalWALRecovery.java
@@ -145,7 +145,12 @@ public class LocalWALRecovery implements Runnable {
 
         log.info("Openning local log " + file.getAbsolutePath());
 
-        Reader reader = new SequenceFile.Reader(fs.getConf(), SequenceFile.Reader.file(new
Path(file.toURI())));
+        Path localWal = new Path(file.toURI());
+        FileSystem localFs = FileSystem.getLocal(fs.getConf());
+        
+        @SuppressWarnings("deprecation")
+        Reader reader = new SequenceFile.Reader(localFs, localWal, localFs.getConf());
+        // Reader reader = new SequenceFile.Reader(localFs.getConf(), SequenceFile.Reader.file(localWal));
         Path tmp = new Path(options.destination + "/" + name + ".copy");
         FSDataOutputStream writer = fs.create(tmp);
         while (reader.next(key, value)) {


Mime
View raw message