io.airlift.log.Logger.debug()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(7.1k)|赞(0)|评价(0)|浏览(244)

本文整理了Java中io.airlift.log.Logger.debug()方法的一些代码示例,展示了Logger.debug()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.debug()方法的具体详情如下:
包路径:io.airlift.log.Logger
类名称:Logger
方法名:debug

Logger.debug介绍

[英]Logs a message at DEBUG level.
[中]在调试级别记录消息。

代码示例

代码示例来源:origin: prestodb/presto

  1. @Override
  2. public void stateChanged(TaskState newState)
  3. {
  4. log.debug("Task %s is %s", taskId, newState);
  5. }
  6. });

代码示例来源:origin: prestodb/presto

  1. private boolean endOfData()
  2. {
  3. if (!reported.getAndSet(true)) {
  4. log.debug("Read a total of %d values with %d bytes.", totalValues, totalBytes);
  5. }
  6. return false;
  7. }

代码示例来源:origin: prestodb/presto

  1. protected void execute(Connection connection, String query)
  2. throws SQLException
  3. {
  4. try (Statement statement = connection.createStatement()) {
  5. log.debug("Execute: %s", query);
  6. statement.execute(query);
  7. }
  8. }

代码示例来源:origin: prestodb/presto

  1. private static List<File> listFiles(File dir)
  2. {
  3. if ((dir != null) && dir.isDirectory()) {
  4. File[] files = dir.listFiles();
  5. if (files != null) {
  6. log.debug("Considering files: %s", asList(files));
  7. return ImmutableList.copyOf(files);
  8. }
  9. }
  10. return ImmutableList.of();
  11. }

代码示例来源:origin: prestodb/presto

  1. private static List<File> listFiles(File dir)
  2. {
  3. if ((dir != null) && dir.isDirectory()) {
  4. File[] files = dir.listFiles();
  5. if (files != null) {
  6. log.debug("Considering files: %s", asList(files));
  7. return ImmutableList.copyOf(files);
  8. }
  9. }
  10. return ImmutableList.of();
  11. }

代码示例来源:origin: prestodb/presto

  1. private static boolean smallestCardAboveThreshold(ConnectorSession session, long numRows, long smallestCardinality)
  2. {
  3. double ratio = ((double) smallestCardinality / (double) numRows);
  4. double threshold = getIndexSmallCardThreshold(session);
  5. LOG.debug("Smallest cardinality is %d, num rows is %d, ratio is %2f with threshold of %f", smallestCardinality, numRows, ratio, threshold);
  6. return ratio > threshold;
  7. }

代码示例来源:origin: prestodb/presto

  1. @Override
  2. public void fallbackToNFA()
  3. {
  4. log.debug("Fallback to NFA, pattern: %s, DFA states limit: %d, DFA retries: %d", re2jPattern.pattern(), dfaStatesLimit, dfaRetries);
  5. }
  6. }

代码示例来源:origin: prestodb/presto

  1. private URLClassLoader buildClassLoaderFromDirectory(File dir)
  2. throws Exception
  3. {
  4. log.debug("Classpath for %s:", dir.getName());
  5. List<URL> urls = new ArrayList<>();
  6. for (File file : listFiles(dir)) {
  7. log.debug(" %s", file);
  8. urls.add(file.toURI().toURL());
  9. }
  10. return createClassLoader(urls);
  11. }

代码示例来源:origin: prestodb/presto

  1. @Override
  2. public void cancelQuery(QueryId queryId)
  3. {
  4. log.debug("Cancel query %s", queryId);
  5. queryTracker.tryGetQuery(queryId)
  6. .ifPresent(QueryExecution::cancelQuery);
  7. }

代码示例来源:origin: prestodb/presto

  1. private static AWSCredentialsProvider getCustomAWSCredentialsProvider(URI uri, Configuration conf, String providerClass)
  2. {
  3. try {
  4. log.debug("Using AWS credential provider %s for URI %s", providerClass, uri);
  5. return conf.getClassByName(providerClass)
  6. .asSubclass(AWSCredentialsProvider.class)
  7. .getConstructor(URI.class, Configuration.class)
  8. .newInstance(uri, conf);
  9. }
  10. catch (ReflectiveOperationException e) {
  11. throw new RuntimeException(format("Error creating an instance of %s for URI %s", providerClass, uri), e);
  12. }
  13. }

代码示例来源:origin: prestodb/presto

  1. @Inject
  2. RedisMetadata(
  3. RedisConnectorId connectorId,
  4. RedisConnectorConfig redisConnectorConfig,
  5. Supplier<Map<SchemaTableName, RedisTableDescription>> redisTableDescriptionSupplier)
  6. {
  7. this.connectorId = requireNonNull(connectorId, "connectorId is null").toString();
  8. requireNonNull(redisConnectorConfig, "redisConfig is null");
  9. hideInternalColumns = redisConnectorConfig.isHideInternalColumns();
  10. log.debug("Loading redis table definitions from %s", redisConnectorConfig.getTableDescriptionDir().getAbsolutePath());
  11. this.redisTableDescriptionSupplier = Suppliers.memoize(redisTableDescriptionSupplier::get)::get;
  12. }

代码示例来源:origin: prestodb/presto

  1. @Override
  2. public MongoTableHandle getTableHandle(ConnectorSession session, SchemaTableName tableName)
  3. {
  4. requireNonNull(tableName, "tableName is null");
  5. try {
  6. return mongoSession.getTable(tableName).getTableHandle();
  7. }
  8. catch (TableNotFoundException e) {
  9. log.debug(e, "Table(%s) not found", tableName);
  10. return null;
  11. }
  12. }

代码示例来源:origin: prestodb/presto

  1. public TaskInfo abortTaskResults(OutputBufferId bufferId)
  2. {
  3. requireNonNull(bufferId, "bufferId is null");
  4. log.debug("Aborting task %s output %s", taskId, bufferId);
  5. outputBuffer.abort(bufferId);
  6. return getTaskInfo();
  7. }

代码示例来源:origin: prestodb/presto

  1. @Override
  2. public void cancelStage(StageId stageId)
  3. {
  4. requireNonNull(stageId, "stageId is null");
  5. log.debug("Cancel stage %s", stageId);
  6. queryTracker.tryGetQuery(stageId.getQueryId())
  7. .ifPresent(query -> query.cancelStage(stageId));
  8. }

代码示例来源:origin: prestodb/presto

  1. @Inject
  2. public ColumnCardinalityCache(Connector connector, AccumuloConfig config)
  3. {
  4. this.connector = requireNonNull(connector, "connector is null");
  5. int size = requireNonNull(config, "config is null").getCardinalityCacheSize();
  6. Duration expireDuration = config.getCardinalityCacheExpiration();
  7. // Create a bounded executor with a pool size at 4x number of processors
  8. this.coreExecutor = newCachedThreadPool(daemonThreadsNamed("cardinality-lookup-%s"));
  9. this.executorService = new BoundedExecutor(coreExecutor, 4 * Runtime.getRuntime().availableProcessors());
  10. LOG.debug("Created new cache size %d expiry %s", size, expireDuration);
  11. cache = CacheBuilder.newBuilder()
  12. .maximumSize(size)
  13. .expireAfterWrite(expireDuration.toMillis(), MILLISECONDS)
  14. .build(new CardinalityCacheLoader());
  15. }

代码示例来源:origin: prestodb/presto

  1. public boolean transitionToFailed(Throwable throwable)
  2. {
  3. requireNonNull(throwable, "throwable is null");
  4. failureCause.compareAndSet(null, Failures.toFailure(throwable));
  5. boolean failed = stageState.setIf(FAILED, currentState -> !currentState.isDone());
  6. if (failed) {
  7. log.error(throwable, "Stage %s failed", stageId);
  8. }
  9. else {
  10. log.debug(throwable, "Failure after stage %s finished", stageId);
  11. }
  12. return failed;
  13. }

代码示例来源:origin: prestodb/presto

  1. private boolean endOfData()
  2. {
  3. if (!reported.getAndSet(true)) {
  4. log.debug("Found a total of %d messages with %d bytes (%d messages expected). Last Offset: %d (%d, %d)",
  5. totalMessages, totalBytes, split.getEnd() - split.getStart(),
  6. cursorOffset, split.getStart(), split.getEnd());
  7. }
  8. return false;
  9. }

代码示例来源:origin: prestodb/presto

  1. public static <T> Class<? extends T> defineClass(ClassDefinition classDefinition, Class<T> superType, DynamicClassLoader classLoader)
  2. {
  3. log.debug("Defining class: %s", classDefinition.getName());
  4. return classGenerator(classLoader).defineClass(classDefinition, superType);
  5. }
  6. }

代码示例来源:origin: prestodb/presto

  1. public KuduTable openTable(SchemaTableName schemaTableName)
  2. {
  3. String rawName = schemaEmulation.toRawName(schemaTableName);
  4. try {
  5. return client.openTable(rawName);
  6. }
  7. catch (KuduException e) {
  8. log.debug("Error on doOpenTable: " + e, e);
  9. if (!listSchemaNames().contains(schemaTableName.getSchemaName())) {
  10. throw new SchemaNotFoundException(schemaTableName.getSchemaName());
  11. }
  12. throw new TableNotFoundException(schemaTableName);
  13. }
  14. }

代码示例来源:origin: prestodb/presto

  1. /**
  2. * Move the task directly to the failed state if there was a failure in this task
  3. */
  4. private void failTask(Throwable cause)
  5. {
  6. TaskStatus taskStatus = getTaskStatus();
  7. if (!taskStatus.getState().isDone()) {
  8. log.debug(cause, "Remote task %s failed with %s", taskStatus.getSelf(), cause);
  9. }
  10. abort(failWith(getTaskStatus(), FAILED, ImmutableList.of(toFailure(cause))));
  11. }

相关文章