You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2019/08/14 03:08:11 UTC

[GitHub] [skywalking] xiongrl opened a new issue #3263: skywalking-6.3.0 es-strore recordDataTTL not work

xiongrl opened a new issue #3263: skywalking-6.3.0 es-strore  recordDataTTL not work
URL: https://github.com/apache/skywalking/issues/3263
 
 
   Please answer these questions before submitting your issue.
   
   - Why do you submit this issue?
   - [ ] Question or discussion
   - [ ] Bug
   - [ ] Requirement
   - [ ] Feature or performance improvement
   
   ___
   ### Question
   recordDataTTL notwork!
   -  storage:
         elasticsearch:
     	recordDataTTL: 45
   
   ```java
      RecordStreamProcessor.create(){
        Model model = modelSetter.putIfAbsent(recordClass, stream.scopeId(),
                   new Storage(stream.name(), true, true, Downsampling.Second), true);
     }
   
    public class ElasticsearchStorageTTL implements StorageTTL {
       @Override public TTLCalculator calculator(Downsampling downsampling) {
           switch (downsampling) {
               case Month:
                   return new MonthTTLCalculator();
               case Hour:
                   return new EsHourTTLCalculator();
               case Minute:
                   return new EsMinuteTTLCalculator();
               default:
                   return new DayTTLCalculator();
           }
       }
   }  
   public class DayTTLCalculator implements TTLCalculator {
   
       @Override public long timeBefore(DateTime currentTime, DataTTLConfig dataTTLConfig) {
           return Long.valueOf(currentTime.plusDays(0 - dataTTLConfig.getDayMetricsDataTTL()).toString("yyyyMMdd"));
       }
   }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services