Preparation of the articleHadoop installationZK InstallationThe hbase version that is used in this article is 0.98.9Before installing HBase, make sure to rely on each version of the component, the Hadoop version of this article is 2.6, no support instructions on the official website, but we still use hadoop2.6 to try, the JDK is 7http://www.apache.org/dyn/closer.cgi/hba
BlogThat Yi-Wipe smilecsdn Blog Address:http://blog.csdn.net/u012185296 itdog8 address link: http://www.itdog8.com/thread-204-1-1.html blog post title:Hbase-mapreduce-hbase As an example of an output source | That Yi-wipe smile Personality Signature:The furthest distance in the world is not the horizon, nor the cape, but I stand in front of you, but you do not feel my presenceTechnical Direction:Flume+kafka+storm+redis/
structure, to preserve the original style; The following PHP code is posted, all of our programs are in HBase A table "new" was built: Ini_set (' display_errors ', e_all);$GLOBALS [' thrift_root '] = "/root/thrift_client";/Dependencies. In the proper order. /Require_once $GLOBALS [' Thrift_root ']. '/thrift/transport/ttransport.php ';Require_once $GLOBALS [' Thrift_root ']. '/thrift/transport/tsocket.php '
Let's take a look at some of the basic operations commands of the HBase shell, and I've listed several common hbase shell commands, as follows:
Name
Command-expression
Create a table
Create ' table name ', ' column name 1 ', ' Column Name 2 ', ' Column name n '
Add a record
Put ' table name ', ' Row name ', ' Column name: ', ' value '
View Record
HBase provides access to the Java API, which is as important as JDBC when using RDBMS with Java applications Import Java.io.ioexception;import Org.apache.hadoop.conf.configuration;import Org.apache.hadoop.hbase.hbaseconfiguration;import Org.apache.hadoop.hbase.hcolumndescriptor;import Org.apache.hadoop.hbase.htabledescriptor;import Org.apache.hadoop.hbase.keyvalue;import Org.apache.hadoop.hbase.client.delete;import Org.apache.hadoop.hbase.client.get
, and read and write locks are also known as shared-exclusive locks, which are often seen s-locks and X-locks.In Java, Reentrantreadwritelock is the implementation class for read-write locks, which have two methods Readlock () and Writelock () to obtain read and write locks, respectively.Implementation of a row lock in HBaseHBase uses row locks to achieve the atomicity of updates, either all of the updates succeed or fail. All updates to HBase row-lev
specify a timestamp or version, the default is to take the latest data.5) The stored data is a byte array.6) The data in the table is physically stored in the order of the row keys.Physical model of 2.HBase1) HBase is a database of simple second-level queries for massive data (such as 20PB).2) The records in the HBase table are split according to the row key and split into a region. Many of the region are
1. Start HBase, go to the Bin folder under the HBase folder, and then execute the command:
HBase Shell
[Root@hadoop0 bin]# hbase shell
hbase shell; Enter ' help
2. To create a table:
Create ' users ', ' user_id ', ' address ', ' info '
Table users, three clusters: user_id
define an available column family, which users can add or remove column families as needed, but must first be disable.3. HBase is a master/slave structure and relies on zookeeper,master to manage multiple regionserver.Third, installation (standalone)1. Java 1.6 or later must be installed.2, can be modified ~/.base_profile,export java_home point to the JAVA installation path, you can also modify the conf/
The configuration of timeouts, retries, and retry intervals is also important because the default configuration values are large, and if the HBase cluster or regionserver and ZK are turned off, the application is catastrophic, and timeouts and restarts quickly fill the Web container's links. Causing the Web container to stop serving, there are two types of timeout for the socket: 1: The timeout for establishing a connection, 2: The timeout for reading
hadoop. hbase relies on hadoop's HDFS as the basic storage unit. By using hadoop's DFS tool, you can see the structure of these data storage folders, you can also use the MAP/reduce framework (Algorithm) Perform hbase operations, as shown in:
Hbase also includes jetty in the product and uses embedded methods to s
Limitations of HBase:1, can only do simple key value query, complex SQL statistics do not.2, can only do a quick query on the row key.3 row-style storage for traditional databasesIn the case of data analysis, we often use a column as a query condition, and the returned results are often just some columns, not all columns. The I/O performance of the row database is poor in this case, Oracle, for example, has a large data file, in which a lot of blocks
.hcolumndescriptor Configuring the 14.1.2.io.hfile.bloom.enabled global shutdown Switch 14.1.3.io.hfile.bloom.error.rate 14.1.4.io.hfile.bloom.max.fold 14.2. BLOOMFILTER,NBSP;FILEINFO data Structure 14.2.2 in Bloom storefile footprint 14.2.1.storefile. Bloomfilter entries 15 in the StoreFile meta-data. Troubleshooting for HBase and debug 15.1. General guideline 15.2. Logs 15.2.1. Log position 15.3. Tool 15.
format of the hfile:This format of hfile has been introduced in the previous read request article. Hfile to ensure that each hblock is approximately 64KB in size, the hfile structure is constructed using DataBlock Multi-level indexes and Bloomfilter first-class indexing methods. The whole writing process is relatively simple, in the loop to facilitate the acquisition of Memstore snapshot keyvalue data, and then constantly write DataBlock, if the tota
What is HBase? HBase
Classic explanation: http://www.cnblogs.com/skyme/archive/2012/07/25/2608310.html
HBase: Non-relational databases; distributed databases; HDFS-based minimum storage unit, which is a file storage. Column storage. (Relational databases belong to row-store)
NoSql: not only SQL non-Relational Data
Column storage:
Http://baike.baidu.com/l
Limit the number of rows when you sweep a table' table_name ' 5 }When the table is scanned, only five data is specified==============================================Delete TableThe deletion of the table requires the implementation of two steps, namely disable and drop, as follows:' table_name ' 'table_name'Of course, after the Disable table can also be re-enable, the command is:' table_name '==============================================Assigning Permissions to users' user_name ' ' Rwxca ' ' ta
version in that the port is also changed from 60010 to 16010, and the boot interface is started successfully as follows10. Enter HBase Shell to perform add, delete, change, and check operations (consistent with HBase 0.9.8 shell command) No other instructions#shell command as follows # Open HBase shellbin/hbase shell#
the-root table and locate the corresponding. Region in the meta table, querying data on the region to the actual nodeIii. the system structure of HBase3.1 HBase is a master-slave structure, hmaster, hregionserverIv.. HBase Pseudo-distributed installationHBase installation is built on top of Hadoop and zookeeper cluste
Preface
This week to learn some of the Hadoop ecosystem surrounding some of the system, simple to do a summary, this article is mainly about HBase introduction. HBase is a column-oriented distributed database built on HDFs, and he has a lot of differences with traditional RDBMS. The emergence of hbase can solve the problem of massive data storage, and he can eas
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.