Allow hive outstanding splits size limit larger than 2GB
The hive.max-outstanding-splits-size configuration passed into
HiveSplitSource was previously stored as an int, prohibiting values
>= 2GB to be used. Switching the representation to long removes the
unnecessary restriction.
@@ -67,7 +67,6 @@ import static com.google.common.util.concurrent.Futures.immediateFuture;
import static com.google.common.util.concurrent.MoreExecutors.directExecutor;
import static io.airlift.units.DataSize.succinctBytes;
import static java.lang.Math.min;
-import static java.lang.Math.toIntExact;
import static java.lang.String.format;
import static java.util.Objects.requireNonNull;
@@ -81,7 +80,7 @@ class HiveSplitSource
private final String tableName;
private final PerBucket queues;
private final AtomicInteger bufferedInternalSplitCount = new AtomicInteger();
- private final int maxOutstandingSplitsBytes;
+ private final long maxOutstandingSplitsBytes;
private final DataSize maxSplitSize;
private final DataSize maxInitialSplitSize;
@@ -112,7 +111,7 @@ class HiveSplitSource
this.databaseName = requireNonNull(databaseName, "databaseName is null");
this.tableName = requireNonNull(tableName, "tableName is null");
this.queues = requireNonNull(queues, "queues is null");
- this.maxOutstandingSplitsBytes = toIntExact(maxOutstandingSplitsSize.toBytes());
+ this.maxOutstandingSplitsBytes = requireNonNull(maxOutstandingSplitsSize, "maxOutstandingSplitsSize is null").toBytes();
this.splitLoader = requireNonNull(splitLoader, "splitLoader is null");
this.highMemorySplitSourceCounter = requireNonNull(highMemorySplitSourceCounter, "highMemorySplitSourceCounter is null");
