morningman commented on issue #2317: Support Dynamic Partition URL: https://github.com/apache/incubator-doris/pull/2317#issuecomment-560970173 Have a few questions 1. The TableProperty class needs to be more general. For example, there may be only one variable in class: `Map<String, String> properties` For dynamic partition related properties, uniformly use the following key-value format: ``` "dynamic_partition.prop1" = "val1", "dynamic_partition.prop2" = "val2" ``` Just put a map, and then different categories of properties are distinguished with different prefixes. The map is mainly to facilitate the subsequent addition of other categories of properties, and o need to modify the FeMetaVersion. After that, you can write a class named, for example, DynamicPartitionProperty, separately. This class is built from `properties` map, and no need to be persisted to meta data. For example, in the `readFields()` method of TableProperty, you can write: ``` public void readFields () { ... read the property map first ... this.dynamicPartitionProperty = buildDynamicPropertyFromPropertyMap(properties); this.someOtherProperty = buildSomeOtherPropertyFromPropertyMap(properties); ... } ``` In subsequent use, you can directly use the parsed content in dynamicPartitionProperty without having to get it from the `properties` map and then parse it. 2. In my opinion, the TableProperty class, is a kind of static class, and only need to be modified. when the user changes the relevant property's meta-information (such as modifying the information about how to create dynamic partition). In other words, you should only modify the contents of the TableProperty in the operations of `create a table`, `stop dynamic partitioning`, `modify dynamic partition metadata`, or `start dynamic partition`. The `DynamicPartitionScheduler` does not need to modify the TableProperty class when it automatically creates partitions. First, after the partition is automatically created, the new partition information has been saved and persisted in the table's partition information. Secondly, infos which `ShowDynamicPartitionStmt` needs to be displayed, such as `LastSchedulerTime`, does not actually need to be persisted. The user usually only cares about the success of the last time and the current state, so this information will be available after the FE restarts and the DynamicPartitionScheduler is executed again.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
