Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果 Mahout 可以使用两个 long 的复合 ID,则可以使用:
UUID uuid = UUID.fromString(string); long l1 = uuid.getMostSignificantBits(); long l2 = uuid.getLeastSignificantBits();
如果您真的坚持使用一个 long,那么我同意您的想法,即使用基于整个 UUID 的一部分哈希