io.druid.java.util.common.logger.Logger类的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(5.6k)|赞(0)|评价(0)|浏览(267)

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

Logger介绍

暂无

代码示例

代码示例来源:origin: io.druid/java-util

@Override
 public void stop()
 {
  log.info("Closing object[%s]", o);
  try {
   o.close();
  }
  catch (Exception e) {
   log.error(e, "Exception when closing object [%s]", o);
  }
 }
}

代码示例来源:origin: io.druid/druid-indexing-hadoop

@Override
 public void abortTask(TaskAttemptContext taskContext) throws IOException
 {
  log.warn("Aborting task. Nothing to clean up.");
 }
};

代码示例来源:origin: io.druid/druid-server

@Override
public void removeCounter(String name)
{
 if (log.isDebugEnabled()) {
  log.debug("Ignoring request to remove [%s]", name);
 }
}

代码示例来源:origin: io.druid.extensions/druid-kafka-extraction-namespace

@Override
 public void onFailure(Throwable t)
 {
  if (t instanceof CancellationException) {
   LOG.debug("Topic [%s] cancelled", topic);
  } else {
   LOG.error(t, "Error in listening to [%s]", topic);
  }
 }
},

代码示例来源:origin: io.druid/druid-server

public void unregister(String serviceName)
 {
  log.info("Unregistering EventReceiverFirehoseMetric for service [%s]", serviceName);
  if (metrics.remove(serviceName) == null) {
   log.warn("Unregistering a non-exist service. Service [%s] never exists.", serviceName);
  }
 }
}

代码示例来源:origin: io.druid/druid-server

public HybridCache(HybridCacheConfig config, Cache level1, Cache level2)
{
 this.config = config;
 log.info("Config: %s", config);
 this.level1 = level1;
 this.level2 = level2;
}

代码示例来源:origin: io.druid.extensions/druid-examples

@Override
public void onException(Exception ex)
{
 log.error(ex, "Got exception");
}

代码示例来源:origin: io.druid/druid-server

@Override
public void addHistogram(String name)
{
 log.debug("Ignoring add histogram [%s]", name);
}

代码示例来源:origin: io.druid/druid-integration-tests

public static boolean isInstanceReady(ServerDiscoverySelector serviceProvider)
{
 try {
  Server instance = serviceProvider.pick();
  if (instance == null) {
   LOG.warn("Unable to find a host");
   return false;
  }
 }
 catch (Exception e) {
  LOG.error(e, "Caught exception waiting for host");
  return false;
 }
 return true;
}

代码示例来源:origin: io.druid/druid-server

@Override
 public DruidCoordinatorRuntimeParams run(DruidCoordinatorRuntimeParams params)
 {
  log.info("Starting coordination. Getting available segments.");

  // Display info about all available segments
  final Set<DataSegment> availableSegments = coordinator.getOrderedAvailableDataSegments();
  if (log.isDebugEnabled()) {
   log.debug("Available DataSegments");
   for (DataSegment dataSegment : availableSegments) {
    log.debug("  %s", dataSegment);
   }
  }

  log.info("Found [%,d] available segments.", availableSegments.size());

  return params.buildFromExisting()
         .withAvailableSegments(availableSegments)
         .build();
 }
}

代码示例来源:origin: io.druid/java-util

private static void awaitNextRetry(final Throwable e, final int nTry, final boolean quiet) throws InterruptedException
{
 final long sleepMillis = nextRetrySleepMillis(nTry);
 if (quiet) {
  log.debug(e, "Failed on try %d, retrying in %,dms.", nTry, sleepMillis);
 } else {
  log.warn(e, "Failed on try %d, retrying in %,dms.", nTry, sleepMillis);
 }
 Thread.sleep(sleepMillis);
}

代码示例来源:origin: io.druid/java-util

@Override
public void channelDisconnected(ChannelHandlerContext context, ChannelStateEvent event) throws Exception
{
 if (log.isDebugEnabled()) {
  log.debug("[%s] Channel disconnected", requestDesc);
 }
 // response is non-null if we received initial chunk and then exception occurs
 if (response != null) {
  handler.exceptionCaught(response, new ChannelException("Channel disconnected"));
 }
 channel.close();
 channelResourceContainer.returnResource();
 if (!retVal.isDone()) {
  log.warn("[%s] Channel disconnected before response complete", requestDesc);
  retVal.setException(new ChannelException("Channel disconnected"));
 }
 context.sendUpstream(event);
}

代码示例来源:origin: io.druid/druid-server

@LifecycleStop
public void stop()
{
 synchronized (startStopSync) {
  if (!started) {
   LOG.debug("Already stopped, ignoring");
   return;
  }
  announcer.unannounce(announcePath);
  LOG.info("Unannouncing start time on [%s]", announcePath);
  started = false;
 }
}

代码示例来源:origin: io.druid/java-util

public LoggingEmitter(LoggingEmitterConfig config, ObjectMapper jsonMapper)
{
 this(new Logger(config.getLoggerClass()), Level.toLevel(config.getLogLevel()), jsonMapper);
}

代码示例来源:origin: io.druid/druid-server

@Inject
public LocalDataSegmentPusher(LocalDataSegmentPusherConfig config, ObjectMapper jsonMapper)
{
 this.config = config;
 this.jsonMapper = jsonMapper;
 log.info("Configured local filesystem as deep storage");
}

代码示例来源:origin: io.druid.extensions/druid-basic-security

@Override
 public void exceptionCaught(
   ClientResponse<StatusResponseHolder> clientResponse, Throwable e
 )
 {
  // Its safe to Ignore as the ClientResponse returned in handleChunk were unfinished
  log.error(e, "exceptionCaught in CommonCacheNotifier ResponseHandler.");
 }
}

代码示例来源:origin: io.druid/druid-server

@Override
 public void updateHistogram(String name, int amount)
 {
  log.debug("Ignoring update histogram [%s]: %d", name, amount);
 }
};

代码示例来源:origin: io.druid/druid-server

@Override
 public void stop()
 {
  try {
   log.info("Stopping Jetty Server...");
   server.stop();
  }
  catch (Exception e) {
   log.warn(e, "Unable to stop Jetty server.");
  }
 }
}

代码示例来源:origin: io.druid/druid-server

@LifecycleStop
 public void stop()
 {
  if (log4jShutdown != null) {
   log.debug("Shutting down log4j");
   log4jShutdown.stop();
  } else {
   log.warn("Log4j shutdown was registered in lifecycle but no shutdown object exists!");
  }
 }
}

代码示例来源:origin: io.druid/java-util

@Override
 public void stop()
 {
  log.info("Stopping object[%s]", o);
  try {
   stopMethod.invoke(o);
  }
  catch (Exception e) {
   log.error(e, "Unable to invoke stopMethod() on %s", o.getClass());
  }
 }
}

相关文章