Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Hai Yan <[email protected]>
  • Loading branch information
oeyh committed Nov 12, 2024
1 parent 1fef189 commit cf1a566
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@
package org.opensearch.dataprepper.plugins.source.rds.converter;

public class MetadataKeyAttributes {
public static final String PRIMARY_KEY_DOCUMENT_ID_METADATA_ATTRIBUTE = "primary_key";
static final String PRIMARY_KEY_DOCUMENT_ID_METADATA_ATTRIBUTE = "primary_key";

public static final String EVENT_VERSION_FROM_TIMESTAMP = "document_version";
static final String EVENT_VERSION_FROM_TIMESTAMP = "document_version";

public static final String EVENT_TIMESTAMP_METADATA_ATTRIBUTE = "event_timestamp";
static final String EVENT_TIMESTAMP_METADATA_ATTRIBUTE = "event_timestamp";

public static final String BULK_ACTION_METADATA_ATTRIBUTE = "opensearch_action";
static final String BULK_ACTION_METADATA_ATTRIBUTE = "opensearch_action";

public static final String CHANGE_EVENT_TYPE_METADATA_ATTRIBUTE = "change_event_type";
static final String CHANGE_EVENT_TYPE_METADATA_ATTRIBUTE = "change_event_type";

public static final String EVENT_DATABASE_NAME_METADATA_ATTRIBUTE = "database_name";
static final String EVENT_DATABASE_NAME_METADATA_ATTRIBUTE = "database_name";

public static final String EVENT_TABLE_NAME_METADATA_ATTRIBUTE = "table_name";
static final String EVENT_TABLE_NAME_METADATA_ATTRIBUTE = "table_name";

public static final String INGESTION_EVENT_TYPE_ATTRIBUTE = "ingestion_type";
static final String INGESTION_EVENT_TYPE_ATTRIBUTE = "ingestion_type";

public static final String EVENT_S3_PARTITION_KEY = "s3_partition_key";
static final String EVENT_S3_PARTITION_KEY = "s3_partition_key";
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ public abstract class RecordConverter {
private final String s3Prefix;
private final List<String> folderNames;

public static final String S3_BUFFER_PREFIX = "buffer";
public static final String S3_PATH_DELIMITER = "/";
static final String S3_BUFFER_PREFIX = "buffer";
static final String S3_PATH_DELIMITER = "/";
static final String EXPORT_INGESTION_TYPE = "EXPORT";
public static final String STREAM_INGESTION_TYPE = "STREAM";
static final String STREAM_INGESTION_TYPE = "STREAM";


public RecordConverter(final String s3Prefix, final int partitionCount) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ public List<Map<String, Object>> selectRows(String query) {
List<Map<String, Object>> result = new ArrayList<>();
try (final Connection connection = connectionManager.getConnection()) {
final Statement statement = connection.createStatement();
ResultSet resultSet = statement.executeQuery(query);
return convertResultSetToList(resultSet);
try (ResultSet resultSet = statement.executeQuery(query)) {
return convertResultSetToList(resultSet);
}
} catch (Exception e) {
LOG.error("Failed to execute query {}, retrying", query, e);
return result;
Expand Down
9 changes: 0 additions & 9 deletions shared-config/log4j2.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,3 @@ logger.plugins.level = info

logger.springframework.name = org.springframework
logger.springframework.level = info

logger.rds.name = org.opensearch.dataprepper.plugins.source.rds
logger.rds.level = debug

logger.s3source.name = org.opensearch.dataprepper.plugins.source.s3
logger.s3source.level = warn

logger.sourcecoord.name = org.opensearch.dataprepper.core.sourcecoordination.LeaseBasedSourceCoordinator
logger.sourcecoord.level = warn

0 comments on commit cf1a566

Please sign in to comment.