Author: stack
Date: Fri Feb 17 19:33:17 2012
New Revision: 1245724
URL: http://svn.apache.org/viewvc?rev=1245724&view=rev
Log:
HBASE-5317 Fix testColumnFamilyCompression and test_TIMERANGE in
TestHFileOutputFormat
Modified:
hbase/branches/0.92/CHANGES.txt
hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHFileOutputFormat.java
Modified: hbase/branches/0.92/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hbase/branches/0.92/CHANGES.txt?rev=1245724&r1=1245723&r2=1245724&view=diff
==============================================================================
--- hbase/branches/0.92/CHANGES.txt (original)
+++ hbase/branches/0.92/CHANGES.txt Fri Feb 17 19:33:17 2012
@@ -22,7 +22,9 @@ Release 0.92.1 - Unreleased
for confirmation (Jimmy Xiang)
HBASE-5425 Punt on the timeout doesn't work in BulkEnabler#waitUntilDone
(master's EnableTableHandler) (Terry Zhang)
-
+ HBASE-5317 Fix testColumnFamilyCompression and test_TIMERANGE in
+ TestHFileOutputFormat (Gregory Chanan)
+
IMPROVEMENTS
HBASE-5197 [replication] Handle socket timeouts in ReplicationSource
to prevent DDOS
Modified:
hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHFileOutputFormat.java
URL:
http://svn.apache.org/viewvc/hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHFileOutputFormat.java?rev=1245724&r1=1245723&r2=1245724&view=diff
==============================================================================
---
hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHFileOutputFormat.java
(original)
+++
hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHFileOutputFormat.java
Fri Feb 17 19:33:17 2012
@@ -272,15 +272,13 @@ public class TestHFileOutputFormat {
// verify that the file has the proper FileInfo.
writer.close(context);
- // the generated file lives 3 directories down and is the only file,
- // so we traverse the dirs to get to the file
- // ./_temporary/_attempt__0000_r_000000_0/b/1979617994050536795
+ // the generated file lives 1 directory down from the attempt directory
+ // and is the only file, e.g.
+ // _attempt__0000_r_000000_0/b/1979617994050536795
FileSystem fs = FileSystem.get(conf);
- Path path = HFileOutputFormat.getOutputPath(job);
- FileStatus[] sub1 = fs.listStatus(path);
- FileStatus[] sub2 = fs.listStatus(sub1[0].getPath());
- FileStatus[] sub3 = fs.listStatus(sub2[0].getPath());
- FileStatus[] file = fs.listStatus(sub3[0].getPath());
+ Path attemptDirectory = hof.getDefaultWorkFile(context, "").getParent();
+ FileStatus[] sub1 = fs.listStatus(attemptDirectory);
+ FileStatus[] file = fs.listStatus(sub1[0].getPath());
// open as HFile Reader and pull out TIMERANGE FileInfo.
HFile.Reader rd = HFile.createReader(fs, file[0].getPath(),
@@ -600,6 +598,7 @@ public class TestHFileOutputFormat {
// commit so that the filesystem has one directory per column family
hof.getOutputCommitter(context).commitTask(context);
+ hof.getOutputCommitter(context).commitJob(context);
for (byte[] family : FAMILIES) {
String familyStr = new String(family);
boolean found = false;