[HUDI-751] Fix some coding issues reported by FindBugs (#1470)
This commit is contained in:
@@ -30,6 +30,7 @@ import java.io.Serializable;
|
||||
*/
|
||||
public class SerializableConfiguration implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private transient Configuration configuration;
|
||||
|
||||
public SerializableConfiguration(Configuration configuration) {
|
||||
|
||||
@@ -31,6 +31,7 @@ import java.util.Objects;
|
||||
*/
|
||||
public class HoodieBaseFile implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private transient FileStatus fileStatus;
|
||||
private final String fullPath;
|
||||
private long fileLen;
|
||||
|
||||
@@ -37,6 +37,7 @@ import java.util.Objects;
|
||||
*/
|
||||
public class HoodieLogFile implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
public static final String DELTA_EXTENSION = ".log";
|
||||
public static final Integer LOGFILE_BASE_VERSION = 1;
|
||||
|
||||
@@ -129,6 +130,7 @@ public class HoodieLogFile implements Serializable {
|
||||
*/
|
||||
public static class LogFileComparator implements Comparator<HoodieLogFile>, Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private transient Comparator<String> writeTokenComparator;
|
||||
|
||||
private Comparator<String> getWriteTokenComparator() {
|
||||
|
||||
@@ -30,11 +30,11 @@ import java.util.Objects;
|
||||
*/
|
||||
public class HoodieRecord<T extends HoodieRecordPayload> implements Serializable {
|
||||
|
||||
public static String COMMIT_TIME_METADATA_FIELD = "_hoodie_commit_time";
|
||||
public static String COMMIT_SEQNO_METADATA_FIELD = "_hoodie_commit_seqno";
|
||||
public static String RECORD_KEY_METADATA_FIELD = "_hoodie_record_key";
|
||||
public static String PARTITION_PATH_METADATA_FIELD = "_hoodie_partition_path";
|
||||
public static String FILENAME_METADATA_FIELD = "_hoodie_file_name";
|
||||
public static final String COMMIT_TIME_METADATA_FIELD = "_hoodie_commit_time";
|
||||
public static final String COMMIT_SEQNO_METADATA_FIELD = "_hoodie_commit_seqno";
|
||||
public static final String RECORD_KEY_METADATA_FIELD = "_hoodie_record_key";
|
||||
public static final String PARTITION_PATH_METADATA_FIELD = "_hoodie_partition_path";
|
||||
public static final String FILENAME_METADATA_FIELD = "_hoodie_file_name";
|
||||
|
||||
public static final List<String> HOODIE_META_COLUMNS =
|
||||
CollectionUtils.createImmutableList(COMMIT_TIME_METADATA_FIELD, COMMIT_SEQNO_METADATA_FIELD,
|
||||
|
||||
@@ -52,7 +52,7 @@ public class HoodieRollingStatMetadata implements Serializable {
|
||||
this.actionType = actionType;
|
||||
}
|
||||
|
||||
class RollingStatsHashMap<K, V> extends HashMap<K, V> {
|
||||
static class RollingStatsHashMap<K, V> extends HashMap<K, V> {
|
||||
|
||||
@Override
|
||||
public V put(K key, V value) {
|
||||
|
||||
@@ -68,10 +68,11 @@ import java.util.stream.Stream;
|
||||
*/
|
||||
public class HoodieTableMetaClient implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final Logger LOG = LogManager.getLogger(HoodieTableMetaClient.class);
|
||||
public static String METAFOLDER_NAME = ".hoodie";
|
||||
public static String TEMPFOLDER_NAME = METAFOLDER_NAME + File.separator + ".temp";
|
||||
public static String AUXILIARYFOLDER_NAME = METAFOLDER_NAME + File.separator + ".aux";
|
||||
public static final String METAFOLDER_NAME = ".hoodie";
|
||||
public static final String TEMPFOLDER_NAME = METAFOLDER_NAME + File.separator + ".temp";
|
||||
public static final String AUXILIARYFOLDER_NAME = METAFOLDER_NAME + File.separator + ".aux";
|
||||
public static final String MARKER_EXTN = ".marker";
|
||||
|
||||
private String basePath;
|
||||
|
||||
@@ -48,6 +48,7 @@ import static java.util.Collections.reverse;
|
||||
*/
|
||||
public class HoodieDefaultTimeline implements HoodieTimeline {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final Logger LOG = LogManager.getLogger(HoodieDefaultTimeline.class);
|
||||
|
||||
private static final String HASHING_ALGORITHM = "SHA-256";
|
||||
|
||||
@@ -32,7 +32,7 @@ public class HoodieTimer {
|
||||
// Ordered stack of TimeInfo's to make sure stopping the timer returns the correct elapsed time
|
||||
Deque<TimeInfo> timeInfoDeque = new ArrayDeque<>();
|
||||
|
||||
class TimeInfo {
|
||||
static class TimeInfo {
|
||||
|
||||
// captures the startTime of the code block
|
||||
long startTime;
|
||||
|
||||
@@ -55,7 +55,7 @@ import java.util.stream.Stream;
|
||||
*/
|
||||
public final class DiskBasedMap<T extends Serializable, R extends Serializable> implements Map<T, R>, Iterable<R> {
|
||||
|
||||
public static int BUFFER_SIZE = 128 * 1024; // 128 KB
|
||||
public static final int BUFFER_SIZE = 128 * 1024; // 128 KB
|
||||
private static final Logger LOG = LogManager.getLogger(DiskBasedMap.class);
|
||||
// Stores the key and corresponding value's latest metadata spilled to disk
|
||||
private final Map<T, ValueMetadata> valueMetadataMap;
|
||||
|
||||
Reference in New Issue
Block a user