The suggest range may be larger than end row in this region (For example ,nearby the splited row). So to make sure the result is correct, I need other region to also do the search.
I am using zookeeper for lock just for learning whether my theory will work , and how many time it will cost. It's not for release. 2018-01-16 11:34 GMT+08:00 Ted Yu <yuzhih...@gmail.com>: > bq. to get an suggest range search to client, and do this suggested range > search > > Since you're using coprocessor, the coprocessor can act (range search) > using the suggestion and return the result to the client. > There is no need to return intermediate result to client. > > BTW using zookeeper for locking is tricky - how do you keep up with region > split / merge ? > > FYI > > On Mon, Jan 15, 2018 at 7:24 PM, Yang Zhang <zhang.yang...@gmail.com> > wrote: > > > In fact , I am using coprocessor to Implement geography index. > Each > > region will only have part of the Index to index the data that it > contained > > . When I try to implement KNN search, only one region will contain the > > index according to the KNN center point. So this region will give an > > suggest of range search to other region(Because other region may also > > contain part of the data in the range search). > > > > I am using zookeeper to implement the lock, other region will > watch > > until they get the suggest. So if region1 is locked and wait for suggest > > ,and by the time region2 will never get the sacn request and never give > an > > suggest, this caused an dead lock. > > > > In other way, I can search region2 first (by limit the start and > > end) to get an suggest range search to client, and do this suggested > range > > search at the second time. This will work, but It will cost more time. > > > > Any suggest? > > > > Thanks > > > > 2018-01-15 23:49 GMT+08:00 Ted Yu <yuzhih...@gmail.com>: > > > > > bq. need region2 to search fist, because it has my own index. > > > > > > Looks like only some of the regions have your index. Can you tell us > more > > > about the characteristics of the region(s) where index would be > present. > > > > > > bq. My scan will be blocked for my lock on region1, > > > > > > By 'my' I assume the lock is placed by your (application) code. Since > > hbase > > > wouldn't know that a subsequent region has index (or suggestion) on > what > > to > > > scan. > > > Can you give us more detail ? > > > > > > Thanks > > > > > > On Mon, Jan 15, 2018 at 7:42 AM, Yang Zhang <zhang.yang...@gmail.com> > > > wrote: > > > > > > > Hello Everyone > > > > > > > > I want to know If the Scan is send to HBase by sequence? For > > > > example, If I have a table that has two region(region1,region2), and > I > > > sent > > > > a Scan() to this Table. This Scan will be send to region1 first and > > until > > > > region1 returned, region2 can get this Scan? So If There are some > > methods > > > > than I can control the sequence? > > > > > > > > some time I need region2 to search fist, because it has my own > > > index. > > > > Then It will give an suggest to other region about where to search.. > I > > am > > > > using zookeeper to do this, But I found that My scan will be blocked > > for > > > my > > > > lock on region1, and region2 who has the suggest, even't can't > receive > > > this > > > > scan. > > > > > > > > Anyone have suggest? > > > > > > > > > > > > Thanks very much > > > > > > > > > >