Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/611#discussion_r86586473
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/columnreaders/ColumnReader.java
 ---
    @@ -258,4 +295,74 @@ public static int readIntLittleEndian(DrillBuf in, int 
offset) {
         return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4 << 0));
       }
     
    +  private class ColumnReaderProcessPagesTask implements Callable<Long> {
    +
    +    private final ColumnReader parent = ColumnReader.this;
    +    private final long recordsToReadInThisPass;
    +
    +    public ColumnReaderProcessPagesTask(long recordsToReadInThisPass){
    +      this.recordsToReadInThisPass = recordsToReadInThisPass;
    +    }
    +
    +    @Override public Long call() throws IOException{
    +
    +      String oldname = Thread.currentThread().getName();
    +      
Thread.currentThread().setName(oldname+"Decode-"+this.parent.columnChunkMetaData.toString());
    +
    +      this.parent.processPages(recordsToReadInThisPass);
    +
    +      Thread.currentThread().setName(oldname);
    +      return recordsToReadInThisPass;
    +    }
    +
    +  }
    +
    +  /*
    +  private class ColumnReaderDetermineSizeTask implements Callable<Boolean> 
{
    +
    +    private final ColumnReader parent = ColumnReader.this;
    +    private final long recordsReadInCurrentPass;
    +    private final Integer lengthVarFieldsInCurrentRecord;
    +
    +    public ColumnReaderDetermineSizeTask(long recordsReadInCurrentPass, 
Integer lengthVarFieldsInCurrentRecord){
    +      this.recordsReadInCurrentPass = recordsReadInCurrentPass;
    +      this.lengthVarFieldsInCurrentRecord = lengthVarFieldsInCurrentRecord;
    +    }
    +
    +    @Override public Boolean call() throws IOException{
    +
    +      String oldname = Thread.currentThread().getName();
    +      
Thread.currentThread().setName(oldname+"Decode-"+this.parent.columnChunkMetaData.toString());
    +
    +      boolean b = this.parent.determineSize(recordsReadInCurrentPass, 
lengthVarFieldsInCurrentRecord);
    +
    +      Thread.currentThread().setName(oldname);
    +      return b;
    +    }
    +
    +  }
    +  */
    +
    +  private class ColumnReaderReadRecordsTask implements Callable<Integer> {
    +
    +    private final ColumnReader parent = ColumnReader.this;
    +    private final int recordsToRead;
    +
    +    public ColumnReaderReadRecordsTask(int recordsToRead){
    +      this.recordsToRead = recordsToRead;
    +    }
    +
    +    @Override public Integer call() throws IOException{
    +
    +      String oldname = Thread.currentThread().getName();
    --- End diff --
    
    Same comment as above about exception-safety on the thread name.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to