Skip to content

Commit

Permalink
Remove unnecessary variable propagation
Browse files Browse the repository at this point in the history
  • Loading branch information
ssheikin authored and losipiuk committed Sep 17, 2020
1 parent f9ef95e commit 6149fa2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ public class HivePageSinkProvider
private final int maxOpenPartitions;
private final int maxOpenSortFiles;
private final DataSize writerSortBufferSize;
private final boolean immutablePartitions;
private final LocationService locationService;
private final ListeningExecutorService writeVerificationExecutor;
private final JsonCodec<PartitionUpdate> partitionUpdateCodec;
Expand Down Expand Up @@ -97,7 +96,6 @@ public HivePageSinkProvider(
this.maxOpenPartitions = config.getMaxPartitionsPerWriter();
this.maxOpenSortFiles = config.getMaxOpenSortFiles();
this.writerSortBufferSize = requireNonNull(config.getWriterSortBufferSize(), "writerSortBufferSize is null");
this.immutablePartitions = config.isImmutablePartitions();
this.locationService = requireNonNull(locationService, "locationService is null");
this.writeVerificationExecutor = listeningDecorator(newFixedThreadPool(config.getWriteValidationThreads(), daemonThreadsNamed("hive-write-validation-%s")));
this.partitionUpdateCodec = requireNonNull(partitionUpdateCodec, "partitionUpdateCodec is null");
Expand Down Expand Up @@ -157,7 +155,6 @@ private ConnectorPageSink createPageSink(HiveWritableTableHandle handle, boolean
pageSorter,
writerSortBufferSize,
maxOpenSortFiles,
immutablePartitions,
parquetTimeZone,
session,
nodeManager,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ public class HiveWriterFactory
private final int maxOpenSortFiles;
private final boolean sortedWritingTempStagingPathEnabled;
private final String sortedWritingTempStagingPath;
private final boolean immutablePartitions;
private final InsertExistingPartitionsBehavior insertExistingPartitionsBehavior;
private final DateTimeZone parquetTimeZone;

Expand Down Expand Up @@ -171,7 +170,6 @@ public HiveWriterFactory(
PageSorter pageSorter,
DataSize sortBufferSize,
int maxOpenSortFiles,
boolean immutablePartitions,
DateTimeZone parquetTimeZone,
ConnectorSession session,
NodeManager nodeManager,
Expand Down Expand Up @@ -200,7 +198,6 @@ public HiveWriterFactory(
this.maxOpenSortFiles = maxOpenSortFiles;
this.sortedWritingTempStagingPathEnabled = isTemporaryStagingDirectoryEnabled(session);
this.sortedWritingTempStagingPath = getTemporaryStagingDirectoryPath(session);
this.immutablePartitions = immutablePartitions;
this.insertExistingPartitionsBehavior = getInsertExistingPartitionsBehavior(session);
this.parquetTimeZone = requireNonNull(parquetTimeZone, "parquetTimeZone is null");

Expand Down Expand Up @@ -351,7 +348,6 @@ public HiveWriter createWriter(Page partitionColumns, int position, OptionalInt
else {
switch (insertExistingPartitionsBehavior) {
case APPEND:
checkState(!immutablePartitions);
updateMode = UpdateMode.APPEND;
writeInfo = locationService.getTableWriteInfo(locationHandle, false);
break;
Expand Down Expand Up @@ -382,7 +378,6 @@ public HiveWriter createWriter(Page partitionColumns, int position, OptionalInt
// Write to: an existing partition in an existing partitioned table
if (insertExistingPartitionsBehavior == InsertExistingPartitionsBehavior.APPEND) {
// Append to an existing partition
checkState(!immutablePartitions);
updateMode = UpdateMode.APPEND;
// Check the column types in partition schema match the column types in table schema
List<Column> tableColumns = table.getDataColumns();
Expand Down

0 comments on commit 6149fa2

Please sign in to comment.