drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chunhui-shi <...@git.apache.org>
Subject [GitHub] drill pull request #750: DRILL-5273: CompliantTextReader excessive memory us...
Date Wed, 22 Feb 2017 03:31:44 GMT
Github user chunhui-shi commented on a diff in the pull request:

    https://github.com/apache/drill/pull/750#discussion_r102377194
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/text/compliant/CompliantTextRecordReader.java
---
    @@ -118,12 +118,21 @@ public boolean apply(@Nullable SchemaPath path) {
        * @param outputMutator  Used to create the schema in the output record batch
        * @throws ExecutionSetupException
        */
    +  @SuppressWarnings("resource")
       @Override
       public void setup(OperatorContext context, OutputMutator outputMutator) throws ExecutionSetupException
{
     
         oContext = context;
    -    readBuffer = context.getManagedBuffer(READ_BUFFER);
    -    whitespaceBuffer = context.getManagedBuffer(WHITE_SPACE_BUFFER);
    +    // Note: DO NOT use managed buffers here. They remain in existence
    +    // until the fragment is shut down. The buffers here are large.
    --- End diff --
    
    I think the reason you chose to use context.getAllocator() was you don't want to fragmentize
managed buffer?
    Otherwise you might just call readBuffer.close()? Was there any problem with managed buffer's
release? Just curious about the "DO NOT use managed buffer here" part. Besides that, +1.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message