2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
20 #ifndef ASYNC_HBASE_SCANNER_H_
21 #define ASYNC_HBASE_SCANNER_H_
27 #include "async/hbase_result.h"
28 #include "core/hbase_types.h"
30 HBASE_API
int32_t hb_scanner_create(hb_scanner_t
* scanner_ptr
);
32 HBASE_API
int32_t hb_scanner_set_table(hb_scanner_t scanner
,
33 char * table
, size_t table_length
);
34 HBASE_API
int32_t hb_scanner_set_namespace(hb_scanner_t scanner
,
35 char * name_space
, size_t name_space_length
);
37 HBASE_API
int32_t hb_scanner_set_start_row(hb_scanner_t scanner
,
38 unsigned char * start_row
, size_t start_row_length
);
39 HBASE_API
int32_t hb_scanner_set_end_row(hb_scanner_t scanner
,
40 unsigned char * end_row
, size_t end_row_length
);
42 HBASE_API
int32_t hb_scanner_set_cache_size(hb_scanner_t scanner
,
44 HBASE_API
int32_t hb_scanner_set_batch_size(hb_scanner_t scanner
,
46 HBASE_API
int32_t hb_scanner_set_num_versions(hb_scanner_t scanner
,
50 * Scanner call back typedef.
52 * This will be called when initinalization of the scanner
53 * is complete. It will also be called when scanner next
56 typedef void (* hb_scanner_cb
)(int32_t status
,
63 * Get the next results from the scanner
65 HBASE_API
int32_t hb_scanner_next(hb_client_t client
,
66 hb_scanner_t scanner
, hb_scanner_cb cb
, void * extra
);
69 * Close the scanner releasing any local and server side
70 * resources held. The call back is fired just before the
71 * scanner's memory is freed.
73 HBASE_API
int32_t hb_scanner_destroy(hb_client_t client
,
74 hb_scanner_t scanner
, hb_scanner_cb cb
, void * extra
);
80 #endif // ASYNC_HBASE_SCANNER_H_