<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>devkuma – HBase</title>
    <link>https://www.devkuma.com/en/tags/hbase/</link>
    <image>
      <url>https://www.devkuma.com/en/tags/hbase/logo/180x180.jpg</url>
      <title>HBase</title>
      <link>https://www.devkuma.com/en/tags/hbase/</link>
    </image>
    <description>Recent content in HBase on devkuma</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <managingEditor>kc@example.com (kc kim)</managingEditor>
    <webMaster>kc@example.com (kc kim)</webMaster>
    <copyright>The devkuma</copyright>
    
	  <atom:link href="https://www.devkuma.com/en/tags/hbase/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Apache HBase Overview</title>
      <link>https://www.devkuma.com/en/docs/hbase/overview/</link>
      <pubDate>Fri, 08 Jul 2022 09:37:00 +0900</pubDate>
      <author>kc@example.com (kc kim)</author>
      <guid>https://www.devkuma.com/en/docs/hbase/overview/</guid>
      <description>
        
        
        &lt;h2 id=&#34;what-is-hbase&#34;&gt;What is HBase?&lt;/h2&gt;
&lt;p&gt;Apache HBase is an open source distributed database management system developed and published by the Apache Software Foundation. It is one of the NoSQL systems, with a structure different from mainstream relational databases.&lt;/p&gt;
&lt;p&gt;It models Google&amp;rsquo;s BigTable, which was developed and used internally at Google, and reimplements a similar database management system as open source software.&lt;/p&gt;
&lt;p&gt;HBase builds a database on HDFS (Hadoop Distributed File System), a distributed file system also developed and published by the ASF. Like a relational database, it structures data in tables, but unlike a typical RDBMS, it stores the values of each column together in storage. This approach is called column-oriented storage.&lt;/p&gt;
&lt;p&gt;Each row in a table stores data as pairs of qualifiers, which correspond to column names, and cells, which correspond to field values. Multiple qualifiers are grouped into a column family. Cell data is automatically versioned, so data from an arbitrary point in the past can be retrieved.&lt;/p&gt;
&lt;p&gt;HBase is designed for a distributed environment where multiple server computers manage one database. It automatically shards data across multiple nodes, so applications do not need to worry about the target location. It also provides strong data consistency, preventing stale data from being externally referenced during processing.&lt;/p&gt;
&lt;p&gt;Database operations are performed not with SQL, as in RDBs, but by calling APIs such as the Java API or RESTful API from an application. HBase is well suited to large-scale distributed big data processing such as Apache Hadoop MapReduce.&lt;/p&gt;
&lt;p&gt;HBase is not a replacement for SQL databases, but it can add an SQL layer by using software such as Apache Phoenix. With an SQL layer, JDBC drivers and similar tools can be used to handle various analytical workloads more easily and in a familiar way.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/apache/hbase&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Apache HBase|GitHub&lt;i class=&#34;fas fa-external-link-alt&#34;&gt;&lt;/i&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;hbase-history&#34;&gt;HBase History&lt;/h2&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Year&lt;/th&gt;
          &lt;th&gt;Event&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;November 2006&lt;/td&gt;
          &lt;td&gt;Google published the BigTable paper.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;February 2007&lt;/td&gt;
          &lt;td&gt;The initial HBase prototype was created as a Hadoop contribution.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;October 2007&lt;/td&gt;
          &lt;td&gt;The first usable HBase was released with Hadoop 0.15.0.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;January 2008&lt;/td&gt;
          &lt;td&gt;HBase became a subproject of Hadoop.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;October 2008&lt;/td&gt;
          &lt;td&gt;HBase 0.18.1 was released.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;January 2009&lt;/td&gt;
          &lt;td&gt;HBase 0.19.0 was released.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;September 2009&lt;/td&gt;
          &lt;td&gt;HBase 0.20.0 was released.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;May 2010&lt;/td&gt;
          &lt;td&gt;HBase became an Apache top-level project.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;June 2010&lt;/td&gt;
          &lt;td&gt;The first developer version, HBase 0.89.20100621, was released.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;January 2011&lt;/td&gt;
          &lt;td&gt;HBase 0.90.0 was released.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Mid-2011&lt;/td&gt;
          &lt;td&gt;HBase 0.92.0 was released.&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;hbase-features&#34;&gt;HBase Features&lt;/h2&gt;
&lt;p&gt;The following are some important characteristics of Apache HBase.&lt;/p&gt;
&lt;h3 id=&#34;distributed&#34;&gt;Distributed&lt;/h3&gt;
&lt;p&gt;Apache HBase can run in two modes: pseudo-distributed mode and fully distributed mode. Pseudo-distributed mode is used for testing and runs on a single node, while fully distributed mode is used in production and runs on a cluster of nodes.&lt;/p&gt;
&lt;h3 id=&#34;big-data-store&#34;&gt;Big Data Store&lt;/h3&gt;
&lt;p&gt;Apache HBase is designed to store very large data in tables with billions of rows and millions or billions of columns. Because it runs on Hadoop HDFS, it provides low-latency real-time reads and writes for data. It also provides better performance for read operations on massive data stored in tables.&lt;/p&gt;
&lt;h3 id=&#34;non-relational&#34;&gt;Non-Relational&lt;/h3&gt;
&lt;p&gt;As already noted, Apache HBase is a non-relational database, so it does not follow the relational database model. In relational database management, data is stored in tables as rows and columns. SQL can be used to access that data, but Apache HBase uses storage and query mechanisms where data storage is not fixed to that format. In Apache HBase, schemas are flexible and can be extended according to requirements.&lt;/p&gt;
&lt;h3 id=&#34;flexible-data-model&#34;&gt;Flexible Data Model&lt;/h3&gt;
&lt;p&gt;Apache HBase provides a flexible data model for storing data in tables. A table has one or more column families. User data is stored in rows, which are collections of key/value pairs. In a table, each row is uniquely identified by a row key.&lt;/p&gt;
&lt;h3 id=&#34;scalable&#34;&gt;Scalable&lt;/h3&gt;
&lt;p&gt;Apache HBase regions are horizontally scalable, with rows distributed by region. A table can be stored across multiple regions, and when a region becomes very large, the data is split into two regions around the middle row key.&lt;/p&gt;
&lt;h2 id=&#34;hbase-functions&#34;&gt;HBase Functions&lt;/h2&gt;
&lt;p&gt;Apache HBase provides the following functions.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Supports linear and modular scalability.&lt;/li&gt;
&lt;li&gt;Provides strict consistency for reads and writes.&lt;/li&gt;
&lt;li&gt;Provides automatic and configurable table sharding.&lt;/li&gt;
&lt;li&gt;Supports automatic failover between RegionServers.&lt;/li&gt;
&lt;li&gt;Provides convenient base classes for supporting Hadoop MapReduce jobs with Apache HBase tables.&lt;/li&gt;
&lt;li&gt;Makes the Java API easy to use for client access.&lt;/li&gt;
&lt;li&gt;Provides block cache and Bloom filters for real-time queries.&lt;/li&gt;
&lt;li&gt;Provides query predicate pushdown through server-side filters.&lt;/li&gt;
&lt;li&gt;Provides an extensible JRuby-based (JIRB) shell.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;hbase-pros-and-cons&#34;&gt;HBase Pros and Cons&lt;/h2&gt;
&lt;h3 id=&#34;hbase-advantages&#34;&gt;HBase Advantages&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Effective for reliably handling large volumes of data.
&lt;ul&gt;
&lt;li&gt;A master that controls the overall distributed system manages overall data consistency and guarantees consistency among replicated data.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Suitable for supporting large-scale data analysis processing.
&lt;ul&gt;
&lt;li&gt;Easy to use as MapReduce input.&lt;/li&gt;
&lt;li&gt;Optimized for use with HDFS, MapReduce, and related tools.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;If performance issues occur, performance can be maintained by adding only Region servers.&lt;/li&gt;
&lt;li&gt;Failover is easy, and management is convenient.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;hbase-disadvantages&#34;&gt;HBase Disadvantages&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;It is convenient as MapReduce input, but when used together with file input, CPU usage can rise and Region servers can go down easily.&lt;/li&gt;
&lt;li&gt;There is material about conditions for appropriate HBase settings, but because cluster size and basic specifications differ, it is difficult to apply directly.&lt;/li&gt;
&lt;li&gt;Regions for a specific table can easily become concentrated on a specific Region server, leading to performance degradation.
&lt;ul&gt;
&lt;li&gt;Proper HBase design is required during configuration.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;differences-between-rdbms-and-hbase&#34;&gt;Differences Between RDBMS and HBase&lt;/h2&gt;
&lt;p&gt;The following table summarizes the major differences between relational databases and HBase.&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;RDBMS&lt;/th&gt;
          &lt;th&gt;HBase&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;Uses tables as the database.&lt;/td&gt;
          &lt;td&gt;Uses regions as the database.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Supported file systems are FAT, NTFS, and EXT.&lt;/td&gt;
          &lt;td&gt;The supported file system is HDFS.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Uses commit logs to store logs.&lt;/td&gt;
          &lt;td&gt;Uses WAL (Write-Ahead Logs) to store logs.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;The reference system used is a coordinate system.&lt;/td&gt;
          &lt;td&gt;The reference system is the one used by ZooKeeper.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Uses a primary key.&lt;/td&gt;
          &lt;td&gt;Uses a row key.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Partitioning is supported.&lt;/td&gt;
          &lt;td&gt;Sharding is supported.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Uses Row, Column, and Cell.&lt;/td&gt;
          &lt;td&gt;Uses Row, Column family, Column, and Cell.&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;differences-between-hdfs-and-hbase&#34;&gt;Differences Between HDFS and HBase&lt;/h2&gt;
&lt;p&gt;The following table summarizes the major differences between HDFS and HBase.&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;HDFS&lt;/th&gt;
          &lt;th&gt;HBase&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;HDFS provides a file system for distributed storage.&lt;/td&gt;
          &lt;td&gt;HBase provides table-form, column-based data storage.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;HDFS provides storage optimized for large files.&lt;/td&gt;
          &lt;td&gt;HBase provides optimization for table-form data.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Uses flat files.&lt;/td&gt;
          &lt;td&gt;Uses key-value pair data.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;The data model is not flexible.&lt;/td&gt;
          &lt;td&gt;Provides a flexible data model.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Uses a file system and processing framework.&lt;/td&gt;
          &lt;td&gt;Uses table-form storage with built-in Hadoop MapReduce support.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Mostly optimized for write-once-read-many workloads.&lt;/td&gt;
          &lt;td&gt;Optimized for many reads and writes.&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;differences-between-row-oriented-and-column-oriented-data-stores&#34;&gt;Differences Between Row-Oriented and Column-Oriented Data Stores&lt;/h2&gt;
&lt;p&gt;The following table summarizes the major differences between row-oriented and column-oriented data stores.&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Row-oriented data store&lt;/th&gt;
          &lt;th&gt;Column-oriented data store&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;Row-oriented data stores are efficient for adding and modifying records.&lt;/td&gt;
          &lt;td&gt;Column-oriented data stores are efficient for reading data.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;They read pages containing entire rows.&lt;/td&gt;
          &lt;td&gt;They read only the required columns.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Best suited for OLTP systems.&lt;/td&gt;
          &lt;td&gt;Not yet suitable for OLTP systems.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Serializes the full value of a row.&lt;/td&gt;
          &lt;td&gt;Serializes the full value of a column.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Stores rows in contiguous pages of memory.&lt;/td&gt;
          &lt;td&gt;Stores columns from pages in memory.&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;What is OLTP (Online Transactional Processing)? It refers to online transaction processing and means batch transaction processing against databases by online users over a network.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&#34;pros-and-cons-of-column-oriented-databases&#34;&gt;Pros and Cons of Column-Oriented Databases&lt;/h2&gt;
&lt;p&gt;The following are the pros and cons of column-oriented databases.&lt;/p&gt;
&lt;h3 id=&#34;advantages&#34;&gt;Advantages&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Built-in support for efficiency and data compression.&lt;/li&gt;
&lt;li&gt;Supports fast data retrieval.&lt;/li&gt;
&lt;li&gt;Management and configuration are simplified in column-oriented databases.&lt;/li&gt;
&lt;li&gt;Suitable for high performance in aggregate queries, such as COUNT, SUM, AVG, MIN, and MAX.&lt;/li&gt;
&lt;li&gt;Provides an automatic sharding mechanism that distributes larger regions into smaller regions, making it efficient for partitioning.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;disadvantages&#34;&gt;Disadvantages&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;JOIN queries and data across multiple tables are not optimized.&lt;/li&gt;
&lt;li&gt;Storage efficiency decreases because partitions must be created for frequent deletes and updates.&lt;/li&gt;
&lt;li&gt;Because of the non-relational nature, designing partitions and indexes is very difficult.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;hbase-use-cases&#34;&gt;HBase Use Cases&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Used to guarantee data consistency or for analysis.
&lt;ul&gt;
&lt;li&gt;Example: Facebook, eBay, Adobe, LINE, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Monitoring systems.&lt;/li&gt;
&lt;li&gt;Tracking user actions.&lt;/li&gt;
&lt;li&gt;Audit logging systems.&lt;/li&gt;
&lt;li&gt;Real-time analytics.
&lt;ul&gt;
&lt;li&gt;Cases where Hadoop must be used to analyze large amounts of data.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Used as the primary storage for large-scale social networking services.
&lt;ul&gt;
&lt;li&gt;Message-oriented systems, such as Twitter-like messages and statuses.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Content management systems that serve content from HBase.&lt;/li&gt;
&lt;li&gt;Standard use cases such as storing web pages during web crawling.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;references&#34;&gt;References&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.cloudduggu.com/hbase/introduction/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Apache HBase Introduction&lt;i class=&#34;fas fa-external-link-alt&#34;&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://hbase.apache.org/book.html&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Apache HBase ™ Reference Guide&lt;i class=&#34;fas fa-external-link-alt&#34;&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
      
      <category>Database</category>
      
      <category>NoSQL</category>
      
      <category>HBase</category>
      
    </item>
    
    <item>
      <title>Apache HBase Architecture</title>
      <link>https://www.devkuma.com/en/docs/hbase/architecture/</link>
      <pubDate>Fri, 08 Jul 2022 09:40:00 +0900</pubDate>
      <author>kc@example.com (kc kim)</author>
      <guid>https://www.devkuma.com/en/docs/hbase/architecture/</guid>
      <description>
        
        
        &lt;h2 id=&#34;apache-hbase-architecture&#34;&gt;Apache HBase Architecture&lt;/h2&gt;
&lt;p&gt;Apache HBase is a NoSQL database. NoSQL is a general expression indicating that a database is not an RDBMS whose primary access language is SQL. Apache HBase is a data store rather than a traditional database. HBase can scale linearly and modularly by adding commodity nodes to the cluster. If the number of nodes increases from 20 to 40, storage and capacity also increase at the same time in the HBase cluster.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;HBase Cluster Architecture&lt;/strong&gt;
&lt;img src=&#34;https://www.devkuma.com/docs/hbase/hbase-cluster-architure.jpg&#34; alt=&#34;HBase Cluster Architecture&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;apache-hbase-components&#34;&gt;Apache HBase Components&lt;/h2&gt;
&lt;p&gt;HBase consists of two types of servers: Master servers and Region servers.&lt;br&gt;
Its structure allows simple scale-out by adding Region servers.
HBase data is divided into units called Regions, and server types are separated according to how Regions are handled.&lt;/p&gt;
&lt;h3 id=&#34;master-server---hbase-hmaster&#34;&gt;Master Server - HBase HMaster&lt;/h3&gt;
&lt;p&gt;Apache HBase HMaster is an important component of an HBase cluster that is responsible for monitoring RegionServers, handling failover, and managing region splits.&lt;/p&gt;
&lt;p&gt;Data for each table is managed by RegionServers, and the entire cluster is managed by HMaster.&lt;br&gt;
HMaster manages metadata that records which Region server stores each piece of HBase data (Region).&lt;br&gt;
It assigns Regions to Region servers and detects failures in Region servers.&lt;/p&gt;
&lt;p&gt;HMaster functions include the following.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Monitors RegionServers.
&lt;ul&gt;
&lt;li&gt;Coordinates Region servers.&lt;/li&gt;
&lt;li&gt;Manages Region startup.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Handles RegionServer failover.&lt;/li&gt;
&lt;li&gt;Assigns or unassigns Regions.&lt;/li&gt;
&lt;li&gt;Monitors all Region servers in the cluster.
&lt;ul&gt;
&lt;li&gt;Management functions.&lt;/li&gt;
&lt;li&gt;Table creation, deletion, and update.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Handles metadata changes.&lt;/li&gt;
&lt;li&gt;Provides an interface for all metadata changes.&lt;/li&gt;
&lt;li&gt;Performs load balancing during idle time.&lt;/li&gt;
&lt;li&gt;HMaster provides a web user interface that shows information about the HBase cluster.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;https://www.devkuma.com/docs/hbase/hbase-hmaster.png&#34; alt=&#34;HBase HMaster&#34;&gt;&lt;/p&gt;
&lt;p&gt;These tasks are handled by ZooKeeper, software that runs inside the Master server.&lt;br&gt;
ZooKeeper is software used in many distributed applications besides HBase.&lt;/p&gt;
&lt;h3 id=&#34;region-server---hbase-region-server&#34;&gt;Region Server - HBase Region Server&lt;/h3&gt;
&lt;p&gt;RegionServer is responsible for storing the actual data assigned by the Master server. As in a Hadoop cluster, NameNode stores metadata and DataNode stores actual data. HBase is similar: the Master holds metadata, and RegionServers store actual data. RegionServer runs on DataNodes in a distributed cluster environment.&lt;/p&gt;
&lt;p&gt;RegionServer performs the following tasks.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Handles assigned regions (tables).&lt;/li&gt;
&lt;li&gt;Handles read and write requests made by clients.&lt;/li&gt;
&lt;li&gt;Flushes cache to HDFS.&lt;/li&gt;
&lt;li&gt;Is responsible for region split processing.&lt;/li&gt;
&lt;li&gt;Maintains HLog.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The client first queries the Master server, or more precisely ZooKeeper, to learn the location of the Region server that holds the target data (Region).&lt;/p&gt;
&lt;p&gt;Then that Region server handles the client request.&lt;br&gt;
A Region is always managed by a single Region server and maintains data consistency for reads and writes.&lt;/p&gt;
&lt;p&gt;If a Region server goes down, the assigned Regions fail over to another Region server. This work is performed by the Master server.&lt;br&gt;
However, until failover completes, clients cannot read from or write to the target Region.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://www.devkuma.com/docs/hbase/hbase-region-server.png&#34; alt=&#34;HBase Region Server&#34;&gt;&lt;/p&gt;
&lt;h4 id=&#34;regionserver-components&#34;&gt;RegionServer Components&lt;/h4&gt;
&lt;p&gt;The following are the components of a RegionServer.&lt;/p&gt;
&lt;h5 id=&#34;wal-write-ahead-logging&#34;&gt;WAL (Write-Ahead Logging)&lt;/h5&gt;
&lt;p&gt;What is WAL? It is a standard method used by databases to guarantee data integrity. In systems that use WAL, changes are first recorded in the WAL before data is modified. These records make it possible to determine when a failure occurred, how far processing succeeded, and where subsequent work should resume.&lt;/p&gt;
&lt;p&gt;Various database systems, including PostgreSQL, HBase, and MongoDB, use the WAL method.&lt;/p&gt;
&lt;p&gt;Apache HBase WAL is an intermediate file also called an edit log file. When reading or modifying data in HBase, data is not written directly to disk but kept in memory for a period of time. If the system goes down, all data in memory may be lost. To overcome this problem, Apache HBase first records data in a Write-Ahead Logging file before recording it in memory.&lt;/p&gt;
&lt;h5 id=&#34;hfile&#34;&gt;HFile&lt;/h5&gt;
&lt;p&gt;HFile is the format for storing data in HBase. It belongs to a Column Family, and a Column Family can have multiple HFiles.
It is the actual file where row data is physically stored, and data is stored in key/value format.
When MemStore fills sufficiently, it creates a new HFile in HDFS and stores the data there.&lt;br&gt;
This process is very fast because the structure minimizes random access.&lt;/p&gt;
&lt;h5 id=&#34;store&#34;&gt;Store&lt;/h5&gt;
&lt;p&gt;Store corresponds to a Column family for an HBase table. HFiles are stored here.&lt;/p&gt;
&lt;h5 id=&#34;memstore&#34;&gt;MemStore&lt;/h5&gt;
&lt;p&gt;MemStore resides in main memory and records current data operations. After data is stored in the WAL, key/value data is sorted and stored in the RegionServer memory store. This data is then stored in HFile as-is.
There is one MemStore per Column Family.&lt;/p&gt;
&lt;h5 id=&#34;region&#34;&gt;Region&lt;/h5&gt;
&lt;p&gt;A Region is a table split that is divided based on keys and hosted by RegionServers.&lt;/p&gt;
&lt;h3 id=&#34;client&#34;&gt;Client&lt;/h3&gt;
&lt;p&gt;Clients can be written in Java or other languages and can connect through external APIs to the RegionServer that manages the actual row data. A client queries catalog tables to find a Region. Once the Region is found, the client connects directly to RegionServers, performs data operations, and caches data for fast lookups.&lt;/p&gt;
&lt;h3 id=&#34;catalog-tables&#34;&gt;Catalog Tables&lt;/h3&gt;
&lt;p&gt;Catalog tables are used to maintain metadata for all RegionServers and Regions.&lt;/p&gt;
&lt;p&gt;HBase has two types of catalog tables.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;-ROOT-&lt;/strong&gt; This table contains information about the location of the META table.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;.META&lt;/strong&gt; This table contains information about all Regions and their locations.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;zookeeper&#34;&gt;ZooKeeper&lt;/h3&gt;
&lt;p&gt;Apache ZooKeeper acts like the coordinator for HBase. HBase uses ZooKeeper to manage the state of servers that make up the cluster.
It provides services such as maintaining configuration information, naming, distributed synchronization, and server error notification. Clients communicate with region servers through ZooKeeper.&lt;/p&gt;
&lt;p&gt;Apache ZooKeeper is a high-performance centralized coordination service system for distributed applications that provides distributed synchronization and group services to HBase. Despite cluster coordination, it lets users focus on application logic. It also provides APIs that allow users to interact with the Master server.&lt;/p&gt;
&lt;p&gt;The Apache ZooKeeper API provides consistency, ordering, and durability, and also provides synchronization and concurrency for distributed cluster systems.&lt;/p&gt;
&lt;h2 id=&#34;hbase-data-writeread-process&#34;&gt;HBase Data Write/Read Process&lt;/h2&gt;
&lt;p&gt;This section explains how HBase reads and writes data.&lt;/p&gt;
&lt;h3 id=&#34;hbase-data-writes&#34;&gt;HBase Data Writes&lt;/h3&gt;
&lt;p&gt;When storing data in HBase, the data is stored in two places: the WAL (Write Ahead Log) and the Region server&amp;rsquo;s MemStore.&lt;/p&gt;
&lt;p&gt;Using these two locations, the write process is considered complete when changes have occurred in both the WAL and MemStore.&lt;/p&gt;
&lt;p&gt;When a data load request arrives in HBase, the appropriate Region server is found first. After the Region server is found, a commit log is added and the data is added to the in-memory MemStore.
Data stored in MemStore is flushed to disk as an HFile when it becomes full according to configured values. Memory is cleared, the server waits for the next request, and a corresponding record is also written to the WAL.
MemStore flush occurs when the value exceeds &lt;code&gt;hbase.hregion.memstore.flush.size&lt;/code&gt;; the unit is bytes and the setting is 134217728 (128 MB).&lt;/p&gt;
&lt;p&gt;MemStore is a memory area of the Region server and acts like a cache.
When a certain amount of data accumulates in MemStore, the data is exported to disk as an HFile and persisted.&lt;br&gt;
However, data before it is exported to HFile is stored in server memory (MemStore), so it disappears if the server goes down.
Therefore, HBase writes a log called HLog when writing data, and if the server goes down, it can recover data based on HLog.&lt;/p&gt;
&lt;h2 id=&#34;hbase-data-reads&#34;&gt;HBase Data Reads&lt;/h2&gt;
&lt;p&gt;The process of reading data from HBase is similar to the write process described above.&lt;/p&gt;
&lt;p&gt;When a request enters HBase, MemStore is checked first. If the desired data is found in MemStore, that data is returned.
Otherwise, HBase searches from the most recently flushed file to older files until it finds suitable data that satisfies the query or there are no more flushed files.&lt;/p&gt;
&lt;h2 id=&#34;references&#34;&gt;References&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.joinc.co.kr/w/man/12/hadoop/hbase/about&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;HBase Introduction|joinc.co.kr&lt;i class=&#34;fas fa-external-link-alt&#34;&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
      
      <category>Database</category>
      
      <category>NoSQL</category>
      
      <category>HBase</category>
      
    </item>
    
    <item>
      <title>Apache HBase Regions</title>
      <link>https://www.devkuma.com/en/docs/hbase/regions/</link>
      <pubDate>Wed, 21 Jun 2023 11:05:33 +0900</pubDate>
      <author>kc@example.com (kc kim)</author>
      <guid>https://www.devkuma.com/en/docs/hbase/regions/</guid>
      <description>
        
        
        &lt;p&gt;Apache HBase stores large amounts of data in tables sorted by row key in lexicographic order. Tables are distributed across multiple Regions, and Regions are further distributed across multiple RegionServers. When you create a table in Apache HBase, a default Region is assigned.&lt;/p&gt;
&lt;p&gt;Apache HBase Regions are horizontally scalable. They include a start key and an end key, and rows are sorted and stored in a continuous format based on those keys. Because HBase provides strong consistency, it does not store the same row key in multiple Regions. Regions distribute load across multiple RegionServers and also perform load balancing and failover according to requirements. As data grows, Regions are split manually or automatically.&lt;/p&gt;
&lt;h2 id=&#34;number-of-regions&#34;&gt;Number of Regions&lt;/h2&gt;
&lt;p&gt;It is recommended to use a small number of medium to large Regions, 5 to 20 GB, per RegionServer, usually 20 to 200 Regions. The standard number of Regions is 100.&lt;/p&gt;
&lt;p&gt;Some factors to consider for Regions are as follows.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The limiting factor when choosing the number of Regions is available heap space. MemStore requires almost 2 MB per column family per Region. If there are 100 Regions and 3 column families per Region, MemStore heap space requirements are 600 MB. Fewer Regions require less MemStore heap.&lt;/li&gt;
&lt;li&gt;A large number of Regions creates many small flushes. If each flush creates a StoreFile, many StoreFiles are created, requiring more compaction. MemStore and StoreFile indexes also require more heap space.&lt;/li&gt;
&lt;li&gt;A large number of Regions creates load on the master because the master must assign and reassign Regions to RegionServers. The master must also move Regions for load balancing.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;region-assignment&#34;&gt;Region Assignment&lt;/h2&gt;
&lt;p&gt;In Apache HBase, Regions are assigned by the master as follows.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The master starts the assignment manager.&lt;/li&gt;
&lt;li&gt;The assignment manager checks existing assignments in hbase:meta metadata.&lt;/li&gt;
&lt;li&gt;Assignments are stored when RegionServers are available.&lt;/li&gt;
&lt;li&gt;If a RegionServer is not online, the load balancer is called to assign Regions to another RegionServer.&lt;/li&gt;
&lt;li&gt;The hbase:meta metadata is updated with the new assignment.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;region-failover&#34;&gt;Region failover&lt;/h2&gt;
&lt;p&gt;Because a RegionServer can fail and multiple RegionServers provide data, a RegionServer&amp;rsquo;s Regions can become unavailable. ZooKeeper detects RegionServer failures, and the master starts failover on another RegionServer with a similar Row Key for the Region.&lt;/p&gt;
&lt;h2 id=&#34;region-locality&#34;&gt;Region Locality&lt;/h2&gt;
&lt;p&gt;Region Locality indicates the proximity of a Region to a RegionServer. It is achieved through HDFS block replication across the cluster.&lt;/p&gt;
&lt;p&gt;The replica placement policy is the HDFS replica placement policy, as follows.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The first replica is placed on the local node.&lt;/li&gt;
&lt;li&gt;The second replica is placed on a random node in a different rack.&lt;/li&gt;
&lt;li&gt;The third replica is placed in the same rack as the second replica, but on a different node.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;benefits-of-regions&#34;&gt;Benefits of Regions&lt;/h2&gt;
&lt;p&gt;The benefits of Regions include distributed data storage, partitioning, automatic sharding and scalability, and Region splitting.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s look at each in detail.&lt;/p&gt;
&lt;h3 id=&#34;distributed-data-store&#34;&gt;Distributed data store&lt;/h3&gt;
&lt;p&gt;The design of a distributed data store matches Apache HBase&amp;rsquo;s design of using multiple Regions for a table. Distributing Regions of larger tables across a cluster of nodes provides high availability.&lt;/p&gt;
&lt;h3 id=&#34;partitioning&#34;&gt;Partitioning&lt;/h3&gt;
&lt;p&gt;Data tables are stored in multiple Regions, and Regions partition the data. To access data in that table, access must now happen from different Regions. Having multiple Regions provides the benefit of delivering data quickly.&lt;/p&gt;
&lt;h3 id=&#34;automatic-sharding-and-scalability&#34;&gt;Automatic sharding and scalability&lt;/h3&gt;
&lt;p&gt;The automatic sharding process is used to split a Region into roughly two halves when the number of row keys in the Region becomes too large. In HBase, the basic unit of horizontal scalability is the Region, and rows are shared by Region.&lt;/p&gt;
&lt;h3 id=&#34;region-splitting&#34;&gt;Region splitting&lt;/h3&gt;
&lt;p&gt;When a threshold is exceeded, a Region is split. This is handled by the RegionServer, which splits the Region and takes the split Region offline. After that, two split Regions are added to hbase:meta, opened by the RegionServer, and reported to the master. Region splitting is automatic by default, but it can also be run manually. The HBase Region split policy is configured with &lt;code&gt;hbase.regionserver.region.split.policy&lt;/code&gt;.&lt;/p&gt;

      </description>
      
      <category>Database</category>
      
      <category>NoSQL</category>
      
      <category>HBase</category>
      
    </item>
    
    <item>
      <title>HBase Data Model</title>
      <link>https://www.devkuma.com/en/docs/hbase/data-model/</link>
      <pubDate>Tue, 20 Jun 2023 19:07:12 +0900</pubDate>
      <author>kc@example.com (kc kim)</author>
      <guid>https://www.devkuma.com/en/docs/hbase/data-model/</guid>
      <description>
        
        
        &lt;h2 id=&#34;data-structure&#34;&gt;Data structure&lt;/h2&gt;
&lt;p&gt;HBase tables have no fixed type and are stored as byte arrays (&lt;code&gt;byte[]&lt;/code&gt;).&lt;br&gt;
HBase rows are sorted in ascending order by a unique row key, and this row key is used when reading and writing table values.&lt;br&gt;
As mentioned earlier, data managed by HBase is divided into Regions by fixed ranges, and a table has multiple Regions.
HBase columns are also grouped in units called column families.&lt;br&gt;
Table data is divided by Region and by column family, then exported as files.
Files are separate, but if they belong to the same Region, they are stored on the same Region server.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://www.devkuma.com/docs/hbase/hbase-table.png&#34; alt=&#34;HBase Table&#34;&gt;&lt;/p&gt;
&lt;p&gt;Each HBase data cell value has a timestamp, so versions are managed.
Files are stored in the following format.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Row(Row Key): Column family: Column: timestamp: value
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;data-model&#34;&gt;Data model&lt;/h2&gt;
&lt;p&gt;The Apache HBase data model is a distributed, multidimensional, persistent, sorted map indexed by column key, row key, and timestamp. This is why Apache HBase is also called a key-value storage system.&lt;/p&gt;
&lt;p&gt;The basic unit of HBase is a column. Columns form a Column Family, and Column Families form a table. Each Row in a table has a Row Key and can be identified by it. See the figure below.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://www.devkuma.com/docs/hbase/hbase-column-family.png&#34; alt=&#34;HBase Column family&#34;&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;This table has two column families: Customer and Sales.&lt;/li&gt;
&lt;li&gt;The Customer column family has two columns: Name and City.&lt;/li&gt;
&lt;li&gt;The Sales column family has two columns: Product and Amount.&lt;/li&gt;
&lt;li&gt;A Row consists of Row Key, Customer CF, and Sales CF.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The following are data model terms used in Apache HBase.&lt;/p&gt;
&lt;h3 id=&#34;table&#34;&gt;Table&lt;/h3&gt;
&lt;p&gt;An Apache HBase table consists of multiple Rows. It organizes data into tables made of characters that are easy to use with the file system.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A set of Rows, with a Row Key and multiple column families.&lt;/li&gt;
&lt;li&gt;In schema definition, only Column Families are defined.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;row&#34;&gt;Row&lt;/h3&gt;
&lt;p&gt;Apache HBase stores data based on Rows, and each Row has a unique Row Key. The Row Key is represented as a byte array.&lt;/p&gt;
&lt;h4 id=&#34;row-key&#34;&gt;Row Key&lt;/h4&gt;
&lt;p&gt;Because data is collected based on the Row Key, the Row Key must be designed so that data can be distributed appropriately. The goal of Row Key design is to store data so similar Rows are near each other.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Sorted lexicographically as arbitrary bytes.&lt;/li&gt;
&lt;li&gt;An empty byte string means the start and end of the table.&lt;/li&gt;
&lt;li&gt;Anything can be a row key, including strings, integers, binary data, and serialized data structures.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In general, a Row Key pattern can also be organized in website domain format. If domains are stored in reverse order, such as &lt;code&gt;org.apache.mair&lt;/code&gt; and &lt;code&gt;org.apache.jira&lt;/code&gt;, Apache domain data can be stored near each other.&lt;/p&gt;
&lt;h3 id=&#34;column&#34;&gt;Column&lt;/h3&gt;
&lt;p&gt;A Column consists of a Column Family and a Column Qualifier.&lt;/p&gt;
&lt;h4 id=&#34;column-family&#34;&gt;Column Family&lt;/h4&gt;
&lt;p&gt;A Column Family is used to store Rows and also provides the structure for storing data in Apache HBase.&lt;/p&gt;
&lt;p&gt;It consists of characters and strings and can be used with file system paths. Each row in a table has the same column families, but a row does not need to store data in every column family.&lt;/p&gt;
&lt;h4 id=&#34;column-qualifier&#34;&gt;Column Qualifier&lt;/h4&gt;
&lt;p&gt;A Column Qualifier provides an index for data stored in a Column Family. The Column qualifier is not a fixed value, so various data can be entered. It can be thought of as a map object.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A group of Columns where all ColumnFamily members use the same prefix.&lt;/li&gt;
&lt;li&gt;NOSQL:Cassandra and NOSQL:HBASE are member columns of the NOSQL column family.&lt;/li&gt;
&lt;li&gt;The column family prefix must consist of displayable characters.&lt;/li&gt;
&lt;li&gt;Part of the table schema definition must be specified first.&lt;/li&gt;
&lt;li&gt;All column family members are physically stored together in the file system.&lt;/li&gt;
&lt;li&gt;New column family members can be added dynamically.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;cell&#34;&gt;Cell&lt;/h3&gt;
&lt;p&gt;A Cell is a data unit consisting of Column family, Row key, and Column qualifier. The value of each column is called a cell.&lt;/p&gt;
&lt;p&gt;A data cell includes a value and a timestamp, which is the version of the value. Because there is a timestamp, previous values are stored together and maintained for a certain period.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A tuple with ROW KEY, Column, and Version specified.&lt;/li&gt;
&lt;li&gt;The value is an arbitrary byte array and Timestamp.&lt;/li&gt;
&lt;li&gt;Table cells are versioned, only cells.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;timestamp&#34;&gt;Timestamp&lt;/h4&gt;
&lt;p&gt;Versions are assigned to values where the same data is stored in a Cell. Each version is identified by a version number assigned during creation time. If Timestamp is not mentioned while writing data, the current time is assigned.&lt;/p&gt;
&lt;h2 id=&#34;hbase-data-types&#34;&gt;HBase data types&lt;/h2&gt;
&lt;p&gt;Apache HBase has no concept of data types. Everything is a byte array. When values are inserted, it is a kind of byte-in and byte-out database converted to byte arrays using the &lt;code&gt;Put&lt;/code&gt; and &lt;code&gt;Result&lt;/code&gt; interfaces. Apache HBase uses a serialization framework to convert user data into byte arrays.&lt;/p&gt;
&lt;p&gt;Apache HBase cells can store values up to 10 to 15 MB. If a value is larger, it can be stored in Hadoop HDFS and file path metadata information can be stored in Apache HBase.&lt;/p&gt;
&lt;h2 id=&#34;hbase-data-storage&#34;&gt;HBase data storage&lt;/h2&gt;
&lt;p&gt;The following introduces how Apache HBase is physically stored.&lt;/p&gt;
&lt;h3 id=&#34;conceptual-view&#34;&gt;Conceptual view&lt;/h3&gt;
&lt;p&gt;You can see that a table is represented as a series of Rows at the conceptual level.&lt;/p&gt;
&lt;p&gt;The following is a conceptual diagram of how data is stored in HBase.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://www.devkuma.com/docs/hbase/hbase_conceptual_view.png&#34; alt=&#34;Conceptual view&#34; width=&#34;70%&#34;&gt;&lt;/p&gt;
&lt;h3 id=&#34;physical-view&#34;&gt;Physical view&lt;/h3&gt;
&lt;p&gt;In the physical view, a table is physically stored by column family.&lt;/p&gt;
&lt;p&gt;The following example shows a table that will be stored as a column-family-based table.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://www.devkuma.com/docs/hbase/hase_physical_view1.png&#34; alt=&#34;Physical view&#34; width=&#34;50%&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://www.devkuma.com/docs/hbase/hase_physical_view2.png&#34; alt=&#34;Physical view&#34; width=&#34;40%&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;namespace&#34;&gt;Namespace&lt;/h2&gt;
&lt;p&gt;A namespace is a logical group of tables. It is similar to grouping related tables in a relational database.&lt;/p&gt;
&lt;p&gt;The representation of a namespace is as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;HBase Namespaces
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Table
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Region Server Group
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Permission
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Quota
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Let&amp;rsquo;s look at each component of namespace space.&lt;/p&gt;
&lt;h3 id=&#34;table-1&#34;&gt;Table&lt;/h3&gt;
&lt;p&gt;All tables are part of a namespace. If no namespace is defined, the table is assigned to the default namespace.&lt;/p&gt;
&lt;h3 id=&#34;regionserver-group&#34;&gt;RegionServer group&lt;/h3&gt;
&lt;p&gt;A default RegionServer group can be assigned to a namespace. In this case, created tables become members of the RegionServer group.&lt;/p&gt;
&lt;h3 id=&#34;permission&#34;&gt;Permission&lt;/h3&gt;
&lt;p&gt;Using namespaces, users can define access control lists such as read, delete, and update permissions, and with write permission, users can create tables.&lt;/p&gt;
&lt;h3 id=&#34;quota&#34;&gt;Quota&lt;/h3&gt;
&lt;p&gt;This component is used to define the quota that a namespace can include for tables and Regions.&lt;/p&gt;
&lt;h3 id=&#34;predefined-namespaces&#34;&gt;Predefined namespaces&lt;/h3&gt;
&lt;p&gt;There are two predefined special namespaces.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;hbase&lt;/strong&gt;: A system namespace used to include HBase internal tables.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;default&lt;/strong&gt;: This namespace is for all tables where no namespace is defined.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;data-model-operations&#34;&gt;Data model operations&lt;/h2&gt;
&lt;p&gt;The main data model operations are Get, Put, Scan, and Delete. These operations can be used to read, write, and delete records from tables.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s look at each operation in detail.&lt;/p&gt;
&lt;h3 id=&#34;get&#34;&gt;Get&lt;/h3&gt;
&lt;p&gt;The Get operation is similar to the Select statement in a relational database. It is used to fetch the contents of an HBase table.&lt;/p&gt;
&lt;p&gt;You can run the Get command in the HBase shell as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main) :001:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; get &amp;#39;table name&amp;#39;, &amp;#39;row key&amp;#39; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;filters&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;put&#34;&gt;Put&lt;/h3&gt;
&lt;p&gt;The Put operation is used to write data to a table.&lt;/p&gt;
&lt;h3 id=&#34;scan&#34;&gt;Scan&lt;/h3&gt;
&lt;p&gt;The Scan operation is used to read multiple rows from a table. It differs from Get, where the set of rows to read must be specified. Scan can iterate over a row range or all rows in a table.&lt;/p&gt;
&lt;h3 id=&#34;delete&#34;&gt;Delete&lt;/h3&gt;
&lt;p&gt;The Delete operation is used to delete a row or set of rows from an HBase table. It can be executed through &lt;code&gt;HTable.delete()&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;When a delete command is executed, it is marked as deleted, and when compaction occurs, the row is finally deleted from the table.&lt;/p&gt;
&lt;p&gt;Internal delete types are as follows.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Delete&lt;/strong&gt;: Used for a specific version of a column.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Delete column&lt;/strong&gt;: Can be used for all column versions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Delete family&lt;/strong&gt;: Used for all columns in a specific ColumnFamily.&lt;/li&gt;
&lt;/ul&gt;

      </description>
      
      <category>Database</category>
      
      <category>NoSQL</category>
      
      <category>HBase</category>
      
    </item>
    
    <item>
      <title>Installing HBase with Docker for Local Practice</title>
      <link>https://www.devkuma.com/en/docs/hbase/docker-install/</link>
      <pubDate>Tue, 13 Jun 2023 18:40:33 +0900</pubDate>
      <author>kc@example.com (kc kim)</author>
      <guid>https://www.devkuma.com/en/docs/hbase/docker-install/</guid>
      <description>
        
        
        &lt;h2 id=&#34;installing-hbase-with-docker&#34;&gt;Installing HBase with Docker&lt;/h2&gt;
&lt;p&gt;Let&amp;rsquo;s install HBase in a Docker environment using the Docker image below.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;HBase Docker image to install
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://hub.docker.com/r/dajobe/hbase&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;https://hub.docker.com/r/dajobe/hbase&lt;i class=&#34;fas fa-external-link-alt&#34;&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;downloading-hbase-docker-run-commands&#34;&gt;Downloading HBase Docker run commands&lt;/h2&gt;
&lt;p&gt;Download, or clone, the HBase Docker run commands from the GitHub repository below.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GitHub
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/dajobe/hbase-docker&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;https://github.com/dajobe/hbase-docker&lt;i class=&#34;fas fa-external-link-alt&#34;&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone git@github.com:dajobe/hbase-docker.git
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;running-hbase-docker&#34;&gt;Running HBase Docker&lt;/h2&gt;
&lt;p&gt;With Docker running, execute the following command as-is.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-zsh&#34; data-lang=&#34;zsh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;./start-hbase.sh
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It is recommended to use the start-hbase.sh script, which starts the container, inspects it to determine all local API ports and web UI ports, and suggests editing /etc/hosts to add an alias for the container IP if it does not already exist.&lt;/p&gt;
&lt;p&gt;It is recommended to use the start-hbase.sh script, which starts the container, determines all local API ports and web UI ports, and suggests editing /etc/hosts to add an alias for the container IP if it does not already exist.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-zsh&#34; data-lang=&#34;zsh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;% ./start-hbase.sh
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;start-hbase.sh: Starting HBase container
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Error: No such container: hbase-docker
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Unable to find image &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;dajobe/hbase:latest&amp;#39;&lt;/span&gt; locally
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;latest: Pulling from dajobe/hbase
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;6cf436f81810: Pulling fs layer
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;... omitted ...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;159beed970fa: Pull &lt;span style=&#34;color:#204a87&#34;&gt;complete&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Digest: sha256:daa36a6d90b118ced866b6c76fcd918e7da73302b0e4971f506f0f61f645a9fe
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Status: Downloaded newer image &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;for&lt;/span&gt; dajobe/hbase:latest
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;WARNING: The requested image&lt;span style=&#34;color:#a40000&#34;&gt;&amp;#39;&lt;/span&gt;s platform &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;(&lt;/span&gt;linux/amd64&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;)&lt;/span&gt; does not match the detected host platform &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;(&lt;/span&gt;linux/arm64/v8&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;)&lt;/span&gt; and no specific platform was requested
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;start-hbase.sh: Container has ID 3804d552250334cc850189e076b77cb0d3066850cef332bec7a125dc29228361
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;./start-hbase.sh: line 32: python: &lt;span style=&#34;color:#204a87&#34;&gt;command&lt;/span&gt; not found
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here, the container ID is &lt;code&gt;3804d552250334cc850189e076b77cb0d3066850cef332bec7a125dc29228361&lt;/code&gt;. Record it because it is needed when running the shell.&lt;/p&gt;
&lt;p&gt;When you run the command above, &lt;code&gt;data&lt;/code&gt; is created in the current path where it was run, ports are opened, and HBase should run.&lt;/p&gt;
&lt;h3 id=&#34;manual-run-method&#34;&gt;Manual run method&lt;/h3&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-zsh&#34; data-lang=&#34;zsh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker run --name&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;hbase-docker &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  -h hbase-docker &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  -p 9095:9095 &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  -p 8085:8085 &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  -p 16010:16010  &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  -v &lt;span style=&#34;color:#000&#34;&gt;$PWD&lt;/span&gt;/data:/data &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  -d dajobe/hbase
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;running-the-hbase-shell&#34;&gt;Running the HBase Shell&lt;/h2&gt;
&lt;p&gt;Next, let&amp;rsquo;s run the shell command that can connect to HBase using the Docker image.&lt;/p&gt;
&lt;p&gt;Put the container ID recorded above into &lt;code&gt;$id&lt;/code&gt; and run it.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-zsh&#34; data-lang=&#34;zsh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker run --rm -it --link &lt;span style=&#34;color:#000&#34;&gt;$id&lt;/span&gt;:hbase-docker dajobe/hbase hbase shell
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;On macOS Apple Silicon, such as M1 or M2, the following error may occur.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-zsh&#34; data-lang=&#34;zsh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;% docker run --rm -it --link 3804d552250334cc850189e076b77cb0d3066850cef332bec7a125dc29228361:hbase-docker dajobe/hbase hbase shell
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;WARNING: The requested image&lt;span style=&#34;color:#a40000&#34;&gt;&amp;#39;&lt;/span&gt;s platform &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;(&lt;/span&gt;linux/amd64&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;)&lt;/span&gt; does not match the detected host platform &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;(&lt;/span&gt;linux/arm64/v8&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;)&lt;/span&gt; and no specific platform was requested
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In that case, delete the Docker container that is already running, add the &lt;code&gt;--platform linux/amd64&lt;/code&gt; option, and run it again.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-zsh&#34; data-lang=&#34;zsh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;% docker run --rm -it --platform linux/amd64 --link 3804d552250334cc850189e076b77cb0d3066850cef332bec7a125dc29228361:hbase-docker dajobe/hbase hbase shell
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;2023-06-16 09:38:17,680 WARN  &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;[&lt;/span&gt;main&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;]&lt;/span&gt; util.NativeCodeLoader: Unable to load native-hadoop library &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;for&lt;/span&gt; your platform... using builtin-java classes where applicable
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;HBase Shell
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Use &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;help&amp;#34;&lt;/span&gt; to get list of supported commands.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Use &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;exit&amp;#34;&lt;/span&gt; to quit this interactive shell.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;For Reference, please visit: http://hbase.apache.org/2.0/book.html#shell
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Version 2.1.2, r1dfc418f77801fbfb59a125756891b9100c1fc6d, Sun Dec &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;30&lt;/span&gt; 21:45:09 PST &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;2018&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Took 0.0480 seconds
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;(&lt;/span&gt;main&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;)&lt;/span&gt;:001:0&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The command to exit the shell is &lt;code&gt;quit&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-zsh&#34; data-lang=&#34;zsh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;(&lt;/span&gt;main&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;)&lt;/span&gt;:005:0&amp;gt; quit
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;em&gt;How to use commands will be explained on the next page.&lt;/em&gt;&lt;/p&gt;

      </description>
      
      <category>Database</category>
      
      <category>NoSQL</category>
      
      <category>HBase</category>
      
    </item>
    
    <item>
      <title>HBase General Shell Commands - status, version, whoami</title>
      <link>https://www.devkuma.com/en/docs/hbase/general-shell-commands/</link>
      <pubDate>Fri, 16 Jun 2023 14:55:22 +0900</pubDate>
      <author>kc@example.com (kc kim)</author>
      <guid>https://www.devkuma.com/en/docs/hbase/general-shell-commands/</guid>
      <description>
        
        
        &lt;h2 id=&#34;general-hbase-shell-commands&#34;&gt;General HBase shell commands&lt;/h2&gt;
&lt;p&gt;This section introduces general HBase commands.&lt;/p&gt;
&lt;h2 id=&#34;status&#34;&gt;&lt;code&gt;status&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;Displays cluster status. Additional options, &lt;code&gt;&amp;quot;summary&amp;quot;&lt;/code&gt;, &lt;code&gt;&amp;quot;simple&amp;quot;&lt;/code&gt;, and &lt;code&gt;&amp;quot;detailed&amp;quot;&lt;/code&gt;, can be used to check detailed information. The default is &lt;code&gt;&amp;quot;summary&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You can check cluster status with the status command.&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Option&lt;/th&gt;
          &lt;th&gt;Description&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;simple&lt;/td&gt;
          &lt;td&gt;Server information&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;summary&lt;/td&gt;
          &lt;td&gt;Number of servers, load&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;detailed&lt;/td&gt;
          &lt;td&gt;Server information, meta information&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;replication&lt;/td&gt;
          &lt;td&gt;Source and sink information&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;status&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):001:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; status
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1 servers, 0 dead, 2.0000 average load
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;status &#39;simple&#39;&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):002:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; status &amp;#39;simple&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1 live servers
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    532f4d895a98:40371 1686636094968
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        requestsPerSecond=0.0, numberOfOnlineRegions=2, usedHeapMB=19, maxHeapMB=966, numberOfStores=2, numberOfStorefiles=2, storefileUncompressedSizeMB=0, storefileSizeMB=0, memstoreSizeMB=0, storefileIndexSizeMB=0, readRequestsCount=42, writeRequestsCount=5, rootIndexSizeKB=0, totalStaticIndexSizeKB=0, totalStaticBloomSizeKB=0, totalCompactingKVs=0, currentCompactedKVs=0, compactionProgressPct=NaN, coprocessors=[]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0 dead servers
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Aggregate load: 0, regions: 2
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;status &#39;summary&#39;&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):003:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; status &amp;#39;summary&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1 servers, 0 dead, 2.0000 average load
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;status &#39;detailed&#39;&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):004:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; status &amp;#39;detailed&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;version 2.0.0-SNAPSHOT
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0 regionsInTransition
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;master coprocessors: []
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1 live servers
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    532f4d895a98:40371 1686636094968
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        requestsPerSecond=0.0, numberOfOnlineRegions=2, usedHeapMB=21, maxHeapMB=966, numberOfStores=2, numberOfStorefiles=2, storefileUncompressedSizeMB=0, storefileSizeMB=0, memstoreSizeMB=0, storefileIndexSizeMB=0, readRequestsCount=42, writeRequestsCount=5, rootIndexSizeKB=0, totalStaticIndexSizeKB=0, totalStaticBloomSizeKB=0, totalCompactingKVs=0, currentCompactedKVs=0, compactionProgressPct=NaN, coprocessors=[]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;hbase:meta,,1&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            numberOfStores=1, numberOfStorefiles=1, storefileUncompressedSizeMB=0, storefileSizeMB=0, memstoreSizeMB=0, storefileIndexSizeMB=0, readRequestsCount=36, writeRequestsCount=3, rootIndexSizeKB=0, totalStaticIndexSizeKB=0, totalStaticBloomSizeKB=0, totalCompactingKVs=0, currentCompactedKVs=0, compactionProgressPct=NaN, completeSequenceId=10
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;hbase:namespace,,1686636105191.93358ca1f9bf1816320d88c48e39a3b4.&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            numberOfStores=1, numberOfStorefiles=1, storefileUncompressedSizeMB=0, storefileSizeMB=0, memstoreSizeMB=0, storefileIndexSizeMB=0, readRequestsCount=6, writeRequestsCount=2, rootIndexSizeKB=0, totalStaticIndexSizeKB=0, totalStaticBloomSizeKB=0, totalCompactingKVs=0, currentCompactedKVs=0, compactionProgressPct=NaN, completeSequenceId=8
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0 dead servers
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;version&#34;&gt;version&lt;/h2&gt;
&lt;p&gt;Checks the installed HBase version information.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;version&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):001:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; version
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;2.0.0-SNAPSHOT, r31ed817447b4c3edef2019d1580aa3ede83a82da, Fri Sep 26 02:07:26 UTC 2014
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;whoami&#34;&gt;whoami&lt;/h3&gt;
&lt;p&gt;Checks the current HBase user.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;whoami&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):008:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; whoami
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;root (auth:SIMPLE)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    groups: root
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
      </description>
      
      <category>Database</category>
      
      <category>NoSQL</category>
      
      <category>HBase</category>
      
    </item>
    
    <item>
      <title>HBase Table Management Commands - create, list, exists, disable/enable, describe, alter, drop</title>
      <link>https://www.devkuma.com/en/docs/hbase/table-management-commands/</link>
      <pubDate>Fri, 16 Jun 2023 14:55:22 +0900</pubDate>
      <author>kc@example.com (kc kim)</author>
      <guid>https://www.devkuma.com/en/docs/hbase/table-management-commands/</guid>
      <description>
        
        
        &lt;h2 id=&#34;table-management-commands&#34;&gt;Table Management commands&lt;/h2&gt;
&lt;p&gt;This section introduces HBase Shell commands for table management.&lt;/p&gt;
&lt;h2 id=&#34;create---create-a-table&#34;&gt;create - Create a Table&lt;/h2&gt;
&lt;p&gt;You can create a table by using the &lt;code&gt;create&lt;/code&gt; command. Here, you must specify the table name and Column Family name. The syntax for creating a table in the HBase shell is as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;create &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;table name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;column family&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following is a sample schema for a table named &lt;code&gt;order&lt;/code&gt;. It has two column families: &lt;code&gt;customer&lt;/code&gt; and &lt;code&gt;sales&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://www.devkuma.com/docs/hbase/hbase-column-family.png&#34; alt=&#34;HBase Column family&#34;&gt;&lt;/p&gt;
&lt;p&gt;You can create this table in the HBase shell as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;create &amp;#39;order&amp;#39;, &amp;#39;customer&amp;#39;, &amp;#39;sales&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;When executed, it runs as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):002:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; create &amp;#39;order&amp;#39;, &amp;#39;customer&amp;#39;, &amp;#39;sales&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Created table order
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Took 2.4344 seconds
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;=&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; Hbase::Table - order
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;create-options&#34;&gt;create Options&lt;/h3&gt;
&lt;p&gt;You can also add options when creating a table.&lt;/p&gt;
&lt;p&gt;Create &lt;code&gt;t1&lt;/code&gt; and create column family &lt;code&gt;cf1&lt;/code&gt;, storing up to 5 latest &lt;code&gt;version&lt;/code&gt; values.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;create &amp;#39;t1&amp;#39;, {NAME =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;f1&amp;#39;, VERSIONS =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; 5}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Create &lt;code&gt;t1&lt;/code&gt; and create column families &lt;code&gt;cf1&lt;/code&gt;, &lt;code&gt;cf2&lt;/code&gt;, and &lt;code&gt;cf3&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;create &amp;#39;t1&amp;#39;, {NAME =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;f1&amp;#39;, NAME =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;f2&amp;#39;, NAME =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;f3&amp;#39;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following commands specify other options.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;create &amp;#39;t1&amp;#39;, {NAME =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;cf2&amp;#39;, VERSION =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; 1, TTL =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; 2592000, BLOCKCACHE =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;true} 
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;create &amp;#39;t1&amp;#39;, {NAME =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;cf2&amp;#39;, CONFIGURATION =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; {&amp;#39;hbase.hstore.blockingStoreFiles&amp;#39; =&amp;#39;10&amp;#39;}} 
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;list---view-table-list&#34;&gt;list - View Table List&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;list&lt;/code&gt; is a command used to list all tables in HBase. The syntax of the list command is as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;list
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you enter this command and run it at the HBase prompt, all HBase tables are displayed as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):004:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; list
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;TABLE
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;order
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1 row(s) in 0.1070 seconds
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;=&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; [&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;order&amp;#34;&lt;/span&gt;]
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can also add options as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):005:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; list &amp;#39;customer.*&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;TABLE
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;order
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1 row(s) in 0.0140 seconds
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;=&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; [&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;order&amp;#34;&lt;/span&gt;]
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;exists---check-table-existence&#34;&gt;exists - Check Table Existence&lt;/h2&gt;
&lt;p&gt;You can check whether a table exists by using the &lt;code&gt;exists&lt;/code&gt; command. The following is the syntax for checking whether a table exists.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;exists &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;table name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following example checks whether the &lt;code&gt;order&lt;/code&gt; table exists.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):022:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; exists &amp;#39;order&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Table order does exist
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0 row(s) in 0.0680 seconds
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following example checks whether the &lt;code&gt;user&lt;/code&gt; table exists, where it does not actually exist.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):023:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; exists &amp;#39;user&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Table user does not exist
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0 row(s) in 0.0110 seconds
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;disable---disable-a-table&#34;&gt;disable - Disable a Table&lt;/h2&gt;
&lt;p&gt;To delete a table or change its settings, you must first disable the table by using the &lt;code&gt;disable&lt;/code&gt; command. You can enable it again by using the &lt;code&gt;enable&lt;/code&gt; command.&lt;/p&gt;
&lt;p&gt;The syntax for disabling a table is as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;disable &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;table name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following example shows how to disable the &lt;code&gt;order&lt;/code&gt; table.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):004:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; disable &amp;#39;order&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0 row(s) in 1.4570 seconds
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Even after disabling a table, you can check that the table exists with the &lt;code&gt;list&lt;/code&gt; and &lt;code&gt;exists&lt;/code&gt; commands.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):009:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; list
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;TABLE
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;order
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1 row(s) in 0.0140 seconds
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;=&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; [&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;order&amp;#34;&lt;/span&gt;]
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;A disabled table cannot be scanned. The following error occurs.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):010:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; scan &amp;#39;order&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ROW                                         COLUMN+CELL
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ERROR: order is disabled.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;// omitted
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;is_disabled&#34;&gt;is_disabled&lt;/h3&gt;
&lt;p&gt;This command is used to check whether a table is disabled. The syntax is as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;is_disabled &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;table name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following example checks whether a table named &lt;code&gt;order&lt;/code&gt; is disabled. It returns &lt;code&gt;true&lt;/code&gt; if disabled and &lt;code&gt;false&lt;/code&gt; otherwise.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):011:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; is_disabled &amp;#39;order&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;true
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0 row(s) in 0.0360 seconds
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;disable_all&#34;&gt;disable_all&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;disable_all&lt;/code&gt; command is used to disable all tables matching a given regular expression. The syntax of the &lt;code&gt;disable_all&lt;/code&gt; command is as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;disable_all ‘&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;regex table name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;’ 
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;A simple example is shown below. The following command disables all tables that start with &lt;code&gt;r&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;disable_all &amp;#39;r.*&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Assume HBase has four tables that start with &lt;code&gt;dev&lt;/code&gt;: &lt;code&gt;dev_follow&lt;/code&gt;, &lt;code&gt;dev_friend&lt;/code&gt;, &lt;code&gt;dev_test&lt;/code&gt;, and &lt;code&gt;dev_user&lt;/code&gt;. The following code disables all tables that start with &lt;code&gt;dev&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):017:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; disable_all &amp;#39;dev.*&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dev_follow
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dev_friend
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dev_test
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dev_user
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Disable the above 4 tables (y/n)?
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;y
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;4 tables successfully disabled
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;enable---enable-a-table&#34;&gt;enable - Enable a Table&lt;/h2&gt;
&lt;p&gt;To enable a disabled table, use the &lt;code&gt;enable&lt;/code&gt; command. The syntax for enabling a table is as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;enable &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;table name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following is an example of enabling a table.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):018:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; enable &amp;#39;order&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0 row(s) in 0.6580 seconds
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After enabling the table, scan it. If no error occurs, the table has been enabled normally.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):020:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; scan &amp;#39;order&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ROW                                         COLUMN+CELL
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0 row(s) in 0.0730 seconds
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;is_enabled&#34;&gt;is_enabled&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;is_enabled&lt;/code&gt; command is used to check whether a table is enabled. The syntax is as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;is_enabled &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;table name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following command checks whether a table named &lt;code&gt;order&lt;/code&gt; is enabled. It returns &lt;code&gt;true&lt;/code&gt; if enabled and &lt;code&gt;false&lt;/code&gt; otherwise.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):021:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; is_enabled &amp;#39;order&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;true
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0 row(s) in 0.0750 seconds
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;describe---describe-a-table&#34;&gt;describe - Describe a Table&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;describe&lt;/code&gt; command returns a description of a table. The syntax is as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;describe &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;table name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following is the output of the &lt;code&gt;describe&lt;/code&gt; command for the &lt;code&gt;order&lt;/code&gt; table.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):006:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; describe &amp;#39;order&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;DESCRIPTION                                                                                                  ENABLED
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#39;order&amp;#39;, {NAME =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;customer&amp;#39;, DATA_BLOCK_ENCODING =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;NONE&amp;#39;, BLOOMFILTER =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;ROW&amp;#39;, REPLICATION_SCO true
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; PE =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;0&amp;#39;, VERSIONS =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;1&amp;#39;, COMPRESSION =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;NONE&amp;#39;, MIN_VERSIONS =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;0&amp;#39;, TTL =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;FOREVER&amp;#39;, KEEP_DELETED_CELL
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; S =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;false&amp;#39;, BLOCKSIZE =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;65536&amp;#39;, IN_MEMORY =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;false&amp;#39;, BLOCKCACHE =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;true&amp;#39;}, {NAME =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;sales&amp;#39;, DATA_BLO
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; CK_ENCODING =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;NONE&amp;#39;, BLOOMFILTER =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;ROW&amp;#39;, REPLICATION_SCOPE =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;0&amp;#39;, VERSIONS =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;1&amp;#39;, COMPRESSION =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;NON
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; E&amp;#39;, MIN_VERSIONS =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;0&amp;#39;, TTL =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;FOREVER&amp;#39;, KEEP_DELETED_CELLS =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;false&amp;#39;, BLOCKSIZE =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;65536&amp;#39;, IN_MEMORY =
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;false&amp;#39;, BLOCKCACHE =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;true&amp;#39;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1 row(s) in 0.1450 seconds
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;alter---change-a-table&#34;&gt;alter - Change a Table&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;alter&lt;/code&gt; is a command used to change an existing table. You can use this command to change the maximum number of cells in a column family, set and remove table-scope operators, and delete column families from a table.&lt;/p&gt;
&lt;h3 id=&#34;change-the-maximum-number-of-cells-in-a-column-family&#34;&gt;Change the Maximum Number of Cells in a Column Family&lt;/h3&gt;
&lt;p&gt;The following is the syntax for changing the maximum number of cells in a column family.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;alter &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;table name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;, NAME =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;column family&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;, VERSIONS =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; 5 
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following example sets the maximum number of cells to 5.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):007:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;alter &amp;#39;order&amp;#39;, NAME =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;customer&amp;#39;, VERSIONS =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; 5
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Updating all regions with the new schema...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0/1 regions updated.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1/1 regions updated.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Done.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0 row(s) in 2.4240 seconds
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):009:0&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;table-scope-operators&#34;&gt;Table-Scope Operators&lt;/h3&gt;
&lt;p&gt;With &lt;code&gt;alter&lt;/code&gt;, you can set and remove table-scope operators such as &lt;code&gt;MAX_FILESIZE&lt;/code&gt;, &lt;code&gt;READONLY&lt;/code&gt;, &lt;code&gt;MEMSTORE_FLUSHSIZE&lt;/code&gt;, and &lt;code&gt;DEFERRED_LOG_FLUSH&lt;/code&gt;.&lt;/p&gt;
&lt;h4 id=&#34;readonly---set-read-only&#34;&gt;READONLY - Set Read-Only&lt;/h4&gt;
&lt;p&gt;The following is the syntax for making a table read-only.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;alter &amp;#39;&amp;lt;table name&amp;gt;&amp;#39;, READONLY(option)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The following example makes the &lt;code&gt;order&lt;/code&gt; table read-only.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):009:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; alter &amp;#39;order&amp;#39;, READONLY
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Updating all regions with the new schema...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0/1 regions updated.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1/1 regions updated.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Done.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0 row(s) in 2.3650 seconds
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id=&#34;max_filesize---change-region-setting&#34;&gt;MAX_FILESIZE - Change Region Setting&lt;/h4&gt;
&lt;p&gt;Change the region setting with &lt;code&gt;MAX_FILESIZE&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;alter &amp;#39;t1&amp;#39;, MAX_FILESIZE =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;123217728&amp;#39; 
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This changes the maximum region size to 128 MB.&lt;/p&gt;
&lt;h3 id=&#34;delete-a-column-family&#34;&gt;Delete a Column Family&lt;/h3&gt;
&lt;p&gt;With &lt;code&gt;alter&lt;/code&gt;, you can also delete a column family. The syntax for deleting a column family with &lt;code&gt;alter&lt;/code&gt; is as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;alter &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;table name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;, &amp;#39;delete&amp;#39; =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;column family&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following is an example of deleting a column family from the &lt;code&gt;order&lt;/code&gt; table.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):010:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; alter &amp;#39;order&amp;#39;, &amp;#39;delete&amp;#39; =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;sales&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Updating all regions with the new schema...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0/1 regions updated.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1/1 regions updated.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Done.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0 row(s) in 2.3790 seconds
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you check with the &lt;code&gt;describe&lt;/code&gt; command, you can see that &lt;code&gt;&#39;sales&#39;&lt;/code&gt; has disappeared.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):011:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; describe &amp;#39;order&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;DESCRIPTION                                                                                                  ENABLED
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;#39;order&amp;#39;, {NAME =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;READONLY&amp;#39;, DATA_BLOCK_ENCODING =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;NONE&amp;#39;, BLOOMFILTER =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;ROW&amp;#39;, REPLICATION_SCO true
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; PE =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;0&amp;#39;, COMPRESSION =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;NONE&amp;#39;, VERSIONS =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;1&amp;#39;, TTL =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;FOREVER&amp;#39;, MIN_VERSIONS =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;0&amp;#39;, KEEP_DELETED_CELL
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; S =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;false&amp;#39;, BLOCKSIZE =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;65536&amp;#39;, IN_MEMORY =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;false&amp;#39;, BLOCKCACHE =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;true&amp;#39;}, {NAME =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;customer&amp;#39;, DATA_
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; BLOCK_ENCODING =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;NONE&amp;#39;, BLOOMFILTER =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;ROW&amp;#39;, REPLICATION_SCOPE =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;0&amp;#39;, VERSIONS =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;5&amp;#39;, COMPRESSION =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; NONE&amp;#39;, MIN_VERSIONS =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;0&amp;#39;, TTL =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;FOREVER&amp;#39;, KEEP_DELETED_CELLS =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;false&amp;#39;, BLOCKSIZE =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;65536&amp;#39;, IN_MEMOR
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; Y =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;false&amp;#39;, BLOCKCACHE =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;true&amp;#39;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1 row(s) in 0.0850 seconds
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;drop---delete-a-table&#34;&gt;drop - Delete a Table&lt;/h2&gt;
&lt;p&gt;You can delete a table by using the &lt;code&gt;drop&lt;/code&gt; command. The syntax is as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;drop &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;table name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The table must be disabled before it is deleted.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):024:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; disable &amp;#39;order&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0 row(s) in 1.3960 seconds
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):025:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; drop &amp;#39;order&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0 row(s) in 0.2860 seconds
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Use the &lt;code&gt;exists&lt;/code&gt; command to check whether the table has been deleted.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):026:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; exists &amp;#39;order&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Table order does not exist
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0 row(s) in 0.0710 seconds
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;drop_all&#34;&gt;drop_all&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;drop_all&lt;/code&gt; command is used to delete all tables matching a given regular expression. The syntax is as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;drop_all &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;regex table name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;A simple example is shown below. The following command deletes all tables that start with &lt;code&gt;t&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;drop_all &amp;#39;t.*&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;blockquote&gt;
&lt;p&gt;Note: All target tables must be disabled before deletion.&lt;/p&gt;
&lt;/blockquote&gt;

      </description>
      
      <category>Database</category>
      
      <category>NoSQL</category>
      
      <category>HBase</category>
      
    </item>
    
    <item>
      <title>HBase Data Manipulation Commands - put, get, delete, deleteall, scan, count, truncate</title>
      <link>https://www.devkuma.com/en/docs/hbase/data-manipulation-commands/</link>
      <pubDate>Fri, 16 Jun 2023 14:55:22 +0900</pubDate>
      <author>kc@example.com (kc kim)</author>
      <guid>https://www.devkuma.com/en/docs/hbase/data-manipulation-commands/</guid>
      <description>
        
        
        &lt;h2 id=&#34;data-manipulation-commands&#34;&gt;Data Manipulation commands&lt;/h2&gt;
&lt;p&gt;This section introduces HBase Shell commands for manipulating data.&lt;/p&gt;
&lt;h2 id=&#34;put---insertupdate-data&#34;&gt;put - Insert/Update Data&lt;/h2&gt;
&lt;p&gt;This section introduces how to create and update data in an HBase table.&lt;/p&gt;
&lt;p&gt;The following HBase table will be created.&lt;br&gt;
&lt;img src=&#34;https://www.devkuma.com/docs/hbase/hbase-column-family.png&#34; alt=&#34;HBase Column family&#34;&gt;&lt;/p&gt;
&lt;p&gt;You can insert and update a row in a table by using the &lt;code&gt;put&lt;/code&gt; command. The syntax is as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;put &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;table name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;row id&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;column family&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;:&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;column name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;value&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;insert-the-first-row&#34;&gt;Insert the First Row&lt;/h3&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;create &amp;#39;order&amp;#39;, &amp;#39;customer&amp;#39;, &amp;#39;sales&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;put &amp;#39;order&amp;#39;, &amp;#39;101&amp;#39;, &amp;#39;customer:name&amp;#39;, &amp;#39;John White&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;put &amp;#39;order&amp;#39;, &amp;#39;101&amp;#39;, &amp;#39;customer:city&amp;#39;, &amp;#39;Los Angeles&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;put &amp;#39;order&amp;#39;, &amp;#39;101&amp;#39;, &amp;#39;sales:product&amp;#39;, &amp;#39;Chairs&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;put &amp;#39;order&amp;#39;, &amp;#39;101&amp;#39;, &amp;#39;sales:amount&amp;#39;, &amp;#39;400.00&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;First, create the table.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):001:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; create &amp;#39;order&amp;#39;, &amp;#39;customer&amp;#39;, &amp;#39;sales&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Created table order
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Took 5.0510 seconds
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;=&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; Hbase::Table - order
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then insert the first row values into the table.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):002:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; put &amp;#39;order&amp;#39;, &amp;#39;101&amp;#39;, &amp;#39;customer:name&amp;#39;, &amp;#39;John White&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Took 0.6725 seconds
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):003:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; put &amp;#39;order&amp;#39;, &amp;#39;101&amp;#39;, &amp;#39;customer:city&amp;#39;, &amp;#39;Los Angeles&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Took 0.0318 seconds
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):004:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; put &amp;#39;order&amp;#39;, &amp;#39;101&amp;#39;, &amp;#39;sales:product&amp;#39;, &amp;#39;Chairs&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Took 0.0988 seconds
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):005:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; put &amp;#39;order&amp;#39;, &amp;#39;101&amp;#39;, &amp;#39;sales:amount&amp;#39;, &amp;#39;400.00&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Took 0.0423 seconds
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you scan the whole table, the following result is displayed.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):006:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; scan &amp;#39;order&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ROW                               COLUMN+CELL
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; 101                              column=customer:city, timestamp=1686908392705, value=Los Angeles
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; 101                              column=customer:name, timestamp=1686908388954, value=John White
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; 101                              column=sales:amount, timestamp=1686908401071, value=400.00
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; 101                              column=sales:product, timestamp=1686908398256, value=Chairs
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1 row(s)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Took 0.4121 seconds
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;update-data&#34;&gt;Update Data&lt;/h3&gt;
&lt;p&gt;You can change an existing cell value by using the &lt;code&gt;put&lt;/code&gt; command. The syntax is the same as when inserting data.&lt;/p&gt;
&lt;p&gt;Specify a new value as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;put &amp;#39;order&amp;#39;,&amp;#39;101&amp;#39;,&amp;#39;customer:city&amp;#39;,&amp;#39;LA&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The command execution is as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):007:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; put &amp;#39;order&amp;#39;,&amp;#39;101&amp;#39;,&amp;#39;customer:city&amp;#39;,&amp;#39;LA&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Took 0.0677 seconds
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):008:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; scan &amp;#39;order&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ROW                               COLUMN+CELL
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; 101                              column=customer:city, timestamp=1686909532774, value=LA
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; 101                              column=customer:name, timestamp=1686908388954, value=John White
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; 101                              column=sales:amount, timestamp=1686908401071, value=400.00
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; 101                              column=sales:product, timestamp=1686908398256, value=Chairs
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1 row(s)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Took 0.1186 seconds
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;get---retrieve-data&#34;&gt;get - Retrieve Data&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;get&lt;/code&gt; command is used to read data from an HBase table. The syntax is as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;get &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;table name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;row id&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following example uses the &lt;code&gt;get&lt;/code&gt; command to retrieve row &lt;code&gt;101&lt;/code&gt; from the &lt;code&gt;order&lt;/code&gt; table.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):009:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; get &amp;#39;order&amp;#39;, &amp;#39;101&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;COLUMN                            CELL
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; customer:city                    timestamp=1686909532774, value=LA
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; customer:name                    timestamp=1686908388954, value=John White
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; sales:amount                     timestamp=1686908401071, value=400.00
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; sales:product                    timestamp=1686908398256, value=Chairs
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1 row(s)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Took 0.3162 seconds
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;retrieve-a-specific-row&#34;&gt;Retrieve a Specific Row&lt;/h3&gt;
&lt;p&gt;The following is the syntax for using the &lt;code&gt;get&lt;/code&gt; command to retrieve a specific column.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;get &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;table name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;row id&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;, {COLUMN =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;column family&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;:&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;column name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following is an example of retrieving a specific column from an HBase table.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):010:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; get &amp;#39;order&amp;#39;, &amp;#39;101&amp;#39;, {COLUMN =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;customer:name&amp;#39;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;COLUMN                            CELL
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; customer:name                    timestamp=1686908388954, value=John White
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1 row(s)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Took 0.1450 seconds
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;delete---delete-a-specific-cell-from-a-table&#34;&gt;delete - Delete a Specific Cell from a Table&lt;/h2&gt;
&lt;p&gt;You can delete a specific cell from a table by using the &lt;code&gt;delete&lt;/code&gt; command. The syntax of the &lt;code&gt;delete&lt;/code&gt; command is as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;delete &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;table name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;row id&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;column name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;timestamp&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following is an example of deleting a specific cell. Here, &lt;code&gt;city&lt;/code&gt; is deleted.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):011:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; delete &amp;#39;order&amp;#39;, &amp;#39;101&amp;#39;, &amp;#39;customer:city&amp;#39;, 1686909532774
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Took 0.0917 seconds
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you query again, you can see that the &lt;code&gt;&#39;LA&#39;&lt;/code&gt; value changed with the previous &lt;code&gt;put&lt;/code&gt; command has been deleted and the existing &lt;code&gt;&#39;Los Angeles&#39;&lt;/code&gt; value is visible again.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):012:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; get &amp;#39;order&amp;#39;, &amp;#39;101&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;COLUMN                            CELL
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; customer:city                    timestamp=1686908392705, value=Los Angeles
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; customer:name                    timestamp=1686908388954, value=John White
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; sales:amount                     timestamp=1686908401071, value=400.00
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; sales:product                    timestamp=1686908398256, value=Chairs
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1 row(s)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Took 0.2196 seconds
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;deleteall---delete-all-cells-in-a-table-row&#34;&gt;deleteall - Delete All Cells in a Table Row&lt;/h2&gt;
&lt;p&gt;You can delete all cells in a row by using the &lt;code&gt;deleteall&lt;/code&gt; command. The following is the syntax of the &lt;code&gt;deleteall&lt;/code&gt; command.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;deleteall &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;table name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;row id&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following is an example of the &lt;code&gt;deleteall&lt;/code&gt; command that deletes all cells in row 1 of the &lt;code&gt;order&lt;/code&gt; table.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):013:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; deleteall &amp;#39;order&amp;#39;,&amp;#39;101&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Took 0.1271 seconds
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):015:0&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Check the table by using the &lt;code&gt;scan&lt;/code&gt; command. After deleting the table data, the table snapshot is as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):015:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; scan &amp;#39;order&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ROW                               COLUMN+CELL
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0 row(s)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Took 0.0518 seconds
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;scan---retrieve-data&#34;&gt;scan - Retrieve Data&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;scan&lt;/code&gt; command is used to view data in HTable. You can use the &lt;code&gt;scan&lt;/code&gt; command to fetch table data. The syntax is as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;scan &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;table name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;First, insert data as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;put &amp;#39;order&amp;#39;, &amp;#39;101&amp;#39;, &amp;#39;customer:name&amp;#39;, &amp;#39;John White&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;put &amp;#39;order&amp;#39;, &amp;#39;101&amp;#39;, &amp;#39;customer:city&amp;#39;, &amp;#39;Los Angeles&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;put &amp;#39;order&amp;#39;, &amp;#39;101&amp;#39;, &amp;#39;sales:product&amp;#39;, &amp;#39;Chairs&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;put &amp;#39;order&amp;#39;, &amp;#39;101&amp;#39;, &amp;#39;sales:amount&amp;#39;, &amp;#39;400.00&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following example uses the &lt;code&gt;scan&lt;/code&gt; command to retrieve data from the table.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):019:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; scan &amp;#39;order&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ROW                               COLUMN+CELL
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; 101                              column=customer:city, timestamp=1686912065208, value=Los Angeles
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; 101                              column=customer:name, timestamp=1686912059341, value=John White
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; 101                              column=sales:amount, timestamp=1686912074891, value=400.00
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; 101                              column=sales:product, timestamp=1686912070718, value=Chairs
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1 row(s)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Took 0.2649 seconds
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;count---count-data&#34;&gt;count - Count Data&lt;/h2&gt;
&lt;p&gt;You can count the number of rows in a table by using the &lt;code&gt;count&lt;/code&gt; command. The syntax is as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;count ‘&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;table name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39; 
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):020:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; count &amp;#39;order&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1 row(s)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Took 0.2992 seconds
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;=&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; 1
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;truncate---delete-all&#34;&gt;truncate - Delete All&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;truncate&lt;/code&gt; command disables, drops, and recreates a table. The syntax of &lt;code&gt;truncate&lt;/code&gt; is as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;truncate ‘&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;table name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39; 
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following is an example of the &lt;code&gt;truncate&lt;/code&gt; command. Here, the &lt;code&gt;order&lt;/code&gt; table was deleted and recreated.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):021:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; truncate &amp;#39;order&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Truncating &amp;#39;order&amp;#39; table (it may take a while):
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Disabling table...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Truncating table...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Took 5.6828 seconds
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After deleting the table data with &lt;code&gt;truncate&lt;/code&gt;, check it by using the &lt;code&gt;scan&lt;/code&gt; command. You can confirm that the table has no rows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):023:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; scan &amp;#39;order&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ROW                               COLUMN+CELL
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0 row(s)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Took 1.6790 seconds
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
      </description>
      
      <category>Database</category>
      
      <category>NoSQL</category>
      
      <category>HBase</category>
      
    </item>
    
    <item>
      <title>HBase Security Commands - grant, revoke, user_permission</title>
      <link>https://www.devkuma.com/en/docs/hbase/security-tools/</link>
      <pubDate>Sun, 18 Jun 2023 16:13:38 +0900</pubDate>
      <author>kc@example.com (kc kim)</author>
      <guid>https://www.devkuma.com/en/docs/hbase/security-tools/</guid>
      <description>
        
        
        &lt;h2 id=&#34;security-tools&#34;&gt;Security tools&lt;/h2&gt;
&lt;p&gt;In HBase, permissions can be granted to and revoked from users. There are three commands for security purposes.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;grant&lt;/li&gt;
&lt;li&gt;revoke&lt;/li&gt;
&lt;li&gt;user_permission&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;grant---granting-permissions&#34;&gt;grant - granting permissions&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;grant&lt;/code&gt; command grants users specific permissions such as read, write, execute, and admin permissions for tables. The syntax of the grant command is as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;grant &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;user&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39; &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;permissions&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39; [&amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;table&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39; [&amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;column family&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39; [&amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;column; qualifier&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;]]
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;RWXCA can be used to grant permissions to users.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;R: READ permission&lt;/li&gt;
&lt;li&gt;W: WRITE permission&lt;/li&gt;
&lt;li&gt;X: EXEC permission&lt;/li&gt;
&lt;li&gt;C: CREATE permission&lt;/li&gt;
&lt;li&gt;A: ADMIN permission&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;grant &amp;#39;devkuma&amp;#39;, &amp;#39;RWXCA&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;grant &amp;#39;devkuma&amp;#39;, &amp;#39;RW&amp;#39; &amp;#39;t1&amp;#39;, &amp;#39;cf1&amp;#39;, &amp;#39;qualifier1&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;revoke---deleting-permissions&#34;&gt;revoke - deleting permissions&lt;/h2&gt;
&lt;p&gt;Deletes a user&amp;rsquo;s access permissions.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;revoke &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;user&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;lt;permissions&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; [&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;table&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; [&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;column family&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; [&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;column; qualifier&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;]]
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;revoke &amp;#39;devkuma&amp;#39;, &amp;#39;t1&amp;#39;, &amp;#39;cf1&amp;#39;, &amp;#39;qualifier1&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;user_permission---querying-permissions-for-a-specific-table&#34;&gt;user_permission - querying permissions for a specific table&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;user_permission&lt;/code&gt; command is used to query all permissions for a specific table. The syntax is as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;user_permission &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;table name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Shows all permissions that exist for a specific table.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;user_permission &amp;#39;t1&amp;#39; 
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
      </description>
      
      <category>Database</category>
      
      <category>NoSQL</category>
      
      <category>HBase</category>
      
    </item>
    
    <item>
      <title>HBase Compression, Compaction, and Data Block Encoding</title>
      <link>https://www.devkuma.com/en/docs/hbase/compression/</link>
      <pubDate>Thu, 22 Jun 2023 19:13:23 +0900</pubDate>
      <author>kc@example.com (kc kim)</author>
      <guid>https://www.devkuma.com/en/docs/hbase/compression/</guid>
      <description>
        
        
        &lt;h2 id=&#34;compression-and-compaction&#34;&gt;Compression and Compaction&lt;/h2&gt;
&lt;p&gt;Regions stored on an HBase RegionServer have an HStore for each Column Family, and this consists of MemStore and HFile for that CF.&lt;/p&gt;
&lt;p&gt;MemStore is Column Family data in memory, and HFile is Column Family data stored on local disk, meaning HDFS. The reason for this layered structure is that data must be sorted by Row key according to the HBase table structure, so it cannot be written directly to disk and must be sorted in memory first.&lt;/p&gt;
&lt;p&gt;When write operations such as put or update are performed in HBase, data is first recorded in the WAL (Write Ahead Log), then written to MemStore. For read operations such as scan, HBase checks MemStore first and then searches HFiles for the requested content.&lt;/p&gt;
&lt;p&gt;When repeated writes cause MemStore data size to exceed the configured threshold, MemStore data is stored as an HFile. In a Region composed of many HFiles, as HFiles increase, compaction occurs and merges multiple HFiles into larger ones. As a result, many small HFiles are reduced to fewer large HFiles. This operation is called compaction.&lt;/p&gt;
&lt;p&gt;HBase compaction is performed as minor compaction and major compaction.&lt;/p&gt;
&lt;h3 id=&#34;minor-compaction&#34;&gt;Minor Compaction&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Minor compaction is the process of merging several recently created small files into a larger configured HFile size.&lt;/li&gt;
&lt;li&gt;As data is inserted, many small HFiles are created. Too many files can reduce performance, so HBase automatically manages the number of HFiles by remaking multiple HFiles into a few larger HFiles.&lt;/li&gt;
&lt;li&gt;Because data stored in HFiles is sorted, it can be merged quickly using merge sort.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;https://www.devkuma.com/docs/hbase/hbase-minor-compaction.png&#34; alt=&#34;Minor Compaction&#34;&gt;&lt;/p&gt;
&lt;h3 id=&#34;major-compaction&#34;&gt;Major Compaction&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Major compaction gathers all HFiles for a Column Family in a specific Region and creates one HFile per column. It runs once every 7 days by default.&lt;/li&gt;
&lt;li&gt;During this process, unnecessary cells and expired cells are removed to improve overall read performance. Data with Tombstone Markers is finally deleted at this time.&lt;/li&gt;
&lt;li&gt;When this work is performed, large amounts of file read/write activity occur, which can increase disk I/O and network traffic.&lt;/li&gt;
&lt;li&gt;It can be scheduled to run automatically, and this can be used to schedule it on weekends or at night to minimize the impact of sudden I/O increases on the service.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;https://www.devkuma.com/docs/hbase/hbase-majar-compaction.png&#34; alt=&#34;Major Compaction&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;compaction-settings&#34;&gt;Compaction settings&lt;/h2&gt;
&lt;p&gt;Minor compaction uses the following settings to configure the number of HFiles that will be compacted.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;hbase.hstore.compaction.min&lt;/code&gt;
&lt;ul&gt;
&lt;li&gt;Sets the minimum number of HFiles for minor compaction.&lt;/li&gt;
&lt;li&gt;The default is 3, and it must be set to 2 or higher.&lt;/li&gt;
&lt;li&gt;If the value is too large, minor compaction is delayed and later processing all at once can create load.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hbase.hstore.compaction.max&lt;/code&gt;
&lt;ul&gt;
&lt;li&gt;Sets the maximum number of HFiles for minor compaction.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The following settings specify the size of HFiles to compact.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;hbase.hstore.compaction.min.size&lt;/code&gt;: HFiles smaller than this value are always included when searching for minor compaction through ExploringCompactionPolicy. This value is used together with &lt;code&gt;hbase.hstore.compaction.ratio&lt;/code&gt; to choose HFiles for compaction.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hbase.hstore.compaction.max.size&lt;/code&gt;: HFiles larger than this size are excluded from minor compaction. If minor compaction occurs often but does not have much effect, this value can be reduced so large files are excluded from minor compaction. Default: &lt;code&gt;9223372036854775807&lt;/code&gt;, LONG.MAX_VALUE, bytes.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Other settings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;hbase.hregion.majorcompaction&lt;/code&gt;
&lt;ul&gt;
&lt;li&gt;HBase can have multiple StoreFiles for one Region. Periodically, to improve performance, it gathers these files and combines them into one larger file. This process involves significant CPU usage and disk I/O, and response time may decrease. Therefore, when response time matters, it is better to run Major compaction manually during off-peak time.&lt;/li&gt;
&lt;li&gt;The default is 86,400,000 ms. If this value is changed to 0, periodic Major Compaction will not run.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hbase.hregion.majorcompaction.jitter&lt;/code&gt;
&lt;ul&gt;
&lt;li&gt;The property defaults to 0.2, or 20%. It spreads out the timing when Major compaction runs for each stored file.&lt;/li&gt;
&lt;li&gt;Without it, major compaction runs simultaneously every 24 hours.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;hbase-compression-and-data-block-encoding&#34;&gt;HBase compression and data block encoding&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;The codecs mentioned in this section are for encoding and decoding data blocks or row keys. For more information about replication codecs, see &lt;a href=&#34;https://hbase.apache.org/book.html#cluster.replication.preserving.tags&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;cluster.replication.preserving.tags&lt;i class=&#34;fas fa-external-link-alt&#34;&gt;&lt;/i&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;HBase supports several compression algorithms that can be enabled for a ColumnFamily. Data block encoding uses HBase&amp;rsquo;s underlying design and patterns, such as sorted row keys and the schema of a given table, to limit information duplication in keys. Compressors can reduce the size of large opaque byte arrays in Cells and significantly reduce the storage space needed for uncompressed data.&lt;/p&gt;
&lt;p&gt;Compressors and data block encoding can be used together in the same ColumnFamily.&lt;/p&gt;
&lt;h3 id=&#34;changes-are-applied-during-compaction&#34;&gt;Changes are applied during compaction&lt;/h3&gt;
&lt;p&gt;If compression or encoding is changed for a ColumnFamily, the change is applied during compaction.&lt;/p&gt;
&lt;p&gt;Some codecs use features built into Java, such as GZip compression. Other codecs depend on native libraries. Native libraries can be provided through codec dependencies installed in the HBase library directory, or as part of Hadoop when using Hadoop codecs. Hadoop codecs usually have native code components, so follow the &lt;a href=&#34;https://hbase.apache.org/book.html#hadoop.native.lib&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Hadoop native binary support installation instructions&lt;i class=&#34;fas fa-external-link-alt&#34;&gt;&lt;/i&gt;&lt;/a&gt; to use Hadoop native libraries in HBase.&lt;/p&gt;
&lt;p&gt;This section describes common codecs used and tested in HBase.&lt;/p&gt;
&lt;p&gt;Whichever codec you use, you must test that the codec is installed correctly and available on all nodes in the cluster. Additional operational steps may be needed to verify codec availability on newly deployed nodes. The &lt;a href=&#34;https://hbase.apache.org/book.html#compression.test&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;compression.test&lt;i class=&#34;fas fa-external-link-alt&#34;&gt;&lt;/i&gt;&lt;/a&gt; utility can be used to verify that a specified codec is installed correctly.&lt;/p&gt;
&lt;p&gt;To configure HBase to use compressors, see &lt;a href=&#34;https://hbase.apache.org/book.html#compressor.install&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;compressor.install&lt;i class=&#34;fas fa-external-link-alt&#34;&gt;&lt;/i&gt;&lt;/a&gt;. To enable a compressor for a ColumnFamily, see &lt;a href=&#34;https://hbase.apache.org/book.html#changing.compression&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;changing.compression&lt;i class=&#34;fas fa-external-link-alt&#34;&gt;&lt;/i&gt;&lt;/a&gt;. To enable data block encoding for a ColumnFamily, see &lt;a href=&#34;https://hbase.apache.org/book.html#data.block.encoding.enable&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;data.block.encoding.enable&lt;i class=&#34;fas fa-external-link-alt&#34;&gt;&lt;/i&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;block-compressors&#34;&gt;Block Compressors&lt;/h3&gt;
&lt;h4 id=&#34;none&#34;&gt;NONE&lt;/h4&gt;
&lt;p&gt;This compression type constant selects no compression and is the default.&lt;/p&gt;
&lt;h4 id=&#34;brotli&#34;&gt;BROTLI&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/Brotli&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Brotli&lt;i class=&#34;fas fa-external-link-alt&#34;&gt;&lt;/i&gt;&lt;/a&gt; is a general-purpose lossless compression algorithm. It combines a modern variant of LZ77, Huffman coding, and second-order context modeling, and provides compression ratios comparable to the best general-purpose compression methods currently available. It has similar speed to GZ but provides denser compression.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;bzip2&#34;&gt;BZIP2&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Bzip2 compresses files using the Burrows-Wheeler block-sorting text compression algorithm and Huffman coding. It usually has a much better compression ratio than dictionary-based compression such as LZ, but both compression and decompression may be slower than other options.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;gzgzip&#34;&gt;GZ(GZIP)&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Focuses on compression ratio.&lt;/li&gt;
&lt;li&gt;gzip is based on the DEFLATE algorithm, a combination of LZ77 and Huffman coding. This algorithm is universally available in the Java runtime environment, so it is a good lowest-common-denominator option. However, it is quite slow compared with newer algorithms such as Zstandard.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;lz4&#34;&gt;LZ4&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Focuses on compression/decompression speed.&lt;/li&gt;
&lt;li&gt;LZ4 is a lossless data compression algorithm focused on compression and decompression speed. It belongs to the LZ77 family of compression algorithms, like Brotli, DEFLATE, and Zstandard. In microbenchmarks, LZ4 is the fastest option in that family for both compression and decompression and is generally recommended.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;lzma&#34;&gt;LZMA&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;LZMA is a dictionary compression method somewhat similar to LZ77. It achieves a very high compression ratio with a computationally expensive prediction model and variable-size compression dictionary, while maintaining decompression speed similar to other commonly used compression algorithms. LZMA beats all other options at typical compression ratios, but as a compressor it can be very slow, especially when configured to operate at high compression levels.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;lzo&#34;&gt;LZO&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Focuses on compression/decompression speed and requires additional library installation.&lt;/li&gt;
&lt;li&gt;LZO is another LZ-variant data compression algorithm implemented with a focus on decompression speed. It is not as fast as LZ4 but is close.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;snappy&#34;&gt;SNAPPY&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Focuses on compression/decompression speed.&lt;/li&gt;
&lt;li&gt;SNAPPY is based on LZ77 ideas but optimized for very fast compression speed, achieving only a reasonable level of compression in the tradeoff. It is as fast as LZ4, but its compression ratio is not very high. HBase provides a pure Java Snappy codec that can be used instead of GZ as a universally available option for all Java runtimes on all hardware architectures.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;zstd&#34;&gt;ZSTD&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Zstandard combines a dictionary matching stage (LZ77) with a large search window and fast entropy coding stage using both finite-state entropy and Huffman coding. Compression speed can differ by more than 20x between the fastest and slowest levels, but decompression is uniformly fast, with less than a 20% difference between the fastest and slowest levels.&lt;/li&gt;
&lt;li&gt;ZStandard is the most flexible available compression codec option. At level 1 it provides compression ratio similar to LZ4, with slightly lower performance. At mid levels it provides compression ratio similar to DEFLATE with better performance, and at high levels it provides dense compression similar to LZMA with LZMA-like compression speed, while providing universally fast decompression.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;data-block-encoding-types&#34;&gt;Data Block Encoding Types&lt;/h3&gt;
&lt;p&gt;HBase provides five data block encoding types:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;NONE&lt;/li&gt;
&lt;li&gt;Prefix&lt;/li&gt;
&lt;li&gt;Diff&lt;/li&gt;
&lt;li&gt;Fast Diff&lt;/li&gt;
&lt;li&gt;Prefix Tree&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;none-1&#34;&gt;None&lt;/h4&gt;
&lt;p&gt;None means no encoding is applied and is the default.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ColumnFamily without encoding&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The following table shows a hypothetical ColumnFamily without data block encoding.&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th style=&#34;text-align: center&#34;&gt;Key Length&lt;/th&gt;
          &lt;th style=&#34;text-align: center&#34;&gt;Value Length&lt;/th&gt;
          &lt;th style=&#34;text-align: center&#34;&gt;Key&lt;/th&gt;
          &lt;th style=&#34;text-align: center&#34;&gt;Value&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;24&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;RowKey:Family:Qualifier0&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;24&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;RowKey:Family:Qualifier1&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;25&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;RowKey:Family:QualifierN&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;25&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;RowKey2:Family:Qualifier1&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;25&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;RowKey2:Family:Qualifier2&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;h4 id=&#34;prefix&#34;&gt;Prefix&lt;/h4&gt;
&lt;p&gt;Usually keys often have the same prefix and only the last part differs.&lt;/p&gt;
&lt;p&gt;For example, the first key may be &lt;code&gt;RowKey:Family:Qualifier0&lt;/code&gt;, and the next key may be &lt;code&gt;RowKey:Family:Qualifier1&lt;/code&gt;. Prefix encoding adds an extended column that stores the length of the prefix shared between the current key and the previous key. In this example, if the first key is completely different from the previous key, the prefix length is 0. Since the first 23 characters of the second key are the same, the prefix length becomes 23.&lt;/p&gt;
&lt;p&gt;Of course, if two keys have nothing in common, Prefix provides no benefit.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ColumnFamily with Prefix encoding&lt;/strong&gt;&lt;br&gt;
The following is the same data with Prefix data encoding applied.&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th style=&#34;text-align: center&#34;&gt;Key Length&lt;/th&gt;
          &lt;th style=&#34;text-align: center&#34;&gt;Value Length&lt;/th&gt;
          &lt;th style=&#34;text-align: center&#34;&gt;Prefix Length&lt;/th&gt;
          &lt;th style=&#34;text-align: center&#34;&gt;Key&lt;/th&gt;
          &lt;th style=&#34;text-align: center&#34;&gt;Value&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;24&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;0&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;RowKey:Family:Qualifier0&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;1&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;23&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;1&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;1&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;23&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;N&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;19&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;6&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;2:Family:Qualifier1&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;1&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;24&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;h4 id=&#34;diff&#34;&gt;Diff&lt;/h4&gt;
&lt;p&gt;Diff encoding extends Prefix encoding. Rather than treating the Key as one sequence of bytes, it splits each Key Field so each part of the Key can be compressed more efficiently.&lt;/p&gt;
&lt;p&gt;Two new fields, timestamp and type, are added.&lt;/p&gt;
&lt;p&gt;If the ColumnFamily is the same as the previous row, it is omitted from the current row. If key length, value length, and type are the same as the previous row, the fields are omitted.&lt;/p&gt;
&lt;p&gt;Also, to improve compression, timestamp is not stored in full but as a difference from the previous row&amp;rsquo;s timestamp. In the prefix example, if there are two row keys and timestamp matches exactly and type is the same, the second row does not need to store value length or type, and the timestamp value in the second row becomes 0 instead of a full timestamp.&lt;/p&gt;
&lt;p&gt;Because write and scan speed become slower, Diff encoding is disabled by default even though more data can be cached.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ColumnFamily with Diff encoding&lt;/strong&gt;&lt;br&gt;
This table shows the same ColumnFamily with Diff encoding applied.&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th style=&#34;text-align: center&#34;&gt;Flags&lt;/th&gt;
          &lt;th style=&#34;text-align: center&#34;&gt;Key Length&lt;/th&gt;
          &lt;th style=&#34;text-align: center&#34;&gt;Value Length&lt;/th&gt;
          &lt;th style=&#34;text-align: center&#34;&gt;Prefix Length&lt;/th&gt;
          &lt;th style=&#34;text-align: center&#34;&gt;Key&lt;/th&gt;
          &lt;th style=&#34;text-align: center&#34;&gt;Timestamp&lt;/th&gt;
          &lt;th style=&#34;text-align: center&#34;&gt;Type Value&lt;/th&gt;
          &lt;th&gt;&lt;/th&gt;
          &lt;th&gt;&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;0&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;24&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;512&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;0&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;RowKey:Family:Qualifier0&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;1340466835163&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;4&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;5&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;-&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;320&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;23&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;1&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;0&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;-&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;3&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;-&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;-&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;23&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;N&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;120&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;8&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;0&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;25&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;576&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;6&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;2:Family:Qualifier1&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;25&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;4&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;5&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;-&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;3384&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;24&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;2&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;1124&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;-&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td style=&#34;text-align: center&#34;&gt;&amp;hellip;&lt;/td&gt;
          &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;h4 id=&#34;fast-diff&#34;&gt;Fast Diff&lt;/h4&gt;
&lt;p&gt;Fast Diff works similarly to Diff but is implemented faster. It also adds one more field that stores a single bit to track whether the data itself is the same as the previous row. If it is the same, the data is not stored again.&lt;/p&gt;
&lt;p&gt;Use the Fast Diff codec when keys are long or there are many columns.&lt;/p&gt;
&lt;p&gt;The data format is almost the same as Diff encoding, so there is no separate image to explain.&lt;/p&gt;
&lt;h4 id=&#34;prefix-tree&#34;&gt;Prefix Tree&lt;/h4&gt;
&lt;p&gt;Prefix Tree encoding was introduced as an experimental feature in HBase 0.96. Prefix Tree encoding provides memory savings similar to Prefix, Diff, and Fast Diff encoders, but provides faster random access at the cost of slower encoding speed. It was a good idea, but it was rarely used and was removed in HBase 2.0.0.&lt;/p&gt;
&lt;h2 id=&#34;references&#34;&gt;References&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://hbase.apache.org/book.html#compression&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Appendix D: Compression and Data Block Encoding In HBase&lt;i class=&#34;fas fa-external-link-alt&#34;&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
      
      <category>Database</category>
      
      <category>NoSQL</category>
      
      <category>HBase</category>
      
    </item>
    
    <item>
      <title>HBase Data Versioning</title>
      <link>https://www.devkuma.com/en/docs/hbase/data-versioning/</link>
      <pubDate>Thu, 22 Jun 2023 19:13:23 +0900</pubDate>
      <author>kc@example.com (kc kim)</author>
      <guid>https://www.devkuma.com/en/docs/hbase/data-versioning/</guid>
      <description>
        
        
        &lt;h2 id=&#34;data-versioning&#34;&gt;Data Versioning&lt;/h2&gt;
&lt;p&gt;As one of HBase&amp;rsquo;s special features, multiple versions can be stored for a specific column value in each cell.&lt;/p&gt;
&lt;p&gt;This is implemented using a timestamp for each version and is sorted in descending order. It uses Unix time converted to milliseconds as a long integer type.&lt;/p&gt;
&lt;p&gt;HBase manages data versions by default. When data is stored with the same Row key, the most recent data is versioned by timestamp and stored in descending order, so the most recent value is found first when reading from storage files.&lt;/p&gt;
&lt;p&gt;Timestamp can also be entered explicitly. By default, HBase keeps up to three changes for each cell, and because scan queries in descending order, the latest data is queried.&lt;/p&gt;
&lt;p&gt;You can also query all stored versions of data as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;get &amp;#39;t1&amp;#39;, &amp;#39;rowkey1&amp;#39;, {COLUMN =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;cf1&amp;#39;, TIMESTAMP =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; ts1}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It is also possible to set a timestamp range and view the value at that point.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;get &amp;#39;t1&amp;#39;, &amp;#39;rowkey1&amp;#39;, {TIMERANGE =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; [start_timestamp, end_timestamp]}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Versioning is usually assigned automatically, but it can also be specified manually.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Automatic versioning
&lt;ul&gt;
&lt;li&gt;Version differences can occur if server times in the cluster are not the same.&lt;/li&gt;
&lt;li&gt;Timestamp can be set when executing the Put method, but generally automatic versioning within the server is recommended.&lt;/li&gt;
&lt;li&gt;The most recent three versions are managed by default, but because Major Compaction has a long cycle, old versions that have not yet been deleted may still exist.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Manual versioning
&lt;ul&gt;
&lt;li&gt;Can be implemented by overriding the timestamp.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;https://www.devkuma.com/docs/hbase/hbase-data-versioning.png&#34; alt=&#34;Data Versioning&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;does-deleting-reveal-an-older-version-of-a-column-even-when-hbase-versions1&#34;&gt;Does deleting reveal an older version of a column even when HBase VERSIONS=1?&lt;/h2&gt;
&lt;p&gt;Earlier, it was mentioned that the most recent three versions are managed by default, but because Major Compaction has a long cycle, old versions that have not yet been deleted may still exist.&lt;/p&gt;
&lt;p&gt;This section introduces a related issue that can occur.&lt;/p&gt;
&lt;h3 id=&#34;applying-versions&#34;&gt;Applying VERSIONS&lt;/h3&gt;
&lt;p&gt;Apply &lt;code&gt;VERSIONS&lt;/code&gt; to the ColumnFamily as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;create &amp;#39;t1&amp;#39;, {NAME =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;f1&amp;#39;, VERSIONS =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; 2}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;hbase(main):001:0&amp;gt; create &amp;#39;t1&amp;#39;, {NAME =&amp;gt; &amp;#39;f1&amp;#39;, VERSIONS =&amp;gt; 2}
Created table t1
Took 5.9091 seconds
=&amp;gt; Hbase::Table - t1
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Next, register data in order.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;put &amp;#39;t1&amp;#39;, &amp;#39;101&amp;#39;, &amp;#39;f1:name1&amp;#39;, &amp;#39;test1&amp;#39;
put &amp;#39;t1&amp;#39;, &amp;#39;101&amp;#39;, &amp;#39;f1:name1&amp;#39;, &amp;#39;test2&amp;#39;
put &amp;#39;t1&amp;#39;, &amp;#39;101&amp;#39;, &amp;#39;f1:name1&amp;#39;, &amp;#39;test2&amp;#39;
put &amp;#39;t1&amp;#39;, &amp;#39;101&amp;#39;, &amp;#39;f1:name1&amp;#39;, &amp;#39;test4&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;hbase(main):002:0&amp;gt; put &amp;#39;t1&amp;#39;, &amp;#39;101&amp;#39;, &amp;#39;f1:name1&amp;#39;, &amp;#39;test1&amp;#39;
Took 0.7153 seconds
hbase(main):003:0&amp;gt; put &amp;#39;t1&amp;#39;, &amp;#39;101&amp;#39;, &amp;#39;f1:name1&amp;#39;, &amp;#39;test2&amp;#39;
Took 0.0318 seconds
hbase(main):004:0&amp;gt; put &amp;#39;t1&amp;#39;, &amp;#39;101&amp;#39;, &amp;#39;f1:name1&amp;#39;, &amp;#39;test3&amp;#39;
Took 0.0418 seconds
hbase(main):005:0&amp;gt; put &amp;#39;t1&amp;#39;, &amp;#39;101&amp;#39;, &amp;#39;f1:name1&amp;#39;, &amp;#39;test4&amp;#39;
Took 0.0255 seconds
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then delete one by one with the &lt;code&gt;delete&lt;/code&gt; command and check the result.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;delete &amp;#39;t1&amp;#39;, &amp;#39;101&amp;#39;, &amp;#39;f1:name1&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;hbase(main):013:0&amp;gt; scan &amp;#39;t1&amp;#39;
ROW                                                                  COLUMN+CELL
 101                                                                 column=f1:name1, timestamp=1687426826665, value=test4
1 row(s)
Took 0.3049 seconds
hbase(main):014:0&amp;gt; delete &amp;#39;t1&amp;#39;, &amp;#39;101&amp;#39;, &amp;#39;f1:name1&amp;#39;
Took 0.0160 seconds
hbase(main):015:0&amp;gt; scan &amp;#39;t1&amp;#39;
ROW                                                                  COLUMN+CELL
 101                                                                 column=f1:name1, timestamp=1687426822568, value=test3
1 row(s)
Took 0.1760 seconds
hbase(main):016:0&amp;gt; delete &amp;#39;t1&amp;#39;, &amp;#39;101&amp;#39;, &amp;#39;f1:name1&amp;#39;
Took 0.0605 seconds
hbase(main):017:0&amp;gt; scan &amp;#39;t1&amp;#39;
ROW                                                                  COLUMN+CELL
 101                                                                 column=f1:name1, timestamp=1687426817569, value=test2
1 row(s)
Took 0.0710 seconds
hbase(main):018:0&amp;gt; delete &amp;#39;t1&amp;#39;, &amp;#39;101&amp;#39;, &amp;#39;f1:name1&amp;#39;
Took 0.0337 seconds
hbase(main):019:0&amp;gt; scan &amp;#39;t1&amp;#39;
ROW                                                                  COLUMN+CELL
 101                                                                 column=f1:name1, timestamp=1687426813634, value=test1
1 row(s)
Took 0.0265 seconds
hbase(main):020:0&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can see that the previously registered data is queried in order.&lt;/p&gt;
&lt;h2 id=&#34;question-about-versions&#34;&gt;Question about VERSIONS&lt;/h2&gt;
&lt;p&gt;The question here is that &lt;code&gt;VERSIONS&lt;/code&gt; was said to store only one version, but even when &lt;code&gt;VERSIONS =&amp;gt; 2&lt;/code&gt; is specified, more versions of the column appear to be maintained. At first glance, this looks suspiciously like a bug.&lt;/p&gt;
&lt;p&gt;Searching online, a person with the same question was found.&lt;br&gt;
&lt;a href=&#34;https://user.hbase.apache.narkive.com/VnZTqJHA/delete-reveals-older-version-of-a-column-even-when-versions-1&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Delete reveals older version of a column even when VERSIONS=1&lt;i class=&#34;fas fa-external-link-alt&#34;&gt;&lt;/i&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The answer to that question says the following.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Older versions do not actually disappear until compaction occurs. Compaction should be performed once a day unless the major compaction setting is changed, or whenever a Region is split.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This issue occurs because Major Compaction has not yet been performed.&lt;/p&gt;
&lt;h2 id=&#34;how-to-check-versions-application&#34;&gt;How to check VERSIONS application&lt;/h2&gt;
&lt;p&gt;Then how can &lt;code&gt;VERSIONS&lt;/code&gt; be checked? Use the &lt;code&gt;get&lt;/code&gt; command and query details with &lt;code&gt;VERSIONS =&amp;gt; 4&lt;/code&gt; as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;get &amp;#39;t1&amp;#39;, &amp;#39;101&amp;#39;, {COLUMN=&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;f1:name1&amp;#39;,VERSIONS =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; 4 }
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):005:0&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; get &amp;#39;t1&amp;#39;, &amp;#39;101&amp;#39;, {COLUMN=&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;f1:name1&amp;#39;, VERSIONS =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; 4 }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;COLUMN                                                               CELL
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; f1:name1                                                            timestamp=1687427184339, value=test4
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; f1:name1                                                            timestamp=1687427181122, value=test2
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1 row(s)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Took 0.5028 seconds
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hbase(main):006:0&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;As shown above, you can see two records according to &lt;code&gt;VERSIONS =&amp;gt; 2&lt;/code&gt; specified when creating the table.&lt;/p&gt;

      </description>
      
      <category>Database</category>
      
      <category>NoSQL</category>
      
      <category>HBase</category>
      
    </item>
    
    <item>
      <title>HBase BloomFilter</title>
      <link>https://www.devkuma.com/en/docs/hbase/bloom-filter/</link>
      <pubDate>Fri, 23 Jun 2023 19:01:58 +0900</pubDate>
      <author>kc@example.com (kc kim)</author>
      <guid>https://www.devkuma.com/en/docs/hbase/bloom-filter/</guid>
      <description>
        
        
        &lt;h2 id=&#34;what-is-bloomfilter&#34;&gt;What is BloomFilter?&lt;/h2&gt;
&lt;p&gt;BloomFilter is a fast search algorithm for multi-hash-function mapping proposed by Bloom in 1970.
This algorithm is generally used in situations where it is necessary to quickly determine whether an element belongs to a set, starting from the premise that strict 100% accuracy is not required.&lt;/p&gt;
&lt;p&gt;For detailed theory, refer to the &lt;a href=&#34;https://www.devkuma.com/docs/data-structure/bloom-filter/&#34;&gt;Bloom Filter data structure explained simply&lt;/a&gt; page.&lt;/p&gt;
&lt;h2 id=&#34;hbase-bloomfilter&#34;&gt;HBase BloomFilter&lt;/h2&gt;
&lt;p&gt;HBase BloomFilter data is stored in StoreFile metadata, and once written, a StoreFile is immutable, so it cannot be updated.&lt;/p&gt;
&lt;p&gt;BloomFilter is a configuration property at the Column family level. If BloomFilter is configured on a table, HBase includes a data fragment of the BloomFilter structure when creating a StoreFile called a MetaBlock.
MetaBlock and DataBlock, which contain actual KeyValue data, are used together in LRU BlockCacheMaintenance.&lt;/p&gt;
&lt;p&gt;Therefore, configuring BloomFilter introduces specific storage and memory cache overhead.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://www.devkuma.com/docs/hbase/hbase-bloom-filter.png&#34; alt=&#34;BloomFilter&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;how-to-configure-hbase-bloomfilter&#34;&gt;How to configure HBase BloomFilter&lt;/h2&gt;
&lt;p&gt;When searching for whether a specific Row key is included, it reduces unnecessary block loading compared to the existing block index, improving overall cluster throughput.&lt;/p&gt;
&lt;p&gt;Bloom filters should be selected according to cell size, number of cells, data storage method, read method, and similar factors.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;According to the HBase documentation, BloomFilter is recommended in most cases.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;BloomFilter has three parameters: &lt;code&gt;NONE&lt;/code&gt; (default), &lt;code&gt;ROW&lt;/code&gt;, and &lt;code&gt;ROWCOL&lt;/code&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ROW&lt;/code&gt;: Indicates a row-level Bloom filter that filters StoreFiles based on the KeyValue row.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ROWCOL&lt;/code&gt;: Indicates a column-level Bloom filter that filters StoreFiles based on the KeyValue row plus column.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Therefore, the space overhead of &lt;code&gt;ROWCOL&lt;/code&gt; is higher than that of &lt;code&gt;ROW&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The more StoreFiles there are in the Region, the better the BloomFilter effect. The fewer StoreFiles there are in the Region, the better HBase read performance becomes.&lt;/p&gt;
&lt;p&gt;Configure the Column family in HBase to enable the BloomFilter command as follows.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-cmd&#34; data-lang=&#34;cmd&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;create &amp;#39;t1&amp;#39;,{name =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;c1&amp;#39;, BLOOMFILTER =&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &amp;#39;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;lt;&lt;/span&gt;ROW or ROWCOL&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt;&amp;#39;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
      </description>
      
      <category>Database</category>
      
      <category>NoSQL</category>
      
      <category>HBase</category>
      
    </item>
    
  </channel>
</rss>
