This paper summarizes the common problems encountered in the process of hbase development and use, hoping to solve some of the doubts of the newly added Hbaser.
1. Is htable thread safe?
Htable is not thread-safe, it is recommended that a Htable object be used in a thread during use, and that htable objects not be shared among different threads.
At the same time, in order to improve the efficiency of the client, different htable objects common to the same configuration object, sharing the HBa
This article summarizes common problems encountered during hbase development and usage, hoping to answer some questions about newly added hbaser. 1. Is the htable thread secure?
Htable is NOT thread-safe. We recommend that you use an htable object in a thread. Do not share htable objects between different threads.
In addition, to improve client efficiency, different htable objects share the same configuration object and hbase server metadata information. For details, see the htable section in
multithreading.
2. The Htable object in Htablepool is a public configuration connection that can reduce network overhead.
More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/database/extra/
The use of Htablepool is simple: each time before the operation, through the Htablepool GetTable method to obtain a Htable object, and then put/get/scan/delete and other operations, Finally, the Htable object is put back into Htablepool through the Htablepool
concurrent data modification between multiple threads.
2. htable objects in the htablepool are connected by public configuration, which can reduce network overhead.
Htablepool is easy to use: before each operation, use the gettable method of htablepool to obtain an htable object, and then perform put/get/scan/delete operations, finally, the htable object is put back into the htablepool through the puttable method of htablepool.
The following is a sim
source, and you can cut the imported picture into several pictures that match the layout of the pageDroplist: drop-down boxRectangle: Rectangular part, can fill up the background, as a text link, can also be deformed into different shapesPlaceholder: When you need to reserve an area on the page but don't want to know exactly what to putTable: TablesText area: Multiline text boxList Box: Multi MarqueeCheckBox: check boxRadio Button: Radio BoxButton Sh
problem of thread insecurity in htable, while maintaining a fixed number of htable objects to reuse these htable resource objects during program operation. Configuration conf = hbaseconfiguration.create (); Htablepool pool = new Htablepool (conf, 10); 1. Htablepool can automatically create Htable objects, and is completely transparent to the client, to avoid the problem of concurrency modification between multithreading. 2. The Htable object in Htablepool is a public configuration connection th
Contact Us
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.