You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by te...@apache.org on 2014/08/20 22:26:46 UTC
git commit: HBASE-11742 Addendum makes compilation on hadoop-1 pass
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 <te...@apache.org>
Authored: Wed Aug 20 20:26:35 2014 +0000
Committer: Ted Yu <te...@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);