accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubbsii <...@git.apache.org>
Subject [GitHub] accumulo pull request #292: ACCUMULO-4681 Created Table & Namespace WeakRefe...
Date Wed, 16 Aug 2017 00:27:56 GMT
Github user ctubbsii commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/292#discussion_r133333221
  
    --- Diff: core/src/main/java/org/apache/accumulo/core/data/impl/KeyExtent.java ---
    @@ -60,28 +58,11 @@
     
     public class KeyExtent implements WritableComparable<KeyExtent> {
     
    -  private static final WeakHashMap<Table.ID,WeakReference<Table.ID>> tableIds
= new WeakHashMap<>();
    -
    -  private static Table.ID dedupeTableId(Table.ID tableId) {
    -    synchronized (tableIds) {
    -      WeakReference<Table.ID> etir = tableIds.get(tableId);
    -      if (etir != null) {
    -        Table.ID eti = etir.get();
    -        if (eti != null) {
    -          return eti;
    -        }
    -      }
    -
    -      tableIds.put(tableId, new WeakReference<>(tableId));
    -      return tableId;
    -    }
    -  }
    -
       private Table.ID tableId;
       private Text textEndRow;
       private Text textPrevEndRow;
     
    -  private final Table.ID EMPTY_ID = new Table.ID("");
    +  private final Table.ID EMPTY_ID = Table.ID.of("");
    --- End diff --
    
    This could be static.


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