If Mahout can use a compound ID of two longs, you can use:
UUID uuid = UUID.fromString(string);
long l1 = uuid.getMostSignificantBits();
long l2 = uuid.getLeastSignificantBits();
If you really are stuck with one long, then I'd agree with your idea to use a portion of a hash based on the entire UUID