test_class.file: bigquery/src/test/java/com/google/cloud/hadoop/io/bigquery/UnshardedExportToCloudStorageTest.java
test_class.identifier: UnshardedExportToCloudStorageTest
test_case.body: @Test
    public void testGetSplits() throws Exception {
      Configuration conf = new Configuration();
  
      UnshardedExportToCloudStorage export =
          new UnshardedExportToCloudStorage(
              conf,
              "path",
              ExportFileFormat.AVRO,
              new BigQueryHelper(null),
              "project-id",
              null, /* table */
              new InputFormat<LongWritable, Text>() {
                @Override
                public List<InputSplit> getSplits(JobContext jobContext) {
                  return ImmutableList.<InputSplit>builder()
                      .add(new FileSplit(new Path("Foo"), 0L, 1L, new String[0]))
                      .add(new FileSplit(new Path("Bar"), 0L, 1L, new String[0]))
                      .build();
                }
  
                @Override
                public RecordReader<LongWritable, Text> createRecordReader(
                    InputSplit inputSplit, TaskAttemptContext taskAttemptContext) {
                  throw new UnsupportedOperationException("Not implemented.");
                }
              });
  
      List<InputSplit> splits = export.getSplits(null);
      UnshardedInputSplit fooSplit = (UnshardedInputSplit) splits.get(0);
      assertThat(fooSplit.getPath().getName()).isEqualTo("Foo");
  
      UnshardedInputSplit barSplit = (UnshardedInputSplit) splits.get(1);
      assertThat(barSplit.getPath().getName()).isEqualTo("Bar");
    }
test_case.class_method_signature: UnshardedExportToCloudStorageTest.testGetSplits()
test_case.full_signature: @Test public void testGetSplits()
test_case.identifier: testGetSplits
test_case.invocations: build add add builder getSplits get isEqualTo assertThat getName getPath get isEqualTo assertThat getName getPath
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetSplits()
focal_class.declarator: logger = GoogleLogger.forEnclosingClass()
focal_class.modifier: private static final
focal_class.original_string: private static final GoogleLogger logger = GoogleLogger.forEnclosingClass();
focal_class.type: GoogleLogger
focal_class.var_name: logger
focal_class.declarator: delegateInputFormat
focal_class.modifier: private
focal_class.original_string: private InputFormat<LongWritable, Text> delegateInputFormat;
focal_class.type: InputFormat<LongWritable, Text>
focal_class.var_name: delegateInputFormat
focal_class.file: bigquery/src/main/java/com/google/cloud/hadoop/io/bigquery/UnshardedExportToCloudStorage.java
focal_class.identifier: UnshardedExportToCloudStorage
focal_class.class_method_signature: UnshardedExportToCloudStorage.UnshardedExportToCloudStorage(
        Configuration configuration,
        String gcsPath,
        ExportFileFormat fileFormat,
        BigQueryHelper bigQueryHelper,
        String projectId,
        Table tableToExport,
        @Nullable InputFormat<LongWritable, Text> delegateInputFormat)
focal_class.full_signature: public  UnshardedExportToCloudStorage(
        Configuration configuration,
        String gcsPath,
        ExportFileFormat fileFormat,
        BigQueryHelper bigQueryHelper,
        String projectId,
        Table tableToExport,
        @Nullable InputFormat<LongWritable, Text> delegateInputFormat)
focal_class.identifier: UnshardedExportToCloudStorage
focal_class.modifiers: public
focal_class.parameters: (
        Configuration configuration,
        String gcsPath,
        ExportFileFormat fileFormat,
        BigQueryHelper bigQueryHelper,
        String projectId,
        Table tableToExport,
        @Nullable InputFormat<LongWritable, Text> delegateInputFormat)
focal_class.signature:  UnshardedExportToCloudStorage(
        Configuration configuration,
        String gcsPath,
        ExportFileFormat fileFormat,
        BigQueryHelper bigQueryHelper,
        String projectId,
        Table tableToExport,
        @Nullable InputFormat<LongWritable, Text> delegateInputFormat)
focal_class.class_method_signature: UnshardedExportToCloudStorage.getSplits(JobContext context)
focal_class.full_signature: @Override public List<InputSplit> getSplits(JobContext context)
focal_class.identifier: getSplits
focal_class.modifiers: @Override public
focal_class.parameters: (JobContext context)
focal_class.return: List<InputSplit>
focal_class.signature: List<InputSplit> getSplits(JobContext context)
focal_class.class_method_signature: UnshardedExportToCloudStorage.getExportPaths()
focal_class.full_signature: @Override public List<String> getExportPaths()
focal_class.identifier: getExportPaths
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: List<String>
focal_class.signature: List<String> getExportPaths()
focal_class.class_method_signature: UnshardedExportToCloudStorage.waitForUsableMapReduceInput()
focal_class.full_signature: @Override public void waitForUsableMapReduceInput()
focal_class.identifier: waitForUsableMapReduceInput
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void waitForUsableMapReduceInput()
focal_class.superclass: extends AbstractExportToCloudStorage
focal_method.body: @Override
    public List<InputSplit> getSplits(JobContext context) throws IOException, InterruptedException {
      logger.atInfo().log("Setting FileInputFormat's inputPath to '%s'", gcsPath);
      configuration.set(FileInputFormat.INPUT_DIR, gcsPath);
  
      // Now that the FileInputFormat's path is pointed to the export directory, construct splits
      // using a TextInputFormat instance.
      List<InputSplit> splits = new ArrayList<>();
      for (InputSplit split : delegateInputFormat.getSplits(context)) {
        FileSplit fileSplit = (FileSplit) split;
        splits.add(
            new UnshardedInputSplit(
                fileSplit.getPath(),
                fileSplit.getStart(),
                fileSplit.getLength(),
                fileSplit.getLocations()));
      }
      return splits;
    }
focal_method.class_method_signature: UnshardedExportToCloudStorage.getSplits(JobContext context)
focal_method.full_signature: @Override public List<InputSplit> getSplits(JobContext context)
focal_method.identifier: getSplits
focal_method.invocations: log atInfo set getSplits add getPath getStart getLength getLocations
focal_method.modifiers: @Override public
focal_method.parameters: (JobContext context)
focal_method.return: List<InputSplit>
focal_method.signature: List<InputSplit> getSplits(JobContext context)