[
https://issues.apache.org/jira/browse/IGNITE-15546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alexander Lapin updated IGNITE-15546:
-------------------------------------
Description:
org.apache.ignite.table.manager.IgniteTables should be moved from Ignite public
API to an internal one, because of
* complexity of change configuration closures
{code:java}
clusterNodes.get(0).tables().createTable(
"PUBLIC.tbl1",
tblChanger -> tblChanger
.changeColumns(cols -> {
cols.create("key",
col -> col.changeType(t ->
t.changeType("INT64")).changeNullable(false));
cols.create("val",
col -> col.changeNullable(true).changeType(t ->
t.changeType("INT32")));
})
.changePrimaryKey(pk -> pk.changeColumns("key"))
.changeReplicas(1)
.changePartitions(10)
); {code}
* and closure client-to-server serialization issues.
Instead, common SQL DDL should be used to create alter or drop tables.
was:
As of now, Tables methods accept Consumer<TableChanger> as a configuration.
TableChanger looks weird on "create" methods because a user expects some
initial configuration to be passed to "create" methods (at least).
I propose to replace TableChanger argument with some configuration objects.
We already have schema builders for schema and just need few changes for table
config.
> Remove java create/alter/dropTable api from within Ignite public API, use DDL
> instead
> -------------------------------------------------------------------------------------
>
> Key: IGNITE-15546
> URL: https://issues.apache.org/jira/browse/IGNITE-15546
> Project: Ignite
> Issue Type: Improvement
> Reporter: Andrey Mashenkov
> Priority: Major
> Labels: ignite-3
>
> org.apache.ignite.table.manager.IgniteTables should be moved from Ignite
> public API to an internal one, because of
> * complexity of change configuration closures
> {code:java}
> clusterNodes.get(0).tables().createTable(
> "PUBLIC.tbl1",
> tblChanger -> tblChanger
> .changeColumns(cols -> {
> cols.create("key",
> col -> col.changeType(t ->
> t.changeType("INT64")).changeNullable(false));
> cols.create("val",
> col -> col.changeNullable(true).changeType(t ->
> t.changeType("INT32")));
> })
> .changePrimaryKey(pk -> pk.changeColumns("key"))
> .changeReplicas(1)
> .changePartitions(10)
> ); {code}
> * and closure client-to-server serialization issues.
> Instead, common SQL DDL should be used to create alter or drop tables.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)