简体   繁体   English

Phoenix Alter表添加列失败

[英]Phoenix alter table add column fails

I am trying to add a column to an existing phoenix table using alter table command as below 我正在尝试使用alter table命令将列添加到现有的凤凰表中,如下所示

ALTER TABLE TABLE1 ADD "db_name" VARCHAR(20);

Its failing with below warning 其失败并显示以下警告

WARN query.ConnectionQueryServicesImpl: Unable to update meta data repo within 1 seconds for TABLE1

Let me know, If there is any timeout I need to increase to get this working. 让我知道,如果有超时,我需要增加以使此工作正常进行。

When altering a table, Phoenix will by default check with the server to ensure it has the most up to date table metadata and statistics. 更改表时,Phoenix默认情况下会与服务器进行核对,以确保其具有最新的表元数据和统计信息。 This RPC may not be necessary when you know in advance that the structure of a table may never change. 如果事先知道表的结构永远不会改变,则可能不需要此RPC。 The UPDATE_CACHE_FREQUENCY property was added in Phoenix 4.7 to allow the user to declare how often the server will be checked for meta data updates. Phoenix 4.7中添加了UPDATE_CACHE_FREQUENCY属性,以允许用户声明检查服务器多久进行一次元数据更新。 You can set this property on your table like below 您可以在表格上设置此属性,如下所示

ALTER TABLE TABLE1 SET UPDATE_CACHE_FREQUENCY=900000

Please refer this doc for tuning tips. 请参考此文档以获取调优技巧。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM