Skip to content

Commit

Permalink
Deleted RepairTest - redundant test to AbstractRebalanceTest. Removed…
Browse files Browse the repository at this point in the history
… slop references in RepairJob
  • Loading branch information
Chinmay Soman committed Aug 12, 2011
1 parent 8da277c commit 3fea647
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 247 deletions.
29 changes: 0 additions & 29 deletions src/java/voldemort/server/scheduler/slop/RepairJob.java
Expand Up @@ -10,7 +10,6 @@

import org.apache.log4j.Logger;

import voldemort.annotations.jmx.JmxGetter;
import voldemort.annotations.jmx.JmxOperation;
import voldemort.cluster.Node;
import voldemort.routing.RoutingStrategy;
Expand All @@ -37,7 +36,6 @@ public class RepairJob implements Runnable {
private final Semaphore repairPermits;
private final StoreRepository storeRepo;
private final MetadataStore metadataStore;
private final Map<String, Long> storeStats;
private final int deleteBatchSize;

public RepairJob(StoreRepository storeRepo,
Expand All @@ -47,7 +45,6 @@ public RepairJob(StoreRepository storeRepo,
this.storeRepo = storeRepo;
this.metadataStore = metadataStore;
this.repairPermits = Utils.notNull(repairPermits);
this.storeStats = Maps.newHashMap();
this.deleteBatchSize = deleteBatchSize;
}

Expand All @@ -60,26 +57,6 @@ public void startRepairJob() {
run();
}

@JmxOperation(description = "Get repair slops per store", impact = MBeanOperationInfo.ACTION)
public long getRepairSlopsPerStore(String storeName) {
if(!storeStats.containsKey(storeName))
return 0L;
return storeStats.get(storeName);
}

@JmxGetter(name = "totalRepairSlops", description = "total repair slops")
public long totalRepairSlops() {
Long totalRepairSlops = new Long(0);
for(Long repairSlops: storeStats.values()) {
totalRepairSlops += repairSlops;
}
return totalRepairSlops;
}

public void resetStats(Map<String, Long> storeStatistics) {
storeStats.putAll(storeStatistics);
}

public void run() {

// don't try to run slop pusher job when rebalancing
Expand All @@ -91,7 +68,6 @@ public void run() {
ClosableIterator<Pair<ByteArray, Versioned<byte[]>>> iterator = null;

Date startTime = new Date();
boolean terminatedEarly = false;
logger.info("Started repair job at " + startTime);

Map<String, Long> localStats = Maps.newHashMap();
Expand Down Expand Up @@ -138,13 +114,8 @@ public void run() {
}
} catch(Exception e) {
logger.error(e, e);
terminatedEarly = true;
} finally {
closeIterator(iterator);

if(!terminatedEarly) {
resetStats(localStats);
}
this.repairPermits.release();
logger.info("Completed repair job started at " + startTime);
}
Expand Down
218 changes: 0 additions & 218 deletions test/unit/voldemort/scheduled/RepairTest.java

This file was deleted.

0 comments on commit 3fea647

Please sign in to comment.