From 0000f2f09efb428f502990c92873b6bb0147ac4e Mon Sep 17 00:00:00 2001 From: Dzmitry Lazerka Date: Sat, 20 Feb 2016 11:34:20 -0800 Subject: [PATCH] Renamed fileNamePattern to jobName. See issue #87. --- .../outputs/BigQueryGoogleCloudStorageStoreOutput.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/java/src/main/java/com/google/appengine/tools/mapreduce/outputs/BigQueryGoogleCloudStorageStoreOutput.java b/java/src/main/java/com/google/appengine/tools/mapreduce/outputs/BigQueryGoogleCloudStorageStoreOutput.java index e8774a02..9c742bb6 100644 --- a/java/src/main/java/com/google/appengine/tools/mapreduce/outputs/BigQueryGoogleCloudStorageStoreOutput.java +++ b/java/src/main/java/com/google/appengine/tools/mapreduce/outputs/BigQueryGoogleCloudStorageStoreOutput.java @@ -8,6 +8,7 @@ import com.google.appengine.tools.mapreduce.GoogleCloudStorageFileSet; import com.google.appengine.tools.mapreduce.Output; import com.google.appengine.tools.mapreduce.OutputWriter; +import com.google.appengine.tools.mapreduce.impl.BigQueryConstants; import java.io.IOException; import java.util.Collection; @@ -25,20 +26,21 @@ public final class BigQueryGoogleCloudStorageStoreOutput extends private final MarshallingOutput dataMarshallingOutput; private final BigQueryMarshaller bigQueryMarshaller; private final String bucketName; - private final String fileNamePattern; + private final String jobName; /** * @param bigQueryMarshaller use for generating the bigquery schema and marshal the data into * newline delimited json. + * @param jobName Used in naming GCS objects, see {@link BigQueryConstants#GCS_FILE_NAME_FORMAT}. */ public BigQueryGoogleCloudStorageStoreOutput(BigQueryMarshaller bigQueryMarshaller, - String bucketName, String fileNamePattern) { + String bucketName, String jobName) { this.bigQueryMarshaller = bigQueryMarshaller; this.bucketName = bucketName; - this.fileNamePattern = fileNamePattern; + this.jobName = jobName; SizeSegmentedGoogleCloudStorageFileOutput sizeSegmentedOutput = new SizeSegmentedGoogleCloudStorageFileOutput(this.bucketName, MAX_BIG_QUERY_GCS_FILE_SIZE, - String.format(GCS_FILE_NAME_FORMAT, this.fileNamePattern), MIME_TYPE); + String.format(GCS_FILE_NAME_FORMAT, this.jobName), MIME_TYPE); this.dataMarshallingOutput = new MarshallingOutput<>(sizeSegmentedOutput, bigQueryMarshaller); }