Skip to content

Fix errorprone warnings #2614

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 22 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* <p>This class holds the metadata for a column, including the namespace (schema), table name, and
* the column name within the table.
*/
@SuppressWarnings("SameNameButDifferent")
@Value
@Builder
public class ColumnInfo {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import lombok.Value;

/** * The scan range which is used in data export scan filtering */
@SuppressWarnings("SameNameButDifferent")
@Value
public class ScanRange {
/** The key for scan start filter */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@SuppressWarnings({"SameNameButDifferent", "FutureReturnValueIgnored"})
@RequiredArgsConstructor
public abstract class ExportManager {
private static final Logger logger = LoggerFactory.getLogger(ExportManager.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import lombok.Builder;
import lombok.Data;

/** Options for a ScalarDB export data operation */
@SuppressWarnings("SameNameButDifferent")
/** Options for a ScalarDB export data operation. */
@SuppressWarnings({"SameNameButDifferent", "MissingSummary"})
@Builder(builderMethodName = "hiddenBuilder")
@Data
public class ExportOptions {
Expand All @@ -31,6 +31,15 @@ public class ExportOptions {
@Builder.Default private List<String> projectionColumns = Collections.emptyList();
private List<Scan.Ordering> sortOrders;

/**
* Generates and returns an export options builder.
*
* @param namespace namespaces for export
* @param tableName tableName for export
* @param scanPartitionKey scan partition key for export
* @param outputFileFormat output file format for export
* @return a configured export options builder
*/
public static ExportOptionsBuilder builder(
String namespace, String tableName, Key scanPartitionKey, FileFormat outputFileFormat) {
return hiddenBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class JsonLineProducerTask extends ProducerTask {

private final DataLoaderObjectMapper objectMapper = new DataLoaderObjectMapper();
private static final Logger logger = LoggerFactory.getLogger(JsonLineProducerTask.class);

/**
* Class constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,11 @@
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class JsonProducerTask extends ProducerTask {

private final DataLoaderObjectMapper objectMapper = new DataLoaderObjectMapper();
private final boolean prettyPrintJson;
private static final Logger logger = LoggerFactory.getLogger(JsonProducerTask.class);

/**
* Class constructor
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.util.Map;
import lombok.RequiredArgsConstructor;

@SuppressWarnings("SameNameButDifferent")
@RequiredArgsConstructor
public class ProducerTaskFactory {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* A validator for ensuring that export options are consistent with the ScalarDB table metadata and
* follow the defined constraints.
*/
@SuppressWarnings("SameNameButDifferent")
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class ExportOptionsValidator {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
* <li>Notifying listeners of various import events
* </ul>
*/
@SuppressWarnings("SameNameButDifferent")
@AllArgsConstructor
public class ImportManager implements ImportEventListener {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
import lombok.Builder;
import lombok.Data;

/** Import options to import data into one or more ScalarDB tables */
/** Import options to import data into one or more ScalarDB tables. */
@SuppressWarnings({"SameNameButDifferent", "MissingSummary"})
@Builder
@Data
public class ImportOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* Represents a control file that holds control file tables which contains the column mappings that
* maps a source file column to the actual database table column.
*/
@SuppressWarnings("SameNameButDifferent")
@Getter
@Setter
public class ControlFile {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* table name, and field mappings. This class is used to define how data from a control file maps to
* a specific table in ScalarDB.
*/
@SuppressWarnings("SameNameButDifferent")
@Getter
@Setter
public class ControlFileTable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* This class defines how data from a specific field in the input source should be mapped to the
* corresponding column in the database.
*/
@SuppressWarnings("SameNameButDifferent")
@Getter
@Setter
public class ControlFileTableFieldMapping {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import lombok.Builder;
import lombok.Data;

/** * Import data chunk data */
/** * Import data chunk data. */
@SuppressWarnings({"SameNameButDifferent", "MissingSummary"})
@Data
@Builder
public class ImportDataChunk {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import lombok.Builder;
import lombok.Data;

/** * A DTO to store import data chunk details */
/** * A DTO to store import data chunk details. */
@SuppressWarnings({"SameNameButDifferent", "MissingSummary"})
@Data
@Builder
@JsonDeserialize(builder = ImportDataChunkStatus.ImportDataChunkStatusBuilder.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import com.fasterxml.jackson.databind.JsonNode;
import lombok.Value;

/** Stores data related to a single row on import file */
/** Stores data related to a single row on import file. */
@SuppressWarnings("SameNameButDifferent")
@Value
public class ImportRow {
int rowNumber;
Expand Down
Loading