Hi Feng, Thanks for driving this FLIP. I have some questions about this FLIP:
1. I agree with Shammon's comment. The two methods `registerCatalog(String catalogName,Catalog catalog)` and `registerCatalog(String catalogName, Map<String, String> properties)` make users confused. I think we should add a method `getStoreProperties()` in the `Catalog` interface and add `registerCatalog(String catalogName,Catalog catalog, boolean lazyInit)` method. Then the `registerCatalog(String catalogName,Catalog catalog)` will be like this : ``` public void registerCatalog(String catalogName, Catalog catalog) { registerCatalog(catalogName, catalog, false); } ``` 2. Do we need to think about encryption? The properties may contain the username/password. 3. Do we really need the `MemoryCatalogStore`? If we store the information to the memory, this is equivalent to no persistence. Best, Hang Shammon FY <zjur...@gmail.com> 于2023年3月31日周五 10:37写道: > Hi Feng > > Thanks for driving this FLIP. The idea of catalog configuration is cool and > I think it will be very useful. I have some comments about the FLIP > > 1. `CatalogStore` in the FLIP stores information of catalogs, what's the > relationship between `Map<String, Catalog> catalogs` and `CatalogStore > catalogStore`? How to handle a catalog with the same name that exists for > both of them? > > 2. I think it will confuse users that `registerCatalog(String catalogName, > Catalog catalog)` in the `Map<String, Catalog> catalogs` and > `registerCatalog(String catalogName, Map<String, String> properties)` in > the `CatalogStore catalogStore`. Do users need to understand the > differences between the two `registerCatalog`? > > 3. How about supporting multiple catalogs in one `xml` or `json` file? > > > Best, > Shammon FY > > > > On Thu, Mar 30, 2023 at 2:21 PM Feng Jin <jinfeng1...@gmail.com> wrote: > > > Hi everyone, > > > > I would like to start a discuss on FLIP-295: Support persistence of > > Catalog configuration and asynchronous registration > > > > Currently, when using Catalog in Flink, it is necessary to re-register > > each time. Therefore, providing persistent configuration for Catalog > > will make its management more convenient. > > Especially for SQL management modules such as Flink SQL gateway and > > SQL client, it eliminates the hassle of registering every time before > > starting. > > > > Look forward to your opinions! > > > > [1] > > > https://cwiki.apache.org/confluence/display/FLINK/FLIP-295%3A+Support+lazy+initialization+of+catalogs+and+persistence+of+catalog+configurations > > [2] https://issues.apache.org/jira/browse/FLINK-31259 > > > > Best, > > Feng. > > >