public class KeyIgnoringAnySAMOutputFormat<K> extends AnySAMOutputFormat<K>
A SAMFileHeader must be provided via setSAMHeader(htsjdk.samtools.SAMFileHeader) or
readSAMHeaderFrom(org.apache.hadoop.fs.Path, org.apache.hadoop.conf.Configuration) before getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext) is called.
By default, writes the SAM header to the output file(s). This can be disabled, because in distributed usage one often ends up with (and, for decent performance, wants to end up with) the output split into multiple parts, which are easier to concatenate if the header is not present in each file.
| Modifier and Type | Field and Description |
|---|---|
protected htsjdk.samtools.SAMFileHeader |
header |
static String |
WRITE_HEADER_PROPERTY
Whether the header will be written, defaults to true.
|
format, OUTPUT_SAM_FORMAT_PROPERTY| Constructor and Description |
|---|
KeyIgnoringAnySAMOutputFormat(org.apache.hadoop.conf.Configuration conf) |
KeyIgnoringAnySAMOutputFormat(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path path) |
KeyIgnoringAnySAMOutputFormat(SAMFormat fmt) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.mapreduce.RecordWriter<K,SAMRecordWritable> |
getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext ctx)
setSAMHeader or readSAMHeaderFrom must have
been called first. |
org.apache.hadoop.mapreduce.RecordWriter<K,SAMRecordWritable> |
getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext ctx,
org.apache.hadoop.fs.Path out) |
htsjdk.samtools.SAMFileHeader |
getSAMHeader() |
boolean |
getWriteHeader()
Deprecated.
|
void |
readSAMHeaderFrom(InputStream in,
org.apache.hadoop.conf.Configuration conf) |
void |
readSAMHeaderFrom(org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration conf) |
void |
setSAMHeader(htsjdk.samtools.SAMFileHeader header) |
void |
setWriteHeader(boolean b)
Deprecated.
|
checkOutputSpecs, getCompressOutput, getDefaultWorkFile, getOutputCommitter, getOutputCompressorClass, getOutputName, getOutputPath, getPathForWorkFile, getUniqueFile, getWorkOutputPath, setCompressOutput, setOutputCompressorClass, setOutputName, setOutputPathprotected htsjdk.samtools.SAMFileHeader header
public static final String WRITE_HEADER_PROPERTY
public KeyIgnoringAnySAMOutputFormat(SAMFormat fmt)
public KeyIgnoringAnySAMOutputFormat(org.apache.hadoop.conf.Configuration conf)
public KeyIgnoringAnySAMOutputFormat(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path path)
@Deprecated public boolean getWriteHeader()
@Deprecated public void setWriteHeader(boolean b)
public htsjdk.samtools.SAMFileHeader getSAMHeader()
public void setSAMHeader(htsjdk.samtools.SAMFileHeader header)
public void readSAMHeaderFrom(org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration conf)
throws IOException
IOExceptionpublic void readSAMHeaderFrom(InputStream in, org.apache.hadoop.conf.Configuration conf)
public org.apache.hadoop.mapreduce.RecordWriter<K,SAMRecordWritable> getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext ctx) throws IOException
setSAMHeader or readSAMHeaderFrom must have
been called first.getRecordWriter in class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat<K,SAMRecordWritable>IOExceptionpublic org.apache.hadoop.mapreduce.RecordWriter<K,SAMRecordWritable> getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext ctx, org.apache.hadoop.fs.Path out) throws IOException
IOExceptionCopyright © 2016. All rights reserved.