-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DG1924: Param changes in task vertex for add tags propagation to increase observability. #3878
Conversation
fecf0df
to
6ec86ed
Compare
common/src/main/java/org/apache/atlas/repository/Constants.java
Outdated
Show resolved
Hide resolved
...itory/src/main/java/org/apache/atlas/repository/store/graph/v2/tasks/ClassificationTask.java
Outdated
Show resolved
Hide resolved
...itory/src/main/java/org/apache/atlas/repository/store/graph/v2/tasks/ClassificationTask.java
Outdated
Show resolved
Hide resolved
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/tasks/MeaningsTask.java
Outdated
Show resolved
Hide resolved
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/tasks/MeaningsTask.java
Outdated
Show resolved
Hide resolved
repository/src/main/java/org/apache/atlas/tasks/AtlasTaskService.java
Outdated
Show resolved
Hide resolved
repository/src/main/java/org/apache/atlas/tasks/TaskRegistry.java
Outdated
Show resolved
Hide resolved
This commit streamlines the handling of asset propagation counts across task-related classes by removing outdated configurations and simplifications in the code: - **Constants.java**: Removed the 'MODIFICATION_TASK_ASSET_COUNT_TO_PROPAGATE_PROPERTY_KEY', eliminating the configuration property for asset count thresholds. - **AtlasTask.java**: Deleted the 'incrementAssetCountPropagated' method to reduce manual asset count manipulations. - **ClassificationTask.java & MeaningsTask.java**: Removed methods setting asset counts to propagate, simplifying task executions. - **AtlasTaskService.java**: Updated task initialization to set asset counts to zero, aligning with the new simplified approach. - **TaskRegistry.java**: Removed an unnecessary sleep operation from the task update process.
...itory/src/main/java/org/apache/atlas/repository/store/graph/v2/tasks/ClassificationTask.java
Outdated
Show resolved
Hide resolved
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/tasks/MeaningsTask.java
Outdated
Show resolved
Hide resolved
repository/src/main/java/org/apache/atlas/tasks/TaskRegistry.java
Outdated
Show resolved
Hide resolved
common/src/main/java/org/apache/atlas/repository/Constants.java
Outdated
Show resolved
Hide resolved
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
Show resolved
Hide resolved
...itory/src/main/java/org/apache/atlas/repository/store/graph/v2/tasks/ClassificationTask.java
Outdated
Show resolved
Hide resolved
repository/src/main/java/org/apache/atlas/tasks/TaskRegistry.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra space. Though minor but good to change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
@@ -78,6 +78,7 @@ | |||
|
|||
import javax.inject.Inject; | |||
import java.util.*; | |||
import java.util.concurrent.TimeUnit; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove this if not being used in the code. found at 2 places, being imported but not used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
@@ -3459,7 +3462,7 @@ public List<String> propagateClassification(String entityGuid, String classifica | |||
List<String> edgeLabelsToCheck = CLASSIFICATION_PROPAGATION_MODE_LABELS_MAP.get(propagationMode); | |||
Boolean toExclude = propagationMode == CLASSIFICATION_PROPAGATION_MODE_RESTRICT_LINEAGE ? true:false; | |||
List<AtlasVertex> impactedVertices = entityRetriever.getIncludedImpactedVerticesV2(entityVertex, relationshipGuid, classificationVertexId, edgeLabelsToCheck,toExclude); | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix the indents please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
currentTask.setAssetsCountToPropagate((long) verticesToPropagate.size()); | ||
|
||
//update the 'assetsCountToPropagate' in the current task vertex. | ||
AtlasVertex currentTaskVertex = (AtlasVertex) graph.query().has(TASK_GUID, currentTask.getGuid()).vertices().iterator().next(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create a method instead of using this 1 liner please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for all the comments asking to make the graph call into a method instead of a one liner, me and janaki has discussed this and I will be doing that in version 2. Thats part of the code cleanup.
@@ -26,7 +27,7 @@ public interface TaskFactory { | |||
* @param atlasTask | |||
* @return | |||
*/ | |||
AbstractTask create(AtlasTask atlasTask); | |||
AbstractTask create(AtlasTask atlasTask) throws AtlasException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious to know why are we allowing to throw error here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this has been removed now, an implementation was complaining about missing exception. Corrected that in this PR, forgot to remove throwing this exception. Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
DG-1924 | Update task vertex w impacted-vertices counts for remaining types of propagation
Change description
assetsCountToPropagate
andassetsCountPropagated
initialised with0
in the task vertex when a task is created.assetsCountToPropagate
with the value of propagation once impacted vertices calculation is finished.assetsCountPropagated
in chunks of 100 as the task progresses (in case of tasks less than 100 its updated in one go.)Type of change
Code review