Package co.cask.cdap.logging.filter

Examples of co.cask.cdap.logging.filter.Filter$EmptyFilter


        @Override
        public void run() {
          callback.init();

          try {
            Filter logFilter = new AndFilter(ImmutableList.of(LoggingContextHelper.createFilter(loggingContext),
                                                              filter));
            long fromTimeMs = fromOffset + 1;

            SortedMap<Long, Location> sortedFiles = fileMetaDataManager.listFiles(loggingContext);
            if (sortedFiles.isEmpty()) {
View Full Code Here


    executor.submit(new Runnable() {
      @Override
      public void run() {
        callback.init();
        try {
          Filter logFilter = new AndFilter(ImmutableList.of(LoggingContextHelper.createFilter(loggingContext),
                                                            filter));

          SortedMap<Long, Location> sortedFiles =
            ImmutableSortedMap.copyOf(fileMetaDataManager.listFiles(loggingContext), Collections.<Long>reverseOrder());
          if (sortedFiles.isEmpty()) {
View Full Code Here

      new Runnable() {
        @Override
        public void run() {
          callback.init();
          try {
            Filter logFilter = new AndFilter(ImmutableList.of(LoggingContextHelper.createFilter(loggingContext),
                                                              filter));

            SortedMap<Long, Location> sortedFiles = fileMetaDataManager.listFiles(loggingContext);
            if (sortedFiles.isEmpty()) {
              return;
View Full Code Here

          callback.init();

          KafkaConsumer kafkaConsumer = new KafkaConsumer(seedBrokers, topic, partition, kafkaTailFetchTimeoutMs);
          try {
            Filter logFilter = new AndFilter(ImmutableList.of(LoggingContextHelper.createFilter(loggingContext),
                                                              filter));

            long latestOffset = kafkaConsumer.fetchOffset(KafkaConsumer.Offset.LATEST);
            long startOffset = fromOffset + 1;
View Full Code Here

          callback.init();

          KafkaConsumer kafkaConsumer = new KafkaConsumer(seedBrokers, topic, partition, kafkaTailFetchTimeoutMs);
          try {
            Filter logFilter = new AndFilter(ImmutableList.of(LoggingContextHelper.createFilter(loggingContext),
                                                              filter));

            long latestOffset = kafkaConsumer.fetchOffset(KafkaConsumer.Offset.LATEST);
            long earliestOffset = kafkaConsumer.fetchOffset(KafkaConsumer.Offset.EARLIEST);
            long stopOffset;
View Full Code Here

        @Override
        public void run() {

          callback.init();
          try {
            Filter logFilter = new AndFilter(ImmutableList.of(LoggingContextHelper.createFilter(loggingContext),
                                                              filter));

            SortedMap<Long, Location> sortedFiles = fileMetaDataManager.listFiles(loggingContext);
            long prevInterval = -1;
            Location prevFile = null;
View Full Code Here

    try {
      LogRequestArguments logArgs = decodeLogArgs(request);
      long fromTimeMs = logArgs.getFromTimeMs();
      long toTimeMs = logArgs.getToTimeMs();
      boolean escape = logArgs.getEscape();
      Filter filter = FilterParser.parse(logArgs.getFilter());

      if (fromTimeMs < 0 || toTimeMs < 0 || toTimeMs <= fromTimeMs) {
        responder.sendStatus(HttpResponseStatus.BAD_REQUEST);
        return;
      }
View Full Code Here

      // Parse start, stop, filter and escape
      LogRequestArguments logArgs = decodeLogArgs(request);
      long fromTimeMs = logArgs.getFromTimeMs();
      long toTimeMs = logArgs.getToTimeMs();
      boolean escape = logArgs.getEscape();
      Filter filter = FilterParser.parse(logArgs.getFilter());

      if (fromTimeMs < 0 || toTimeMs < 0 || toTimeMs <= fromTimeMs) {
        responder.sendStatus(HttpResponseStatus.BAD_REQUEST);
        return;
      }
View Full Code Here

    try {
      LogRequestArguments logArgs = decodeLogArgs(request);
      int maxEvents = logArgs.getMaxEvents();
      long fromOffset = logArgs.getFromOffset();
      boolean escape = logArgs.getEscape();
      Filter filter = FilterParser.parse(logArgs.getFilter());

      LoggingContext loggingContext = LoggingContextHelper.getLoggingContext(Constants.Logging.SYSTEM_NAME, componentId,
                                                                             serviceId);
      LogReaderCallback logCallback = new LogReaderCallback(responder, logPattern, escape);
      logReader.getLogNext(loggingContext, fromOffset, maxEvents, filter, logCallback);
View Full Code Here

      //Parse filter, max, offset and escape
      LogRequestArguments logArgs = decodeLogArgs(request);
      int maxEvents = logArgs.getMaxEvents();
      long fromOffset = logArgs.getFromOffset();
      boolean escape = logArgs.getEscape();
      Filter filter = FilterParser.parse(logArgs.getFilter());

      LoggingContext loggingContext =
        LoggingContextHelper.getLoggingContext(accountId, appId,
                                               entityId, getEntityType(EntityType.valueOf(entityType)));
      LogReaderCallback logCallback = new LogReaderCallback(responder, logPattern, escape);
View Full Code Here

TOP

Related Classes of co.cask.cdap.logging.filter.Filter$EmptyFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.