Currently, when writing to a TPFS from Map/Reduce, the dataset delegates writing to the underlying output format. That output format writes the correct file in the correct format, but it does not register the file as a new partition of the dataset. Therefore, the addPartition() call must be made in the onFinish() method of the MR program.
The correct way to do this is to implement a wrapper output format that delegates to the underlying output format, but overrides the output committer to add the partition. This requires injecting the dataset framework into the output committer and will therefore involve changes in the Map/Reduce framework as well as in the TPFS dataset.