Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -18,12 +18,14 @@

package org.apache.hudi.common.util;

import java.io.Serializable;

/**
* Default implementation of size-estimator that uses Twitter's ObjectSizeCalculator.
*
* @param <T>
*/
public class DefaultSizeEstimator<T> implements SizeEstimator<T> {
public class DefaultSizeEstimator<T> implements SizeEstimator<T>, Serializable {

@Override
public long sizeEstimate(T t) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;

import java.io.Serializable;

/**
* Size Estimator for Hoodie record payload.
*
* @param <T>
*/
public class HoodieRecordSizeEstimator<T extends HoodieRecordPayload> implements SizeEstimator<HoodieRecord<T>> {
public class HoodieRecordSizeEstimator<T extends HoodieRecordPayload> implements SizeEstimator<HoodieRecord<T>>, Serializable {

private static final Logger LOG = LogManager.getLogger(HoodieRecordSizeEstimator.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
* map may occupy more memory than is available, resulting in OOM. However, if the spill threshold is too low, we spill
* frequently and incur unnecessary disk writes.
*/
public class ExternalSpillableMap<T extends Serializable, R extends Serializable> implements Map<T, R> {
public class ExternalSpillableMap<T extends Serializable, R extends Serializable> implements Map<T, R>, Serializable {

// Find the actual estimated payload size after inserting N records
private static final int NUMBER_OF_RECORDS_TO_ESTIMATE_PAYLOAD_SIZE = 100;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
/**
* A map's implementation based on RocksDB.
*/
public final class RocksDBBasedMap<K extends Serializable, R extends Serializable> implements Map<K, R> {
public final class RocksDBBasedMap<K extends Serializable, R extends Serializable> implements Map<K, R>, Serializable {

private static final String COL_FAMILY_NAME = "map_handle";

private final String rocksDbStoragePath;
private RocksDBDAO rocksDBDAO;
private transient RocksDBDAO rocksDBDAO;
private final String columnFamilyName;

public RocksDBBasedMap(String rocksDbStoragePath) {
Expand Down