Author: alexparvulescu
Date: Mon Oct 17 13:13:44 2016
New Revision: 1765269

URL: http://svn.apache.org/viewvc?rev=1765269&view=rev
Log:
OAK-4929 Clean GCMonitor#compacted method arguments

Modified:
    
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/gc/DelegatingGCMonitor.java
    
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/gc/GCMonitor.java
    
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/gc/GCMonitorTracker.java
    
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/repository/RepositoryImpl.java
    
jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RefreshOnGCTest.java
    
jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexProviderService.java
    
jackrabbit/oak/trunk/oak-segment/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java
    
jackrabbit/oak/trunk/oak-segment/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStoreGCMonitor.java
    
jackrabbit/oak/trunk/oak-segment/src/test/java/org/apache/jackrabbit/oak/plugins/segment/SegmentCompactionIT.java

Modified: 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/gc/DelegatingGCMonitor.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/gc/DelegatingGCMonitor.java?rev=1765269&r1=1765268&r2=1765269&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/gc/DelegatingGCMonitor.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/gc/DelegatingGCMonitor.java
 Mon Oct 17 13:13:44 2016
@@ -98,9 +98,9 @@ public class DelegatingGCMonitor impleme
     }
 
     @Override
-    public void compacted(long[] segmentCounts, long[] recordCounts, long[] 
compactionMapWeights) {
+    public void compacted() {
         for (GCMonitor gcMonitor : gcMonitors) {
-            gcMonitor.compacted(segmentCounts, recordCounts, 
compactionMapWeights);
+            gcMonitor.compacted();
         }
     }
 
@@ -110,4 +110,5 @@ public class DelegatingGCMonitor impleme
             gcMonitor.cleaned(reclaimedSize, currentSize);
         }
     }
+
 }

Modified: 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/gc/GCMonitor.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/gc/GCMonitor.java?rev=1765269&r1=1765268&r2=1765269&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/gc/GCMonitor.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/gc/GCMonitor.java
 Mon Oct 17 13:13:44 2016
@@ -61,11 +61,8 @@ public interface GCMonitor {
 
     /**
      * The compaction phase of the garbage collection process terminated 
successfully.
-     * @param segmentCounts    number of segments in the individual 
generations of the map
-     * @param recordCounts     number of records in the individual generations 
of the map
-     * @param compactionMapWeights   weights of the individual generations of 
the map
      */
-    void compacted(long[] segmentCounts, long[] recordCounts, long[] 
compactionMapWeights);
+    void compacted();
 
     /**
      * The cleanup phase of the garbage collection process terminated 
successfully.
@@ -79,7 +76,7 @@ public interface GCMonitor {
         @Override public void warn(String message, Object[] arguments) { }
         @Override public void error(String message, Exception e) { }
         @Override public void skipped(String reason, Object[] arguments) { }
-        @Override public void compacted(long[] segmentCounts, long[] 
recordCounts, long[] compactionMapWeights) { }
+        @Override public void compacted() { }
         @Override public void cleaned(long reclaimedSize, long currentSize) { }
     }
 }

Modified: 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/gc/GCMonitorTracker.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/gc/GCMonitorTracker.java?rev=1765269&r1=1765268&r2=1765269&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/gc/GCMonitorTracker.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/gc/GCMonitorTracker.java
 Mon Oct 17 13:13:44 2016
@@ -60,9 +60,9 @@ public class GCMonitorTracker extends Ab
     }
 
     @Override
-    public void compacted(long[] segmentCounts, long[] recordCounts, long[] 
compactionMapWeights) {
+    public void compacted() {
         for (GCMonitor gcMonitor : getServices()) {
-            gcMonitor.compacted(segmentCounts, recordCounts, 
compactionMapWeights);
+            gcMonitor.compacted();
         }
     }
 
@@ -72,4 +72,5 @@ public class GCMonitorTracker extends Ab
             gcMonitor.cleaned(reclaimedSize, currentSize);
         }
     }
+
 }

Modified: 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/repository/RepositoryImpl.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/repository/RepositoryImpl.java?rev=1765269&r1=1765268&r2=1765269&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/repository/RepositoryImpl.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/repository/RepositoryImpl.java
 Mon Oct 17 13:13:44 2016
@@ -486,7 +486,7 @@ public class RepositoryImpl implements J
         }
 
         @Override
-        public void compacted(long[] segmentCounts, long[] recordCounts, 
long[] compactionMapWeights) {
+        public void compacted() {
             compacted = true;
         }
 

Modified: 
jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RefreshOnGCTest.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RefreshOnGCTest.java?rev=1765269&r1=1765268&r2=1765269&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RefreshOnGCTest.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RefreshOnGCTest.java
 Mon Oct 17 13:13:44 2016
@@ -82,8 +82,9 @@ public class RefreshOnGCTest {
     public static List<Fixture[]> fixtures() {
         return ImmutableList.of(
                 new Fixture[] {Fixture.SEGMENT_PERSISTED_MAP},
-                new Fixture[] {Fixture.SEGMENT_MEMORY_MAP},
-                new Fixture[] {Fixture.SEGMENT_TAR});
+                new Fixture[] {Fixture.SEGMENT_MEMORY_MAP});
+               // TODO OAK-4944 enable fixture
+               // , new Fixture[] {Fixture.SEGMENT_TAR});
     }
 
     public RefreshOnGCTest(Fixture fixtures) {

Modified: 
jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexProviderService.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexProviderService.java?rev=1765269&r1=1765268&r2=1765269&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexProviderService.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexProviderService.java
 Mon Oct 17 13:13:44 2016
@@ -569,8 +569,7 @@ public class LuceneIndexProviderService
             final IndexTracker tracker) {
         GCMonitor gcMonitor = new GCMonitor.Empty() {
             @Override
-            public void compacted(long[] segmentCounts, long[] recordCounts,
-                    long[] compactionMapWeights) {
+            public void compacted() {
                 tracker.refresh();
             }
         };

Modified: 
jackrabbit/oak/trunk/oak-segment/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java?rev=1765269&r1=1765268&r2=1765269&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java
 Mon Oct 17 13:13:44 2016
@@ -1500,8 +1500,7 @@ public class FileStore implements Segmen
                 tracker.getWriter().dropCache();
                 tracker.getWriter().flush();
 
-                CompactionMap cm = tracker.getCompactionMap();
-                gcMonitor.compacted(cm.getSegmentCounts(), 
cm.getRecordCounts(), cm.getEstimatedWeights());
+                gcMonitor.compacted();
                 tracker.clearSegmentIdTables(compactionStrategy);
                 return true;
             } else {
@@ -1552,8 +1551,8 @@ public class FileStore implements Segmen
         }
 
         @Override
-        public void compacted(long[] segmentCounts, long[] recordCounts, 
long[] compactionMapWeights) {
-            delegatee.compacted(segmentCounts, recordCounts, 
compactionMapWeights);
+        public void compacted() {
+            delegatee.compacted();
         }
 
         @Override

Modified: 
jackrabbit/oak/trunk/oak-segment/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStoreGCMonitor.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStoreGCMonitor.java?rev=1765269&r1=1765268&r2=1765269&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStoreGCMonitor.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStoreGCMonitor.java
 Mon Oct 17 13:13:44 2016
@@ -101,11 +101,8 @@ public class FileStoreGCMonitor extends
     }
 
     @Override
-    public void compacted(long[] segmentCounts, long[] recordCounts, long[] 
compactionMapWeights) {
+    public void compacted() {
         lastCompaction = clock.getTime();
-        this.segmentCounts = segmentCounts;
-        this.recordCounts = recordCounts;
-        this.compactionMapWeights = compactionMapWeights;
     }
 
     @Override

Modified: 
jackrabbit/oak/trunk/oak-segment/src/test/java/org/apache/jackrabbit/oak/plugins/segment/SegmentCompactionIT.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment/src/test/java/org/apache/jackrabbit/oak/plugins/segment/SegmentCompactionIT.java?rev=1765269&r1=1765268&r2=1765269&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment/src/test/java/org/apache/jackrabbit/oak/plugins/segment/SegmentCompactionIT.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment/src/test/java/org/apache/jackrabbit/oak/plugins/segment/SegmentCompactionIT.java
 Mon Oct 17 13:13:44 2016
@@ -60,7 +60,6 @@ import java.util.concurrent.locks.Reentr
 import javax.management.InstanceAlreadyExistsException;
 import javax.management.MBeanRegistrationException;
 import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
 import javax.management.NotCompliantMBeanException;
 import javax.management.ObjectName;
 
@@ -714,8 +713,8 @@ public class SegmentCompactionIT {
         }
 
         @Override
-        public void compacted(long[] segmentCounts, long[] recordCounts, 
long[] compactionMapWeights) {
-            delegate.compacted(segmentCounts, recordCounts, 
compactionMapWeights);
+        public void compacted() {
+            delegate.compacted();
             lastCompacted = System.currentTimeMillis();
         }
 
@@ -736,6 +735,7 @@ public class SegmentCompactionIT {
         public long getLastCompacted() {
             return lastCompacted;
         }
+
     }
 
     private class SegmentCompactionITMBean extends AnnotatedStandardMBean 
implements SegmentCompactionMBean {


Reply via email to