MAPREDUCE服务 MRS-修改Kudu表:代码样例

时间:2024-07-29 08:59:26

代码样例

如下是写数据的代码片段:

// Alter the table, adding a column with a default value.
// Note: after altering the table, the table needs to be re-opened.
AlterTableOptions ato = new AlterTableOptions();
ato.addColumn("added", org.apache.kudu.Type.DOUBLE, DEFAULT_DOUBLE);
client.alterTable(tableName, ato);

示例代码中,AlterTableOptions是要修改表属性的集合,这里需要在格中新增一列。

support.huaweicloud.com/devg3-mrs/mrs_07_140016.html