Kudu遇到的问题

简介: Kudu遇到的问题

安装Kudu

kudu已经集成在了CDP runtime中,安装比较简单,选择master和tablet之后,配置数据目录即可

安装完成后,我们要在impala中显式集成kudu

为了省去每次建表都需要在TBLPROPERTIES中添加kudumasteraddresses属性,我们还要在Impala的高级配置KuduMaster的地址 --kudu_master_hosts=192.168.0.207:7051

在impala-shell中建kudu表

[root@cdh2 ~]# impala-shell
Starting Impala Shell without Kerberos authentication
Opened TCP connection to cdh2.macro.com:21000
Connected to cdh2.macro.com:21000
Server version: impalad version 3.4.0-SNAPSHOT RELEASE (build 25402784335c39cc24076d71dab7a3ccbd562094)
***********************************************************************************
Welcome to the Impala shell.
(Impala Shell v3.4.0-SNAPSHOT (2540278) built on Wed Aug  5 11:07:32 UTC 2020)
You can change the Impala daemon that you're connected to by using the CONNECT
command.To see how Impala will plan to run your query without actually executing
it, use the EXPLAIN command. You can change the level of detail in the EXPLAIN
output by setting the EXPLAIN_LEVEL query option.
***********************************************************************************
[cdh2.macro.com:21000] default> CREATE TABLE my_first_table
                              > (
                              >   id BIGINT,
                              >   name STRING,
                              >   PRIMARY KEY(id)
                              > )
                              > PARTITION BY HASH PARTITIONS 16
                              > STORED AS KUDU
                              > TBLPROPERTIES (
                              >   'kudu.master_addresses' = 'cdh2.macro.com:7051'
                              > );
Query: CREATE TABLE my_first_table
(
  id BIGINT,
  name STRING,
  PRIMARY KEY(id)
)
PARTITION BY HASH PARTITIONS 16
STORED AS KUDU
TBLPROPERTIES (
  'kudu.master_addresses' = 'cdh2.macro.com:7051'
)
+-------------------------+
| summary                 |
+-------------------------+
| Table has been created. |
+-------------------------+
Fetched 1 row(s) in 2.35s
[cdh2.macro.com:21000] default> desc formatted my_first_table;
Query: describe formatted my_first_table
+------------------------------+------------------------------------------------------------------------------+------------------------------------------------+
| name                         | type                                                                         | comment                                        |
+------------------------------+------------------------------------------------------------------------------+------------------------------------------------+
| # col_name                   | data_type                                                                    | comment                                        |
|                              | NULL                                                                         | NULL                                           |
| id                           | bigint                                                                       | NULL                                           |
| name                         | string                                                                       | NULL                                           |
|                              | NULL                                                                         | NULL                                           |
| # Detailed Table Information | NULL                                                                         | NULL                                           |
| Database:                    | default                                                                      | NULL                                           |
| OwnerType:                   | USER                                                                         | NULL                                           |
| Owner:                       | root                                                                         | NULL                                           |
| CreateTime:                  | Sat Sep 12 16:50:11 CST 2020                                                 | NULL                                           |
| LastAccessTime:              | UNKNOWN                                                                      | NULL                                           |
| Retention:                   | 0                                                                            | NULL                                           |
| Location:                    | hdfs://cdh2.macro.com:8020/warehouse/tablespace/external/hive/my_first_table | NULL                                           |
| Table Type:                  | EXTERNAL_TABLE                                                               | NULL                                           |
| Table Parameters:            | NULL                                                                         | NULL                                           |
|                              | EXTERNAL                                                                     | TRUE                                           |
|                              | TRANSLATED_TO_EXTERNAL                                                       | TRUE                                           |
|                              | external.table.purge                                                         | TRUE                                           |
|                              | kudu.master_addresses                                                        | cdh2.macro.com:7051                            |
|                              | kudu.table_name                                                              | impala::default.my_first_table                 |
|                              | storage_handler                                                              | org.apache.hadoop.hive.kudu.KuduStorageHandler |
|                              | transient_lastDdlTime                                                        | 1599900611                                     |
|                              | NULL                                                                         | NULL                                           |
| # Storage Information        | NULL                                                                         | NULL                                           |
| SerDe Library:               | org.apache.hadoop.hive.kudu.KuduSerDe                                        | NULL                                           |
| InputFormat:                 | org.apache.hadoop.hive.kudu.KuduInputFormat                                  | NULL                                           |
| OutputFormat:                | org.apache.hadoop.hive.kudu.KuduOutputFormat                                 | NULL                                           |
| Compressed:                  | No                                                                           | NULL                                           |
| Num Buckets:                 | 0                                                                            | NULL                                           |
| Bucket Columns:              | []                                                                           | NULL                                           |
| Sort Columns:                | []                                                                           | NULL                                           |
+------------------------------+------------------------------------------------------------------------------+------------------------------------------------+
Fetched 31 row(s) in 0.83s

我们可以看到kudu表创建成功。

遇到的问题

1、启动过程中报错

Check failed: _s.ok() Bad status:
Invalid argument: Unable to initialize catalog manager: Failed to initialize sys tables
async: on-disk master list

解决办法

停掉master和tserver 删掉之前残余的 /kudu_master/fswal_dir/kudu_master/fsdata_dir/kudu_tablet/fswal_dir/kudu_tablet/fsdata_dir几个数据目录

2.建表一直卡住,然后报错:


CreateTablet RPC failed for tablet :not authorized: client connection negotiation failed: client connection to 192.168.0.207:7050: FATAL_UNAUTHORIZED: not authorized: unencrypted connections from publicly routable IPs are prohibited.

我们需要在全局gflagfile中配置如下

--rpc_encryption=disabled
--rpc_authentication=disabled 
--rusted_subnets=0.0.0.0/0

3.impala-shell中直接报


FATAL_UNAUTHORIZED: not authorized: unencrypted connections from publicly routable IPs are prohibited

解决办法:

同样在impala中配置


--rpc_encryption=disabled
--rpc_authentication=disabled 
--rusted_subnets=0.0.0.0/0

4.建表报错

ERROR: ImpalaRuntimeException: Error creating Kudu table 'impala::default.my_first_table'
CAUSED BY: NonRecoverableException: not enough live tablet servers to create a table with the requested replication factor 3; 2 tablet servers are alive

这是因为kudu默认的存储副本是3,由于我这是单节点,副本只有1份(这与HDFS不同,HDFS没作此强制限制,1份副本也可以),于是到CM里面修改副本设置,如下图:


相关文章
|
SQL 分布式计算 NoSQL
Spark 操作 kudu -- 增加,删除,修改,查询操作 | 学习笔记
快速学习 Spark 操作 kudu -- 增加,删除,修改,查询操作
1916 0
Spark 操作 kudu -- 增加,删除,修改,查询操作 | 学习笔记
|
消息中间件 物联网 网络性能优化
MQTT常见问题之mqtt 连接一直显示 Not authorized to connect如何解决
MQTT(Message Queuing Telemetry Transport)是一个轻量级的、基于发布/订阅模式的消息协议,广泛用于物联网(IoT)中设备间的通信。以下是MQTT使用过程中可能遇到的一些常见问题及其答案的汇总:
|
资源调度 分布式计算 Hadoop
Yarn【常用命令】
Yarn【常用命令】
|
6月前
|
Shell
Shell脚本循环控制:shift、continue、break、exit指令
使用这些命令可以让你的Shell脚本像有生命一样动起来。正确使用它们,你的脚本就能像一场精心编排的舞蹈剧目,既有旋律的起伏,也有节奏的跳跃,最终以一场惊艳的表演结束。每一个动作、每一个转折点,都准确、优雅地完成所需要表达的逻辑。如此,你的脚本不只是冰冷的代码,它透过终端的界面,跳着有节奏的舞蹈,走进观众——使用者的心中。
294 60
|
搜索推荐 关系型数据库 MySQL
基于自己的数据库构建基于LLM的专属知识库
基于自己的数据库构建基于LLM的专属知识库
695 2
|
10月前
|
人工智能 数据可视化 JavaScript
深入通义灵码 2.0 的 AI 程序员体验场景
减少了在不同编程语言间切
263 8
|
缓存 Linux
CentOS7添加阿里云yum源
CentOS7添加阿里云yum源
11130 1
|
分布式计算 容灾 大数据
MaxCompute( 原名ODPS)大数据容灾方案与实现(及项目落地实例)专有云
一,背景与概述    复杂系统的灾难恢复是个难题,具有海量数据及复杂业务场景的大数据容灾是个大难题。    MaxCompute是集团内重要数据平台,是自主研发的大数据解决方案,其规模和稳定性在业界都是领先的。
2820 17
|
Linux
CentOS 7 配置yum阿里源 (三步即可)
CentOS 7 配置yum阿里源 (三步即可)
31858 1
CentOS6使用第三方YUM源(EPEL、RPMForge和RPMFusion)
CentOS6使用第三方YUM源(EPEL、RPMForge和RPMFusion)
1524 0

热门文章

最新文章