Github user qiuchenjian commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2970#discussion_r240447425
  
    --- Diff: 
core/src/main/java/org/apache/carbondata/core/util/CarbonThreadFactory.java ---
    @@ -34,14 +34,26 @@
        */
       private String name;
     
    +  private boolean withTime = false;
    +
       public CarbonThreadFactory(String name) {
         this.defaultFactory = Executors.defaultThreadFactory();
         this.name = name;
       }
     
    +  public CarbonThreadFactory(String name, boolean withTime) {
    +    this(name);
    +    this.withTime = withTime;
    +  }
    +
       @Override public Thread newThread(Runnable r) {
         final Thread thread = defaultFactory.newThread(r);
    -    thread.setName(name);
    +    if (withTime) {
    +      thread.setName(name + "_" + System.currentTimeMillis());
    --- End diff --
    
    @xubo245  
    timestamp is different for diff thread, bacause ms is fine-gained and  
Thread pool creates thread one by one normally。
    timestamp is more useful than uuid, it indicates creation time


---

Reply via email to