@Test @Category(UnitTest.class) public void testWriteNonTileIdWritableKey() throws Exception { subject = createSubject(false); RecordWriter writer = subject.getRecordWriter(mockContext); WritableComparable testKey = mock(WritableComparable.class); Writable testValue = mock(Writable.class); writer.write(testKey, testValue); verify(mockWriter, atLeastOnce()).append(testKey, testValue); }
@Override public RecordWriter<WritableComparable<?>, Writable> getRecordWriter(TaskAttemptContext context) throws IOException { CompressionCodec codec = null; CompressionType compressionType = CompressionType.NONE; if (getCompressOutput(context)) { compressionType = SequenceFileOutputFormat.getOutputCompressionType(context); codec = getCompressionCodec(context); } Path file = getDefaultWorkFile(context, ""); MapFile.Writer out = createMapFileWriter(context, codec, compressionType, file); return new Writer(out); }
HdfsMrsPyramidOutputFormat extends FileOutputFormat<WritableComparable<?>, Writable> { @Override public RecordWriter<WritableComparable<?>, Writable> getRecordWriter(TaskAttemptContext context) throws IOException { CompressionCodec codec = null; CompressionType compressionType = CompressionType.NONE; if (getCompressOutput(context)) { compressionType = SequenceFileOutputFormat.getOutputCompressionType(context); codec = getCompressionCodec(context); } Path file = getDefaultWorkFile(context, ""); MapFile.Writer out = createMapFileWriter(context, codec, compressionType, file); return new Writer(out); } }
HdfsMrsPyramidOutputFormat extends FileOutputFormat<WritableComparable<?>, Writable> { @Override public RecordWriter<WritableComparable<?>, Writable> getRecordWriter(TaskAttemptContext context) throws IOException { CompressionCodec codec = null; CompressionType compressionType = CompressionType.NONE; if (getCompressOutput(context)) { compressionType = SequenceFileOutputFormat.getOutputCompressionType(context); codec = getCompressionCodec(context); } Path file = getDefaultWorkFile(context, ""); MapFile.Writer out = createMapFileWriter(context, codec, compressionType, file); return new Writer(out); }  }
HdfsMrsPyramidOutputFormat extends FileOutputFormat<WritableComparable<?>, Writable> { @Override public RecordWriter<WritableComparable<?>, Writable> getRecordWriter(TaskAttemptContext context) throws IOException { CompressionCodec codec = null; CompressionType compressionType = CompressionType.NONE; if (getCompressOutput(context)) { compressionType = SequenceFileOutputFormat.getOutputCompressionType(context); codec = getCompressionCodec(context); } Path file = getDefaultWorkFile(context, ""); MapFile.Writer out = createMapFileWriter(context, codec, compressionType, file); return new Writer(out); }  @Override RecordWriter<WritableComparable<?>, Writable> getRecordWriter(TaskAttemptContext context); }
HdfsMrsPyramidOutputFormat extends FileOutputFormat<WritableComparable<?>, Writable> { @Override public RecordWriter<WritableComparable<?>, Writable> getRecordWriter(TaskAttemptContext context) throws IOException { CompressionCodec codec = null; CompressionType compressionType = CompressionType.NONE; if (getCompressOutput(context)) { compressionType = SequenceFileOutputFormat.getOutputCompressionType(context); codec = getCompressionCodec(context); } Path file = getDefaultWorkFile(context, ""); MapFile.Writer out = createMapFileWriter(context, codec, compressionType, file); return new Writer(out); }  @Override RecordWriter<WritableComparable<?>, Writable> getRecordWriter(TaskAttemptContext context);  }