NonRecoverableException: Not enough live tablet servers to create a table with the requested replication factor 3. 1 tablet servers are alive

孤街浪徒 提交于 2019-12-11 15:19:27

问题


I am trying to create a Kudu table using Impala-shell.

Query:

CREATE TABLE lol
(
  uname STRING,
  age INTEGER,
  PRIMARY KEY(uname)
)
STORED AS KUDU
TBLPROPERTIES (
'kudu.master_addresses' = '127.0.0.1'
);

CREATE TABLE t (k INT PRIMARY KEY) STORED AS KUDU
TBLPROPERTIES (
'kudu.master_addresses' = '127.0.0.1'
);

But I am getting error:

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

Please suggest what should be done for this. I new to Kudu.

**


回答1:


NonRecoverableException: Not enough live tablet servers to create a table with the requested replication factor 3 , this error is occurring because in query replication factor is not specified

In KUDU default replication factor = 3.

If you are running in query standalone cluster in that case only 1 tablet servers are alive in kudu's ( kudu tserver) for above query replication factor should be 1

You can modife the replication factor as per the requirement by setting

table_num_replicas (optional) - The number of replicas

Query:

                         CREATE TABLE lol
                         (
                           uname STRING,
                           age INTEGER,
                           PRIMARY KEY(uname)
                         )
                         STORED AS KUDU
                         TBLPROPERTIES (
                         'kudu.master_addresses' = '127.0.0.1',
                         'kudu.num_tablet_replicas' = '1'
                        );

In KUDU's for large a amount of data partition should be specified.

Query:

create table test 
(
id int not null,
code string,
primary key(id)
) 
partition by hash partitions 8 
stored as KUDU 
TBLPROPERTIES ( 
'kudu.master_addresses' = '127.0.0.1' ,
'kudu.num_tablet_replicas' = '1'
);

For setting more property refer https://kudu.apache.org/docs/command_line_tools_reference.html



来源:https://stackoverflow.com/questions/51720160/nonrecoverableexception-not-enough-live-tablet-servers-to-create-a-table-with-t

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!