diff --git a/hetu-transport/src/main/java/io/hetu/core/transport/execution/buffer/PagesSerde.java b/hetu-transport/src/main/java/io/hetu/core/transport/execution/buffer/PagesSerde.java index 49a380d15..5738c5b8d 100644 --- a/hetu-transport/src/main/java/io/hetu/core/transport/execution/buffer/PagesSerde.java +++ b/hetu-transport/src/main/java/io/hetu/core/transport/execution/buffer/PagesSerde.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.hetu.core.transport.execution.buffer; import io.airlift.compress.Compressor; diff --git a/hetu-transport/src/main/java/io/hetu/core/transport/execution/buffer/SerializedPage.java b/hetu-transport/src/main/java/io/hetu/core/transport/execution/buffer/SerializedPage.java index b1b3385cb..daf73e3bb 100644 --- a/hetu-transport/src/main/java/io/hetu/core/transport/execution/buffer/SerializedPage.java +++ b/hetu-transport/src/main/java/io/hetu/core/transport/execution/buffer/SerializedPage.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.hetu.core.transport.execution.buffer; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/presto-cli/src/main/java/io/prestosql/cli/Query.java b/presto-cli/src/main/java/io/prestosql/cli/Query.java index 0e7135f35..e972ed09f 100644 --- a/presto-cli/src/main/java/io/prestosql/cli/Query.java +++ b/presto-cli/src/main/java/io/prestosql/cli/Query.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.cli; import com.google.common.base.Splitter; @@ -58,7 +59,7 @@ public class Query { private static final Signal SIGINT = new Signal("INT"); - private static final Logger log = Logger.get(Query.class); + private static final Logger LOG = Logger.get(Query.class); private final AtomicBoolean ignoreUserInterrupt = new AtomicBoolean(); private final StatementClient client; @@ -201,7 +202,7 @@ private void processInitialStatusUpdates(WarningsPrinter warningsPrinter) client.advance(); } catch (RuntimeException e) { - log.debug(e, "error printing status"); + LOG.debug(e, "error printing status"); } } List warnings; diff --git a/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveConnector.java b/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveConnector.java index cdf53ea0b..7202bec59 100644 --- a/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveConnector.java +++ b/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveConnector.java @@ -44,7 +44,7 @@ public class HiveConnector implements Connector { - private static final Logger log = Logger.get(HiveConnector.class); + private static final Logger LOG = Logger.get(HiveConnector.class); private final LifeCycleManager lifeCycleManager; private final Supplier metadataFactory; @@ -216,7 +216,7 @@ public final void shutdown() lifeCycleManager.stop(); } catch (Exception e) { - log.error(e, "Error shutting down connector"); + LOG.error(e, "Error shutting down connector"); } } diff --git a/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveMetadata.java b/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveMetadata.java index 85c2595e7..fcf6a1f54 100755 --- a/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveMetadata.java +++ b/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveMetadata.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.plugin.hive; import com.google.common.annotations.VisibleForTesting; @@ -198,7 +199,7 @@ public class HiveMetadata implements TransactionalMetadata { - private static final Logger log = Logger.get(HiveMetadata.class); + private static final Logger LOG = Logger.get(HiveMetadata.class); public static final String PRESTO_VERSION_NAME = "presto_version"; public static final String PRESTO_QUERY_ID_NAME = "presto_query_id"; @@ -491,7 +492,7 @@ protected ConnectorTableMetadata doGetTableMetadata(ConnectorSession session, Sc properties.put(HiveTableProperties.STORAGE_FORMAT_PROPERTY, format); } catch (PrestoException ignored) { - log.debug("Format is not known error"); + LOG.debug("Format is not known error"); } // Partitioning property @@ -668,7 +669,7 @@ public long getTableModificationTime(ConnectorSession session, ConnectorTableHan } // We want to make sure the query doesn't fail because of star-tree not being able to get last modified time catch (Exception e) { - log.error("Exception thrown while trying to get modified time", e); + LOG.error("Exception thrown while trying to get modified time", e); return -1L; } } @@ -684,10 +685,10 @@ public Map> listTableColumns(ConnectorSess columns.put(tableName, getTableMetadata(session, tableName).getColumns()); } catch (HiveViewNotSupportedException e) { - log.debug("View is not supported error"); + LOG.debug("View is not supported error"); } catch (TableNotFoundException e) { - log.debug("Table disappeared during listing operation error"); + LOG.debug("Table disappeared during listing operation error"); } } return columns.build(); @@ -1445,7 +1446,7 @@ public Optional finishCreateTable( future.get(); } catch (InterruptedException | ExecutionException ignore) { - log.debug("Get future error"); + LOG.debug("Get future error"); } }); } @@ -3022,13 +3023,13 @@ else if (isSnapshotFile(status.getPath().getName(), queryId)) { long subFileIndex = getSnapshotSubFileIndex(fileName, queryId); // Remove any merged files and subfiles that are after the snapshot being resumed to if (subFileIndex < 0 || subFileIndex >= snapshotIndex) { - log.debug("Deleting file resume=true: %s", fileName); + LOG.debug("Deleting file resume=true: %s", fileName); fileSystem.delete(status.getPath()); } } else { if (isSnapshotSubFile(fileName, queryId)) { - log.debug("Deleting sub file resume=false: %s", fileName); + LOG.debug("Deleting sub file resume=false: %s", fileName); fileSystem.delete(status.getPath()); } else { @@ -3037,12 +3038,12 @@ else if (isSnapshotFile(status.getPath().getName(), queryId)) { // For transaqctional tables, the file's parent folder is part of the output file list if (mergedFileNames.contains(fileName) || mergedFileNames.contains(status.getPath().getParent().getName())) { String newName = removeSnapshotFileName(fileName, queryId); - log.debug("Renaming merged file resume=false: %s to %s", fileName, newName); + LOG.debug("Renaming merged file resume=false: %s to %s", fileName, newName); fileSystem.rename(status.getPath(), new Path(folder, newName)); } else { // Remove files that are not part of the final output files. (e.g. those produced by abandoned tasks.) - log.debug("Deleting old merged file resume=false: %s", fileName); + LOG.debug("Deleting old merged file resume=false: %s", fileName); fileSystem.delete(status.getPath()); } } @@ -3178,7 +3179,7 @@ else if (isSortingColumnsNotPresent) { if ((partitionedBy.size() + sortedColumnNames.size() < groupKeyNames.size()) || (partitionedBy.size() > groupKeyNames.size())) { //sorted columns are less than join criteria columns - log.debug("number of sorted columns " + sortedColumnNames.size() + "are less join column size " + groupKeyNames.size()); + LOG.debug("number of sorted columns " + sortedColumnNames.size() + "are less join column size " + groupKeyNames.size()); return partialAndFinalAggregationType; } @@ -3217,7 +3218,7 @@ else if (isSortingColumnsNotPresent) { boolean bucketedColumnsResult = !singleOrZeroBucketedColumn && (!groupKeyNames.get(numOfComparedKeys).equals(bucketedColumns.get(numOfComparedKeys))); if ((!groupKeyNames.get(numOfCmpKeysAfterPartitionedBy).equals(sortedColumnNames.get(numOfComparedKeys))) || (!singleOrZeroBucketedColumn && bucketedColumnsResult)) { - if (log.isDebugEnabled()) { + if (LOG.isDebugEnabled()) { final String[] dbgGroupKeyNames = {new String("")}; groupKeyNames.stream().forEach(k -> dbgGroupKeyNames[0] = dbgGroupKeyNames[0].concat(k + " , ")); final String[] dbgSortedColumnNames = {new String("")}; @@ -3225,9 +3226,9 @@ else if (isSortingColumnsNotPresent) { if ((null != bucketedColumns) && (bucketedColumns.size() > 0)) { final String[] dbgbucketedColumns = {new String("")}; bucketedColumns.stream().forEach(k -> dbgbucketedColumns[0] = dbgbucketedColumns[0].concat(k + " , ")); - log.debug("Not matching sortedColumnNames: " + dbgSortedColumnNames + " group columns name: " + dbgGroupKeyNames + " bucketedColumns :" + dbgbucketedColumns); + LOG.debug("Not matching sortedColumnNames: " + dbgSortedColumnNames + " group columns name: " + dbgGroupKeyNames + " bucketedColumns :" + dbgbucketedColumns); } - log.debug("Not matching sortedColumnNames: " + dbgSortedColumnNames + " group columns name: " + dbgGroupKeyNames); + LOG.debug("Not matching sortedColumnNames: " + dbgSortedColumnNames + " group columns name: " + dbgGroupKeyNames); } return partialAndFinalAggregationType; } diff --git a/presto-hive/src/main/java/io/prestosql/plugin/hive/HivePageSink.java b/presto-hive/src/main/java/io/prestosql/plugin/hive/HivePageSink.java index ad83a14c5..3f8a764e8 100644 --- a/presto-hive/src/main/java/io/prestosql/plugin/hive/HivePageSink.java +++ b/presto-hive/src/main/java/io/prestosql/plugin/hive/HivePageSink.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.plugin.hive; import com.google.common.collect.ImmutableList; @@ -92,7 +93,7 @@ public class HivePageSink implements ConnectorPageSink { - private static final Logger log = Logger.get(HivePageSink.class); + private static final Logger LOG = Logger.get(HivePageSink.class); private static final int MAX_PAGE_POSITIONS = 4096; @@ -344,7 +345,7 @@ private ListenableFuture> mergeFiles() return doFinish(); } catch (IOException e) { - log.debug("exception '%s' while merging subfile", e); + LOG.debug("exception '%s' while merging subfile", e); throw new RuntimeException(e); } } @@ -375,7 +376,7 @@ private void doAbort(boolean isCancel) writer.rollback(isCancel); } catch (Exception e) { - log.warn("exception '%s' while rollback on %s", e, writer); + LOG.warn("exception '%s' while rollback on %s", e, writer); rollbackException = Optional.of(e); } } diff --git a/presto-hive/src/main/java/io/prestosql/plugin/hive/HivePageSource.java b/presto-hive/src/main/java/io/prestosql/plugin/hive/HivePageSource.java index 7253b1a18..2bad55eff 100644 --- a/presto-hive/src/main/java/io/prestosql/plugin/hive/HivePageSource.java +++ b/presto-hive/src/main/java/io/prestosql/plugin/hive/HivePageSource.java @@ -67,7 +67,7 @@ public class HivePageSource implements ConnectorPageSource { - private static final Logger log = Logger.get(HivePageSource.class); + private static final Logger LOG = Logger.get(HivePageSource.class); private final List columnMappings; private final Optional bucketAdapter; @@ -76,7 +76,6 @@ public class HivePageSource private final TypeManager typeManager; private final List>> coercers; private final int rowFilteringThreshold; - protected boolean eligibleForRowFiltering; private final ConnectorPageSource delegate; diff --git a/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveSplitManager.java b/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveSplitManager.java index 47fe70ac9..90968e906 100644 --- a/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveSplitManager.java +++ b/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveSplitManager.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.plugin.hive; import com.google.common.collect.AbstractIterator; diff --git a/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveSplitSource.java b/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveSplitSource.java index 52d8a8f74..be3f9c8d9 100644 --- a/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveSplitSource.java +++ b/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveSplitSource.java @@ -81,7 +81,7 @@ class HiveSplitSource implements ConnectorSplitSource { - private static final Logger log = Logger.get(HiveSplitSource.class); + private static final Logger LOG = Logger.get(HiveSplitSource.class); private final String queryId; private final String databaseName; @@ -329,7 +329,7 @@ ListenableFuture addToQueue(InternalHiveSplit split) // If it's hit, it means individual splits are huge. if (loggedHighMemoryWarning.compareAndSet(false, true)) { highMemorySplitSourceCounter.update(1); - log.warn("Split buffering for %s.%s in query %s exceeded memory limit (%s). %s splits are buffered.", + LOG.warn("Split buffering for %s.%s in query %s exceeded memory limit (%s). %s splits are buffered.", databaseName, tableName, queryId, succinctBytes(maxOutstandingSplitsBytes), getBufferedInternalSplitCount()); } throw new PrestoException(HiveErrorCode.HIVE_EXCEEDED_SPLIT_BUFFERING_LIMIT, format( @@ -521,7 +521,7 @@ private boolean matchesUserDefinedCachedPredicates(List partit } } catch (Exception ex) { - log.warn(ex, "Unable to match partition keys %s with cached predicates. Ignoring this partition key. Error = %s", partitionKeys, ex.getMessage()); + LOG.warn(ex, "Unable to match partition keys %s with cached predicates. Ignoring this partition key. Error = %s", partitionKeys, ex.getMessage()); } return false; } @@ -728,7 +728,7 @@ Number of files should not cross MinValue(max-splits-to-group, Total number of f numberOfSplitsGrouped += 1; if ((maxSplitBytes < totalSize) || (avgSplitsPerNode < numberOfSplitsGrouped) || (maxSmallSplitsCanBeGrouped < numberOfSplitsGrouped)) { connectorSplitList.add(HiveSplitWrapper.wrap(groupedHiveSplit, bucketNumberPresent ? OptionalInt.of(bucketNumber) : OptionalInt.empty())); - log.debug("info table %s, groupedHiveSplit size %d, maxSplitBytes %d, totalSize %d, avgSplitsPerNode %d, numberOfSplitsGrouped %d, maxSmallSplitsCanBeGrouped %d, numberOfSplitsGrouped %d ", + LOG.debug("info table %s, groupedHiveSplit size %d, maxSplitBytes %d, totalSize %d, avgSplitsPerNode %d, numberOfSplitsGrouped %d, maxSmallSplitsCanBeGrouped %d, numberOfSplitsGrouped %d ", groupedHiveSplit.get(0).getTable(), groupedHiveSplit.size(), maxSplitBytes, totalSize, avgSplitsPerNode, numberOfSplitsGrouped, maxSmallSplitsCanBeGrouped, numberOfSplitsGrouped); totalSize = 0; numberOfSplitsGrouped = 0; @@ -747,7 +747,7 @@ Number of files should not cross MinValue(max-splits-to-group, Total number of f numberOfSplitsGrouped += 1; if ((maxSplitBytes < totalSize) || (avgSplitsPerNode < numberOfSplitsGrouped) || (maxSmallSplitsCanBeGrouped < numberOfSplitsGrouped)) { connectorSplitList.add(HiveSplitWrapper.wrap(groupedHiveSplit, bucketNumberPresent ? OptionalInt.of(bucketNumber) : OptionalInt.empty())); - log.debug("info table %s, groupedHiveSplit size %d, maxSplitBytes %d, totalSize %d, avgSplitsPerNode %d, numberOfSplitsGrouped %d, maxSmallSplitsCanBeGrouped %d, numberOfSplitsGrouped %d ", + LOG.debug("info table %s, groupedHiveSplit size %d, maxSplitBytes %d, totalSize %d, avgSplitsPerNode %d, numberOfSplitsGrouped %d, maxSmallSplitsCanBeGrouped %d, numberOfSplitsGrouped %d ", groupedHiveSplit.get(0).getTable(), groupedHiveSplit.size(), maxSplitBytes, totalSize, avgSplitsPerNode, numberOfSplitsGrouped, maxSmallSplitsCanBeGrouped, numberOfSplitsGrouped); totalSize = 0; numberOfSplitsGrouped = 0; @@ -764,7 +764,7 @@ Number of files should not cross MinValue(max-splits-to-group, Total number of f } } List resultConnectorSplits = connectorSplitList.build(); - log.debug("info resultBuilder size %d", resultConnectorSplits.size()); + LOG.debug("info resultBuilder size %d", resultConnectorSplits.size()); return resultConnectorSplits; } @@ -797,7 +797,7 @@ private boolean getSmallerSplits(List hiveSplitWrappers, Multi return false; } - log.info("info total Split %d, numSmallSplits %d ", hiveSplitWrappers.size(), numSmallSplits); + LOG.info("info total Split %d, numSmallSplits %d ", hiveSplitWrappers.size(), numSmallSplits); return true; } diff --git a/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveUtil.java b/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveUtil.java index 56639acbc..7b55a05ae 100644 --- a/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveUtil.java +++ b/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveUtil.java @@ -167,7 +167,7 @@ public final class HiveUtil { - public static final Logger log = Logger.get(HiveUtil.class); + public static final Logger LOG = Logger.get(HiveUtil.class); public static final String PRESTO_VIEW_FLAG = "presto_view"; @@ -398,7 +398,7 @@ public static boolean isSplittable(InputFormat inputFormat, FileSystem fil break; } catch (NoSuchMethodException ignored) { - log.warn("GetDeclaredMethod error(FileSystem = %s, path = %s)", FileSystem.class.getName(), Path.class.getName()); + LOG.warn("GetDeclaredMethod error(FileSystem = %s, path = %s)", FileSystem.class.getName(), Path.class.getName()); } } @@ -1136,7 +1136,7 @@ public static boolean isPartitionFiltered(List partitionKeys, } } catch (PrestoException | ClassCastException e) { - log.error("cannot cast class" + e.getMessage()); + LOG.error("cannot cast class" + e.getMessage()); return false; } //return if this dynamic filter is not filtering diff --git a/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveWriterFactory.java b/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveWriterFactory.java index b10690e23..0dfb3d46e 100755 --- a/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveWriterFactory.java +++ b/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveWriterFactory.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.plugin.hive; import com.google.common.base.Strings; @@ -108,7 +109,7 @@ public class HiveWriterFactory { - private static Logger log = Logger.get(HiveWriterFactory.class); + private static final Logger LOG = Logger.get(HiveWriterFactory.class); private static final int MAX_BUCKET_COUNT = 100_000; private static final int BUCKET_NUMBER_PADDING = Integer.toString(MAX_BUCKET_COUNT - 1).length(); @@ -985,15 +986,15 @@ public void mergeSubFiles(List writers) private void logContainingFolderInfo(FileSystem fileSystem, Path path, String message, Object... params) { try { - if (log.isDebugEnabled()) { - log.debug(message, params); + if (LOG.isDebugEnabled()) { + LOG.debug(message, params); Arrays.stream(fileSystem.listStatus(path.getParent())).forEach(file -> { - log.debug("%d\t%s", file.getLen(), file.getPath()); + LOG.debug("%d\t%s", file.getLen(), file.getPath()); }); } } catch (IOException e) { - log.debug(e, "Failed to list folder content for %s: %s", path, e.getMessage()); + LOG.debug(e, "Failed to list folder content for %s: %s", path, e.getMessage()); } } diff --git a/presto-hive/src/main/java/io/prestosql/plugin/hive/OrcFileWriter.java b/presto-hive/src/main/java/io/prestosql/plugin/hive/OrcFileWriter.java index 1a4d3fdf2..c56fa53d3 100644 --- a/presto-hive/src/main/java/io/prestosql/plugin/hive/OrcFileWriter.java +++ b/presto-hive/src/main/java/io/prestosql/plugin/hive/OrcFileWriter.java @@ -64,7 +64,7 @@ public class OrcFileWriter implements HiveFileWriter { - private static final Logger log = Logger.get(OrcFileWriter.class); + private static final Logger LOG = Logger.get(OrcFileWriter.class); private static final int INSTANCE_SIZE = ClassLayout.parseClass(OrcFileWriter.class).instanceSize(); private static final ThreadMXBean THREAD_MX_BEAN = ManagementFactory.getThreadMXBean(); @@ -402,7 +402,7 @@ public void commit() rollbackAction.call(); } catch (Exception ignored) { - log.warn("RollbackAction error after roc commit error"); + LOG.warn("RollbackAction error after roc commit error"); } throw new PrestoException(HIVE_WRITER_CLOSE_ERROR, "Error committing write to Hive", e); } diff --git a/presto-hive/src/main/java/io/prestosql/plugin/hive/S3SelectRecordCursorProvider.java b/presto-hive/src/main/java/io/prestosql/plugin/hive/S3SelectRecordCursorProvider.java index ce55a2f65..518c1589b 100644 --- a/presto-hive/src/main/java/io/prestosql/plugin/hive/S3SelectRecordCursorProvider.java +++ b/presto-hive/src/main/java/io/prestosql/plugin/hive/S3SelectRecordCursorProvider.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.plugin.hive; import com.google.common.collect.ImmutableSet; diff --git a/presto-hive/src/main/java/io/prestosql/plugin/hive/SnapshotTempFileWriter.java b/presto-hive/src/main/java/io/prestosql/plugin/hive/SnapshotTempFileWriter.java index a0b6ed03f..8f2eb1d0b 100644 --- a/presto-hive/src/main/java/io/prestosql/plugin/hive/SnapshotTempFileWriter.java +++ b/presto-hive/src/main/java/io/prestosql/plugin/hive/SnapshotTempFileWriter.java @@ -32,7 +32,7 @@ public class SnapshotTempFileWriter implements HiveFileWriter { - private static final Logger log = Logger.get(SnapshotTempFileWriter.class); + private static final Logger LOG = Logger.get(SnapshotTempFileWriter.class); private static final int INSTANCE_SIZE = ClassLayout.parseClass(SnapshotTempFileWriter.class).instanceSize(); private final TempFileWriter writer; @@ -83,7 +83,7 @@ public void rollback() catch (Exception e) { // DO NOT delete the file. A newly schedule task may be recreating this file. // Don't need to throw the exception either. This is part of the cancel-to-resume task. - log.debug(e, "Error rolling back write to Hive"); + LOG.debug(e, "Error rolling back write to Hive"); } } diff --git a/presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/SemiTransactionalHiveMetastore.java b/presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/SemiTransactionalHiveMetastore.java index f2ed5e5f5..ff0a4e8f9 100644 --- a/presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/SemiTransactionalHiveMetastore.java +++ b/presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/SemiTransactionalHiveMetastore.java @@ -125,7 +125,7 @@ public class SemiTransactionalHiveMetastore { - private static final Logger log = Logger.get(SemiTransactionalHiveMetastore.class); + private static final Logger LOG = Logger.get(SemiTransactionalHiveMetastore.class); private final HiveMetastore delegate; private final HiveMetastoreClosure closure; @@ -1119,7 +1119,7 @@ public void beginQuery(ConnectorSession session) .map(Duration::toMillis) .orElseGet(this::getServerExpectedHeartbeatIntervalMillis); long transactionId = delegate.openTransaction(identity); - log.debug("Using hive transaction %s for query %s", transactionId, queryId); + LOG.debug("Using hive transaction %s for query %s", transactionId, queryId); ScheduledFuture heartbeatTask = heartbeatExecutor.scheduleAtFixedRate( () -> delegate.sendTransactionHeartbeat(identity, transactionId), @@ -1648,7 +1648,7 @@ private PartitionStatistics getExistingPartitionStatistics(HiveIdentity identity } catch (PrestoException e) { if (e.getErrorCode().equals(HiveErrorCode.HIVE_CORRUPTED_COLUMN_STATISTICS.toErrorCode())) { - log.warn( + LOG.warn( e, "Corrupted statistics found when altering partition. Table: %s.%s. Partition: %s", partition.getDatabaseName(), @@ -1778,7 +1778,7 @@ private void waitForAsyncRenamesSuppressThrowables() } catch (Throwable t) { // ignore - log.debug("Get future(%s) error", future.toString()); + LOG.debug("Get future(%s) error", future.toString()); } } } @@ -2116,7 +2116,7 @@ private void logCleanupFailure(String format, Object... args) if (throwOnCleanupFailure) { throw new RuntimeException(format(format, args)); } - log.warn(format, args); + LOG.warn(format, args); } private void logCleanupFailure(Throwable t, String format, Object... args) @@ -2124,7 +2124,7 @@ private void logCleanupFailure(Throwable t, String format, Object... args) if (throwOnCleanupFailure) { throw new RuntimeException(format(format, args), t); } - log.warn(t, format, args); + LOG.warn(t, format, args); } private static void asyncRename( @@ -2242,11 +2242,11 @@ private static boolean deleteIfExists(FileSystem fileSystem, Path path, boolean } catch (FileNotFoundException ignored) { // path was already removed or never existed - log.debug("path may be removed or never existed", ignored); + LOG.debug("path may be removed or never existed", ignored); return true; } catch (IOException ignored) { - log.error("Hdfs RPC Call Error", ignored); + LOG.error("Hdfs RPC Call Error", ignored); } return false; } @@ -2310,7 +2310,7 @@ private static boolean deleteRecursivelyIfExists(HdfsEnvironment.HdfsContext con fileSystem = hdfsEnvironment.getFileSystem(context, path); } catch (IOException ignored) { - log.error("Hdfs RPC Call Error", ignored); + LOG.error("Hdfs RPC Call Error", ignored); return false; } @@ -2451,7 +2451,7 @@ private static RecursiveDeleteResult moveToTrash(HdfsEnvironment hdfsEnvironment } } catch (IOException ioe) { - log.error("Hdfs RPC Call Error", ioe); + LOG.error("Hdfs RPC Call Error", ioe); return new RecursiveDeleteResult(false, ImmutableList.of(directory.toString() + "/**")); } @@ -2521,7 +2521,7 @@ private static boolean moveFileToTrash(FileSystem fileSystem, Path path, HdfsEnv } } catch (IOException ignored) { - log.warn(format("move file %s to trash failed and force to delete it.", path.toString()), ignored); + LOG.warn(format("move file %s to trash failed and force to delete it.", path.toString()), ignored); } return deleteIfExists(fileSystem, path, false); @@ -3036,7 +3036,7 @@ public void run(HiveMetastore metastore) // Deleting the table when aborting commit has the risk of deleting table not added in this transaction. // Not deleting the table may leave garbage behind. The former is much more dangerous than the latter. // Therefore, the table is not considered added. - log.debug("Create table error(dataBaseName=%s tableName=%s)", newTable.getDatabaseName(), newTable.getTableName()); + LOG.debug("Create table error(dataBaseName=%s tableName=%s)", newTable.getDatabaseName(), newTable.getTableName()); } if (!done) { @@ -3333,7 +3333,7 @@ public List> rollback() catch (PartitionNotFoundException e) { // Maybe some one deleted the partition we added. // Anyways, we are good because the partition is not there anymore. - log.debug("Drop partition error(schemaName=%s tableName=%s), may be partition is not there anymore", + LOG.debug("Drop partition error(schemaName=%s tableName=%s), may be partition is not there anymore", schemaName, tableName); } catch (Throwable t) { diff --git a/presto-main/src/main/java/io/prestosql/execution/QueryInfo.java b/presto-main/src/main/java/io/prestosql/execution/QueryInfo.java index b7c0d08f3..283498555 100644 --- a/presto-main/src/main/java/io/prestosql/execution/QueryInfo.java +++ b/presto-main/src/main/java/io/prestosql/execution/QueryInfo.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.execution; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/presto-main/src/main/java/io/prestosql/execution/QueryStateMachine.java b/presto-main/src/main/java/io/prestosql/execution/QueryStateMachine.java index c196a238c..3448d5f16 100644 --- a/presto-main/src/main/java/io/prestosql/execution/QueryStateMachine.java +++ b/presto-main/src/main/java/io/prestosql/execution/QueryStateMachine.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.execution; import com.google.common.annotations.VisibleForTesting; diff --git a/presto-main/src/main/java/io/prestosql/execution/SqlQueryExecution.java b/presto-main/src/main/java/io/prestosql/execution/SqlQueryExecution.java index 3a2134535..6676c8a4c 100644 --- a/presto-main/src/main/java/io/prestosql/execution/SqlQueryExecution.java +++ b/presto-main/src/main/java/io/prestosql/execution/SqlQueryExecution.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.execution; import com.google.common.cache.Cache; @@ -136,7 +137,7 @@ public class SqlQueryExecution implements QueryExecution { - private static final Logger log = Logger.get(SqlQueryExecution.class); + private static final Logger LOG = Logger.get(SqlQueryExecution.class); private static final OutputBufferId OUTPUT_BUFFER_ID = new OutputBufferId(0); @@ -435,7 +436,7 @@ private void handleCrossRegionDynamicFilter(PlanRoot plan) } String queryId = getSession().getQueryId().getId(); - log.debug("queryId=%s begin to find columnToColumnMapping.", queryId); + LOG.debug("queryId=%s begin to find columnToColumnMapping.", queryId); PlanNode outputNode = plan.getRoot().getFragment().getRoot(); Map> columnToSymbolMapping = new HashMap<>(); @@ -467,7 +468,7 @@ private void handleCrossRegionDynamicFilter(PlanRoot plan) // save mapping into stateStore StateMap mappingStateMap = (StateMap) stateStore.getOrCreateStateCollection(CROSS_REGION_DYNAMIC_FILTERS, StateCollection.Type.MAP); mappingStateMap.put(queryId + QUERY_COLUMN_NAME_TO_SYMBOL_MAPPING, columnToSymbolMapping); - log.debug("queryId=%s, add columnToSymbolMapping into hazelcast success.", queryId + QUERY_COLUMN_NAME_TO_SYMBOL_MAPPING); + LOG.debug("queryId=%s, add columnToSymbolMapping into hazelcast success.", queryId + QUERY_COLUMN_NAME_TO_SYMBOL_MAPPING); } @Override @@ -489,7 +490,7 @@ public void start() } catch (Throwable e) { // ignore any exception - log.warn("something unexpected happened.. cause: %s", e.getMessage()); + LOG.warn("something unexpected happened.. cause: %s", e.getMessage()); } // plan distribution of query @@ -509,7 +510,7 @@ public void start() catch (Throwable e) { fail(e); throwIfInstanceOf(e, Error.class); - log.warn(e, "Encountered error while rescheduling query"); + LOG.warn(e, "Encountered error while rescheduling query"); } } }); @@ -523,7 +524,7 @@ public void start() catch (Throwable e) { fail(e); throwIfInstanceOf(e, Error.class); - log.warn(e, "Encountered error while scheduling query"); + LOG.warn(e, "Encountered error while scheduling query"); } } } @@ -540,7 +541,7 @@ private void resumeQuery(PlanRoot plan) throw new RuntimeException(e); } - log.debug("Rescheduling query %s from a resumable task failure.", getQueryId()); + LOG.debug("Rescheduling query %s from a resumable task failure.", getQueryId()); PartitioningHandle partitioningHandle = plan.getRoot().getFragment().getPartitioningScheme().getPartitioning().getHandle(); OutputBuffers rootOutputBuffers = createInitialEmptyOutputBuffers(partitioningHandle) .withBuffer(OUTPUT_BUFFER_ID, BROADCAST_PARTITION_ID) @@ -563,7 +564,7 @@ private void resumeQuery(PlanRoot plan) } } queryScheduler.set(scheduler); - log.debug("Restarting query %s from a resumable task failure.", getQueryId()); + LOG.debug("Restarting query %s from a resumable task failure.", getQueryId()); scheduler.start(); stateMachine.transitionToStarting(); } @@ -894,7 +895,7 @@ private static void closeSplitSources(StageExecutionPlan plan) source.close(); } catch (Throwable t) { - log.warn(t, "Error closing split source"); + LOG.warn(t, "Error closing split source"); } } diff --git a/presto-main/src/main/java/io/prestosql/execution/SqlQueryManager.java b/presto-main/src/main/java/io/prestosql/execution/SqlQueryManager.java index 31720e35d..47934bff6 100644 --- a/presto-main/src/main/java/io/prestosql/execution/SqlQueryManager.java +++ b/presto-main/src/main/java/io/prestosql/execution/SqlQueryManager.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.execution; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/presto-main/src/main/java/io/prestosql/execution/SqlStageExecution.java b/presto-main/src/main/java/io/prestosql/execution/SqlStageExecution.java index 15dd1ad5d..1537035e7 100644 --- a/presto-main/src/main/java/io/prestosql/execution/SqlStageExecution.java +++ b/presto-main/src/main/java/io/prestosql/execution/SqlStageExecution.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.execution; import com.google.common.collect.HashMultimap; @@ -88,7 +89,7 @@ @ThreadSafe public final class SqlStageExecution { - private static final Logger log = Logger.get(SqlStageExecution.class); + private static final Logger LOG = Logger.get(SqlStageExecution.class); private final StageStateMachine stateMachine; private final RemoteTaskFactory remoteTaskFactory; @@ -334,7 +335,7 @@ public synchronized void cancelToResume() public void OnSnapshotXCompleted(boolean capture, long snapshotId) { - log.debug("OnSnapshotXCompleted() is called!, capture: %b, snapshotId: %d", capture, snapshotId); + LOG.debug("OnSnapshotXCompleted() is called!, capture: %b, snapshotId: %d", capture, snapshotId); if (!capture) { restoreInProgress = false; captureSnapshotId = 0; @@ -604,7 +605,7 @@ private synchronized void updateTaskStatus(TaskStatus taskStatus) TaskState taskState = taskStatus.getState(); if (taskState == TaskState.RESUMABLE_FAILURE) { - log.debug("Task %s on node %s failed but is resumable. Triggering rescheduling.", taskStatus.getTaskId(), taskStatus.getNodeId()); + LOG.debug("Task %s on node %s failed but is resumable. Triggering rescheduling.", taskStatus.getTaskId(), taskStatus.getNodeId()); stateMachine.transitionToResumableFailure(); return; } @@ -624,14 +625,14 @@ private synchronized void updateTaskStatus(TaskStatus taskStatus) index += HttpPageBufferClient.PAGE_TRANSPORT_ERROR_PREFIX.length() + 1; // point to numeric response code; skip over space int responseCode = Integer.parseInt(message.substring(index, message.indexOf('!', index))); if (responseCode >= 500 || responseCode == HttpStatus.OK.code()) { - log.debug(failure, "Task %s on node %s failed but is resumable. Triggering rescheduling.", taskStatus.getTaskId(), taskStatus.getNodeId()); + LOG.debug(failure, "Task %s on node %s failed but is resumable. Triggering rescheduling.", taskStatus.getTaskId(), taskStatus.getNodeId()); stateMachine.transitionToResumableFailure(); return; } } else if (message.contains(SimpleHttpResponseHandler.EXPECT_200_SAW_5XX)) { // SimpleHttpResponseHandler can also produce errors that are resumable - log.debug(failure, "Task %s on node %s failed but is resumable. Triggering rescheduling.", taskStatus.getTaskId(), taskStatus.getNodeId()); + LOG.debug(failure, "Task %s on node %s failed but is resumable. Triggering rescheduling.", taskStatus.getTaskId(), taskStatus.getNodeId()); stateMachine.transitionToResumableFailure(); return; } @@ -640,7 +641,7 @@ else if (message.contains(SimpleHttpResponseHandler.EXPECT_200_SAW_5XX)) { } else if (taskState == TaskState.ABORTED) { if (isSnapshotEnabled) { - log.debug("Task %s on node %s was aborted prematually. Triggering rescheduling.", taskStatus.getTaskId(), taskStatus.getNodeId()); + LOG.debug("Task %s on node %s was aborted prematually. Triggering rescheduling.", taskStatus.getTaskId(), taskStatus.getNodeId()); stateMachine.transitionToResumableFailure(); return; } diff --git a/presto-main/src/main/java/io/prestosql/execution/SqlTask.java b/presto-main/src/main/java/io/prestosql/execution/SqlTask.java index 7e9b15dfc..6a8c7f934 100644 --- a/presto-main/src/main/java/io/prestosql/execution/SqlTask.java +++ b/presto-main/src/main/java/io/prestosql/execution/SqlTask.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.execution; import com.google.common.base.Function; @@ -76,7 +77,7 @@ public class SqlTask { - private static final Logger log = Logger.get(SqlTask.class); + private static final Logger LOG = Logger.get(SqlTask.class); private final TaskId taskId; private final String taskInstanceId; @@ -148,7 +149,7 @@ private SqlTask( () -> queryContext.getTaskContext(taskInstanceId).localSystemMemoryContext()); taskStateMachine = new TaskStateMachine(taskId, taskNotificationExecutor); - log.debug("Created new SqlTask object for task %s, with instanceId %s", taskId, taskInstanceId); + LOG.debug("Created new SqlTask object for task %s, with instanceId %s", taskId, taskInstanceId); } // this is a separate method to ensure that the `this` reference is not leaked during construction @@ -197,7 +198,7 @@ public void stateChanged(TaskState newState) onDone.apply(SqlTask.this); } catch (Exception e) { - log.warn(e, "Error running task cleanup callback %s", SqlTask.this.taskId); + LOG.warn(e, "Error running task cleanup callback %s", SqlTask.this.taskId); } } }); @@ -464,7 +465,7 @@ public TaskInfo abortTaskResults(OutputBufferId bufferId) { requireNonNull(bufferId, "bufferId is null"); - log.debug("Aborting task %s output %s", taskId, bufferId); + LOG.debug("Aborting task %s output %s", taskId, bufferId); outputBuffer.abort(bufferId); return getTaskInfo(); diff --git a/presto-main/src/main/java/io/prestosql/execution/SqlTaskExecution.java b/presto-main/src/main/java/io/prestosql/execution/SqlTaskExecution.java index 877abf8e0..1554c0f62 100644 --- a/presto-main/src/main/java/io/prestosql/execution/SqlTaskExecution.java +++ b/presto-main/src/main/java/io/prestosql/execution/SqlTaskExecution.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.execution; import com.google.common.collect.AbstractIterator; @@ -122,7 +123,7 @@ public class SqlTaskExecution // * a driver could belong to pipeline 1 and driver life cycle 42. // * another driver could belong to pipeline 3 and task-wide driver life cycle. - private static final Logger log = Logger.get(SqlTaskExecution.class); + private static final Logger LOG = Logger.get(SqlTaskExecution.class); private final TaskId taskId; private final TaskStateMachine taskStateMachine; private final TaskContext taskContext; diff --git a/presto-main/src/main/java/io/prestosql/execution/SqlTaskManager.java b/presto-main/src/main/java/io/prestosql/execution/SqlTaskManager.java index 7dac2ce45..5b6dfdd55 100644 --- a/presto-main/src/main/java/io/prestosql/execution/SqlTaskManager.java +++ b/presto-main/src/main/java/io/prestosql/execution/SqlTaskManager.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.execution; import com.google.common.annotations.VisibleForTesting; @@ -90,7 +91,7 @@ public class SqlTaskManager implements TaskManager, Closeable { - private static final Logger log = Logger.get(SqlTaskManager.class); + private static final Logger LOG = Logger.get(SqlTaskManager.class); private final ExecutorService taskNotificationExecutor; private final ThreadPoolExecutorMBean taskNotificationExecutorMBean; @@ -295,13 +296,13 @@ public void start() removeOldTasks(); } catch (Throwable e) { - log.warn(e, "Error removing old tasks"); + LOG.warn(e, "Error removing old tasks"); } try { failAbandonedTasks(); } catch (Throwable e) { - log.warn(e, "Error canceling abandoned tasks"); + LOG.warn(e, "Error canceling abandoned tasks"); } }, 200, 200, TimeUnit.MILLISECONDS); @@ -310,7 +311,7 @@ public void start() updateStats(); } catch (Throwable e) { - log.warn(e, "Error updating stats"); + LOG.warn(e, "Error updating stats"); } }, 0, 1, TimeUnit.SECONDS); } @@ -510,7 +511,7 @@ public TaskInfo cancelTask(TaskId taskId, TaskState targetState, String expected TaskState oldState = sqlTask.getTaskStatus().getState(); TaskInfo result = sqlTask.cancel(targetState); - log.debug("Cancelling task %s (instanceId %s). Old state: %s; new state: %s", taskId, expectedTaskInstanceId, oldState, targetState); + LOG.debug("Cancelling task %s (instanceId %s). Old state: %s; new state: %s", taskId, expectedTaskInstanceId, oldState, targetState); if (targetState == TaskState.CANCELED_TO_RESUME) { cleanupTaskToResume(taskId, sqlTask.getTaskInstanceId()); } @@ -550,7 +551,7 @@ public void removeOldTasks() } } catch (RuntimeException e) { - log.warn(e, "Error while inspecting age of complete task with instanceId %s and taskId %s", instanceId, task.getTaskId()); + LOG.warn(e, "Error while inspecting age of complete task with instanceId %s and taskId %s", instanceId, task.getTaskId()); } } } @@ -568,7 +569,7 @@ public void failAbandonedTasks() } DateTime lastHeartbeat = taskInfo.getLastHeartbeat(); if (lastHeartbeat != null && lastHeartbeat.isBefore(oldestAllowedHeartbeat)) { - log.info("Failing abandoned task %s (instanceId %s)", taskStatus.getTaskId(), sqlTask.getTaskInstanceId()); + LOG.info("Failing abandoned task %s (instanceId %s)", taskStatus.getTaskId(), sqlTask.getTaskInstanceId()); if (sqlTask.isSnapshotEnabled()) { // When a task is abandoned, to be safe, we cancel it and allow recovery. sqlTask.cancel(TaskState.CANCELED_TO_RESUME); @@ -579,7 +580,7 @@ public void failAbandonedTasks() } } catch (RuntimeException e) { - log.warn(e, "Error while inspecting age of task with instanceId %s and taskId %s", sqlTask.getTaskInstanceId(), sqlTask.getTaskId()); + LOG.warn(e, "Error while inspecting age of task with instanceId %s and taskId %s", sqlTask.getTaskInstanceId(), sqlTask.getTaskId()); } } } diff --git a/presto-main/src/main/java/io/prestosql/execution/StageStateMachine.java b/presto-main/src/main/java/io/prestosql/execution/StageStateMachine.java index 934df881c..a18e38793 100644 --- a/presto-main/src/main/java/io/prestosql/execution/StageStateMachine.java +++ b/presto-main/src/main/java/io/prestosql/execution/StageStateMachine.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.execution; import com.google.common.collect.ImmutableList; @@ -78,7 +79,7 @@ @ThreadSafe public class StageStateMachine { - private static final Logger log = Logger.get(StageStateMachine.class); + private static final Logger LOG = Logger.get(StageStateMachine.class); private final StageId stageId; private final URI location; @@ -119,7 +120,7 @@ public StageStateMachine( this.scheduledStats = requireNonNull(schedulerStats, "schedulerStats is null"); stageState = new StateMachine<>("stage " + stageId, executor, PLANNED, TERMINAL_STAGE_STATES); - stageState.addStateChangeListener(state -> log.debug("Stage %s is %s", stageId, state)); + stageState.addStateChangeListener(state -> LOG.debug("Stage %s is %s", stageId, state)); finalStageInfo = new StateMachine<>("final stage " + stageId, executor, Optional.empty()); @@ -228,23 +229,23 @@ public boolean transitionToFailed(Throwable throwable) failureCause.compareAndSet(null, Failures.toFailure(throwable)); boolean failed = stageState.setIf(FAILED, currentState -> !currentState.isDone()); if (failed) { - log.error(throwable, "Stage %s failed", stageId); + LOG.error(throwable, "Stage %s failed", stageId); } else { - log.debug(throwable, "Failure after stage %s finished", stageId); + LOG.debug(throwable, "Failure after stage %s finished", stageId); } return failed; } public boolean transitionToResumableFailure() { - log.debug("Moving stage %s to Resumable Failure state", stageId); + LOG.debug("Moving stage %s to Resumable Failure state", stageId); return stageState.setIf(RESUMABLE_FAILURE, currentState -> !currentState.isDone()); } public boolean transitionToRescheduling() { - log.debug("Moving stage %s to Rescheduling state", stageId); + LOG.debug("Moving stage %s to Rescheduling state", stageId); // Force it, even when the stage is in FINISHED state, which was before the resume occurred return stageState.forceSet(RESCHEDULING) == RESCHEDULING; } diff --git a/presto-main/src/main/java/io/prestosql/execution/StateMachine.java b/presto-main/src/main/java/io/prestosql/execution/StateMachine.java index 24801797c..4b74e4150 100644 --- a/presto-main/src/main/java/io/prestosql/execution/StateMachine.java +++ b/presto-main/src/main/java/io/prestosql/execution/StateMachine.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.execution; import com.google.common.annotations.VisibleForTesting; @@ -43,7 +44,7 @@ @ThreadSafe public class StateMachine { - private static final Logger log = Logger.get(StateMachine.class); + private static final Logger LOG = Logger.get(StateMachine.class); private final String name; private final Executor executor; @@ -226,7 +227,7 @@ private void fireStateChanged(T newState, FutureStateChange futureStateChange futureStateChange.complete(newState); } catch (Throwable e) { - log.error(e, "Error setting future state for %s", name); + LOG.error(e, "Error setting future state for %s", name); } for (StateChangeListener stateChangeListener : stateChangeListeners) { fireStateChangedListener(newState, stateChangeListener); @@ -240,7 +241,7 @@ private void fireStateChangedListener(T newState, StateChangeListener stateCh stateChangeListener.stateChanged(newState); } catch (Throwable e) { - log.error(e, "Error notifying state change listener for %s", name); + LOG.error(e, "Error notifying state change listener for %s", name); } } diff --git a/presto-main/src/main/java/io/prestosql/execution/buffer/ArbitraryOutputBuffer.java b/presto-main/src/main/java/io/prestosql/execution/buffer/ArbitraryOutputBuffer.java index 38f446e61..93a0c0039 100644 --- a/presto-main/src/main/java/io/prestosql/execution/buffer/ArbitraryOutputBuffer.java +++ b/presto-main/src/main/java/io/prestosql/execution/buffer/ArbitraryOutputBuffer.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.execution.buffer; import com.google.common.annotations.VisibleForTesting; diff --git a/presto-main/src/main/java/io/prestosql/execution/buffer/BroadcastOutputBuffer.java b/presto-main/src/main/java/io/prestosql/execution/buffer/BroadcastOutputBuffer.java index 9d56872d3..6b11a60f4 100644 --- a/presto-main/src/main/java/io/prestosql/execution/buffer/BroadcastOutputBuffer.java +++ b/presto-main/src/main/java/io/prestosql/execution/buffer/BroadcastOutputBuffer.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.execution.buffer; import com.google.common.annotations.VisibleForTesting; diff --git a/presto-main/src/main/java/io/prestosql/execution/buffer/PartitionedOutputBuffer.java b/presto-main/src/main/java/io/prestosql/execution/buffer/PartitionedOutputBuffer.java index 5c4a7cf5a..11ccda495 100644 --- a/presto-main/src/main/java/io/prestosql/execution/buffer/PartitionedOutputBuffer.java +++ b/presto-main/src/main/java/io/prestosql/execution/buffer/PartitionedOutputBuffer.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.execution.buffer; import com.google.common.annotations.VisibleForTesting; diff --git a/presto-main/src/main/java/io/prestosql/execution/scheduler/FixedSourcePartitionedScheduler.java b/presto-main/src/main/java/io/prestosql/execution/scheduler/FixedSourcePartitionedScheduler.java index 1a7a81027..a8f079062 100644 --- a/presto-main/src/main/java/io/prestosql/execution/scheduler/FixedSourcePartitionedScheduler.java +++ b/presto-main/src/main/java/io/prestosql/execution/scheduler/FixedSourcePartitionedScheduler.java @@ -56,7 +56,7 @@ public class FixedSourcePartitionedScheduler implements StageScheduler { - private static final Logger log = Logger.get(FixedSourcePartitionedScheduler.class); + private static final Logger LOG = Logger.get(FixedSourcePartitionedScheduler.class); private final SqlStageExecution stage; private final List nodes; @@ -256,7 +256,7 @@ public void close() sourceScheduler.close(); } catch (Throwable t) { - log.warn(t, "Error closing split source"); + LOG.warn(t, "Error closing split source"); } } sourceSchedulers.clear(); diff --git a/presto-main/src/main/java/io/prestosql/execution/scheduler/ScaledWriterScheduler.java b/presto-main/src/main/java/io/prestosql/execution/scheduler/ScaledWriterScheduler.java index a24d0e194..38f3e9040 100644 --- a/presto-main/src/main/java/io/prestosql/execution/scheduler/ScaledWriterScheduler.java +++ b/presto-main/src/main/java/io/prestosql/execution/scheduler/ScaledWriterScheduler.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.execution.scheduler; import com.google.common.collect.ImmutableList; diff --git a/presto-main/src/main/java/io/prestosql/execution/scheduler/SimpleFixedNodeSelector.java b/presto-main/src/main/java/io/prestosql/execution/scheduler/SimpleFixedNodeSelector.java index b6eb80852..206c590f2 100644 --- a/presto-main/src/main/java/io/prestosql/execution/scheduler/SimpleFixedNodeSelector.java +++ b/presto-main/src/main/java/io/prestosql/execution/scheduler/SimpleFixedNodeSelector.java @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.execution.scheduler; import com.google.common.base.Supplier; diff --git a/presto-main/src/main/java/io/prestosql/execution/scheduler/SimpleNodeSelector.java b/presto-main/src/main/java/io/prestosql/execution/scheduler/SimpleNodeSelector.java index 0e7e645c2..03599fcfb 100644 --- a/presto-main/src/main/java/io/prestosql/execution/scheduler/SimpleNodeSelector.java +++ b/presto-main/src/main/java/io/prestosql/execution/scheduler/SimpleNodeSelector.java @@ -66,7 +66,7 @@ public class SimpleNodeSelector implements NodeSelector { - private static final Logger log = Logger.get(SimpleNodeSelector.class); + private static final Logger LOG = Logger.get(SimpleNodeSelector.class); private final InternalNodeManager nodeManager; protected final NodeTaskMap nodeTaskMap; @@ -170,10 +170,10 @@ public SplitPlacementResult computeAssignments(Set splits, List splits, List stage, M for (Map.Entry entry : tables.entrySet()) { QualifiedObjectName qualifiedTableName = entry.getValue().getTableName(); tableSplitAssignmentInfo.setTableSplitAssignment(qualifiedTableName, producer.getReuseTableScanMappingId(), assignment); //also sets the splitkey info internally - log.debug("Producer:: Assignment size is " + assignment.size() + " ,Assignment is " + assignment + " ,Assignment Stats is " + assignmentStats); + LOG.debug("Producer:: Assignment size is " + assignment.size() + " ,Assignment is " + assignment + " ,Assignment Stats is " + assignmentStats); } } diff --git a/presto-main/src/main/java/io/prestosql/execution/scheduler/SourcePartitionedScheduler.java b/presto-main/src/main/java/io/prestosql/execution/scheduler/SourcePartitionedScheduler.java index e93121156..d18601204 100644 --- a/presto-main/src/main/java/io/prestosql/execution/scheduler/SourcePartitionedScheduler.java +++ b/presto-main/src/main/java/io/prestosql/execution/scheduler/SourcePartitionedScheduler.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.execution.scheduler; import com.google.common.collect.HashMultimap; diff --git a/presto-main/src/main/java/io/prestosql/execution/scheduler/SplitCacheAwareNodeSelector.java b/presto-main/src/main/java/io/prestosql/execution/scheduler/SplitCacheAwareNodeSelector.java index ea6f9648e..b7b4164b5 100644 --- a/presto-main/src/main/java/io/prestosql/execution/scheduler/SplitCacheAwareNodeSelector.java +++ b/presto-main/src/main/java/io/prestosql/execution/scheduler/SplitCacheAwareNodeSelector.java @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.execution.scheduler; import com.google.common.base.Supplier; @@ -49,7 +50,7 @@ public class SplitCacheAwareNodeSelector implements NodeSelector { - private static final Logger log = Logger.get(SplitCacheAwareNodeSelector.class); + private static final Logger LOG = Logger.get(SplitCacheAwareNodeSelector.class); private final InternalNodeManager nodeManager; private final NodeTaskMap nodeTaskMap; @@ -160,7 +161,7 @@ public SplitPlacementResult computeAssignments(Set splits, List unassignedSplits = new HashSet<>(); unassignedSplits.addAll(newCacheableSplits); diff --git a/presto-main/src/main/java/io/prestosql/execution/scheduler/SqlQueryScheduler.java b/presto-main/src/main/java/io/prestosql/execution/scheduler/SqlQueryScheduler.java index 064cbdeae..55e9a682b 100644 --- a/presto-main/src/main/java/io/prestosql/execution/scheduler/SqlQueryScheduler.java +++ b/presto-main/src/main/java/io/prestosql/execution/scheduler/SqlQueryScheduler.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.execution.scheduler; import com.google.common.collect.ImmutableList; @@ -125,7 +126,7 @@ public class SqlQueryScheduler { - private static final Logger log = Logger.get(SqlQueryScheduler.class); + private static final Logger LOG = Logger.get(SqlQueryScheduler.class); private static final int[] THROTTLE_SLEEP_TIMER = {5, 10, 15}; //seconds private static final long MIN_RESUME_INTERVAL = 5000; // milliseconds private static final int[] SPLIT_GROUP_GRADATION = {1, 2, 4, 8, 16, 32, 64, 128}; @@ -734,7 +735,7 @@ private boolean canScheduleMoreSplits() return true; } - log.debug("Splits scheduling throttled....!!! Used memory " + cachedMemoryUsage + " configured " + softReservedMemory); + LOG.debug("Splits scheduling throttled....!!! Used memory " + cachedMemoryUsage + " configured " + softReservedMemory); return false; } diff --git a/presto-main/src/main/java/io/prestosql/execution/scheduler/TopologyAwareNodeSelector.java b/presto-main/src/main/java/io/prestosql/execution/scheduler/TopologyAwareNodeSelector.java index c0c15cadf..ba188035d 100644 --- a/presto-main/src/main/java/io/prestosql/execution/scheduler/TopologyAwareNodeSelector.java +++ b/presto-main/src/main/java/io/prestosql/execution/scheduler/TopologyAwareNodeSelector.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.execution.scheduler; import com.google.common.base.Supplier; @@ -55,7 +56,7 @@ public class TopologyAwareNodeSelector implements NodeSelector { - private static final Logger log = Logger.get(TopologyAwareNodeSelector.class); + private static final Logger LOG = Logger.get(TopologyAwareNodeSelector.class); private final InternalNodeManager nodeManager; private final NodeTaskMap nodeTaskMap; @@ -147,7 +148,7 @@ public SplitPlacementResult computeAssignments(Set splits, List candidateNodes = selectExactNodes(nodeMapSlice, split.getAddresses(), includeCoordinator); if (candidateNodes.isEmpty()) { - log.debug("No nodes available to schedule %s. Available nodes %s", split, nodeMapSlice.getNodesByHost().keys()); + LOG.debug("No nodes available to schedule %s. Available nodes %s", split, nodeMapSlice.getNodesByHost().keys()); throw new PrestoException(NO_NODES_AVAILABLE, "No nodes available to run query"); } InternalNode chosenNode = bestNodeSplitCount(candidateNodes.iterator(), minCandidates, maxPendingSplitsPerTask, assignmentStats); diff --git a/presto-main/src/main/java/io/prestosql/metadata/Metadata.java b/presto-main/src/main/java/io/prestosql/metadata/Metadata.java index 947a0595a..016b848d8 100755 --- a/presto-main/src/main/java/io/prestosql/metadata/Metadata.java +++ b/presto-main/src/main/java/io/prestosql/metadata/Metadata.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.metadata; import io.airlift.slice.Slice; diff --git a/presto-main/src/main/java/io/prestosql/metadata/MetadataManager.java b/presto-main/src/main/java/io/prestosql/metadata/MetadataManager.java index f1e271044..b544aa5c2 100755 --- a/presto-main/src/main/java/io/prestosql/metadata/MetadataManager.java +++ b/presto-main/src/main/java/io/prestosql/metadata/MetadataManager.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.metadata; import com.esotericsoftware.kryo.Kryo; diff --git a/presto-main/src/main/java/io/prestosql/operator/AbstractRowChangeOperator.java b/presto-main/src/main/java/io/prestosql/operator/AbstractRowChangeOperator.java index aa313263b..8a54aa3c4 100644 --- a/presto-main/src/main/java/io/prestosql/operator/AbstractRowChangeOperator.java +++ b/presto-main/src/main/java/io/prestosql/operator/AbstractRowChangeOperator.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.operator; import com.google.common.collect.ImmutableList; diff --git a/presto-main/src/main/java/io/prestosql/operator/Driver.java b/presto-main/src/main/java/io/prestosql/operator/Driver.java index cb80093f5..0f8de4ce1 100644 --- a/presto-main/src/main/java/io/prestosql/operator/Driver.java +++ b/presto-main/src/main/java/io/prestosql/operator/Driver.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.operator; import com.google.common.annotations.VisibleForTesting; @@ -68,7 +69,7 @@ public class Driver implements Closeable { - private static final Logger log = Logger.get(Driver.class); + private static final Logger LOG = Logger.get(Driver.class); private final DriverContext driverContext; private final boolean isSnapshotEnabled; @@ -376,7 +377,7 @@ private ListenableFuture updateDriverBlockedFuture(ListenableFuture source } // Snapshot: for debugging only, to print number of rows received by each operator for each snapshot - private final Map receivedRows = log.isDebugEnabled() ? new HashMap<>() : null; + private final Map receivedRows = LOG.isDebugEnabled() ? new HashMap<>() : null; @GuardedBy("exclusiveLock") private ListenableFuture processInternal(OperationTimer operationTimer) @@ -403,9 +404,9 @@ private ListenableFuture processInternal(OperationTimer operationTimer) Operator current = activeOperators.get(i); Operator next = activeOperators.get(i + 1); - if (log.isDebugEnabled()) { + if (LOG.isDebugEnabled()) { if (getBlockedFuture(current).isPresent() || getBlockedFuture(next).isPresent()) { - log.debug("Blocking info next=%s: getBlockedFuture(current)=%b; current.isFinished=%b; getBlockedFuture(next)=%b; next.needsInput=%b", + LOG.debug("Blocking info next=%s: getBlockedFuture(current)=%b; current.isFinished=%b; getBlockedFuture(next)=%b; next.needsInput=%b", next.getOperatorContext().getUniqueId(), getBlockedFuture(current).isPresent(), current.isFinished(), getBlockedFuture(next).isPresent(), next.needsInput()); } } @@ -439,12 +440,12 @@ else if (isSnapshotEnabled && next.allowMarker()) { // if we got an output page, add it to the next operator if (page != null && page.getPositionCount() != 0) { - if (log.isDebugEnabled()) { + if (LOG.isDebugEnabled()) { // Snapshot: print number of rows received by each operator for each snapshot final Page p = page; if (page instanceof MarkerPage) { long count = receivedRows.compute(next, (o, v) -> v == null ? 0 : v); - log.debug("Operator %s received %d rows at marker %s", next.getOperatorContext().getUniqueId(), count, page); + LOG.debug("Operator %s received %d rows at marker %s", next.getOperatorContext().getUniqueId(), count, page); } else { receivedRows.compute(next, (o, v) -> v == null ? p.getPositionCount() : v + p.getPositionCount()); @@ -595,13 +596,13 @@ private void destroyIfNecessary() try { inFlightException = closeAndDestroyOperators(activeOperators, toResume); if (driverContext.getMemoryUsage() > 0) { - log.error("Driver still has memory reserved after freeing all operator memory."); + LOG.error("Driver still has memory reserved after freeing all operator memory."); } if (driverContext.getSystemMemoryUsage() > 0) { - log.error("Driver still has system memory reserved after freeing all operator memory."); + LOG.error("Driver still has system memory reserved after freeing all operator memory."); } if (driverContext.getRevocableMemoryUsage() > 0) { - log.error("Driver still has revocable memory reserved after freeing all operator memory. Freeing it."); + LOG.error("Driver still has revocable memory reserved after freeing all operator memory. Freeing it."); } driverContext.finished(); } @@ -631,9 +632,9 @@ private Throwable closeAndDestroyOperators(List operators, boolean toR for (Operator operator : operators) { try { if (toResume) { - if (log.isDebugEnabled()) { + if (LOG.isDebugEnabled()) { long count = receivedRows.compute(operator, (o, v) -> v == null ? 0 : v); - log.debug("Operator %s received %d rows when the operator is cancelled to resume", operator.getOperatorContext().getUniqueId(), count); + LOG.debug("Operator %s received %d rows when the operator is cancelled to resume", operator.getOperatorContext().getUniqueId(), count); } // Snapshot: different ways to cancel operators. They may choose different strategies. // e.g. for table-writer, normal cancel should remove any data that's been written, @@ -642,9 +643,9 @@ private Throwable closeAndDestroyOperators(List operators, boolean toR operator.cancelToResume(); } else { - if (log.isDebugEnabled()) { + if (LOG.isDebugEnabled()) { long count = receivedRows.compute(operator, (o, v) -> v == null ? 0 : v); - log.debug("Operator %s received %d rows when the operator finishes", operator.getOperatorContext().getUniqueId(), count); + LOG.debug("Operator %s received %d rows when the operator finishes", operator.getOperatorContext().getUniqueId(), count); } operator.close(); } @@ -738,7 +739,7 @@ private static Throwable addSuppressedException(Throwable inFlightException, Thr } else { // log normal exceptions instead of rethrowing them - log.error(newException, message, args); + LOG.error(newException, message, args); } return inFlightExceptionNew; } diff --git a/presto-main/src/main/java/io/prestosql/operator/ExchangeClient.java b/presto-main/src/main/java/io/prestosql/operator/ExchangeClient.java index ee04c6d52..9f0bedc08 100644 --- a/presto-main/src/main/java/io/prestosql/operator/ExchangeClient.java +++ b/presto-main/src/main/java/io/prestosql/operator/ExchangeClient.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.operator; import com.google.common.annotations.VisibleForTesting; @@ -68,7 +69,7 @@ public class ExchangeClient implements Closeable { - private static final Logger log = Logger.get(ExchangeClient.class); + private static final Logger LOG = Logger.get(ExchangeClient.class); private static final SerializedPage NO_MORE_PAGES = new SerializedPage(EMPTY_SLICE, PageCodecMarker.MarkerSet.empty(), 0, 0); private final long bufferCapacity; @@ -726,7 +727,7 @@ private static void closeQuietly(HttpPageBufferClient client) client.close(); } catch (RuntimeException e) { - log.error("ExchangeClient close failed: %s", e.getMessage()); + LOG.error("ExchangeClient close failed: %s", e.getMessage()); } } } diff --git a/presto-main/src/main/java/io/prestosql/operator/ExchangeOperator.java b/presto-main/src/main/java/io/prestosql/operator/ExchangeOperator.java index 6c2750b54..0aa126e94 100644 --- a/presto-main/src/main/java/io/prestosql/operator/ExchangeOperator.java +++ b/presto-main/src/main/java/io/prestosql/operator/ExchangeOperator.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.operator; import com.google.common.util.concurrent.Futures; diff --git a/presto-main/src/main/java/io/prestosql/operator/HashBuilderOperator.java b/presto-main/src/main/java/io/prestosql/operator/HashBuilderOperator.java index 83fd52bd1..f309f14bf 100644 --- a/presto-main/src/main/java/io/prestosql/operator/HashBuilderOperator.java +++ b/presto-main/src/main/java/io/prestosql/operator/HashBuilderOperator.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.operator; import com.google.common.annotations.VisibleForTesting; diff --git a/presto-main/src/main/java/io/prestosql/operator/HttpPageBufferClient.java b/presto-main/src/main/java/io/prestosql/operator/HttpPageBufferClient.java index c77404e5d..8e032cea4 100644 --- a/presto-main/src/main/java/io/prestosql/operator/HttpPageBufferClient.java +++ b/presto-main/src/main/java/io/prestosql/operator/HttpPageBufferClient.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.operator; import com.google.common.annotations.VisibleForTesting; @@ -88,7 +89,7 @@ public final class HttpPageBufferClient implements Closeable { - private static final Logger log = Logger.get(HttpPageBufferClient.class); + private static final Logger LOG = Logger.get(HttpPageBufferClient.class); public static final String PAGE_TRANSPORT_ERROR_PREFIX = "Page transport error with response status code"; /** @@ -370,7 +371,7 @@ public void onSuccess(PagesResponse result) @Override public Void handleException(Request request, Exception exception) { - log.debug(exception, "Acknowledge request failed: %s", uri); + LOG.debug(exception, "Acknowledge request failed: %s", uri); return null; } @@ -378,7 +379,7 @@ public Void handleException(Request request, Exception exception) public Void handle(Request request, Response response) { if (familyForStatusCode(response.getStatusCode()) != HttpStatus.Family.SUCCESSFUL) { - log.debug("Unexpected acknowledge response code: %s", response.getStatusCode()); + LOG.debug("Unexpected acknowledge response code: %s", response.getStatusCode()); } return null; } @@ -421,7 +422,7 @@ public Void handle(Request request, Response response) @Override public void onFailure(Throwable t) { - log.debug("Request to %s failed %s", uri, t); + LOG.debug("Request to %s failed %s", uri, t); checkNotHoldsLock(this); Throwable throwable = rewriteException(t); @@ -439,7 +440,7 @@ public void onFailure(Throwable t) * if node is otherwise (e.g.active), keep retrying till timeout of maxErrorDuration */ FailureDetector.State state = failureDetector.getState(fromUri(uri)); - log.debug("failure detector state is " + state.toString()); + LOG.debug("failure detector state is " + state.toString()); hasFailed = (backoff.maxTried() && !FailureDetector.State.ALIVE.equals(state) || backoff.timeout()); @@ -453,7 +454,7 @@ public void onFailure(Throwable t) backoff.getFailureRequestTimeTotal().convertTo(SECONDS)); if (querySnapshotManager != null) { // Snapshot: recover from remote server errors - log.debug(throwable, "Snapshot: remote task failed with resumable error: %s", message); + LOG.debug(throwable, "Snapshot: remote task failed with resumable error: %s", message); querySnapshotManager.cancelToResume(); handleFailure(throwable, resultFuture); return; @@ -499,7 +500,7 @@ public void onFailure(Throwable t) { checkNotHoldsLock(this); - log.error("Request to delete %s failed %s", location, t); + LOG.error("Request to delete %s failed %s", location, t); Throwable throwable = t; if (!(throwable instanceof PrestoException) && backoff.failure()) { String message = format("Error closing remote buffer (%s - %s failures, failure duration %s, total failed request time %s)", @@ -673,7 +674,7 @@ public PagesResponse handle(Request request, Response response) if (querySnapshotManager != null && querySnapshotManager.isCoordinator()) { // Snapshot: for internal server errors on the worker, or unexpected OK results, treat as resumable error. if (response.getStatusCode() >= 500 || response.getStatusCode() == HttpStatus.OK.code()) { - log.debug(e.getMessage()); + LOG.debug(e.getMessage()); querySnapshotManager.cancelToResume(); return createEmptyPagesResponse(0, 0, false); } diff --git a/presto-main/src/main/java/io/prestosql/operator/LookupOuterOperator.java b/presto-main/src/main/java/io/prestosql/operator/LookupOuterOperator.java index b81aa810c..785cffb7f 100644 --- a/presto-main/src/main/java/io/prestosql/operator/LookupOuterOperator.java +++ b/presto-main/src/main/java/io/prestosql/operator/LookupOuterOperator.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.operator; import com.google.common.collect.ImmutableList; diff --git a/presto-main/src/main/java/io/prestosql/operator/MergeOperator.java b/presto-main/src/main/java/io/prestosql/operator/MergeOperator.java index a8fc7ff94..269cc3f72 100644 --- a/presto-main/src/main/java/io/prestosql/operator/MergeOperator.java +++ b/presto-main/src/main/java/io/prestosql/operator/MergeOperator.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.operator; import com.google.common.io.Closer; diff --git a/presto-main/src/main/java/io/prestosql/operator/OrderByOperator.java b/presto-main/src/main/java/io/prestosql/operator/OrderByOperator.java index 79e21ac18..a5f4eb501 100644 --- a/presto-main/src/main/java/io/prestosql/operator/OrderByOperator.java +++ b/presto-main/src/main/java/io/prestosql/operator/OrderByOperator.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.operator; import com.google.common.collect.ImmutableList; diff --git a/presto-main/src/main/java/io/prestosql/operator/PartitionedOutputOperator.java b/presto-main/src/main/java/io/prestosql/operator/PartitionedOutputOperator.java index bc45cfdb1..f50f173a0 100644 --- a/presto-main/src/main/java/io/prestosql/operator/PartitionedOutputOperator.java +++ b/presto-main/src/main/java/io/prestosql/operator/PartitionedOutputOperator.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.operator; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/presto-main/src/main/java/io/prestosql/operator/WindowOperator.java b/presto-main/src/main/java/io/prestosql/operator/WindowOperator.java index 9df4e06fd..9edae872a 100644 --- a/presto-main/src/main/java/io/prestosql/operator/WindowOperator.java +++ b/presto-main/src/main/java/io/prestosql/operator/WindowOperator.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.operator; import com.google.common.annotations.VisibleForTesting; diff --git a/presto-main/src/main/java/io/prestosql/operator/aggregation/AbstractGroupCollectionAggregationState.java b/presto-main/src/main/java/io/prestosql/operator/aggregation/AbstractGroupCollectionAggregationState.java index f6086b8b7..516e92d94 100644 --- a/presto-main/src/main/java/io/prestosql/operator/aggregation/AbstractGroupCollectionAggregationState.java +++ b/presto-main/src/main/java/io/prestosql/operator/aggregation/AbstractGroupCollectionAggregationState.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.operator.aggregation; import io.prestosql.array.IntBigArray; diff --git a/presto-main/src/main/java/io/prestosql/operator/aggregation/Accumulator.java b/presto-main/src/main/java/io/prestosql/operator/aggregation/Accumulator.java index c84e4b2c6..633029796 100644 --- a/presto-main/src/main/java/io/prestosql/operator/aggregation/Accumulator.java +++ b/presto-main/src/main/java/io/prestosql/operator/aggregation/Accumulator.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.operator.aggregation; import io.prestosql.spi.Page; diff --git a/presto-main/src/main/java/io/prestosql/operator/aggregation/state/AbstractGroupedAccumulatorState.java b/presto-main/src/main/java/io/prestosql/operator/aggregation/state/AbstractGroupedAccumulatorState.java index cb5aeefaa..4a0e1fd94 100644 --- a/presto-main/src/main/java/io/prestosql/operator/aggregation/state/AbstractGroupedAccumulatorState.java +++ b/presto-main/src/main/java/io/prestosql/operator/aggregation/state/AbstractGroupedAccumulatorState.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.operator.aggregation.state; import io.prestosql.spi.function.GroupedAccumulatorState; diff --git a/presto-main/src/main/java/io/prestosql/server/TaskResource.java b/presto-main/src/main/java/io/prestosql/server/TaskResource.java index 65cb2e5c5..4fc02f59d 100644 --- a/presto-main/src/main/java/io/prestosql/server/TaskResource.java +++ b/presto-main/src/main/java/io/prestosql/server/TaskResource.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.server; import com.google.common.collect.ImmutableList; diff --git a/presto-main/src/main/java/io/prestosql/server/protocol/Query.java b/presto-main/src/main/java/io/prestosql/server/protocol/Query.java index f9ef8fd36..0c4e36bb3 100644 --- a/presto-main/src/main/java/io/prestosql/server/protocol/Query.java +++ b/presto-main/src/main/java/io/prestosql/server/protocol/Query.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.server.protocol; import com.google.common.collect.ImmutableList; @@ -115,7 +116,7 @@ @ThreadSafe public class Query { - private static final Logger log = Logger.get(Query.class); + private static final Logger LOG = Logger.get(Query.class); private final QueryManager queryManager; private final QueryId queryId; @@ -582,7 +583,7 @@ private synchronized DataCenterQueryResults getNextResult(long token, DataSize t queryHtmlUri = new URI("http://localhost"); } catch (URISyntaxException e) { - log.error("get uri error: %s", e.getMessage()); + LOG.error("get uri error: %s", e.getMessage()); } // Remove as many pages as possible from the exchange until just greater than DESIRED_RESULT_BYTES @@ -679,7 +680,7 @@ else if (queryInfo.isRunningAsync()) { nextResultsUri = new URI(Long.toString(nextToken.getAsLong())); } catch (URISyntaxException e) { - log.error("get uri error: %s", e.getMessage()); + LOG.error("get uri error: %s", e.getMessage()); } } @@ -881,7 +882,7 @@ else if (snapshotInfo.getSnapshotResult() == SnapshotResult.IN_PROGRESS) { capturingSnapshots.add(snapshotId); } else { - log.info("Neither successful nor in progress, Snapshot: %d, Status: %s", snapshotId, snapshotInfo.getSnapshotResult().toString()); + LOG.info("Neither successful nor in progress, Snapshot: %d, Status: %s", snapshotId, snapshotInfo.getSnapshotResult().toString()); } }); SnapshotStats.Builder builder = SnapshotStats.builder(); @@ -926,7 +927,7 @@ else if (snapshotInfo.getSnapshotResult() == SnapshotResult.IN_PROGRESS) { restoredSnapshotList.add(restoreResult.getSnapshotId()); } else { - log.info("Query restarted instead of resume.."); + LOG.info("Query restarted instead of resume.."); } }); builder.setSuccessRestoreCount(restoreCount) @@ -941,7 +942,7 @@ else if (snapshotInfo.getSnapshotResult() == SnapshotResult.IN_PROGRESS) { builder.setRestoringSnapshotId(restoringSnapshotId); } SnapshotStats snapshotStats = builder.build(); - log.debug("SnapshotStats: " + snapshotStats.toString()); + LOG.debug("SnapshotStats: " + snapshotStats.toString()); return snapshotStats; } return null; @@ -966,7 +967,7 @@ private static StageStats toStageStats(StageInfo stageInfo) URI uri = task.getTaskStatus().getSelf(); uniqueNodes.add(uri.getHost() + ":" + uri.getPort()); } - log.debug("StageStats Id: %s, IsRestoring: %b, SnapshotId: %d", stageInfo.getStageId().toString(), stageInfo.isRestoring(), stageInfo.getSnapshotId()); + LOG.debug("StageStats Id: %s, IsRestoring: %b, SnapshotId: %d", stageInfo.getStageId().toString(), stageInfo.isRestoring(), stageInfo.getSnapshotId()); return StageStats.builder() .setStageId(String.valueOf(stageInfo.getStageId().getId())) .setState(stageInfo.getState().toString()) @@ -1054,7 +1055,7 @@ private static QueryError toQueryError(QueryInfo queryInfo) executionFailure = queryInfo.getFailureInfo(); } else { - log.warn("Query %s in state %s has no failure info", queryInfo.getQueryId(), state); + LOG.warn("Query %s in state %s has no failure info", queryInfo.getQueryId(), state); executionFailure = toFailure(new RuntimeException(format("Query is %s (reason unknown)", state))); } FailureInfo failure = executionFailure.toFailureInfoWithoutStack(); @@ -1065,7 +1066,7 @@ private static QueryError toQueryError(QueryInfo queryInfo) } else { errorCode = GENERIC_INTERNAL_ERROR.toErrorCode(); - log.warn("Failed query %s has no error code", queryInfo.getQueryId()); + LOG.warn("Failed query %s has no error code", queryInfo.getQueryId()); } return new QueryError( firstNonNull(failure.getMessage(), "Internal error"), diff --git a/presto-main/src/main/java/io/prestosql/server/remotetask/ContinuousTaskStatusFetcher.java b/presto-main/src/main/java/io/prestosql/server/remotetask/ContinuousTaskStatusFetcher.java index a10cd0cdb..d722386a3 100644 --- a/presto-main/src/main/java/io/prestosql/server/remotetask/ContinuousTaskStatusFetcher.java +++ b/presto-main/src/main/java/io/prestosql/server/remotetask/ContinuousTaskStatusFetcher.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.server.remotetask; import com.google.common.util.concurrent.Futures; @@ -60,7 +61,7 @@ class ContinuousTaskStatusFetcher implements SimpleHttpResponseCallback { - private static final Logger log = Logger.get(ContinuousTaskStatusFetcher.class); + private static final Logger LOG = Logger.get(ContinuousTaskStatusFetcher.class); private final TaskId taskId; private final String instanceId; @@ -151,7 +152,7 @@ private synchronized void scheduleNextRequest() // outstanding request? if (future != null && !future.isDone()) { // this should never happen - log.error("Can not reschedule update because an update is already running"); + LOG.error("Can not reschedule update because an update is already running"); return; } diff --git a/presto-main/src/main/java/io/prestosql/server/remotetask/HttpRemoteTask.java b/presto-main/src/main/java/io/prestosql/server/remotetask/HttpRemoteTask.java index c32f743cc..e2017de8d 100644 --- a/presto-main/src/main/java/io/prestosql/server/remotetask/HttpRemoteTask.java +++ b/presto-main/src/main/java/io/prestosql/server/remotetask/HttpRemoteTask.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.server.remotetask; import com.google.common.base.Ticker; @@ -116,7 +117,7 @@ public final class HttpRemoteTask implements RemoteTask { - private static final Logger log = Logger.get(HttpRemoteTask.class); + private static final Logger LOG = Logger.get(HttpRemoteTask.class); private final TaskId taskId; private final String instanceId; @@ -644,7 +645,7 @@ public synchronized void cancelToResume() private void sendCancelRequest(TaskStatus taskStatus, TaskState targetState, String action) { - log.debug("Cancelling task %s, with target state %s", taskStatus.getTaskId(), targetState); + LOG.debug("Cancelling task %s, with target state %s", taskStatus.getTaskId(), targetState); // send cancel to task and ignore response HttpUriBuilder uriBuilder = getHttpUriBuilder(taskStatus).addParameter("targetState", targetState.toString()); @@ -809,7 +810,7 @@ private void failTask(Throwable cause) { TaskStatus taskStatus = getTaskStatus(); if (!taskStatus.getState().isDone()) { - log.debug(cause, "Remote task %s failed with %s", taskStatus.getSelf(), cause); + LOG.debug(cause, "Remote task %s failed with %s", taskStatus.getSelf(), cause); } ExecutionFailureInfo failureInfo = toFailure(cause); @@ -820,7 +821,7 @@ private void failTask(Throwable cause) taskStatusFetcher.updateTaskStatus(taskStatus); return; } - log.debug(cause, "Snapshot: remote task %s failed with unresumable error %s", taskStatus.getSelf(), cause); + LOG.debug(cause, "Snapshot: remote task %s failed with unresumable error %s", taskStatus.getSelf(), cause); } abort(failWith(taskStatus, FAILED, ImmutableList.of(failureInfo))); diff --git a/presto-main/src/main/java/io/prestosql/server/remotetask/TaskInfoFetcher.java b/presto-main/src/main/java/io/prestosql/server/remotetask/TaskInfoFetcher.java index ab20e8201..89301ff0f 100644 --- a/presto-main/src/main/java/io/prestosql/server/remotetask/TaskInfoFetcher.java +++ b/presto-main/src/main/java/io/prestosql/server/remotetask/TaskInfoFetcher.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.server.remotetask; import com.google.common.util.concurrent.Futures; diff --git a/presto-main/src/main/java/io/prestosql/snapshot/MarkerAnnouncer.java b/presto-main/src/main/java/io/prestosql/snapshot/MarkerAnnouncer.java index 0761c87cd..5d8b91d77 100644 --- a/presto-main/src/main/java/io/prestosql/snapshot/MarkerAnnouncer.java +++ b/presto-main/src/main/java/io/prestosql/snapshot/MarkerAnnouncer.java @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.snapshot; import io.airlift.log.Logger; diff --git a/presto-main/src/main/java/io/prestosql/snapshot/MarkerSplit.java b/presto-main/src/main/java/io/prestosql/snapshot/MarkerSplit.java index 334f67a44..b696c3025 100644 --- a/presto-main/src/main/java/io/prestosql/snapshot/MarkerSplit.java +++ b/presto-main/src/main/java/io/prestosql/snapshot/MarkerSplit.java @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.snapshot; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/presto-main/src/main/java/io/prestosql/snapshot/MarkerSplitHandleResolver.java b/presto-main/src/main/java/io/prestosql/snapshot/MarkerSplitHandleResolver.java index 0ed755921..3b5b3466c 100644 --- a/presto-main/src/main/java/io/prestosql/snapshot/MarkerSplitHandleResolver.java +++ b/presto-main/src/main/java/io/prestosql/snapshot/MarkerSplitHandleResolver.java @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.snapshot; import io.prestosql.spi.connector.ConnectorSplit; diff --git a/presto-main/src/main/java/io/prestosql/snapshot/MarkerSplitSource.java b/presto-main/src/main/java/io/prestosql/snapshot/MarkerSplitSource.java index 3053146dd..811c3fb7c 100644 --- a/presto-main/src/main/java/io/prestosql/snapshot/MarkerSplitSource.java +++ b/presto-main/src/main/java/io/prestosql/snapshot/MarkerSplitSource.java @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.snapshot; import com.google.common.collect.ImmutableList; diff --git a/presto-main/src/main/java/io/prestosql/snapshot/MultiInputRestorable.java b/presto-main/src/main/java/io/prestosql/snapshot/MultiInputRestorable.java index 81c879e59..f5345cb84 100644 --- a/presto-main/src/main/java/io/prestosql/snapshot/MultiInputRestorable.java +++ b/presto-main/src/main/java/io/prestosql/snapshot/MultiInputRestorable.java @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.snapshot; import io.prestosql.spi.snapshot.Restorable; diff --git a/presto-main/src/main/java/io/prestosql/snapshot/MultiInputSnapshotState.java b/presto-main/src/main/java/io/prestosql/snapshot/MultiInputSnapshotState.java index 8e57e1353..0cb281f2f 100644 --- a/presto-main/src/main/java/io/prestosql/snapshot/MultiInputSnapshotState.java +++ b/presto-main/src/main/java/io/prestosql/snapshot/MultiInputSnapshotState.java @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.snapshot; import com.google.common.base.Stopwatch; diff --git a/presto-main/src/main/java/io/prestosql/snapshot/QuerySnapshotManager.java b/presto-main/src/main/java/io/prestosql/snapshot/QuerySnapshotManager.java index c842ad588..c0a3dd2b2 100644 --- a/presto-main/src/main/java/io/prestosql/snapshot/QuerySnapshotManager.java +++ b/presto-main/src/main/java/io/prestosql/snapshot/QuerySnapshotManager.java @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.snapshot; import com.google.common.annotations.VisibleForTesting; diff --git a/presto-main/src/main/java/io/prestosql/snapshot/RestoreResult.java b/presto-main/src/main/java/io/prestosql/snapshot/RestoreResult.java index 0eba8bba4..ecd562f24 100644 --- a/presto-main/src/main/java/io/prestosql/snapshot/RestoreResult.java +++ b/presto-main/src/main/java/io/prestosql/snapshot/RestoreResult.java @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.snapshot; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/presto-main/src/main/java/io/prestosql/snapshot/SingleInputSnapshotState.java b/presto-main/src/main/java/io/prestosql/snapshot/SingleInputSnapshotState.java index db53adc07..1c1fb1169 100644 --- a/presto-main/src/main/java/io/prestosql/snapshot/SingleInputSnapshotState.java +++ b/presto-main/src/main/java/io/prestosql/snapshot/SingleInputSnapshotState.java @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.snapshot; import com.google.common.base.Stopwatch; diff --git a/presto-main/src/main/java/io/prestosql/snapshot/SnapshotComponentCounter.java b/presto-main/src/main/java/io/prestosql/snapshot/SnapshotComponentCounter.java index be4e502ea..d39b3efec 100644 --- a/presto-main/src/main/java/io/prestosql/snapshot/SnapshotComponentCounter.java +++ b/presto-main/src/main/java/io/prestosql/snapshot/SnapshotComponentCounter.java @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.snapshot; import io.airlift.log.Logger; @@ -29,7 +30,7 @@ */ public class SnapshotComponentCounter { - private static final Logger log = Logger.get(SnapshotComponentCounter.class); + private static final Logger LOG = Logger.get(SnapshotComponentCounter.class); // Function to verify if snapshot is complete for query components private final Function, Boolean> checkComplete; @@ -90,7 +91,7 @@ else if (state == ComponentState.FAILED && snapshotResult != SnapshotResult.FAIL } else if (componentMap.size() > totalComponentCount) { String keys = componentMap.keySet().stream().map(Object::toString).collect(Collectors.joining(" \n")); - log.warn("BUG: Too many operators for %s. Expecting %d; see %d.\n %s", stateId, totalComponentCount, componentMap.size(), keys); + LOG.warn("BUG: Too many operators for %s. Expecting %d; see %d.\n %s", stateId, totalComponentCount, componentMap.size(), keys); snapshotResult = SnapshotResult.FAILED; doneResult(); } diff --git a/presto-main/src/main/java/io/prestosql/snapshot/SnapshotConfig.java b/presto-main/src/main/java/io/prestosql/snapshot/SnapshotConfig.java index 8aef5a634..6d9945f18 100644 --- a/presto-main/src/main/java/io/prestosql/snapshot/SnapshotConfig.java +++ b/presto-main/src/main/java/io/prestosql/snapshot/SnapshotConfig.java @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.snapshot; import io.airlift.configuration.Config; diff --git a/presto-main/src/main/java/io/prestosql/snapshot/SnapshotDataCollector.java b/presto-main/src/main/java/io/prestosql/snapshot/SnapshotDataCollector.java index ce0f8872b..844eb5b18 100644 --- a/presto-main/src/main/java/io/prestosql/snapshot/SnapshotDataCollector.java +++ b/presto-main/src/main/java/io/prestosql/snapshot/SnapshotDataCollector.java @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.snapshot; public interface SnapshotDataCollector diff --git a/presto-main/src/main/java/io/prestosql/snapshot/SnapshotFileBasedClient.java b/presto-main/src/main/java/io/prestosql/snapshot/SnapshotFileBasedClient.java index 9ebded2f1..76d81099d 100644 --- a/presto-main/src/main/java/io/prestosql/snapshot/SnapshotFileBasedClient.java +++ b/presto-main/src/main/java/io/prestosql/snapshot/SnapshotFileBasedClient.java @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.snapshot; import com.google.common.base.Stopwatch; diff --git a/presto-main/src/main/java/io/prestosql/snapshot/SnapshotInfo.java b/presto-main/src/main/java/io/prestosql/snapshot/SnapshotInfo.java index 4d1ec82d1..1e0d802a4 100644 --- a/presto-main/src/main/java/io/prestosql/snapshot/SnapshotInfo.java +++ b/presto-main/src/main/java/io/prestosql/snapshot/SnapshotInfo.java @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.snapshot; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/presto-main/src/main/java/io/prestosql/snapshot/SnapshotStateId.java b/presto-main/src/main/java/io/prestosql/snapshot/SnapshotStateId.java index 71e46f328..7db8eeb09 100644 --- a/presto-main/src/main/java/io/prestosql/snapshot/SnapshotStateId.java +++ b/presto-main/src/main/java/io/prestosql/snapshot/SnapshotStateId.java @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.snapshot; import io.prestosql.execution.TaskId; diff --git a/presto-main/src/main/java/io/prestosql/snapshot/SnapshotStoreClient.java b/presto-main/src/main/java/io/prestosql/snapshot/SnapshotStoreClient.java index a5881807b..2906e314c 100644 --- a/presto-main/src/main/java/io/prestosql/snapshot/SnapshotStoreClient.java +++ b/presto-main/src/main/java/io/prestosql/snapshot/SnapshotStoreClient.java @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.snapshot; import java.nio.file.Path; diff --git a/presto-main/src/main/java/io/prestosql/snapshot/SnapshotStoreType.java b/presto-main/src/main/java/io/prestosql/snapshot/SnapshotStoreType.java index 993c4789b..048ac9d2d 100644 --- a/presto-main/src/main/java/io/prestosql/snapshot/SnapshotStoreType.java +++ b/presto-main/src/main/java/io/prestosql/snapshot/SnapshotStoreType.java @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.snapshot; /** diff --git a/presto-main/src/main/java/io/prestosql/snapshot/SnapshotUtils.java b/presto-main/src/main/java/io/prestosql/snapshot/SnapshotUtils.java index fa543501a..48b47f972 100644 --- a/presto-main/src/main/java/io/prestosql/snapshot/SnapshotUtils.java +++ b/presto-main/src/main/java/io/prestosql/snapshot/SnapshotUtils.java @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.snapshot; import com.esotericsoftware.kryo.Kryo; @@ -76,7 +77,7 @@ public class SnapshotUtils // Key is query id; value is number of attempts private final Map snapshotsToDelete = new ConcurrentHashMap<>(); private final ScheduledThreadPoolExecutor deleteSnapshotExecutor = new ScheduledThreadPoolExecutor(1); - private static final ThreadLocal kryoPool = ThreadLocal.withInitial(() -> { + private static final ThreadLocal KRYO_POOL = ThreadLocal.withInitial(() -> { Kryo kryo = new Kryo(); // Configure the Kryo instance. kryo.setInstantiatorStrategy(new DefaultInstantiatorStrategy(new StdInstantiatorStrategy())); @@ -221,7 +222,7 @@ public static void serializeState(Object state, OutputStream outputStream, boole if (useKryo) { // Kryo serialization Output output = new Output(outputStream); - Kryo kryo = kryoPool.get(); + Kryo kryo = KRYO_POOL.get(); kryo.writeClassAndObject(output, state); output.flush(); } @@ -242,7 +243,7 @@ public static Object deserializeState(InputStream inputStream, boolean useKryo) if (useKryo) { // Kryo deserialization Input input = new Input(inputStream); - Kryo kryo = kryoPool.get(); + Kryo kryo = KRYO_POOL.get(); return kryo.readClassAndObject(input); } else { diff --git a/presto-main/src/main/java/io/prestosql/snapshot/Spillable.java b/presto-main/src/main/java/io/prestosql/snapshot/Spillable.java index 176a2e2ce..18b5d8fe1 100644 --- a/presto-main/src/main/java/io/prestosql/snapshot/Spillable.java +++ b/presto-main/src/main/java/io/prestosql/snapshot/Spillable.java @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.snapshot; import java.nio.file.Path; diff --git a/presto-main/src/main/java/io/prestosql/snapshot/TaskSnapshotManager.java b/presto-main/src/main/java/io/prestosql/snapshot/TaskSnapshotManager.java index 8555d7fe2..e738454cd 100644 --- a/presto-main/src/main/java/io/prestosql/snapshot/TaskSnapshotManager.java +++ b/presto-main/src/main/java/io/prestosql/snapshot/TaskSnapshotManager.java @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.snapshot; import com.google.common.collect.ImmutableMap; diff --git a/presto-main/src/main/java/io/prestosql/split/SplitManager.java b/presto-main/src/main/java/io/prestosql/split/SplitManager.java index 4a0464dad..087d6af3f 100644 --- a/presto-main/src/main/java/io/prestosql/split/SplitManager.java +++ b/presto-main/src/main/java/io/prestosql/split/SplitManager.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.split; import com.google.common.collect.ImmutableMap; diff --git a/presto-main/src/main/java/io/prestosql/sql/planner/DistributedExecutionPlanner.java b/presto-main/src/main/java/io/prestosql/sql/planner/DistributedExecutionPlanner.java index 944eab604..03282daa5 100644 --- a/presto-main/src/main/java/io/prestosql/sql/planner/DistributedExecutionPlanner.java +++ b/presto-main/src/main/java/io/prestosql/sql/planner/DistributedExecutionPlanner.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.sql.planner; import com.google.common.collect.HashMultimap; @@ -110,7 +111,7 @@ public class DistributedExecutionPlanner { - private static final Logger log = Logger.get(DistributedExecutionPlanner.class); + private static final Logger LOG = Logger.get(DistributedExecutionPlanner.class); public enum Mode { @@ -214,7 +215,7 @@ private static void closeSplitSource(SplitSource source) source.close(); } catch (Throwable t) { - log.warn(t, "Error closing split source"); + LOG.warn(t, "Error closing split source"); } } diff --git a/presto-main/src/main/java/io/prestosql/sql/planner/LocalExecutionPlanner.java b/presto-main/src/main/java/io/prestosql/sql/planner/LocalExecutionPlanner.java index a3b4ecc50..6b577c46c 100644 --- a/presto-main/src/main/java/io/prestosql/sql/planner/LocalExecutionPlanner.java +++ b/presto-main/src/main/java/io/prestosql/sql/planner/LocalExecutionPlanner.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.sql.planner; import com.google.common.base.VerifyException; @@ -340,7 +341,7 @@ public class LocalExecutionPlanner { - private static final Logger log = Logger.get(LocalExecutionPlanner.class); + private static final Logger LOG = Logger.get(LocalExecutionPlanner.class); protected final Metadata metadata; protected final TypeAnalyzer typeAnalyzer; @@ -1783,7 +1784,7 @@ else if (sourceNode instanceof SampleNode) { protected Supplier>> getDynamicFilterSupplier(Optional>> dynamicFilters, PlanNode sourceNode, LocalExecutionPlanContext context) { if (dynamicFilters.isPresent() && !dynamicFilters.get().isEmpty()) { - log.debug("[TableScan] Dynamic filters: %s", dynamicFilters); + LOG.debug("[TableScan] Dynamic filters: %s", dynamicFilters); if (sourceNode instanceof TableScanNode) { TableScanNode tableScanNode = (TableScanNode) sourceNode; LocalDynamicFiltersCollector collector = context.getDynamicFiltersCollector(); @@ -2244,7 +2245,7 @@ public PhysicalOperation visitJoin(JoinNode node, LocalExecutionPlanContext cont // TODO: Execution must be plugged in here if (!node.getDynamicFilters().isEmpty()) { - log.debug("[Join] Dynamic filters: %s", node.getDynamicFilters()); + LOG.debug("[Join] Dynamic filters: %s", node.getDynamicFilters()); } List leftSymbols = Lists.transform(clauses, JoinNode.EquiJoinClause::getLeft); @@ -2875,7 +2876,7 @@ public PhysicalOperation visitSemiJoin(SemiJoinNode node, LocalExecutionPlanCont node.getDynamicFilterId().ifPresent(filterId -> { // Add a DynamicFilterSourceOperatorFactory to build operator factories - log.debug("[Semi-join] Dynamic filter: %s", filterId); + LOG.debug("[Semi-join] Dynamic filter: %s", filterId); LocalDynamicFilter filterConsumer = createDynamicFilter(node, context).orElse(null); if (filterConsumer != null) { addSuccessCallback(filterConsumer.getDynamicFilterResultFuture(), context::getDynamicFiltersCollector); diff --git a/presto-main/src/main/java/io/prestosql/sql/planner/NodePartitioningManager.java b/presto-main/src/main/java/io/prestosql/sql/planner/NodePartitioningManager.java index 2bde799ac..e0ccdf158 100644 --- a/presto-main/src/main/java/io/prestosql/sql/planner/NodePartitioningManager.java +++ b/presto-main/src/main/java/io/prestosql/sql/planner/NodePartitioningManager.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.sql.planner; import com.google.common.collect.BiMap; diff --git a/presto-main/src/main/java/io/prestosql/sql/planner/SystemPartitioningHandle.java b/presto-main/src/main/java/io/prestosql/sql/planner/SystemPartitioningHandle.java index ea5cbf6ae..807b97496 100644 --- a/presto-main/src/main/java/io/prestosql/sql/planner/SystemPartitioningHandle.java +++ b/presto-main/src/main/java/io/prestosql/sql/planner/SystemPartitioningHandle.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.sql.planner; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/presto-main/src/main/java/io/prestosql/testing/TestingTaskContext.java b/presto-main/src/main/java/io/prestosql/testing/TestingTaskContext.java index 1cd4bba04..d1f584ab8 100644 --- a/presto-main/src/main/java/io/prestosql/testing/TestingTaskContext.java +++ b/presto-main/src/main/java/io/prestosql/testing/TestingTaskContext.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.testing; import io.airlift.stats.GcMonitor; diff --git a/presto-spi/src/main/java/io/prestosql/spi/connector/classloader/ClassLoaderSafeConnectorPageSink.java b/presto-spi/src/main/java/io/prestosql/spi/connector/classloader/ClassLoaderSafeConnectorPageSink.java index 7e9656d85..bc43bccdf 100644 --- a/presto-spi/src/main/java/io/prestosql/spi/connector/classloader/ClassLoaderSafeConnectorPageSink.java +++ b/presto-spi/src/main/java/io/prestosql/spi/connector/classloader/ClassLoaderSafeConnectorPageSink.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.spi.connector.classloader; import io.airlift.slice.Slice; diff --git a/presto-spi/src/main/java/io/prestosql/spi/connector/classloader/ClassLoaderSafeConnectorPageSourceProvider.java b/presto-spi/src/main/java/io/prestosql/spi/connector/classloader/ClassLoaderSafeConnectorPageSourceProvider.java index 12cf3c521..b3b157d4c 100644 --- a/presto-spi/src/main/java/io/prestosql/spi/connector/classloader/ClassLoaderSafeConnectorPageSourceProvider.java +++ b/presto-spi/src/main/java/io/prestosql/spi/connector/classloader/ClassLoaderSafeConnectorPageSourceProvider.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.spi.connector.classloader; import io.prestosql.spi.classloader.ThreadContextClassLoader; diff --git a/presto-spi/src/main/java/io/prestosql/spi/function/GroupedAccumulatorState.java b/presto-spi/src/main/java/io/prestosql/spi/function/GroupedAccumulatorState.java index ad48d1b15..de063943e 100644 --- a/presto-spi/src/main/java/io/prestosql/spi/function/GroupedAccumulatorState.java +++ b/presto-spi/src/main/java/io/prestosql/spi/function/GroupedAccumulatorState.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.spi.function; public interface GroupedAccumulatorState diff --git a/presto-spi/src/main/java/io/prestosql/spi/snapshot/BlockEncodingSerdeProvider.java b/presto-spi/src/main/java/io/prestosql/spi/snapshot/BlockEncodingSerdeProvider.java index e7d2abb53..9e8b29a3b 100644 --- a/presto-spi/src/main/java/io/prestosql/spi/snapshot/BlockEncodingSerdeProvider.java +++ b/presto-spi/src/main/java/io/prestosql/spi/snapshot/BlockEncodingSerdeProvider.java @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.spi.snapshot; import io.prestosql.spi.block.BlockEncodingSerde; diff --git a/presto-spi/src/main/java/io/prestosql/spi/snapshot/MarkerPage.java b/presto-spi/src/main/java/io/prestosql/spi/snapshot/MarkerPage.java index 86c0b0469..bfca57856 100644 --- a/presto-spi/src/main/java/io/prestosql/spi/snapshot/MarkerPage.java +++ b/presto-spi/src/main/java/io/prestosql/spi/snapshot/MarkerPage.java @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.spi.snapshot; import com.google.common.primitives.Longs; diff --git a/presto-spi/src/main/java/io/prestosql/spi/snapshot/Restorable.java b/presto-spi/src/main/java/io/prestosql/spi/snapshot/Restorable.java index b38091dc7..19d80a17d 100644 --- a/presto-spi/src/main/java/io/prestosql/spi/snapshot/Restorable.java +++ b/presto-spi/src/main/java/io/prestosql/spi/snapshot/Restorable.java @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.spi.snapshot; /** diff --git a/presto-spi/src/main/java/io/prestosql/spi/snapshot/RestorableConfig.java b/presto-spi/src/main/java/io/prestosql/spi/snapshot/RestorableConfig.java index 70bada1c7..2cb2283cd 100644 --- a/presto-spi/src/main/java/io/prestosql/spi/snapshot/RestorableConfig.java +++ b/presto-spi/src/main/java/io/prestosql/spi/snapshot/RestorableConfig.java @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package io.prestosql.spi.snapshot; import java.lang.annotation.ElementType; @@ -21,7 +22,7 @@ /** * Help to clarify snapshot support of the annotated class: - * - unsupported: controls whether the class is expeccted to be involved in snapshot. Default is false. + * - unsupported: controls whether the class is expected to be involved in snapshot. Default is false. * - stateClassName: name of state class, the result of capturing the annotated class. Default is class name with State suffix. * The state class can also be omitted if there are 0 or 1 fields to capture. * - baseClassStateName: name of field in stateClass that corresponds to result of "super.capture()". Default is "baseState".