SCAN: sets scan record conditions, buffer size, cache size, and other resultscanner scanner: Provides the scan interface, clientscaner: implements the client resultscanner scanner, and data is distributed between multiple region, read in sequence. Usage: htableinterface TBL = NULL; TBL = table. gettable ("table_name"); scan = new scan (); // Set the number of records cached by the client. When the next method is called, data of the cache size is returned from the server at one time and cached on the client. When the next method is called, the next data is obtained directly from the client cache. Scan. setcaching (100); scan. setcacheblocks (true); scan. setstartrow (usernum + "10 "). getbytes (); scan. setstoprow (usernum + "20 "). getbytes (); clscaner = (clientlistener) TBL. getscaner (SCAN); Result [] rets = clscaner. next (); // obtain the result of the next row [] rets = clscaner. limit (START, pagesize); // in the next method, do while loop calls the nextscanner method to determine whether to end scan. The condition for loop completion is, the size of the retrieved records reaches the caching size, or the returned data is null if it cannot meet the filter conditions of the server side, or the current It is the last region or when the stoprowkey of the scan is less than the endkey of the current region, the scan is automatically terminated and the scan is not performed by the next region. Htable: Provides interfaces to interact with a single table, including put, get, and delete. It also provides the resultscaner creation method, which is non-thread-safe and htablepool is thread-safe. All the above operations on the region will eventually perform the servercallable operation on the regionserver. Next, let's focus on this class. A servercallale is a region operation class for a server. It locates the region (hregionlocation) based on startrow and obtains the server instance on which the location of the region is located (hregioninterface, the client proxy of the hregionserver ), call the call method to connect to the server instance and obtain data. In the call method of implementation class scanercallable, call the next method of hregioninterface (client proxy of hregionserver) to obtain results. After the hregionserver is connected through the RPC protocol, the regionscaner of the current region is performed inside the server (filtered Based on the configured startrow, endrow, and filter ).