文档首页> MapReduce服务 MRS> 用户指南(巴黎区域)> 故障排除> 使用HBase> 使用Phoenix创建HBase表后,向索引表中加载数据报错
更新时间:2022-12-14 GMT+08:00

使用Phoenix创建HBase表后,向索引表中加载数据报错

问题背景与现象

使用Phoenix创建HBase表后,使用命令向索引表中加载数据报错:

  • MRS 2.x及之前版本:Mutable secondary indexes must have the hbase.regionserver.wal.codec property set to org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec in the hbase-sites.xml of every region server. tableName=MY_INDEX (state=42Y88,code=1029)

  • MRS 3.x及之后版本:Exception in thread "main" java.io.IOException: Retry attempted 10 times without completing, bailing out

处理步骤

  1. MRS 2.x及之前版本,操作步骤如下:

    1. 使用admin用户登录MRS Manager界面,选择“服务管理 > HBase > 服务配置”,将“参数类别”的“基础配置”切换为“全部配置”,选择“HMaster > 自定义”,给参数“hbase.hmaster.config.expandor”新增名称为“hbase.regionserver.wal.codec”,值为“org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec”的配置项。
    2. 选择“RegionServer > 自定义”,给参数“hbase.regionserver.config.expandor”新增名称为“hbase.regionserver.wal.codec”,值为“org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec”的配置项,单击“保存配置”,输入当前用户密码,单击“确定”,保存配置。
    3. 单击“服务状态”,选择“更多 > 重启服务”,输入当前用户密码,单击“确定”,重启HBase服务。

  2. MRS 3.x及之后版本,操作步骤如下:

    1. 使用admin用户登录FusionInsight Manager,选择“集群 > 服务 > HBase > 配置 > 全部配置 > RegionServer > 自定义”,给参数“hbase.regionserver.config.expandor”新增名称为“hbase.regionserver.wal.codec”,值为“org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec”的配置项。
    2. 选择“HMaster > 自定义”,给参数“hbase.hmaster.config.expandor”新增名称为“hbase.regionserver.wal.codec”,值为“org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec”的配置项。
    3. 单击“保存”,在弹出的对话框中单击“确定”,保存配置。
    4. 单击“概览”,选择“更多 > 重启服务”,输入当前用户密码,单击“确定”,重启HBase服务。