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 numberDiff line numberDiff line change
Expand Up@@ -65,7 +65,7 @@ public class TenantCacheImpl implements TenantCache {

private final long EVICTION_MARGIN_BYTES = 10000000;

private class CacheEntry implements Comparable<CacheEntry>, Closeable {
private static class CacheEntry implements Comparable<CacheEntry>, Closeable {
private ImmutableBytesPtr cacheId;
private ImmutableBytesWritable cachePtr;
private int hits;
Expand DownExpand Up@@ -247,9 +247,9 @@ public Closeable addServerCache(ImmutableBytesPtr cacheId, ImmutableBytesWritabl
entry = getIfPresent(cacheId);
if (entry == null) {
entry = new CacheEntry(
cacheId, cachePtr, cacheFactory, txState, chunk,
usePersistentCache, useProtoForIndexMaintainer,
clientVersion);
cacheId, cachePtr, cacheFactory, txState, chunk,
usePersistentCache, useProtoForIndexMaintainer,
clientVersion);
getServerCaches().put(cacheId, entry);
if (usePersistentCache) {
getPersistentServerCaches().put(cacheId, entry);
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -1240,7 +1240,7 @@ private PDatum getPDatumByExpression(Expression expression, PDataType pDataTypeI
return new PDatumImpl(expression, pDataTypeInput);
}

private class PDatumImpl implements PDatum {
private static class PDatumImpl implements PDatum {

private final boolean isNullable;
private final PDataType dataType;
Expand DownExpand Up@@ -1283,7 +1283,7 @@ public SortOrder getSortOrder() {

}

private class ExpressionDeterminism {
private static class ExpressionDeterminism {
private ArithmeticParseNode node;
private List<Expression> children;
private PDataType theType;
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -2428,8 +2428,8 @@ public void dropTable(RpcController controller, DropTableRequest request,
ServerUtil.releaseRowLocks(locks);
if (dropTableStats) {
Thread statsDeleteHandler = new Thread(new StatsDeleteHandler(env,
loadedTable, tableNamesToDelete, sharedTablesToDelete),
"thread-statsdeletehandler");
loadedTable, tableNamesToDelete, sharedTablesToDelete),
"thread-statsdeletehandler");
statsDeleteHandler.setDaemon(true);
statsDeleteHandler.start();
}
Expand All@@ -2441,7 +2441,7 @@ public void dropTable(RpcController controller, DropTableRequest request,
}
}

class StatsDeleteHandler implements Runnable {
private static class StatsDeleteHandler implements Runnable {
PTable deletedTable;
List<byte[]> physicalTableNames;
List<MetaDataProtocol.SharedTableState> sharedTableStates;
Expand DownExpand Up@@ -2485,6 +2485,7 @@ public Object run() throws Exception {
}
}
}

private RowLock acquireLock(Region region, byte[] lockKey, List<RowLock> locks) throws IOException {
RowLock rowLock = region.getRowLock(lockKey, false);
if (rowLock == null) {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -43,7 +43,7 @@ public class RowKeyComparisonFilter extends BooleanExpressionFilter {

private boolean evaluate = true;
private boolean keepRow = false;
private RowKeyTuple inputTuple = new RowKeyTuple();
private final RowKeyTuple inputTuple = new RowKeyTuple();
private byte[] essentialCF;

public RowKeyComparisonFilter() {
Expand DownExpand Up@@ -79,7 +79,7 @@ public ReturnCode filterKeyValue(Cell v) {
return keepRow ? ReturnCode.INCLUDE_AND_NEXT_COL : ReturnCode.NEXT_ROW;
}

private final class RowKeyTuple extends BaseTuple {
private static final class RowKeyTuple extends BaseTuple {
private byte[] buf;
private int offset;
private int length;
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -199,7 +199,7 @@ public Cell getHint(Cell peeked) {
* Hint the next column-qualifier after the given keyvalue. We can't be smart like in the
* ScanQueryMatcher since we don't know the columns ahead of time.
*/
class DeleteColumnHinter implements Hinter {
private static class DeleteColumnHinter implements Hinter {

@Override
public Cell getHint(Cell kv) {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,6 +17,7 @@
*/
package org.apache.phoenix.hbase.index.covered.update;

import java.io.Serializable;
import java.util.Collection;
import java.util.Comparator;
import java.util.HashMap;
Expand All@@ -43,7 +44,9 @@
public class IndexUpdateManager {

public Comparator<Mutation> COMPARATOR = new MutationComparator();
class MutationComparator implements Comparator<Mutation> {

private static class MutationComparator implements Comparator<Mutation>,
Serializable {

@Override
public int compare(Mutation o1, Mutation o2) {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -118,7 +118,7 @@ public int getValue() {
* An instance of this class is created for each scanner on an index
* and used to verify individual rows and rebuild them if they are not valid
*/
private class GlobalIndexScanner implements RegionScanner {
private static class GlobalIndexScanner implements RegionScanner {
private RegionScanner scanner;
private RegionScanner deleteRowScanner;
private long ageThreshold;
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -1281,7 +1281,7 @@ public List<PeekingResultIterator> getIterators() throws SQLException {
.getInt(QueryConstants.HASH_JOIN_CACHE_RETRIES, QueryConstants.DEFAULT_HASH_JOIN_CACHE_RETRIES));
}

class ScanWrapper {
private static class ScanWrapper {
Scan scan;

public Scan getScan() {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -291,7 +291,7 @@ public Tuple call() throws Exception {
* keeps track of the tuple the {@link PeekingResultIterator} read in the previous next() call before it ran out of
* underlying scanner cache.
*/
private class RoundRobinIterator implements PeekingResultIterator {
private static class RoundRobinIterator implements PeekingResultIterator {

private PeekingResultIterator delegate;
private Tuple tuple;
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -82,7 +82,7 @@ public Closeable newCache(ImmutableBytesWritable cachePtr, byte[] txState, Memor
}

@Immutable
private class HashCacheImpl implements HashCache {
private static class HashCacheImpl implements HashCache {
private final Map<ImmutableBytesPtr,List<Tuple>> hashCache;
private final MemoryChunk memoryChunk;
private final boolean singleValueOnly;
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -205,7 +205,7 @@ private void printHelpAndExit(Options options, int exitCode) {
System.exit(exitCode);
}

class JobFactory {
private static class JobFactory {
Connection connection;
Configuration configuration;
private final boolean useSnapshot;
Expand DownExpand Up@@ -456,8 +456,8 @@ public int run(String[] args) throws Exception {
schemaName, dataTable, indexTable, useSnapshot, ts, batchSize, basePath,
outputFormat, outputMaxRows));
JobFactory jobFactory =
new JobFactory(connection, configuration, batchSize, useSnapshot, ts,
outputInvalidRows, outputFormat, basePath, outputMaxRows, tenantId, mapperClass);
new JobFactory(connection, configuration, batchSize, useSnapshot, ts,
outputInvalidRows, outputFormat, basePath, outputMaxRows, tenantId, mapperClass);
// If we are running the scrutiny with both tables as the source, run two separate jobs,
// one for each direction
if (SourceTable.BOTH.equals(sourceTable)) {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -843,7 +843,7 @@ private HashMap<String, IndexInfo> prepareToRebuildIndexes(Connection conn,
tenantId);
for (String viewIndex : viewIndexes) {
IndexInfo indexInfo = new IndexInfo(schemaName, viewName,
tenantId == null ? GLOBAL_INDEX_ID : tenantId, viewIndex);
tenantId == null ? GLOBAL_INDEX_ID : tenantId, viewIndex);
indexInfos.put(viewIndex, indexInfo);
}
}
Expand DownExpand Up@@ -891,7 +891,7 @@ public static String getViewIndexesSql(String viewName, String schemaName, Strin
" AND TENANT_ID = \'" + tenantId + "\'" : " AND TENANT_ID IS NULL");
}

private class IndexInfo {
private static class IndexInfo {
final private String schemaName;
final private String baseTable;
final private String tenantId;
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -5173,7 +5173,7 @@ else if (metaProperties.getImmutableStorageSchemeProp() != table.getImmutableSto
return changingPhoenixTableProperty;
}

class MetaProperties{
private static class MetaProperties{
private Boolean isImmutableRowsProp = null;
private Boolean multiTenantProp = null;
private Boolean disableWALProp = null;
Expand DownExpand Up@@ -5299,7 +5299,7 @@ public void setChangeDetectionEnabled(Boolean isChangeDetectionEnabled) {
}
}

class MetaPropertiesEvaluated{
private static class MetaPropertiesEvaluated{
private Boolean isImmutableRows;
private Boolean multiTenant = null;
private Boolean disableWAL = null;
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -106,15 +106,15 @@ public boolean areStatsBeingCollectedOnCompaction(RegionInfo regionInfo) {
* @return true if UPDATE STATISTICS wasn't already running on the region, false otherwise.
*/
public boolean addUpdateStatsCommandRegion(RegionInfo regionInfo, Set<byte[]> familySet) {
return updateStatsRegions.add(new ColumnFamilyRegionInfo(regionInfo,familySet));
return updateStatsRegions.add(new ColumnFamilyRegionInfo(regionInfo,familySet));
}

/**
* @param regionInfo for the region to mark as not running UPDATE STATISTICS command on.
* @return true if UPDATE STATISTICS was running on the region, false otherwise.
*/
public boolean removeUpdateStatsCommandRegion(RegionInfo regionInfo, Set<byte[]> familySet) {
return updateStatsRegions.remove(new ColumnFamilyRegionInfo(regionInfo,familySet));
return updateStatsRegions.remove(new ColumnFamilyRegionInfo(regionInfo,familySet));
}

/**
Expand All@@ -126,9 +126,9 @@ public <T> Future<T> runTask(Callable<T> c) {
return executor.submit(c);
}

class ColumnFamilyRegionInfo {
private RegionInfo regionInfo;
private Set<byte[]> familySet;
private static class ColumnFamilyRegionInfo {
private final RegionInfo regionInfo;
private final Set<byte[]> familySet;

public ColumnFamilyRegionInfo(RegionInfo regionInfo, Set<byte[]> familySet) {
this.regionInfo = regionInfo;
Expand Down