Skip to content

Commit

Permalink
Clean up access modifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
dain committed Mar 13, 2019
1 parent e224efd commit 4085228
Show file tree
Hide file tree
Showing 17 changed files with 28 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class DictionaryCompressionOptimizer
// direct mode, close the stripe early assuming it has hit the minimum row count.
static final DataSize DICTIONARY_MEMORY_MAX_RANGE = new DataSize(4, Unit.MEGABYTE);

static final DataSize DIRECT_COLUMN_SIZE_RANGE = new DataSize(4, Unit.MEGABYTE);
private static final DataSize DIRECT_COLUMN_SIZE_RANGE = new DataSize(4, Unit.MEGABYTE);

private final Set<DictionaryColumnManager> allWriters;
private final Set<DictionaryColumnManager> directConversionCandidates = new HashSet<>();
Expand Down
2 changes: 1 addition & 1 deletion presto-orc/src/main/java/io/prestosql/orc/OrcReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public OrcReader(OrcDataSource orcDataSource, DataSize maxMergeDistance, DataSiz
this(orcDataSource, maxMergeDistance, tinyStripeThreshold, maxBlockSize, Optional.empty());
}

OrcReader(
private OrcReader(
OrcDataSource orcDataSource,
DataSize maxMergeDistance,
DataSize tinyStripeThreshold,
Expand Down
4 changes: 2 additions & 2 deletions presto-orc/src/main/java/io/prestosql/orc/OrcWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ public final class OrcWriter
{
private static final int INSTANCE_SIZE = ClassLayout.parseClass(OrcWriter.class).instanceSize();

static final String PRESTO_ORC_WRITER_VERSION_METADATA_KEY = "presto.writer.version";
static final String PRESTO_ORC_WRITER_VERSION;
private static final String PRESTO_ORC_WRITER_VERSION_METADATA_KEY = "presto.writer.version";
private static final String PRESTO_ORC_WRITER_VERSION;
private final OrcWriterStats stats;

static {
Expand Down
8 changes: 4 additions & 4 deletions presto-orc/src/main/java/io/prestosql/orc/StripeReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public Stripe readStripe(StripeInformation stripe, AggregatedMemoryContext syste
return new Stripe(stripe.getNumberOfRows(), timeZone, columnEncodings, ImmutableList.of(rowGroup), dictionaryStreamSources);
}

public Map<StreamId, OrcInputStream> readDiskRanges(long stripeOffset, Map<StreamId, DiskRange> diskRanges, AggregatedMemoryContext systemMemoryUsage)
private Map<StreamId, OrcInputStream> readDiskRanges(long stripeOffset, Map<StreamId, DiskRange> diskRanges, AggregatedMemoryContext systemMemoryUsage)
throws IOException
{
//
Expand Down Expand Up @@ -280,7 +280,7 @@ private Map<StreamId, ValueInputStream<?>> createValueStreams(Map<StreamId, Stre
return valueStreams.build();
}

public InputStreamSources createDictionaryStreamSources(Map<StreamId, Stream> streams, Map<StreamId, ValueInputStream<?>> valueStreams, List<ColumnEncoding> columnEncodings)
private InputStreamSources createDictionaryStreamSources(Map<StreamId, Stream> streams, Map<StreamId, ValueInputStream<?>> valueStreams, List<ColumnEncoding> columnEncodings)
{
ImmutableMap.Builder<StreamId, InputStreamSource<?>> dictionaryStreamBuilder = ImmutableMap.builder();
for (Entry<StreamId, Stream> entry : streams.entrySet()) {
Expand Down Expand Up @@ -338,7 +338,7 @@ private List<RowGroup> createRowGroups(
return rowGroupBuilder.build();
}

public static RowGroup createRowGroup(int groupId, int rowOffset, int rowCount, long minAverageRowBytes, Map<StreamId, ValueInputStream<?>> valueStreams, Map<StreamId, StreamCheckpoint> checkpoints)
private static RowGroup createRowGroup(int groupId, int rowOffset, int rowCount, long minAverageRowBytes, Map<StreamId, ValueInputStream<?>> valueStreams, Map<StreamId, StreamCheckpoint> checkpoints)
{
ImmutableMap.Builder<StreamId, InputStreamSource<?>> builder = ImmutableMap.builder();
for (Entry<StreamId, StreamCheckpoint> entry : checkpoints.entrySet()) {
Expand All @@ -357,7 +357,7 @@ public static RowGroup createRowGroup(int groupId, int rowOffset, int rowCount,
return new RowGroup(groupId, rowOffset, rowCount, minAverageRowBytes, rowGroupStreams);
}

public StripeFooter readStripeFooter(StripeInformation stripe, AggregatedMemoryContext systemMemoryUsage)
private StripeFooter readStripeFooter(StripeInformation stripe, AggregatedMemoryContext systemMemoryUsage)
throws IOException
{
long offset = stripe.getOffset() + stripe.getIndexLength() + stripe.getDataLength();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ private static BinaryStatistics toBinaryStatistics(OrcProto.BinaryStatistics bin
return new BinaryStatistics(binaryStatistics.getSum());
}

static Slice byteStringToSlice(ByteString value)
private static Slice byteStringToSlice(ByteString value)
{
return Slices.wrappedBuffer(value.toByteArray());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public String toString()
}

// This comes from the Apache Hive ORC code
public static long decodeTimestamp(long seconds, long serializedNanos, long baseTimestampInSeconds)
private static long decodeTimestamp(long seconds, long serializedNanos, long baseTimestampInSeconds)
{
long millis = (seconds + baseTimestampInSeconds) * MILLIS_PER_SECOND;
long nanos = parseNanos(serializedNanos);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public int getUnsetBits(int batchSize, boolean[] vector)
* Sets the vector element to true for the batchSize number of elements starting at offset
* if the bit is not set.
*/
public int getUnsetBits(int batchSize, boolean[] vector, int offset)
private int getUnsetBits(int batchSize, boolean[] vector, int offset)
throws IOException
{
int count = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public BooleanOutputStream(OrcOutputBuffer buffer)
this(new ByteOutputStream(buffer));
}

public BooleanOutputStream(ByteOutputStream byteOutputStream)
private BooleanOutputStream(ByteOutputStream byteOutputStream)
{
this.byteOutputStream = byteOutputStream;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static <S extends ValueInputStream<C>, C extends StreamCheckpoint> Checkp
private final S stream;
private final C checkpoint;

public CheckpointInputStreamSource(S stream, C checkpoint)
private CheckpointInputStreamSource(S stream, C checkpoint)
{
this.stream = requireNonNull(stream, "stream is null");
this.checkpoint = requireNonNull(checkpoint, "checkpoint is null");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ private void clearEncoder()
isFixedDelta = true;
}

public void flush()
private void flush()
{
if (numLiterals == 0) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
@BenchmarkMode(Mode.AverageTime)
public class BenchmarkOrcDecimalReader
{
public static final DecimalType DECIMAL_TYPE = createDecimalType(30, 10);
private static final DecimalType DECIMAL_TYPE = createDecimalType(30, 10);

@Benchmark
public Object readDecimal(BenchmarkData data)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@
@BenchmarkMode(Mode.AverageTime)
public class BenchmarkStreamReaders
{
public static final DecimalType DECIMAL_TYPE = createDecimalType(10, 5);
public static final int ROWS = 10_000_000;
public static final Collection<?> NULL_VALUES = Collections.nCopies(ROWS, null);
private static final DecimalType DECIMAL_TYPE = createDecimalType(10, 5);
private static final int ROWS = 10_000_000;
private static final Collection<?> NULL_VALUES = Collections.nCopies(ROWS, null);

@Benchmark
public Object readBooleanNoNull(BooleanNoNullBenchmarkData data)
Expand Down
2 changes: 1 addition & 1 deletion presto-orc/src/test/java/io/prestosql/orc/OrcTester.java
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ private void testRoundTripType(Type type, List<?> readValues)
}
}

public void assertRoundTrip(Type type, List<?> readValues)
private void assertRoundTrip(Type type, List<?> readValues)
throws Exception
{
assertRoundTrip(type, type, readValues, readValues);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public void testIntegration()
assertEquals(orcDataSource.getReadCount(), 3); // footer, first few stripes, last few stripes
}

public void doIntegration(TestingOrcDataSource orcDataSource, DataSize maxMergeDistance, DataSize tinyStripeThreshold)
private void doIntegration(TestingOrcDataSource orcDataSource, DataSize maxMergeDistance, DataSize tinyStripeThreshold)
throws IOException
{
OrcReader orcReader = new OrcReader(orcDataSource, maxMergeDistance, tinyStripeThreshold, new DataSize(1, Unit.MEGABYTE));
Expand Down Expand Up @@ -220,7 +220,7 @@ public void doIntegration(TestingOrcDataSource orcDataSource, DataSize maxMergeD
assertEquals(positionCount, POSITION_COUNT);
}

public static <T, U extends T> void assertNotInstanceOf(T actual, Class<U> expectedType)
private static <T, U extends T> void assertNotInstanceOf(T actual, Class<U> expectedType)
{
assertNotNull(actual, "actual is null");
assertNotNull(expectedType, "expectedType is null");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public class TestStructStreamReader

private static final String STRUCT_COL_NAME = "struct_col";

public static final ConnectorSession SESSION = new TestingConnectorSession(ImmutableList.of());
private static final ConnectorSession SESSION = new TestingConnectorSession(ImmutableList.of());

private TempFile tempFile;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,13 @@ public void testGetMaxSlice()
.add(EM_SPACE_SURROUNDED_BY_CONTINUATION_BYTE)
.build();

static final List<Slice> ALL_UTF8_SEQUENCES = ImmutableList.<Slice>builder()
private static final List<Slice> ALL_UTF8_SEQUENCES = ImmutableList.<Slice>builder()
.addAll(VALID_UTF8_SEQUENCES)
.addAll(INVALID_UTF8_SEQUENCES)
.build();

private static final int REPLACEMENT_CHARACTER_CODE_POINT = 0xFFFD;
static final List<Integer> TEST_CODE_POINTS = ImmutableList.<Integer>builder()
private static final List<Integer> TEST_CODE_POINTS = ImmutableList.<Integer>builder()
.add(0)
.add((int) 'a')
.add(0xC0)
Expand Down Expand Up @@ -352,7 +352,7 @@ private static void testMaxStringTruncateAtFirstReplacementCharacter(Slice prefi
}
}

static Slice concatSlice(Slice... slices)
private static Slice concatSlice(Slice... slices)
{
int totalLength = Arrays.stream(slices)
.mapToInt(Slice::length)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

public class TestLongBitPacker
{
public static final int LENGTHS = 128;
public static final int OFFSETS = 4;
public static final int WIDTHS = 64;
private static final int LENGTHS = 128;
private static final int OFFSETS = 4;
private static final int WIDTHS = 64;

@Test
public void testBasic()
Expand Down

0 comments on commit 4085228

Please sign in to comment.