|
From: Ning L. <nin...@gm...> - 2008-03-20 18:15:59
|
On Wed, Mar 19, 2008 at 4:00 PM, Doug Cutting <cu...@ap...> wrote: > Should search results indicate the ranges actually searched? That way, > if the client's Mapper is out of date, the client can detect and repair > this. The current Client to Host API is Results search(NodeID[] nodeIDs, Range[] ranges, Query q, int maxHits) It means for each node n in nodeIDs and the correpsonding range r in ranges, execute query q on node n with range r. The range r should be a subset of the range that node n serves. In most case, the range r is the same as the range that node n serves. An exception will be thrown if either node n is not on the host or range r is not a subset of the range that node n serves. I probably should change the return type to Results[] and let the client decide how to combine the results. Are you suggesting range r be what the client thinks node n serves? So if only a subset of range r is needed, the results are filtered on the client? And when range r is different from the range that node n serves, execute the query anyway and return the results with the actual range that node n serves? I think returning partial results is good but is it more efficient to do filtering on the node/host? In this case, again, range r should be a subset of the range that node n serves. If range r is not a subset of the range that node n serves, execute the query on the overlap range and return the results with the overlap range. > To repair, given a set of search results, we need to check for gaps, > then figure out what to re-query to fill those gaps. Should this be > done through the Ring API? Yep, we can use the ring to find out nodes serving the gaps. At the same time, the client to contact the master for a new version of the ring. > Will host ids ever be other than an ipaddress+port? Should we represent > them that way instead? Hosts are not on the ring, so we don't need a > numeric value here. Agree. > Will node ids ever be other than a large (128 bit?) numeric value? They > need to be unique, but should be host-independent. E.g., it should be > possible to copy a node's data to a new host and have that new host > start serving that data. Agree. Ning |