test_class.declarator: TEST_PROJECT_ID = "domain:project"
test_class.modifier: private static final
test_class.original_string: private static final String TEST_PROJECT_ID = "domain:project";
test_class.type: String
test_class.var_name: TEST_PROJECT_ID
test_class.declarator: TEST_DATASET_ID = "dataset"
test_class.modifier: private static final
test_class.original_string: private static final String TEST_DATASET_ID = "dataset";
test_class.type: String
test_class.var_name: TEST_DATASET_ID
test_class.declarator: TEST_TABLE_ID = "table"
test_class.modifier: private static final
test_class.original_string: private static final String TEST_TABLE_ID = "table";
test_class.type: String
test_class.var_name: TEST_TABLE_ID
test_class.declarator: QUALIFIED_TEST_TABLE_ID =
        String.format("%s:%s.%s", TEST_PROJECT_ID, TEST_DATASET_ID, TEST_TABLE_ID)
test_class.modifier: private static final
test_class.original_string: private static final String QUALIFIED_TEST_TABLE_ID =
        String.format("%s:%s.%s", TEST_PROJECT_ID, TEST_DATASET_ID, TEST_TABLE_ID);
test_class.type: String
test_class.var_name: QUALIFIED_TEST_TABLE_ID
test_class.declarator: TEST_FILE_FORMAT =
        BigQueryFileFormat.NEWLINE_DELIMITED_JSON
test_class.modifier: private static final
test_class.original_string: private static final BigQueryFileFormat TEST_FILE_FORMAT =
        BigQueryFileFormat.NEWLINE_DELIMITED_JSON;
test_class.type: BigQueryFileFormat
test_class.var_name: TEST_FILE_FORMAT
test_class.declarator: TEST_OUTPUT_CLASS = TextOutputFormat.class
test_class.modifier: @SuppressWarnings("rawtypes")
    private static final
test_class.original_string: @SuppressWarnings("rawtypes")
    private static final Class<? extends FileOutputFormat> TEST_OUTPUT_CLASS = TextOutputFormat.class;
test_class.type: Class<? extends FileOutputFormat>
test_class.var_name: TEST_OUTPUT_CLASS
test_class.declarator: TEST_OUTPUT_PATH_STRING = "gs://test_bucket/test_directory/"
test_class.modifier: private static final
test_class.original_string: private static final String TEST_OUTPUT_PATH_STRING = "gs://test_bucket/test_directory/";
test_class.type: String
test_class.var_name: TEST_OUTPUT_PATH_STRING
test_class.declarator: TEST_OUTPUT_PATH = new Path(TEST_OUTPUT_PATH_STRING)
test_class.modifier: private static final
test_class.original_string: private static final Path TEST_OUTPUT_PATH = new Path(TEST_OUTPUT_PATH_STRING);
test_class.type: Path
test_class.var_name: TEST_OUTPUT_PATH
test_class.declarator: TEST_TASK_ATTEMPT_ID =
        new TaskAttemptID(new TaskID("sample_task", 100, false, 200), 1)
test_class.modifier: private static final
test_class.original_string: private static final TaskAttemptID TEST_TASK_ATTEMPT_ID =
        new TaskAttemptID(new TaskID("sample_task", 100, false, 200), 1);
test_class.type: TaskAttemptID
test_class.var_name: TEST_TASK_ATTEMPT_ID
test_class.declarator: ghfs
test_class.modifier: private
test_class.original_string: private InMemoryGoogleHadoopFileSystem ghfs;
test_class.type: InMemoryGoogleHadoopFileSystem
test_class.var_name: ghfs
test_class.declarator: conf
test_class.modifier: private
test_class.original_string: private Configuration conf;
test_class.type: Configuration
test_class.var_name: conf
test_class.declarator: job
test_class.modifier: private
test_class.original_string: private Job job;
test_class.type: Job
test_class.var_name: job
test_class.declarator: outputFormat
test_class.modifier: private
test_class.original_string: private ForwardingBigQueryFileOutputFormat<Text, Text> outputFormat;
test_class.type: ForwardingBigQueryFileOutputFormat<Text, Text>
test_class.var_name: outputFormat
test_class.declarator: mockTaskAttemptContext
test_class.modifier: @Mock private
test_class.original_string: @Mock private TaskAttemptContext mockTaskAttemptContext;
test_class.type: TaskAttemptContext
test_class.var_name: mockTaskAttemptContext
test_class.declarator: mockFileOutputFormat
test_class.modifier: @Mock private
test_class.original_string: @Mock private FileOutputFormat<Text, Text> mockFileOutputFormat;
test_class.type: FileOutputFormat<Text, Text>
test_class.var_name: mockFileOutputFormat
test_class.declarator: mockOutputCommitter
test_class.modifier: @Mock private
test_class.original_string: @Mock private OutputCommitter mockOutputCommitter;
test_class.type: OutputCommitter
test_class.var_name: mockOutputCommitter
test_class.declarator: mockRecordWriter
test_class.modifier: @Mock private
test_class.original_string: @Mock private RecordWriter<Text, Text> mockRecordWriter;
test_class.type: RecordWriter<Text, Text>
test_class.var_name: mockRecordWriter
test_class.file: bigquery/src/test/java/com/google/cloud/hadoop/io/bigquery/output/ForwardingBigQueryFileOutputFormatTest.java
test_class.identifier: ForwardingBigQueryFileOutputFormatTest
test_case.body: @Test
    public void testCheckOutputSpecs() throws IOException {
      outputFormat.checkOutputSpecs(mockTaskAttemptContext);
  
      verify(mockFileOutputFormat).checkOutputSpecs(eq(mockTaskAttemptContext));
    }
test_case.class_method_signature: ForwardingBigQueryFileOutputFormatTest.testCheckOutputSpecs()
test_case.full_signature: @Test public void testCheckOutputSpecs()
test_case.identifier: testCheckOutputSpecs
test_case.invocations: checkOutputSpecs checkOutputSpecs verify eq
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCheckOutputSpecs()
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: delegate = null
focal_class.modifier: private
focal_class.original_string: private FileOutputFormat<K, V> delegate = null;
focal_class.type: FileOutputFormat<K, V>
focal_class.var_name: delegate
focal_class.declarator: committer = null
focal_class.modifier: private
focal_class.original_string: private OutputCommitter committer = null;
focal_class.type: OutputCommitter
focal_class.var_name: committer
focal_class.file: bigquery/src/main/java/com/google/cloud/hadoop/io/bigquery/output/ForwardingBigQueryFileOutputFormat.java
focal_class.identifier: ForwardingBigQueryFileOutputFormat
focal_class.class_method_signature: ForwardingBigQueryFileOutputFormat.checkOutputSpecs(JobContext job)
focal_class.full_signature: @Override public void checkOutputSpecs(JobContext job)
focal_class.identifier: checkOutputSpecs
focal_class.modifiers: @Override public
focal_class.parameters: (JobContext job)
focal_class.return: void
focal_class.signature: void checkOutputSpecs(JobContext job)
focal_class.class_method_signature: ForwardingBigQueryFileOutputFormat.getOutputCommitter(TaskAttemptContext context)
focal_class.full_signature: @Override public synchronized OutputCommitter getOutputCommitter(TaskAttemptContext context)
focal_class.identifier: getOutputCommitter
focal_class.modifiers: @Override public synchronized
focal_class.parameters: (TaskAttemptContext context)
focal_class.return: OutputCommitter
focal_class.signature: OutputCommitter getOutputCommitter(TaskAttemptContext context)
focal_class.class_method_signature: ForwardingBigQueryFileOutputFormat.getRecordWriter(TaskAttemptContext context)
focal_class.full_signature: @Override public RecordWriter<K, V> getRecordWriter(TaskAttemptContext context)
focal_class.identifier: getRecordWriter
focal_class.modifiers: @Override public
focal_class.parameters: (TaskAttemptContext context)
focal_class.return: RecordWriter<K, V>
focal_class.signature: RecordWriter<K, V> getRecordWriter(TaskAttemptContext context)
focal_class.class_method_signature: ForwardingBigQueryFileOutputFormat.createCommitter(TaskAttemptContext context)
focal_class.full_signature: protected OutputCommitter createCommitter(TaskAttemptContext context)
focal_class.identifier: createCommitter
focal_class.modifiers: protected
focal_class.parameters: (TaskAttemptContext context)
focal_class.return: OutputCommitter
focal_class.signature: OutputCommitter createCommitter(TaskAttemptContext context)
focal_class.class_method_signature: ForwardingBigQueryFileOutputFormat.getDelegate(Configuration conf)
focal_class.full_signature: @SuppressWarnings("unchecked") protected synchronized FileOutputFormat<K, V> getDelegate(Configuration conf)
focal_class.identifier: getDelegate
focal_class.modifiers: @SuppressWarnings("unchecked") protected synchronized
focal_class.parameters: (Configuration conf)
focal_class.return: FileOutputFormat<K, V>
focal_class.signature: FileOutputFormat<K, V> getDelegate(Configuration conf)
focal_class.class_method_signature: ForwardingBigQueryFileOutputFormat.setDelegate(FileOutputFormat<K, V> delegate)
focal_class.full_signature: @VisibleForTesting synchronized void setDelegate(FileOutputFormat<K, V> delegate)
focal_class.identifier: setDelegate
focal_class.modifiers: @VisibleForTesting synchronized
focal_class.parameters: (FileOutputFormat<K, V> delegate)
focal_class.return: void
focal_class.signature: void setDelegate(FileOutputFormat<K, V> delegate)
focal_class.superclass: extends OutputFormat<K, V>
focal_method.body: @Override
    public void checkOutputSpecs(JobContext job) throws FileAlreadyExistsException, IOException {
      Configuration conf = job.getConfiguration();
  
      // Validate the output configuration.
      BigQueryOutputConfiguration.validateConfiguration(conf);
  
      // Get the output path.
      Path outputPath = BigQueryOutputConfiguration.getGcsOutputPath(conf);
      logger.atInfo().log("Using output path '%s'.", outputPath);
  
      // Error if the output path already exists.
      FileSystem outputFileSystem = outputPath.getFileSystem(conf);
      if (outputFileSystem.exists(outputPath)) {
        throw new IOException("The output path '" + outputPath + "' already exists.");
      }
  
      // Error if compression is set as there's mixed support in BigQuery.
      if (FileOutputFormat.getCompressOutput(job)) {
        throw new IOException("Compression isn't supported for this OutputFormat.");
      }
  
      // Error if unable to create a BigQuery helper.
      try {
        new BigQueryFactory().getBigQueryHelper(conf);
      } catch (GeneralSecurityException gse) {
        throw new IOException("Failed to create BigQuery client", gse);
      }
  
      // Let delegate process its checks.
      getDelegate(conf).checkOutputSpecs(job);
    }
focal_method.class_method_signature: ForwardingBigQueryFileOutputFormat.checkOutputSpecs(JobContext job)
focal_method.full_signature: @Override public void checkOutputSpecs(JobContext job)
focal_method.identifier: checkOutputSpecs
focal_method.invocations: getConfiguration validateConfiguration getGcsOutputPath log atInfo getFileSystem exists getCompressOutput getBigQueryHelper checkOutputSpecs getDelegate
focal_method.modifiers: @Override public
focal_method.parameters: (JobContext job)
focal_method.return: void
focal_method.signature: void checkOutputSpecs(JobContext job)