Uploaded image for project: 'Usergrid (Retired)'
  1. Usergrid (Retired)
  2. USERGRID-1245

Find alternative to com.clearspring.analytics

Details

    • Story
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.0
    • 2.2.0
    • None
    • None

    Description

      com.clearspring.analytics.hash.MurmurHash is found in the fasterutil dependency which is 16MB. We want to pare down the size of the REST WAR file. Let's see if there is an alternative.

      Here is the maven dependency:

          <dependency>
            <groupId>com.clearspring.analytics</groupId>
            <artifactId>stream</artifactId>
            <version>2.7.0</version>
          </dependency>
      

      Look for the com.clearspring.analytics package. Seems to be used in GCM Adapter:

         private Batch getBatch( Map<String, Object> payload) {
             synchronized (this) {
                 long hash = MurmurHash.hash64(payload);
                 Batch batch = batches.get(hash);
                 if (batch == null && payload != null) {
                     batch = new Batch(notifier, payload);
                     batches.put(hash, batch);
                 }
                 return batch;
             }
         }
      

      Also the CountMinSketch is used from this dependency:

      org/apache/usergrid/services/notifications/impl/ApplicationQueueManagerImpl.java:111

      final CountMinSketch sketch = new CountMinSketch(0.0001,.99,7364181); //add probablistic counter to find dups
      

      Attachments

        Activity

          People

            mrusso Michael Russo
            jeffreyawest Jeffrey West
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: