accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joshelser <...@git.apache.org>
Subject [GitHub] accumulo pull request #168: ACCUMULO-4501 (work in progress) Very simple imp...
Date Mon, 17 Oct 2016 14:23:14 GMT
Github user joshelser commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/168#discussion_r83653991
  
    --- Diff: core/src/main/java/org/apache/accumulo/core/file/rfile/RFile.java ---
    @@ -374,7 +380,42 @@ public void flushIfNeeded() throws IOException {
         }
       }
     
    -  private static class LocalityGroupWriter {
    +  private static class VisibilityHistogramLocalityGroupWriter {
    +    private final HashMap<Text,AtomicLong> histogram;
    +    private final LocalityGroupWriter lgr;
    +
    +    private ThreadLocal<Text> buffer = new ThreadLocal<Text>() {
    +      @Override public Text initialValue() {
    +        return new Text();
    +      }
    +    };
    +
    +    public VisibilityHistogramLocalityGroupWriter(LocalityGroupWriter lgr) {
    +      this.lgr = lgr;
    +      this.histogram = new HashMap<>(); 
    +    }
    +
    +    public void append(Key key, Value value) throws IOException {
    +      Text _text = buffer.get();
    +      key.getColumnFamily(_text);
    --- End diff --
    
    Lol, bad copy-paste :)


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