-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into ab-add-undo-soft-delete
- Loading branch information
Showing
236 changed files
with
5,499 additions
and
696 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
30 changes: 30 additions & 0 deletions
30
...in/java/com/linkedin/datahub/upgrade/config/restoreindices/PropertyDefinitionsConfig.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,30 @@ | ||
package com.linkedin.datahub.upgrade.config.restoreindices; | ||
|
||
import com.linkedin.datahub.upgrade.config.SystemUpdateCondition; | ||
import com.linkedin.datahub.upgrade.system.NonBlockingSystemUpgrade; | ||
import com.linkedin.datahub.upgrade.system.restoreindices.structuredproperties.PropertyDefinitions; | ||
import com.linkedin.metadata.entity.AspectDao; | ||
import com.linkedin.metadata.entity.EntityService; | ||
import io.datahubproject.metadata.context.OperationContext; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Conditional; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
@Conditional(SystemUpdateCondition.NonBlockingSystemUpdateCondition.class) | ||
public class PropertyDefinitionsConfig { | ||
|
||
@Bean | ||
public NonBlockingSystemUpgrade propertyDefinitions( | ||
final OperationContext opContext, | ||
final EntityService<?> entityService, | ||
final AspectDao aspectDao, | ||
@Value("${systemUpdate.propertyDefinitions.enabled}") final boolean enabled, | ||
@Value("${systemUpdate.propertyDefinitions.batchSize}") final Integer batchSize, | ||
@Value("${systemUpdate.propertyDefinitions.delayMs}") final Integer delayMs, | ||
@Value("${systemUpdate.propertyDefinitions.limit}") final Integer limit) { | ||
return new PropertyDefinitions( | ||
opContext, entityService, aspectDao, enabled, batchSize, delayMs, limit); | ||
} | ||
} |
5 changes: 3 additions & 2 deletions
5
...onfig/ReindexDomainDescriptionConfig.java → ...dices/ReindexDomainDescriptionConfig.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
4 changes: 2 additions & 2 deletions
4
...raph/ReindexDataJobViaNodesCLLConfig.java → ...raph/ReindexDataJobViaNodesCLLConfig.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
4 changes: 2 additions & 2 deletions
4
...config/graph/ReindexEdgeStatusConfig.java → ...ndices/graph/ReindexEdgeStatusConfig.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
2 changes: 1 addition & 1 deletion
2
...description/ReindexDomainDescription.java → ...description/ReindexDomainDescription.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
2 changes: 1 addition & 1 deletion
2
...ription/ReindexDomainDescriptionStep.java → ...ription/ReindexDomainDescriptionStep.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
2 changes: 1 addition & 1 deletion
2
...m/graph/edgestatus/ReindexEdgeStatus.java → ...s/graph/edgestatus/ReindexEdgeStatus.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
2 changes: 1 addition & 1 deletion
2
...estatus/ReindexReindexEdgeStatusStep.java → ...estatus/ReindexReindexEdgeStatusStep.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
2 changes: 1 addition & 1 deletion
2
...h/vianodes/ReindexDataJobViaNodesCLL.java → ...h/vianodes/ReindexDataJobViaNodesCLL.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
2 changes: 1 addition & 1 deletion
2
...anodes/ReindexDataJobViaNodesCLLStep.java → ...anodes/ReindexDataJobViaNodesCLLStep.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
49 changes: 49 additions & 0 deletions
49
...kedin/datahub/upgrade/system/restoreindices/structuredproperties/PropertyDefinitions.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,49 @@ | ||
package com.linkedin.datahub.upgrade.system.restoreindices.structuredproperties; | ||
|
||
import com.google.common.collect.ImmutableList; | ||
import com.linkedin.datahub.upgrade.UpgradeStep; | ||
import com.linkedin.datahub.upgrade.system.NonBlockingSystemUpgrade; | ||
import com.linkedin.metadata.entity.AspectDao; | ||
import com.linkedin.metadata.entity.EntityService; | ||
import io.datahubproject.metadata.context.OperationContext; | ||
import java.util.List; | ||
import javax.annotation.Nonnull; | ||
import lombok.extern.slf4j.Slf4j; | ||
|
||
/** | ||
* A job that reindexes all domain aspects as part of reindexing descriptions This is required to | ||
* fix the analytics for domains | ||
*/ | ||
@Slf4j | ||
public class PropertyDefinitions implements NonBlockingSystemUpgrade { | ||
|
||
private final List<UpgradeStep> _steps; | ||
|
||
public PropertyDefinitions( | ||
@Nonnull OperationContext opContext, | ||
EntityService<?> entityService, | ||
AspectDao aspectDao, | ||
boolean enabled, | ||
Integer batchSize, | ||
Integer batchDelayMs, | ||
Integer limit) { | ||
if (enabled) { | ||
_steps = | ||
ImmutableList.of( | ||
new PropertyDefinitionsStep( | ||
opContext, entityService, aspectDao, batchSize, batchDelayMs, limit)); | ||
} else { | ||
_steps = ImmutableList.of(); | ||
} | ||
} | ||
|
||
@Override | ||
public String id() { | ||
return this.getClass().getName(); | ||
} | ||
|
||
@Override | ||
public List<UpgradeStep> steps() { | ||
return _steps; | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
...n/datahub/upgrade/system/restoreindices/structuredproperties/PropertyDefinitionsStep.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,42 @@ | ||
package com.linkedin.datahub.upgrade.system.restoreindices.structuredproperties; | ||
|
||
import static com.linkedin.metadata.Constants.*; | ||
|
||
import com.linkedin.datahub.upgrade.system.AbstractMCLStep; | ||
import com.linkedin.metadata.entity.AspectDao; | ||
import com.linkedin.metadata.entity.EntityService; | ||
import io.datahubproject.metadata.context.OperationContext; | ||
import javax.annotation.Nonnull; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
@Slf4j | ||
public class PropertyDefinitionsStep extends AbstractMCLStep { | ||
|
||
public PropertyDefinitionsStep( | ||
OperationContext opContext, | ||
EntityService<?> entityService, | ||
AspectDao aspectDao, | ||
Integer batchSize, | ||
Integer batchDelayMs, | ||
Integer limit) { | ||
super(opContext, entityService, aspectDao, batchSize, batchDelayMs, limit); | ||
} | ||
|
||
@Override | ||
public String id() { | ||
return "structured-property-definitions-v1"; | ||
} | ||
|
||
@Nonnull | ||
@Override | ||
protected String getAspectName() { | ||
return STRUCTURED_PROPERTY_DEFINITION_ASPECT_NAME; | ||
} | ||
|
||
@Nullable | ||
@Override | ||
protected String getUrnLike() { | ||
return "urn:li:" + STRUCTURED_PROPERTY_ENTITY_NAME + ":%"; | ||
} | ||
} |
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
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
Oops, something went wrong.