morningman commented on code in PR #10190:
URL: https://github.com/apache/incubator-doris/pull/10190#discussion_r898972365
##########
fe/fe-core/src/main/java/org/apache/doris/common/util/PropertyAnalyzer.java:
##########
@@ -109,16 +109,23 @@ public class PropertyAnalyzer {
public static final String PROPERTIES_DISABLE_LOAD = "disable_load";
- public static DataProperty analyzeDataProperty(Map<String, String>
properties, DataProperty oldDataProperty)
+ /**
+ * check and replace members of DataProperty by properties.
+ * @param properties key->value for members to change.
+ * @param oldDataProperty old DataProperty
+ * @return new DataProperty
+ * @throws AnalysisException property has invalid key->value
+ */
+ public static DataProperty analyzeDataProperty(Map<String, String>
properties, final DataProperty oldDataProperty)
throws AnalysisException {
if (properties == null || properties.isEmpty()) {
return oldDataProperty;
}
- TStorageMedium storageMedium = null;
- long cooldownTimeStamp = DataProperty.MAX_COOLDOWN_TIME_MS;
- String remoteStorageResourceName = "";
- long remoteCooldownTimeStamp = DataProperty.MAX_COOLDOWN_TIME_MS;
+ TStorageMedium storageMedium = oldDataProperty.getStorageMedium();
+ long cooldownTimeStamp = oldDataProperty.getCooldownTimeMs();
+ String remoteStorageResourceName =
oldDataProperty.getRemoteStorageResourceName();
+ long remoteCooldownTimeStamp =
oldDataProperty.getRemoteCooldownTimeMs();
Review Comment:
Should we change the logic in line 161?
```
if (!hasCooldown && !hasMedium) {
return oldDataProperty;
}
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]