1
我想弄清楚如何查詢Hazelcast中的分層樹結構。比方說,我有一個組織類:查詢Hazelcast分層樹結構
public class Organization {
private long id;
private long parentId;
}
,我有一個User類:
public class NestupUser extends BaseEntity {
private long id;
private String firstName;
private String lastName;
private String email;
private String password;
private long organizationId;
}
現在,給定一個organizationId我想找到該組織的所有用戶,並且有該組織的所有組織作爲父母,讓這些組織作爲父母等。
我認爲這可以用作某種MapReduce,但是是否可以啓動更多MapReduce任務作爲一個MapReduce的一部分?
任何幫助表示讚賞。
我不能夠準確可視化的數據結構。你可以請張貼一些樣本數據嗎?此外,組織和用戶的預期數量? –
無法真正將其格式化...假設您有一個擁有2個子組織的父組織,其中包括child1和child2。 Child1還有一個孩子組織child1_1。鑑於父母組織,我希望找到父母,孩子1,孩子2和孩子1_1中的所有用戶。 –
謝謝。此外,有多少這樣的上級組織以及層級結構的數量是多少? –