hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject git commit: HBASE-11742 Addendum makes compilation on hadoop-1 pass
Date Wed, 20 Aug 2014 20:26:46 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 d79861213 -> 00a9cd3c3


HBASE-11742 Addendum makes compilation on hadoop-1 pass


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

Branch: refs/heads/0.98
Commit: 00a9cd3c342b59774e1068c705e454f94d861d14
Parents: d798612
Author: Ted Yu <tedyu@apache.org>
Authored: Wed Aug 20 20:26:35 2014 +0000
Committer: Ted Yu <tedyu@apache.org>
Committed: Wed Aug 20 20:26:35 2014 +0000

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/snapshot/ExportSnapshot.java     | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/00a9cd3c/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java
index 3ffed7a..0639218 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java
@@ -159,10 +159,16 @@ public class ExportSnapshot extends Configured implements Tool {
       LOG.info("Using bufferSize=" + StringUtils.humanReadableInt(bufferSize));
     }
 
+    byte[] copyBytes(BytesWritable  bw) {
+      byte[] result = new byte[bw.getLength()];
+      System.arraycopy(bw.getBytes(), 0, result, 0, bw.getLength());
+      return result;
+    }
+
     @Override
     public void map(BytesWritable key, NullWritable value, Context context)
         throws InterruptedException, IOException {
-      SnapshotFileInfo inputInfo = SnapshotFileInfo.parseFrom(key.copyBytes());
+      SnapshotFileInfo inputInfo = SnapshotFileInfo.parseFrom(copyBytes(key));
       Path outputPath = getOutputPath(inputInfo);
 
       copyFile(context, inputInfo, outputPath);


Mime
View raw message