-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add safe-guard to omit void partitions
- Loading branch information
Showing
13 changed files
with
101 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
...src/main/java/com/netflix/metacat/common/server/properties/PartitionColumnProperties.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package com.netflix.metacat.common.server.properties; | ||
|
||
import lombok.Data; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.core.env.Environment; | ||
import javax.annotation.Nullable; | ||
|
||
/** | ||
* Partition Column service properties. | ||
* | ||
* @author gabeiglio | ||
*/ | ||
@Data | ||
@Slf4j | ||
public class PartitionColumnProperties { | ||
private static final String OMIT_VOID_TRANSFORM_PARTITION_FIELDS_PROPERTY_NAME = | ||
"metacat.partitionColumnProperties.omitVoidTransformPartitionFields"; | ||
private boolean omitVoidPartitionEnabled; | ||
|
||
/** | ||
* Constructor. | ||
* | ||
* @param env Spring environment | ||
*/ | ||
public PartitionColumnProperties(@Nullable final Environment env) { | ||
if (env != null) { | ||
setOmitVoidTransformPartitionFields( | ||
env.getProperty(OMIT_VOID_TRANSFORM_PARTITION_FIELDS_PROPERTY_NAME, | ||
Boolean.class, true) | ||
); | ||
} | ||
} | ||
|
||
/** | ||
* set omitVoidPartitionEnabled based on boolean config. | ||
* | ||
* @param configBool configBool | ||
*/ | ||
public void setOmitVoidTransformPartitionFields(final boolean configBool) { | ||
this.omitVoidPartitionEnabled = configBool; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters