[GitHub] carbondata pull request #2970: [CARBONDATA-3142]Add timestamp with thread na...

classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2970: [CARBONDATA-3142]Add timestamp with thread name whic...

qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2970
 
    Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/2155/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #2970: [CARBONDATA-3142]Add timestamp with thread na...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user asfgit closed the pull request at:

    https://github.com/apache/carbondata/pull/2970


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #2970: [CARBONDATA-3142]Add timestamp with thread na...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user qiuchenjian commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2970#discussion_r244065663
 
    --- 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 --
   
    @xuchuanyin Because currentTimeMillis is absolute time, nanoTime is not


---
12