在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>
<description>Factory to create the Phoenix RPC Scheduler that uses separate queues for index and metadata updates</description>
</property>
<property>
<name>hbase.rpc.controllerfactory.class</name>
<value>org.apache.hadoop.hbase.ipc.controller.ServerRpcControllerFactory</value>
<description>Factory to create the Phoenix RPC Scheduler that uses separate queues for index and metadata updates</description>
</property>
<!-- 指定查询在客户端上超时的毫秒数。 默认值是10分钟。-->
<property>
<name>phoenix.query.timeoutMs</name>
<value>86400000</value>
</property>
<!-- 当线程数大于客户端线程池数量,线程在终止之前等待新任务的最长时间(以毫秒为单位)。默认值为60秒 -->
<property>
<name>phoenix.query.keepAliveMs</name>
<value>86400000</value>
</property>
<!-- 默认60s,该参数表示一次RPC请求的超时时间。RPC时间超过该值,客户端就会主动关闭socket -->
<property>
<name>hbase.rpc.timeout</name>
<value>86400000</value>
</property>
<!-- regionserer租约时间,默认值是60s -->
<property>
<name>hbase.regionserver.lease.period</name>
<value>86400000</value>
</property>
<!-- 默认20min,该参数表示HBase客户端发起一次数据操作直至得到响应之间总的超时时间 -->
<property>
<name>hbase.client.operation.timeout</name>
<value>86400000</value>
</property>
<!-- scan缓存,默认为2147483647,不可太大,避免占用过多内存。 -->
<property>
<name>hbase.client.scanner.caching</name>
<value>1000</value>
</property>
<!-- 默认60s,该参数是表示HBase客户端发起一次scan操作的rpc调用至得到响应之间总的超时时间 -->
<property>
<name>hbase.client.scanner.timeout.period</name>
<value>86400000</value>
</property>
0: jdbc:phoenix:> select count(1) from "wap_track";
+-----------+
| COUNT(1) |
+-----------+
| 1888606 |
+-----------+
1 row selected (8.6 seconds)
0: jdbc:phoenix:> create index wap_uid_index on "wap_track"("info"."uid");
1,888,606 rows affected (43.177 seconds)