Hadoop生态圈-phoenix(HBase)的索引配置
作者:尹正杰
版权声明:原创作品,谢绝转载!否则将追究法律责任。
创建索引是为了优化查询,我们可以在phoenix上配置索引方式。
一.修改hbase配置文件,以便支持索引
1>.xrsync.sh 脚本内容
1 [yinzhengjie@s101 ~]$ more `which xrsync.sh` 2 #!/bin/bash 3 #@author :yinzhengjie 4 #blog:http://www.cnblogs.com/yinzhengjie 5 #EMAIL:[email protected] 6 7 #判断用户是否传参 8 if [ $# -lt 1 ];then 9 echo "请输入参数"; 10 exit 11 fi 12 13 14 #获取文件路径 15 file=$@ 16 17 #获取子路径 18 filename=`basename $file` 19 20 #获取父路径 21 dirpath=`dirname $file` 22 23 #获取完整路径 24 cd $dirpath 25 fullpath=`pwd -P` 26 27 #同步文件到DataNode 28 for (( i=102;i<=105;i++ )) 29 do 30 #使终端变绿色 31 tput setaf 2 32 echo =========== s$i %file =========== 33 #使终端变回原来的颜色,即白灰色 34 tput setaf 7 35 #远程执行命令 36 rsync -lr $filename `whoami`@s$i:$fullpath 37 #判断命令是否执行成功 38 if [ $? == 0 ];then 39 echo "命令执行成功" 40 fi 41 done 42 [yinzhengjie@s101 ~]$
2>.修改hbase配置文件,以便支持索引
扫描二维码关注公众号,回复:
1592354 查看本文章
二.设置索引方式