public void initStatisticalPolicy(long[] docCount, int batchSize) { policy = new StatisticalAssignmentPolicy(docCount, batchSize); }
/** * get the index of the forest with smallest number of docs */ @Override public int getPlacementForestIndex(DocumentURI uri) { int idx = 0; try { idx = popAndInsert(); } catch (InterruptedException e) { LOG.error("Statistical assignment gets interrupted"); } return idx; }
protected void rollbackCount(int fId) { ((StatisticalAssignmentPolicy)am.getPolicy()).updateStats(fId, -batchSize); }