Fix hash partitioning for new java api

This is a fix for this issue https://github.com/stratosphere/stratosphere/issues/857