Skip to content

Commit

Permalink
Make configuration and session property names consistent
Browse files Browse the repository at this point in the history
It makes it easier to reason about which session property maps to which configuration property.
  • Loading branch information
wendigo committed Jan 23, 2025
1 parent 6f64088 commit dce1c7e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import io.airlift.configuration.Config;
import io.airlift.configuration.ConfigDescription;
import io.airlift.configuration.ConfigSecuritySensitive;
import io.airlift.configuration.DefunctConfig;
import io.airlift.units.DataSize;
import io.airlift.units.MaxDataSize;
import io.airlift.units.MinDataSize;
Expand All @@ -33,6 +34,7 @@
import static io.airlift.units.DataSize.Unit.MEGABYTE;
import static java.util.Base64.getDecoder;

@DefunctConfig({"protocol.spooling.inlining.max-size", "protocol.spooling.inlining.max-rows"})
public class SpoolingConfig
{
private Optional<SecretKey> sharedSecretKey = Optional.empty();
Expand Down Expand Up @@ -122,7 +124,7 @@ public long getMaximumInlinedRows()
return maximumInlinedRows;
}

@Config("protocol.spooling.inlining.max-rows")
@Config("protocol.spooling.inlining.maximum-rows")
@ConfigDescription("Maximum number of rows that are allowed to be inlined per worker")
public SpoolingConfig setMaximumInlinedRows(long maximumInlinedRows)
{
Expand All @@ -137,7 +139,7 @@ public DataSize getMaximumInlinedSize()
return maximumInlinedSize;
}

@Config("protocol.spooling.inlining.max-size")
@Config("protocol.spooling.inlining.maximum-size")
@ConfigDescription("Maximum size of rows that are allowed to be inlined per worker")
public SpoolingConfig setMaximumInlinedSize(DataSize maximumInlinedSize)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ public class SpoolingSessionProperties
{
// Spooled segments
public static final String INITIAL_SEGMENT_SIZE = "spooling_initial_segment_size";
public static final String MAX_SEGMENT_SIZE = "spooling_max_segment_size";
public static final String MAX_SEGMENT_SIZE = "spooling_maximum_segment_size";

// Inlined segments
public static final String ALLOW_INLINING = "spooling_inlining_enabled";
public static final String MAX_INLINED_SIZE = "spooling_max_inlined_size";
public static final String MAX_INLINED_ROWS = "spooling_max_inlined_rows";
public static final String MAX_INLINED_SIZE = "spooling_inlining_maximum_size";
public static final String MAX_INLINED_ROWS = "spooling_inlining_maximum_rows";

private final List<PropertyMetadata<?>> sessionProperties;

Expand Down

0 comments on commit dce1c7e

Please sign in to comment.