in java/src/main/java/com/google/cloud/dataproc/templates/gcs/GCStoGCS.java [94:132]
public void validateInput() {
if (StringUtils.isAllBlank(projectID)
|| StringUtils.isAllBlank(inputFileLocation)
|| StringUtils.isAllBlank(inputFileFormat)
|| StringUtils.isAllBlank(gcsOutputLocation)
|| StringUtils.isAllBlank(gcsOutputFormat)
|| StringUtils.isAllBlank(gcsWriteMode)) {
LOGGER.error(
"{},{},{},{},{},{} are required parameter. ",
PROJECT_ID_PROP,
GCS_GCS_INPUT_LOCATION,
GCS_GCS_INPUT_FORMAT,
GCS_GCS_OUTPUT_LOCATION,
GCS_GCS_OUTPUT_FORMAT,
GCS_GCS_WRITE_MODE);
throw new IllegalArgumentException(
"Required parameters for GCStoGCS not passed. "
+ "Set mandatory parameter for GCStoGCS template "
+ "in resources/conf/template.properties file.");
}
LOGGER.info(
"Starting GCS to GCS spark job with following parameters:"
+ "1. {}:{}"
+ "2. {}:{}"
+ "3. {}:{}"
+ "4. {}:{}"
+ "5. {}:{}",
GCS_GCS_INPUT_LOCATION,
inputFileLocation,
GCS_GCS_INPUT_FORMAT,
inputFileFormat,
GCS_GCS_OUTPUT_LOCATION,
gcsOutputLocation,
GCS_GCS_OUTPUT_FORMAT,
gcsOutputFormat,
GCS_GCS_WRITE_MODE,
gcsWriteMode);
}