Skip to content

Commit

Permalink
Refactor CdfPluginPropertyLocator alignment and update build dependen…
Browse files Browse the repository at this point in the history
…cies.

-Fixed indentation alignment for partitionFrom, partitionTo, filter and Output Schema.
-Updated pom.xml for as it is.
  • Loading branch information
Praveena2607 committed Dec 16, 2024
1 parent 7e71bc2 commit 0870576
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 35 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
<google.cloud.storage.version>2.3.0</google.cloud.storage.version>
<google.cloud.datastore.version>1.105.1</google.cloud.datastore.version>
<google.protobuf.java.version>3.19.4</google.protobuf.java.version>
<google.tink.version>1.5.0</google.tink.version>
<google.tink.version>1.3.0</google.tink.version>
<guava.version>27.0.1-jre</guava.version>
<hadoop.version>3.3.6</hadoop.version>
<hbase-shaded-client.version>1.4.13</hbase-shaded-client.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public enum CdfPluginPropertyLocator {
FILTER("filter"),
OUTPUT_SCHEMA("Output Schema-macro-input");


public String pluginProperty;
CdfPluginPropertyLocator(String property) {
this.pluginProperty = property;
Expand All @@ -51,39 +50,39 @@ public enum CdfPluginPropertyLocator {
private static final Map<String, CdfPluginPropertyLocator> CDF_PLUGIN_PROPERTY_MAPPING;
static {
CDF_PLUGIN_PROPERTY_MAPPING = new ImmutableMap.Builder<String, CdfPluginPropertyLocator>()
.put("projectId", CdfPluginPropertyLocator.PROJECT_ID)
.put("datasetProjectId", CdfPluginPropertyLocator.DATASET_PROJECT_ID)
.put("dataset", CdfPluginPropertyLocator.DATASET)
.put("table", CdfPluginPropertyLocator.TABLE)
.put("format", CdfPluginPropertyLocator.FORMAT)
.put("path", CdfPluginPropertyLocator.PATH)
.put("sampleSize", CdfPluginPropertyLocator.SAMPLE_SIZE)
.put("delimiter", CdfPluginPropertyLocator.DELIMITER)
.put("skipHeader", CdfPluginPropertyLocator.SKIP_HEADER)
.put("pathSuffix", CdfPluginPropertyLocator.SUFFIX)
.put("encryptionKeyName", CdfPluginPropertyLocator.CMEK_KEY)
.put("serviceAccountType", CdfPluginPropertyLocator.SERVICE_ACCOUNT_TYPE)
.put("serviceAccountFilePath", CdfPluginPropertyLocator.SERVICE_ACCOUNT_PATH)
.put("serviceAccountJSON", CdfPluginPropertyLocator.SERVICE_ACCOUNT_JSON)
.put("truncateTable", CdfPluginPropertyLocator.TRUNCATE_TABLE)
.put("updateTableSchema", CdfPluginPropertyLocator.UPDATE_TABLE_SCHEMA)
.put("topic", CdfPluginPropertyLocator.PUBSUB_TOPIC)
.put("maximumBatchCount", CdfPluginPropertyLocator.PUBSUB_MAXIMUM_BATCH_COUNT)
.put("maximumBatchSize", CdfPluginPropertyLocator.PUBSUB_MAXIMUM_BATCH_SIZE)
.put("publishDelayThreshold", CdfPluginPropertyLocator.PUBSUB_PUBLISH_DELAY_THRESHOLD)
.put("retryTimeout", CdfPluginPropertyLocator.PUBSUB_RETRY_TIMEOUT)
.put("errorThreshold", CdfPluginPropertyLocator.PUBSUB_ERROR_THRESHOLD)
.put("outputSchema", CdfPluginPropertyLocator.OUTPUT_SCHEMA_MACRO_INPUT)
.put("objectsToDelete", CdfPluginPropertyLocator.GCS_DELETE_OBJECTS_TO_DELETE)
.put("objectsToCreate", CdfPluginPropertyLocator.GCS_CREATE_OBJECTS_TO_CREATE)
.put("createFailIfObjectExists", CdfPluginPropertyLocator.GCS_CREATE_FAIL_IF_OBJECT_EXISTS)
.put("gcsMoveSourcePath", CdfPluginPropertyLocator.GCS_MOVE_SOURCE_PATH)
.put("gcsMoveDestinationPath", CdfPluginPropertyLocator.GCS_MOVE_DESTINATION_PATH)
.put("partitionFrom", CdfPluginPropertyLocator.PARTITION_START_DATE)
.put("partitionTo", CdfPluginPropertyLocator.PARTITION_END_DATE)
.put("filter", CdfPluginPropertyLocator.FILTER)
.put("Output Schema-macro-input", CdfPluginPropertyLocator.OUTPUT_SCHEMA)
.build();
.put("projectId", CdfPluginPropertyLocator.PROJECT_ID)
.put("datasetProjectId", CdfPluginPropertyLocator.DATASET_PROJECT_ID)
.put("dataset", CdfPluginPropertyLocator.DATASET)
.put("table", CdfPluginPropertyLocator.TABLE)
.put("format", CdfPluginPropertyLocator.FORMAT)
.put("path", CdfPluginPropertyLocator.PATH)
.put("sampleSize", CdfPluginPropertyLocator.SAMPLE_SIZE)
.put("delimiter", CdfPluginPropertyLocator.DELIMITER)
.put("skipHeader", CdfPluginPropertyLocator.SKIP_HEADER)
.put("pathSuffix", CdfPluginPropertyLocator.SUFFIX)
.put("encryptionKeyName", CdfPluginPropertyLocator.CMEK_KEY)
.put("serviceAccountType", CdfPluginPropertyLocator.SERVICE_ACCOUNT_TYPE)
.put("serviceAccountFilePath", CdfPluginPropertyLocator.SERVICE_ACCOUNT_PATH)
.put("serviceAccountJSON", CdfPluginPropertyLocator.SERVICE_ACCOUNT_JSON)
.put("truncateTable", CdfPluginPropertyLocator.TRUNCATE_TABLE)
.put("updateTableSchema", CdfPluginPropertyLocator.UPDATE_TABLE_SCHEMA)
.put("topic", CdfPluginPropertyLocator.PUBSUB_TOPIC)
.put("maximumBatchCount", CdfPluginPropertyLocator.PUBSUB_MAXIMUM_BATCH_COUNT)
.put("maximumBatchSize", CdfPluginPropertyLocator.PUBSUB_MAXIMUM_BATCH_SIZE)
.put("publishDelayThreshold", CdfPluginPropertyLocator.PUBSUB_PUBLISH_DELAY_THRESHOLD)
.put("retryTimeout", CdfPluginPropertyLocator.PUBSUB_RETRY_TIMEOUT)
.put("errorThreshold", CdfPluginPropertyLocator.PUBSUB_ERROR_THRESHOLD)
.put("outputSchema", CdfPluginPropertyLocator.OUTPUT_SCHEMA_MACRO_INPUT)
.put("objectsToDelete", CdfPluginPropertyLocator.GCS_DELETE_OBJECTS_TO_DELETE)
.put("objectsToCreate", CdfPluginPropertyLocator.GCS_CREATE_OBJECTS_TO_CREATE)
.put("createFailIfObjectExists", CdfPluginPropertyLocator.GCS_CREATE_FAIL_IF_OBJECT_EXISTS)
.put("gcsMoveSourcePath", CdfPluginPropertyLocator.GCS_MOVE_SOURCE_PATH)
.put("gcsMoveDestinationPath", CdfPluginPropertyLocator.GCS_MOVE_DESTINATION_PATH)
.put("partitionFrom", CdfPluginPropertyLocator.PARTITION_START_DATE)
.put("partitionTo", CdfPluginPropertyLocator.PARTITION_END_DATE)
.put("filter", CdfPluginPropertyLocator.FILTER)
.put("Output Schema-macro-input", CdfPluginPropertyLocator.OUTPUT_SCHEMA)
.build();
}

@Nullable
Expand Down

0 comments on commit 0870576

Please sign in to comment.