drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Rogers (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-5016) drill.exec.sort.purge.threshold is misnamed
Date Tue, 08 Nov 2016 19:05:58 GMT
Paul Rogers created DRILL-5016:
----------------------------------

             Summary: drill.exec.sort.purge.threshold is misnamed
                 Key: DRILL-5016
                 URL: https://issues.apache.org/jira/browse/DRILL-5016
             Project: Apache Drill
          Issue Type: Bug
    Affects Versions: 1.8.0
            Reporter: Paul Rogers
            Priority: Minor


The Drill config system provides a property called {{drill.exec.sort.purge.threshold}}. The
name suggests that this is a parameter related to sorting. Perhaps it controls something having
to do with when we purge buffered batches from memory in the ExternalSortBatch?

In fact, this is actually {{drill.exec.topn.purge-threshold}} - it affects only the Top-N
operator, not sort.

To make this change, rename the config attribute in {{ExecConstants}} from

{code}
  String BATCH_PURGE_THRESHOLD = "drill.exec.sort.purge.threshold";
{code}

to:

{code}
  String TOP_N_PURGE_THRESHOLD = "drill.exec.topn.purge-threshold";
{code}

To permit backward compatibility, modify the use in TopNBatch to check the old value, use
it if set, else use the new value.

{code}
    // Check pre x.y config parameter for backward compatibility.

    if ( ! context.getConfig( ).isEmpty( "drill.exec.sort.purge.threshold" ) ) {
      batchPurgeThreshold = context.getConfig().getInt("drill.exec.sort.purge.threshold");
    } else {
      batchPurgeThreshold = context.getConfig().getInt(ExecConstants. TOP_N_PURGE_THRESHOLD);
    }
{code}




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message