Class ParentControllerConfigUpdateUtils
- java.lang.Object
-
- com.linkedin.venice.controller.util.ParentControllerConfigUpdateUtils
-
public class ParentControllerConfigUpdateUtils extends java.lang.Object
This class is a utility class for Parent Controller store update logics. The method here aims to take in current status and request params to determine if certain feature is updated / should be updated based on some customized logics.
-
-
Field Summary
Fields Modifier and Type Field Description static org.apache.logging.log4j.Logger
LOGGER
static WriteComputeSchemaConverter
updateSchemaConverter
-
Constructor Summary
Constructors Constructor Description ParentControllerConfigUpdateUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addUpdateSchemaForStore(VeniceParentHelixAdmin parentHelixAdmin, java.lang.String clusterName, java.lang.String storeName, boolean dryRun)
static boolean
checkAndMaybeApplyChunkingConfigChange(VeniceParentHelixAdmin parentHelixAdmin, java.lang.String clusterName, java.lang.String storeName, java.util.Optional<java.lang.Boolean> chunkingRequest, UpdateStore setStore)
static boolean
checkAndMaybeApplyPartialUpdateConfig(VeniceParentHelixAdmin parentHelixAdmin, java.lang.String clusterName, java.lang.String storeName, java.util.Optional<java.lang.Boolean> partialUpdateRequest, UpdateStore setStore, boolean storeBeingConvertedToHybrid)
This method takes in current status and request and try to determine whether to change partial update config.static boolean
checkAndMaybeApplyRmdChunkingConfigChange(VeniceParentHelixAdmin parentHelixAdmin, java.lang.String clusterName, java.lang.String storeName, java.util.Optional<java.lang.Boolean> rmdChunkingRequest, UpdateStore setStore)
-
-
-
Field Detail
-
LOGGER
public static final org.apache.logging.log4j.Logger LOGGER
-
updateSchemaConverter
public static final WriteComputeSchemaConverter updateSchemaConverter
-
-
Method Detail
-
checkAndMaybeApplyPartialUpdateConfig
public static boolean checkAndMaybeApplyPartialUpdateConfig(VeniceParentHelixAdmin parentHelixAdmin, java.lang.String clusterName, java.lang.String storeName, java.util.Optional<java.lang.Boolean> partialUpdateRequest, UpdateStore setStore, boolean storeBeingConvertedToHybrid)
This method takes in current status and request and try to determine whether to change partial update config. The check logic is: Step (1): If there is explict request, we will respect the request and maybe update config if new request value is different from existing config value. In this step, if we are enabling partial update, we will also perform a dry run to validate schema. If validation fails, it will throw exception and fail the whole request. Step (2): If there is NO explict request and store is being converted into hybrid store, we will check the cluster config and store's latest A/A config to see whether we should by default enable partial update. If so, we will also perform a dry on to validate schema. If validation fails, it will swallow the exception and log warning message. It will not turn on partial update and will not fail the whole request.
-
checkAndMaybeApplyChunkingConfigChange
public static boolean checkAndMaybeApplyChunkingConfigChange(VeniceParentHelixAdmin parentHelixAdmin, java.lang.String clusterName, java.lang.String storeName, java.util.Optional<java.lang.Boolean> chunkingRequest, UpdateStore setStore)
-
checkAndMaybeApplyRmdChunkingConfigChange
public static boolean checkAndMaybeApplyRmdChunkingConfigChange(VeniceParentHelixAdmin parentHelixAdmin, java.lang.String clusterName, java.lang.String storeName, java.util.Optional<java.lang.Boolean> rmdChunkingRequest, UpdateStore setStore)
-
addUpdateSchemaForStore
public static void addUpdateSchemaForStore(VeniceParentHelixAdmin parentHelixAdmin, java.lang.String clusterName, java.lang.String storeName, boolean dryRun)
-
-