if (fMap.containsKey(item) && !item.trim().isEmpty()) {
itemSet.add(fMap.get(item));
}
}
IntArrayList itemArr = new IntArrayList(itemSet.size());
itemSet.keys(itemArr);
itemArr.sort();
OpenIntHashSet groups = new OpenIntHashSet();
for (int j = itemArr.size() - 1; j >= 0; j--) {
// generate group dependent shards
int item = itemArr.get(j);
int groupID = PFPGrowth.getGroup(item, maxPerGroup);
if (!groups.contains(groupID)) {
IntArrayList tempItems = new IntArrayList(j + 1);
tempItems.addAllOfFromTo(itemArr, 0, j);
context.setStatus("Parallel FPGrowth: Generating Group Dependent transactions for: " + item);
wGroupID.set(groupID);
context.write(wGroupID, new TransactionTree(tempItems, 1L));
}
groups.add(groupID);