forked from datahub-project/datahub
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'datahub-project:master' into master
- Loading branch information
Showing
30 changed files
with
6,036 additions
and
16 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
23 changes: 23 additions & 0 deletions
23
...upgrade/src/main/java/com/linkedin/datahub/upgrade/config/BackfillPolicyFieldsConfig.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,23 @@ | ||
package com.linkedin.datahub.upgrade.config; | ||
|
||
import com.linkedin.datahub.upgrade.system.entity.steps.BackfillPolicyFields; | ||
import com.linkedin.metadata.entity.EntityService; | ||
import com.linkedin.metadata.search.SearchService; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class BackfillPolicyFieldsConfig { | ||
|
||
@Bean | ||
public BackfillPolicyFields backfillPolicyFields( | ||
EntityService<?> entityService, | ||
SearchService searchService, | ||
@Value("${systemUpdate.policyFields.enabled}") final boolean enabled, | ||
@Value("${systemUpdate.policyFields.reprocess.enabled}") final boolean reprocessEnabled, | ||
@Value("${systemUpdate.policyFields.batchSize}") final Integer batchSize) { | ||
return new BackfillPolicyFields( | ||
entityService, searchService, enabled, reprocessEnabled, batchSize); | ||
} | ||
} |
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
38 changes: 38 additions & 0 deletions
38
.../src/main/java/com/linkedin/datahub/upgrade/system/entity/steps/BackfillPolicyFields.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,38 @@ | ||
package com.linkedin.datahub.upgrade.system.entity.steps; | ||
|
||
import com.google.common.collect.ImmutableList; | ||
import com.linkedin.datahub.upgrade.Upgrade; | ||
import com.linkedin.datahub.upgrade.UpgradeStep; | ||
import com.linkedin.metadata.entity.EntityService; | ||
import com.linkedin.metadata.search.SearchService; | ||
import java.util.List; | ||
|
||
public class BackfillPolicyFields implements Upgrade { | ||
private final List<UpgradeStep> _steps; | ||
|
||
public BackfillPolicyFields( | ||
EntityService<?> entityService, | ||
SearchService searchService, | ||
boolean enabled, | ||
boolean reprocessEnabled, | ||
Integer batchSize) { | ||
if (enabled) { | ||
_steps = | ||
ImmutableList.of( | ||
new BackfillPolicyFieldsStep( | ||
entityService, searchService, reprocessEnabled, batchSize)); | ||
} else { | ||
_steps = ImmutableList.of(); | ||
} | ||
} | ||
|
||
@Override | ||
public String id() { | ||
return "BackfillPolicyFields"; | ||
} | ||
|
||
@Override | ||
public List<UpgradeStep> steps() { | ||
return _steps; | ||
} | ||
} |
Oops, something went wrong.