### Question:
MultiRFileOutputFormatter extends FileOutputFormat<BulkIngestKey,Value> { public static void setRFileLimits(Configuration conf, int maxEntries, long maxSize) { conf.setInt(MAX_RFILE_UNDEDUPPED_ENTRIES, maxEntries); conf.setLong(MAX_RFILE_UNCOMPRESSED_SIZE, maxSize); }  static void setGenerateMapFileRowKeys(Configuration conf, boolean generateMapFileRowKeys); static void setGenerateMapFilePerShardLocation(Configuration conf, boolean generateMapFilePerShardLocation); static void setCompressionType(Configuration conf, String compressionType); static void setCompressionTableBlackList(Configuration conf, Set<String> compressionTableBlackList); static void setFileType(Configuration conf, String type); static void setAccumuloConfiguration(Configuration conf); static void setRFileLimits(Configuration conf, int maxEntries, long maxSize); static void addTableToLocalityGroupConfiguration(Configuration conf, String tableName); @Override synchronized OutputCommitter getOutputCommitter(TaskAttemptContext context); @Override RecordWriter<BulkIngestKey,Value> getRecordWriter(final TaskAttemptContext context); static final String CONFIGURE_LOCALITY_GROUPS; static final String EVENT_PARTITION_COUNT; static final String EDGE_PARTITION_COUNT; static final String INDEX_PARTITION_COUNT; static final String REV_INDEX_PARTITION_COUNT; static final String LOCATION_PARTITION_COUNT; static final String CONFIGURED_TABLE_NAMES; }### Answer:
@Test public void testRFileEntrySizeLimit() throws IOException, InterruptedException, AccumuloSecurityException, AccumuloException, URISyntaxException { MultiRFileOutputFormatter.setRFileLimits(conf, 1, 0); RecordWriter<BulkIngestKey,Value> writer = createWriter(formatter, conf); writeShardPairs(writer, 2); assertNumFileNames(5); assertFileNameForShardIndex(0); expectShardFiles(4); }
@Test public void testRFileFileSizeLimit() throws IOException, InterruptedException { MultiRFileOutputFormatter.setRFileLimits(conf, 0, 32); RecordWriter<BulkIngestKey,Value> writer = createWriter(formatter, conf); writeShardPairs(writer, 3); assertNumFileNames(4); assertFileNameForShardIndex(0); expectShardFiles(3); }