ForwardingBigQueryFileOutputCommitter extends OutputCommitter { protected List<String> getOutputFileURIs() throws IOException { FileStatus[] outputFiles = outputFileSystem.listStatus(outputPath); ArrayList<String> sourceUris = new ArrayList<String>(outputFiles.length); for (int i = 0; i < outputFiles.length; i++) { FileStatus fileStatus = outputFiles[i]; if (!fileStatus.isDir() && !fileStatus.getPath().getName().equals(FileOutputCommitter.SUCCEEDED_FILE_NAME)) { sourceUris.add(fileStatus.getPath().toString()); } } return sourceUris; } ForwardingBigQueryFileOutputCommitter(TaskAttemptContext context, OutputCommitter delegate); @Override void commitJob(JobContext context); @Override void abortJob(JobContext context, State state); @Override void abortTask(TaskAttemptContext context); @Override void commitTask(TaskAttemptContext context); @Override boolean needsTaskCommit(TaskAttemptContext context); @Override void setupJob(JobContext context); @Override void setupTask(TaskAttemptContext context);  }
@Test public void testGetOutputFileURIs() throws IOException { generateSampleFiles(); List<String> outputFileURIs = committer.getOutputFileURIs(); assertThat(outputFileURIs).containsExactly(TEST_OUTPUT_FILE_STRING); }