accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From keith-turner <...@git.apache.org>
Subject [GitHub] accumulo pull request #106: ACCUMULO-4153: Update the getCodec method to no ...
Date Wed, 01 Jun 2016 19:58:22 GMT
Github user keith-turner commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/106#discussion_r65431073
  
    --- Diff: core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/Compression.java
---
    @@ -139,46 +168,82 @@ public synchronized OutputStream createCompressionStream(OutputStream
downStream
             } else {
               bos1 = downStream;
             }
    -        conf.setInt("io.compression.codec.lzo.buffersize", 64 * 1024);
             CompressionOutputStream cos = codec.createOutputStream(bos1, compressor);
             BufferedOutputStream bos2 = new BufferedOutputStream(new FinishOnFlushCompressionStream(cos),
DATA_OBUF_SIZE);
             return bos2;
           }
    +
         },
     
         GZ(COMPRESSION_GZ) {
    -      private transient DefaultCodec codec;
     
    -      @Override
    -      synchronized CompressionCodec getCodec() {
    -        if (codec == null) {
    -          codec = new DefaultCodec();
    -          codec.setConf(conf);
    -        }
    +      private DefaultCodec codec = null;
    --- End diff --
    
    maybe volatile also


---
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