Hi kuer, The scanner encapsulates all of the logic to detect when a range splits and then backoff, consult the METADATA table to discover the new split ranges, and then retry. It's all hidden inside the TableScanner, so the user application does not have to worry about splits.
- Doug 2009/9/4 kuer <[email protected]> > > Hi, all, > > there were codes in count_stored.cc : > > 143 while (scanner->get(key, value)) { > 144 if (!hit_start) { > 145 if (strcmp(key.row, file_vector[i].start_row.c_str()) <= > 0) { > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > WHEN THIS HAPPENED? WHEN RANGE SPLITS ??? > > 146 cout << " WARN " << key.row << " <=StartRow " << > file_vector[i].start_row << endl; > 147 scanner->forward(); > 148 continue; > 149 } > 150 hit_start = true; > 151 } > 152 if (strcmp(key.row, file_vector[i].end_row.c_str()) > 0) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > ALSO HERE, THIS CODE DISCARD THE ROW WHO OUT-OF- > RANGE. BUT WHY THERE ARE ROWS OUT-OF-RANGE ?? BECAUSE OF RANGE SPLIT, > TOO ?? > > 153 break; > > thanks > > -- kuer > > > On 9月4日, 下午4时09分, kuer <[email protected]> wrote: > > Hi, all, > > > > There is a bug in count_stored.cc : > > > > 102 // Create Hypertable client object > > 103 ClientPtr hypertable_client = new Hypertable::Client(argv[0]); > > 104 ConnectionManagerPtr conn_mgr = new ConnectionManager(); > > 105 DfsBroker::Client *dfs = new DfsBroker::Client(conn_mgr, > > properties); > > 106 > > 107 Global::dfs = dfs; <<<<<<<<--- this line should be added > > 108 > > > > if not, when calling CellStoreFactory::open(...), the program will > > crash because Global::dfs is nil. > > > > 131 CellStorePtr cell_store_ptr = CellStoreFactory::open > > (file_vector[i].file, 0, 0); > > 132 CellListScanner *scanner = 0; > > > > thanks > > > > -- kuer > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Hypertable Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/hypertable-dev?hl=en -~----------~----~----~----~------~----~------~--~---
