Methods Summary |
---|
public int | doLogic()
getRunData().getIndexReader().deleteDocument(docid);
lastDeleted = docid;
return 1; // one work item done here
|
private void | log(int count)
if (logStep>0 && (count%logStep)==0) {
System.out.println("--> processed "+count+" docs, last deleted: "+lastDeleted);
}
|
public void | setParams(java.lang.String params)Set the params (docid only)
super.setParams(params);
docid = (int) Float.parseFloat(params);
byStep = (docid < 0);
|
public void | setup()
super.setup();
// one time static initializations
if (logStep<0) {
logStep = getRunData().getConfig().get("doc.delete.log.step",500);
}
if (deleteStep<0) {
deleteStep = getRunData().getConfig().get("doc.delete.step",8);
}
// set the docid to be deleted
docid = (byStep ? lastDeleted + deleteStep : docid);
|
public void | tearDown()
log(++numDeleted);
super.tearDown();
|