HBASE-2063 For hfileoutputformat, on timeout/failure/kill clean up half-written hfile
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@919058 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cda22507a9
commit
a4b99cf687
|
@ -221,6 +221,8 @@ Release 0.21.0 - Unreleased
|
||||||
HBASE-2244 META gets inconsistent in a number of crash scenarios
|
HBASE-2244 META gets inconsistent in a number of crash scenarios
|
||||||
HBASE-2284 fsWriteLatency metric may be incorrectly reported
|
HBASE-2284 fsWriteLatency metric may be incorrectly reported
|
||||||
(Kannan Muthukkaruppan via Stack)
|
(Kannan Muthukkaruppan via Stack)
|
||||||
|
HBASE-2063 For hfileoutputformat, on timeout/failure/kill clean up
|
||||||
|
half-written hfile (Ruslan Salyakhov via Stack)
|
||||||
|
|
||||||
IMPROVEMENTS
|
IMPROVEMENTS
|
||||||
HBASE-1760 Cleanup TODOs in HTable
|
HBASE-1760 Cleanup TODOs in HTable
|
||||||
|
|
|
@ -35,6 +35,7 @@ import org.apache.hadoop.hbase.regionserver.StoreFile;
|
||||||
import org.apache.hadoop.hbase.util.Bytes;
|
import org.apache.hadoop.hbase.util.Bytes;
|
||||||
import org.apache.hadoop.mapreduce.RecordWriter;
|
import org.apache.hadoop.mapreduce.RecordWriter;
|
||||||
import org.apache.hadoop.mapreduce.TaskAttemptContext;
|
import org.apache.hadoop.mapreduce.TaskAttemptContext;
|
||||||
|
import org.apache.hadoop.mapreduce.lib.output.FileOutputCommitter;
|
||||||
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
|
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
|
||||||
import org.mortbay.log.Log;
|
import org.mortbay.log.Log;
|
||||||
|
|
||||||
|
@ -50,7 +51,8 @@ public class HFileOutputFormat extends FileOutputFormat<ImmutableBytesWritable,
|
||||||
public RecordWriter<ImmutableBytesWritable, KeyValue> getRecordWriter(TaskAttemptContext context)
|
public RecordWriter<ImmutableBytesWritable, KeyValue> getRecordWriter(TaskAttemptContext context)
|
||||||
throws IOException, InterruptedException {
|
throws IOException, InterruptedException {
|
||||||
// Get the path of the temporary output file
|
// Get the path of the temporary output file
|
||||||
final Path outputdir = FileOutputFormat.getOutputPath(context);
|
final Path outputPath = FileOutputFormat.getOutputPath(context);
|
||||||
|
final Path outputdir = new FileOutputCommitter(outputPath, context).getWorkPath();
|
||||||
Configuration conf = context.getConfiguration();
|
Configuration conf = context.getConfiguration();
|
||||||
final FileSystem fs = outputdir.getFileSystem(conf);
|
final FileSystem fs = outputdir.getFileSystem(conf);
|
||||||
// These configs. are from hbase-*.xml
|
// These configs. are from hbase-*.xml
|
||||||
|
|
Loading…
Reference in New Issue