hbase-06 Phoenix安装部署&构建二级索引

一、Phoenix安装部署

  • 需要先安装好HBase集群
  • phoenix只是一个工具,只需要在一台机器上安装就可以了,这里我们选择node02服务器来进行安装一台即可

1、下载安装包

  • 从对应的地址下载:http://archive.apache.org/dist/phoenix/
  • 注意版本兼容问题;这里我们使用的是
    • apache-phoenix-4.14.0-cdh5.14.2-bin.tar.gz

2、上传解压

  • 将安装包上传到node02服务器的/kkb/soft路径下,然后进行解压
cd /kkb/soft/
tar -zxf apache-phoenix-4.14.0-cdh5.14.2-bin.tar.gz -C /kkb/install/

3、修改配置

3.1 拷贝jar包

  • 将phoenix目录下的phoenix-4.8.2-HBase-1.2-server.jarphoenix-core-4.8.2-HBase-1.2.jar拷贝到各个 HBase节点的lib目录下。

  • node02执行以下命令

cd /kkb/install/apache-phoenix-4.14.0-cdh5.14.2-bin
scp phoenix-4.14.0-cdh5.14.2-server.jar phoenix-core-4.14.0-cdh5.14.2.jar node01:/kkb/install/hbase-1.2.0-cdh5.14.2/lib/

scp phoenix-4.14.0-cdh5.14.2-server.jar phoenix-core-4.14.0-cdh5.14.2.jar node02:/kkb/install/hbase-1.2.0-cdh5.14.2/lib/

scp phoenix-4.14.0-cdh5.14.2-server.jar phoenix-core-4.14.0-cdh5.14.2.jar node03:/kkb/install/hbase-1.2.0-cdh5.14.2/lib/


## 3.2 拷贝配置文件

- 将HBase的配置文件==hbase-site.xml==、 hadoop下的配置文件==core-site.xml== 、==hdfs-site.xml==放到phoenix/bin/下,替换phoenix原来的配置文件。

 node02执行以下命令,进行拷贝配置文件

cp /kkb/install/hadoop-2.6.0-cdh5.14.2/etc/hadoop/core-site.xml /kkb/install/apache-phoenix-4.14.0-cdh5.14.2-bin/bin/

cp /kkb/install/hadoop-2.6.0-cdh5.14.2/etc/hadoop/hdfs-site.xml /kkb/install/apache-phoenix-4.14.0-cdh5.14.2-bin/bin/

cp /kkb/install/hbase-1.2.0-cdh5.14.2/conf/hbase-site.xml /kkb/install/apache-phoenix-4.14.0-cdh5.14.2-bin/bin/


- 重启hbase集群,使Phoenix的jar包生效。

node01执行以下命令来重启hbase的集群

cd /kkb/install/hbase-1.2.0-cdh5.14.2/
bin/stop-hbase.sh
bin/start-hbase.sh




# 4、验证是否成功

- 在phoenix/bin下输入命令, 进入到命令行,接下来就可以操作了

-  node02执行以下命令,进入phoenix客户端

~~~shell
cd /kkb/install/apache-phoenix-4.14.0-cdh5.14.2-bin/
bin/sqlline.py node01:2181
~~~

# 5、Phoenix使用

## 5.1 批处理方式

* node02执行以下命令创建user_phoenix.sql文件

~~~
mkdir -p /kkb/install/phoenixsql
cd /kkb/install/phoenixsql/
vim user_phoenix.sql
~~~

​	内容如下

```sql
create table if not exists user_phoenix (state varchar(10) NOT NULL,  city varchar(20) NOT NULL,  population BIGINT  CONSTRAINT my_pk PRIMARY KEY (state, city));
  • node02执行以下命令,创建user_phoenix.csv数据文件
cd /kkb/install/phoenixsql/
vim user_phoenix.csv

​ 内容如下

NY,New York,8143197
CA,Los Angeles,3844829
IL,Chicago,2842518
TX,Houston,2016582
PA,Philadelphia,1463281
AZ,Phoenix,1461575
TX,San Antonio,1256509
CA,San Diego,1255540
TX,Dallas,1213825
CA,San Jose,912332
  • 创建user_phoenix_query.sql文件
cd /kkb/install/phoenixsql
vim user_phoenix_query.sql

​ 内容如下

select state as "userState",count(city) as "City Count",sum(population) as "Population Sum" FROM user_phoenix GROUP BY state; 
  • 执行sql语句
cd /kkb/install/phoenixsql

/kkb/install/apache-phoenix-4.14.0-cdh5.14.2-bin/bin/psql.py  node01:2181 user_phoenix.sql user_phoenix.csv user_phoenix_query.sql

3.2 命令行方式

  • 执行命令
cd /kkb/install/apache-phoenix-4.14.0-cdh5.14.2-bin/
bin/sqlline.py node01:2181
  • 退出命令行方式

    phoenix的命令都需要一个感叹号

!quit
  • 查看phoenix的帮助文档,显示所有命令;用!help

    0: jdbc:phoenix:node01:2181> !help
    !all                Execute the specified SQL against all the current
                      connections
    !autocommit         Set autocommit mode on or off
    !batch              Start or execute a batch of statements
    !brief              Set verbose mode off
    !call               Execute a callable statement
    !close              Close the current connection to the database
    !closeall           Close all current open connections
    !columns            List all the columns for the specified table
    !commit             Commit the current transaction (if autocommit is off)
    !connect            Open a new connection to the database.
    !dbinfo             Give metadata information about the database
    !describe           Describe a table
    !dropall            Drop all tables in the current database
    !exportedkeys       List all the exported keys for the specified table
    !go                 Select the current connection
    !help               Print a summary of command usage
    !history            Display the command history
    !importedkeys       List all the imported keys for the specified table
    !indexes            List all the indexes for the specified table
    !isolation          Set the transaction isolation for this connection
    !list               List the current connections
    !manual             Display the SQLLine manual
    !metadata           Obtain metadata information
    !nativesql          Show the native SQL for the specified statement
    !outputformat       Set the output format for displaying results
                      (table,vertical,csv,tsv,xmlattrs,xmlelements)
    !primarykeys        List all the primary keys for the specified table
    !procedures         List all the procedures
    !properties         Connect to the database specified in the properties file(s)
    !quit               Exits the program
    !reconnect          Reconnect to the database
    !record             Record all output to the specified file
    !rehash             Fetch table and column names for command completion
    !rollback           Roll back the current transaction (if autocommit is off)
    !run                Run a script from the specified file
    !save               Save the current variabes and aliases
    !scan               Scan for installed JDBC drivers
    !script             Start saving a script to a file
    !set                Set a sqlline variable
    
  • 1、建立employee的映射表

    进入hbase客户端,创建一个普通表employee,并且有两个列族 company 和family

    cd /kkb/install/hbase-1.2.0-cdh5.14.2/
    bin/hbase shell
    hbase(main):001:0> create 'employee','company','family'
    
  • 2、添加数据

    put 'employee','row1','company:name','ted'
    put 'employee','row1','company:position','worker'
    put 'employee','row1','family:tel','13600912345'
    put 'employee','row2','company:name','michael'
    put 'employee','row2','company:position','manager'
    put 'employee','row2','family:tel','1894225698'
    
  • 3、建立hbase到phoenix的映射表

    node02进入到phoenix的客户端,然后创建映射表

    cd /kkb/install/apache-phoenix-4.14.0-cdh5.14.2-bin
    bin/sqlline.py node01:2181
    

    执行语句

    CREATE TABLE IF NOT EXISTS "employee" ("no" VARCHAR(10) NOT NULL PRIMARY KEY, "company"."name" VARCHAR(30),"company"."position" VARCHAR(20), "family"."tel" VARCHAR(20), "family"."age" INTEGER) column_encoded_bytes=0;
    

    说明

    在建立映射表之前要说明的是,Phoenix是大小写敏感的,并且所有命令都是大写,如果你建的表名没有用双引号括起来,那么无论你输入的是大写还是小写,建立出来的表名都是大写的,如果你需要建立出同时包含大写和小写的表名和字段名,请把表名或者字段名用双引号括起来。

  • 4、查询映射表数据

0: jdbc:phoenix:node1:2181> select * from "employee";
+-------+----------+-----------+--------------+-------+
|  no   |   name   | position  |     tel      |  age  |
+-------+----------+-----------+--------------+-------+
| row1  | ted      | worker    | 13600912345  | null  |
| row2  | michael  | manager   | 1894225698   | null  |
+-------+----------+-----------+--------------+-------+

0: jdbc:phoenix:node01:2181> select * from "employee" where "tel" = '13600912345';
+-------+-------+-----------+--------------+-------+
|  no   | name  | position  |     tel      |  age  |
+-------+-------+-----------+--------------+-------+
| row1  | ted   | worker    | 13600912345  | null  |
+-------+-------+-----------+--------------+-------+

3.3 GUI方式

  • 通过dbeaver来连接phoenix

3.3.1 准备两个文件

  • 我们通过dbeaver来连接phoenix需要两个文件

    • 第一个文件是phoenix-4.14.0-cdh5.14.2-client.jar
    • 第二个文件是hbase-site.xml
  • 进入到phoenix的安装目录,获取第一个文件

    node02执行以下命令,进入到以下路径,获取第一个文件

    找到 phoenix-4.14.0-cdh5.14.2-client.jar 这个jar包,并将其下载下来备用

cd /kkb/install/apache-phoenix-4.14.0-cdh5.14.2-bin
  • 然后进入到node02服务器的hbase的安装配置文件路径,获取hbase-site.xml这个文件

    找到hbase-site.xml,将其下载下来备用

cd /kkb/install/hbase-1.2.0-cdh5.14.2/conf/

3.3.2 更新jar包

  • 将hbase-site.xml放到phoenix-4.14.0-cdh5.14.2-client.jar这个jar包里面去

  • 我们在第一步找到了hbase-site.xml和phoenix-4.14.0-cdh5.14.2-client.jar 这两个文件之后,我们需要使用解压缩工具,将phoenix-4.14.0-cdh5.14.2-client.jar 这个jar包解压开,然后将hbase-site.xml放入到phoenix-4.14.0-cdh5.14.2-client.jar 这个jar包里面去

在这里插入图片描述

3.3.3 通过dbeaver连接phoenix

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

  • 注意:如果连接不上,可能不是操作配置的问题,有可能是因为dbeaver软件的问题,将dbeaver软件重启几次试试看

3.4.4 创建数据库表,并实现sql进行操作

  • 直接在phoenix当中通过sql语句的方式来创建表并
CREATE TABLE IF NOT EXISTS US_POPULATION (
      state CHAR(2) NOT NULL,
      city VARCHAR NOT NULL,
      population BIGINT
      CONSTRAINT my_pk PRIMARY KEY (state, city));

UPSERT INTO US_POPULATION (state, city, population) values ('NY','New York',8143197);
UPSERT INTO US_POPULATION (state, city, population) values ('CA','Los Angeles',3844829);

SELECT * FROM US_POPULATION WHERE population > 8000000;

3.4 JDBC调用方式

  • 创建maven工程并导入jar包
<dependencies>
    <dependency>
        <groupId>org.apache.phoenix</groupId>
        <artifactId>phoenix-core</artifactId>
        <version>4.14.0-cdh5.14.2</version>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
    </dependency>
    <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.14.3</version>
    </dependency>
    </dependencies>
    <build>
        <plugins>
            <!-- 限制jdk版本插件 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
        </plugins>
    </build>
  • 代码开发
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import java.sql.*;
public class PhoenixSearch {
    private Connection connection;
    private Statement statement;
    private ResultSet rs;
    @BeforeTest
    public void init() throws SQLException {
        //定义phoenix的连接url地址
        String url="jdbc:phoenix:node01:2181";
        connection = DriverManager.getConnection(url);
        //构建Statement对象
        statement = connection.createStatement();
    }
    @Test
    public void queryTable() throws SQLException {
        //定义查询的sql语句,注意大小写
        String sql="select * from US_POPULATION";
        //执行sql语句
        try {
            rs=statement.executeQuery(sql);
            while(rs.next()){
                System.out.println("state:"+rs.getString("state"));
                System.out.println("city:"+rs.getString("city"));
                System.out.println("population:"+rs.getInt("population"));
                System.out.println("-------------------------");
            }
        } catch (SQLException e) {
            e.printStackTrace();
        }finally {
            if(connection!=null){
                connection.close();
            }
        }
    }
}

二、phoenix构建二级索引

1、为什么需要用二级索引?

  • 对于HBase而言,如果想精确地定位到某行记录,唯一的办法是通过rowkey来查询。如果不通过rowkey来查找数据,就必须逐行地比较每一列的值,即全表扫瞄。
  • 对于较大的表,全表扫描的代价是不可接受的。但是,很多情况下,需要从多个角度查询数据。例如,在定位某个人的时候,可以通过姓名、身份证号、学籍号等不同的角度来查询,要想把这么多角度的数据都放到rowkey中几乎不可能(业务的灵活性不允许,对rowkey长度的要求也不允许)。所以需要secondary index(二级索引)来完成这件事。secondary index的原理很简单,但是如果自己维护的话则会麻烦一些。现在,Phoenix已经提供了对HBase secondary index的支持。

2、Phoenix 全局索引和本地索引

2.1 Global Indexing全局索引
  • Global indexing,全局索引,适用于读多写少的业务场景。
  • 使用Global indexing在写数据的时候开销很大,因为所有对数据表的更新操作(DELETE, UPSERT VALUES and UPSERT SELECT),都会引起索引表的更新,而索引表是分布在不同的数据节点上的,跨节点的数据传输带来了较大的性能消耗。
  • 在读数据的时候Phoenix会选择索引表来降低查询消耗的时间。在默认情况下如果想查询的字段不是索引字段的话索引表不会被使用,也就是说不会带来查询速度的提升。
2.2 Local Indexing本地索引
  • Local indexing,本地索引,适用于写操作频繁以及空间受限制的场景。
  • 与Global indexing一样,Phoenix会自动判定在进行查询的时候是否使用索引。使用Local indexing时,索引数据和数据表的数据存放在相同的服务器中,这样避免了在写操作的时候往不同服务器的索引表中写索引带来的额外开销。使用Local indexing的时候即使查询的字段不是索引字段索引表也会被使用,这会带来查询速度的提升,这点跟Global indexing不同。对于Local Indexing,一个数据表的所有索引数据都存储在一个单一的独立的可共享的表中

3 不可变索引和可变索引

3.1 immutable index不可变索引
  • immutable index,不可变索引,适用于数据只增加不更新并且按照时间先后顺序存储(time-series data)的场景,如保存日志数据或者事件数据等。
  • 不可变索引的存储方式是write one,append only。当在Phoenix使用create table语句时指定IMMUTABLE_ROWS = true表示该表上创建的索引将被设置为不可变索引。Phoenix默认情况下如果在create table时不指定IMMUTABLE_ROW = true时,表示该表为mutable。不可变索引分为Global immutable index和Local immutable index两种。
3.2 mutable index可变索引
  • mutable index,可变索引,适用于数据有增删改的场景。
  • Phoenix默认情况创建的索引都是可变索引,除非在create table的时候显式地指定IMMUTABLE_ROWS = true。可变索引同样分为Global immutable index和Local immutable index两种。

4、配置HBase支持Phoenix二级索引

4.1 修改配置文件
  • 如果要启用phoenix的二级索引功能,需要修改配置文件hbase-site.xml

  • vim hbase-site.xml

    <!-- 添加配置 -->
    <property>
    	<name>hbase.regionserver.wal.codec</name>
    	<value>org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec</value>
    </property>
    <property>
       <name>hbase.region.server.rpc.scheduler.factory.class</name>
       <value>org.apache.hadoop.hbase.ipc.PhoenixRpcSchedulerFactory</value>
    </property>
    <property>
    		<name>hbase.rpc.controllerfactory.class</name>
    		<value>org.apache.hadoop.hbase.ipc.controller.ServerRpcControllerFactory</value>
    </property>
    
4.2 重启hbase
  • 完成上述修改后重启hbase集群使配置生效。

5、实战

5.1 在phoenix中创建表
  • 首先,在phoenix中创建一个user table

  • node02执行以下命令,进入phoenix客户端

cd /kkb/install/apache-phoenix-4.14.0-cdh5.14.2-bin/
bin/sqlline.py node01:2181	
  • 创建表
create  table user (
"session_id" varchar(100) not null primary key, 
"f"."cookie_id" varchar(100), 
"f"."visit_time" varchar(100), 
"f"."user_id" varchar(100), 
"f"."age" varchar(100), 
"f"."sex" varchar(100), 
"f"."visit_url" varchar(100), 
"f"."visit_os" varchar(100), 
"f"."browser_name" varchar(100),
"f"."visit_ip" varchar(100), 
"f"."province" varchar(100),
"f"."city" varchar(100),
"f"."page_id" varchar(100), 
"f"."goods_id" varchar(100),
"f"."shop_id" varchar(100)) column_encoded_bytes=0;
5.2 导入测试数据
  • 将课件当中的user50w.csv 这个文件上传到node02的/kkb/install/phoenixsql 这个路径下
    该CSV文件中有250万条记录
    node02执行以下命令,导入50W的测试数据
cd /kkb/install/apache-phoenix-4.14.0-cdh5.14.2-bin/
bin/psql.py -t USER node01:2181 /kkb/install/phoenixsql/user50w.csv
5.3 Global Indexing的二级索引测试
5.3.1 正常查询一条数据所需的时间
  • 在为表USER创建secondary index之前,先看看查询一条数据所需的时间
    在node02服务器,进入phoenix的客户端
bin/sqlline.py node01:2181
cd /kkb/install/apache-phoenix-4.14.0-cdh5.14.2-bin
  • 然后执行以下sql语句,查询数据,查看耗费时间

    可以看到,对名为cookie_id的列进行按值查询需要10秒左右。

select * from user where "cookie_id" = '99738fd1-2084-44e9';
  • 我们可以通过explain来查看执行计划
    EXPLAIN(语句的执行逻辑及计划):

    由图看知先进行了全表扫描再通过过滤器来筛选出目标数据,显示这种查询方式效率是很低的。

explain select * from user where "cookie_id" = '99738fd1-2084-44e9';
5.3.2 给表USER创建基于Global Indexing的二级索引
  • 进入到phoenix的客户端,然后执行以下命令进行创建索引
    在cookie_id列上面创建二级索引:

    查看当前所有表会发现多一张USER_COOKIE_ID_INDEX索引表,查询该表数据。

0: jdbc:phoenix:node01:2181> create index USER_COOKIE_ID_INDEX on USER ("f"."cookie_id"); 

在这里插入图片描述

  • 再次执行查询"cookie_id"='99738fd1-2084-44e9’的数据记录
select "cookie_id" from user where "cookie_id" = '99738fd1-2084-44e9';

在这里插入图片描述

此时:查询速度由10秒左右减少到了毫秒级别。

注意:select所带的字段必须包含在覆盖索引内

EXPLAIN(语句的执行逻辑及计划):

可以看到使用到了创建的索引USER_COOKIE_ID_INDEX。

explain select "cookie_id" from user where "cookie_id"='99738fd1-2084-44e9';

在这里插入图片描述

5.3.3 以下查询不会用到索引表
select "cookie_id","age" from user where "cookie_id"='99738fd1-2084-44e9';
  • (虽然cookie_id是索引字段,但age不是索引字段,所以不会使用到索引)
    也可以通过EXPLAIN查询语句的执行逻辑及计划
EXPLAIN	select "cookie_id","age" from user where "cookie_id"='99738fd1-2084-44e9';
  • 同理要查询的字段不是索引字段,也不会使用到索引表。
select "sex" from user where "cookie_id"='99738fd1-2084-44e9';
5.4 Local Indexing的二级索引测试
5.4.1 正常查询一条数据所需的时间
  • 在为表USER创建secondary index之前,先看看查询一条数据所需的时间
select * from user where "user_id"='371e963d-c-487065';

可以看到,对名为user_id的列进行按值查询需要11秒左右。

  • EXPLAIN(语句的执行逻辑及计划):
explain select * from user where "user_id"='371e963d-c-487065';

由图看知先进行了全表扫描再通过过滤器来筛选出目标数据,显示这种查询方式效率是很低的。

5.4.2 给表USER创建基于Local Indexing的二级索引
  • 在user_id列上面创建二级索引:
create local index USER_USER_ID_INDEX on USER ("f"."user_id");

查看当前所有表会发现多一张USER_USER_ID_INDEX索引表,查询该表数据。

  • 再次执行查询"user_id"='371e963d-c-487065’的数据记录
select * from user where "user_id"='371e963d-c-487065';
-- 可以看到,对名为user_id的列进行按值查询需要0.3秒左右。
  • EXPLAIN(语句的执行逻辑及计划):
    explain select * from user where "user_id"='371e963d-c-487065';

查看执行计划,没有执行全表扫描,效率更高了

此时:查询速度由11秒左右减少到了毫秒级别。

EXPLAIN(语句的执行逻辑及计划):

explain select "user_id","age","sex" from user where "user_id"='371e963d-c-487065';

可以看到使用到了创建的索引USER_USER_ID_INDEX.

5.5 如何确保query查询使用Index

​ 要想让一个查询使用index,有三种方式实现。

5.5.1 创建 convered index
	如果在某次查询中,查询项或者查询条件中包含除被索引列之外的列(主键MY_PK除外)。默认情况下,该查询会触发full table scan(全表扫描),但是使用covered index则可以避免全表扫描。 
	创建包含某个字段的覆盖索引,创建方式如下:
	 create index USER_COOKIE_ID_AGE_INDEX on USER ("f"."cookie_id") include("f"."age");
	 
	 查看当前所有表会发现多一张USER_COOKIE_ID_AGE_INDEX索引表,查询该表数据。
查询数据
select "age" from user where  "cookie_id"='99738fd1-2084-44e9';
select "age","sex" from user where  "cookie_id"='99738fd1-2084-44e9';

在这里插入图片描述

在这里插入图片描述

5.5.2 在查询中提示其使用index
在select和column_name之间加上/*+ Index(<表名> <index名>)*/,通过这种方式强制使用索引。
例如:
select /*+ index(user,USER_COOKIE_ID_AGE_INDEX) */ "age" from user where "cookie_id"='99738fd1-2084-44e9';

如果sex是索引字段,那么就会直接从索引表中查询
如果sex不是索引字段,那么将会进行全表扫描,所以当用户明确知道表中数据较少且符合检索条件时才适用,此时的性能才是最佳的。

在这里插入图片描述

在这里插入图片描述

5.5.3 使用本地索引 (创建Local Indexing 索引)
  • 详细见上面
5.6 索引重建
Phoenix的索引重建是把索引表清空后重新装配数据。
alter index USER_COOKIE_ID_INDEX on user rebuild;
5.7 删除索引
删除某个表的某张索引:
语法	drop index 索引名称 on 表名
例如:  
drop index USER_COOKIE_ID_INDEX on user;

如果表中的一个索引列被删除,则索引也将被自动删除,如果删除的是
覆盖索引上的列,则此列将从覆盖索引中被自动删除。

6、索引性能调优

​ 一般来说,索引已经很快了,不需要特别的优化。这里也提供了一些方法,让你在面对特定的环境和负载的时候可以进行一些调优。下面的这些需要在hbase-site.xml文件中设置,针对所有的服务器。

1. index.builder.threads.max 
创建索引时,使用的最大线程数。 
默认值: 10。

2. index.builder.threads.keepalivetime 
创建索引的创建线程池中线程的存活时间,单位:秒。 
默认值: 60

3. index.writer.threads.max 
写索引表数据的写线程池的最大线程数。 
更新索引表可以用的最大线程数,也就是同时可以更新多少张索引表,数量最好和索引表的数量一致。 
默认值: 10

4. index.writer.threads.keepalivetime 
索引写线程池中,线程的存活时间,单位:秒。
默认值:60
 

5. hbase.htable.threads.max 
每一张索引表可用于写的线程数。 
默认值: 2,147,483,647

6. hbase.htable.threads.keepalivetime 
索引表线程池中线程的存活时间,单位:秒。 
默认值: 60

7. index.tablefactory.cache.size 
允许缓存的索引表的数量。 
增加此值,可以在写索引表时不用每次都去重复的创建htable,这个值越大,内存消耗越多。 
默认值: 10

8. org.apache.phoenix.regionserver.index.handler.count 
处理全局索引写请求时,可以使用的线程数。 
默认值: 30
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小技工丨

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值