Skip to content

Commit

Permalink
Remove obsolete items from TaskType
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Aug 23, 2021
1 parent 10c5257 commit 6195d91
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 100 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -870,14 +870,35 @@
</xsd:documentation>
<xsd:appinfo>
<a:container>true</a:container>
<a:schemaMigration>
<a:element>tns:iterationInformation</a:element>
<a:version>4.4</a:version>
<a:operation>removed</a:operation>
</a:schemaMigration>
<a:schemaMigration>
<a:element>tns:iterativeTaskInformation</a:element>
<a:version>4.4</a:version>
<a:operation>removed</a:operation>
</a:schemaMigration>
<a:schemaMigration>
<a:element>tns:synchronizationInformation</a:element>
<a:version>4.4</a:version>
<a:operation>removed</a:operation>
</a:schemaMigration>
<a:schemaMigration>
<a:element>tns:actionsExecutedInformation</a:element>
<a:version>4.4</a:version>
<a:operation>removed</a:operation>
</a:schemaMigration>
<a:schemaMigration>
<a:element>tns:workBucketManagementPerformanceInformation</a:element>
<a:version>4.4</a:version>
<a:operation>removed</a:operation>
</a:schemaMigration>
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="environmentalPerformanceInformation" type="tns:EnvironmentalPerformanceInformationType" minOccurs="0"/>
<xsd:element name="iterationInformation" type="tns:ActivityItemProcessingStatisticsType" minOccurs="0"/> <!-- TODO remove -->
<xsd:element name="iterativeTaskInformation" type="tns:IterativeTaskInformationType" minOccurs="0"/> <!-- TODO remove -->
<xsd:element name="synchronizationInformation" type="tns:ActivitySynchronizationStatisticsType" minOccurs="0"/> <!-- TODO remove -->
<xsd:element name="actionsExecutedInformation" type="tns:ActivityActionsExecutedType" minOccurs="0"/> <!-- TODO remove -->
<xsd:element name="repositoryPerformanceInformation" type="tns:RepositoryPerformanceInformationType" minOccurs="0">
<xsd:annotation>
<xsd:appinfo>
Expand All @@ -902,14 +923,6 @@
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="workBucketManagementPerformanceInformation" type="tns:ActivityBucketManagementStatisticsType" minOccurs="0"> <!-- TODO remove -->
<xsd:annotation>
<xsd:appinfo>
<a:since>4.0</a:since>
<a:experimental>true</a:experimental>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="cachingConfiguration" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo>
Expand Down Expand Up @@ -3170,40 +3183,6 @@
</xsd:restriction>
</xsd:simpleType>

<!--<xsd:simpleType name="ActivityExecutionResultType">-->
<!-- <xsd:annotation>-->
<!-- <xsd:documentation>-->
<!-- Result of an activity execution.-->
<!-- </xsd:documentation>-->
<!-- <xsd:appinfo>-->
<!-- <a:since>4.4</a:since>-->
<!-- <a:experimental>true</a:experimental>-->
<!-- </xsd:appinfo>-->
<!-- </xsd:annotation>-->
<!-- <xsd:restriction base="xsd:string">-->
<!-- <xsd:enumeration value="partialError">-->
<!-- <xsd:annotation>-->
<!-- <xsd:documentation>-->
<!-- Partial error. TODO what does it mean?-->
<!-- </xsd:documentation>-->
<!-- <xsd:appinfo>-->
<!-- <jaxb:typesafeEnumMember name="PARTIAL_ERROR"/>-->
<!-- </xsd:appinfo>-->
<!-- </xsd:annotation>-->
<!-- </xsd:enumeration>-->
<!-- <xsd:enumeration value="fatalError">-->
<!-- <xsd:annotation>-->
<!-- <xsd:documentation>-->
<!-- Fatal error. TODO what does it mean?-->
<!-- </xsd:documentation>-->
<!-- <xsd:appinfo>-->
<!-- <jaxb:typesafeEnumMember name="FATAL_ERROR"/>-->
<!-- </xsd:appinfo>-->
<!-- </xsd:annotation>-->
<!-- </xsd:enumeration>-->
<!-- </xsd:restriction>-->
<!--</xsd:simpleType>-->

<xsd:complexType name="ActivityBucketingStateType">
<xsd:annotation>
<xsd:documentation>
Expand Down Expand Up @@ -6626,26 +6605,6 @@
</xsd:complexType>
<xsd:element name="abstractActivityWorkState" type="tns:AbstractActivityWorkStateType" />

<!--<xsd:complexType name="RuntimeDefinedActivityWorkStateType">-->
<!-- <xsd:annotation>-->
<!-- <xsd:documentation>-->
<!-- TODO-->
<!-- </xsd:documentation>-->
<!-- <xsd:appinfo>-->
<!-- <a:container>true</a:container>-->
<!-- <a:since>4.4</a:since>-->
<!-- </xsd:appinfo>-->
<!-- </xsd:annotation>-->
<!-- <xsd:complexContent>-->
<!-- <xsd:extension base="tns:AbstractActivityWorkStateType">-->
<!-- <xsd:sequence>-->
<!-- -->
<!-- </xsd:sequence>-->
<!-- </xsd:extension>-->
<!-- </xsd:complexContent>-->
<!--</xsd:complexType>-->
<!--<xsd:element name="runtimeDefinedActivityWorkState" type="tns:RuntimeDefinedActivityWorkStateType" />-->

<xsd:complexType name="PureCompositeWorkStateType">
<xsd:annotation>
<xsd:documentation>
Expand Down Expand Up @@ -6866,23 +6825,6 @@
</xsd:complexType>
<xsd:element name="distributionWorkState" type="tns:DistributionWorkStateType" />

<!-- TODO consider removal -->
<xsd:complexType name="PropagationWorkStateType">
<xsd:annotation>
<xsd:documentation>
TODO
</xsd:documentation>
<xsd:appinfo>
<a:container>true</a:container>
<a:since>4.4</a:since>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="tns:AbstractActivityWorkStateType"/>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name="propagationWorkState" type="tns:PropagationWorkStateType" />

<xsd:complexType name="ReconciliationWorkStateType">
<xsd:annotation>
<xsd:documentation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ public class DefaultColumnUtils {
new ColumnWrapper(TaskType.F_COMPLETION_TIMESTAMP, "TaskType.currentRunTime"),
new ColumnWrapper(TaskType.F_PROGRESS),
new ColumnWrapper(TaskType.F_SCHEDULE, "pageTasks.task.scheduledToRunAgain"),
new ColumnWrapper(ItemPath.create(TaskType.F_OPERATION_STATS,
OperationStatsType.F_ITERATIVE_TASK_INFORMATION,
IterativeTaskInformationType.F_TOTAL_FAILURE_COUNT), "pageTasks.task.errors"), // TODO MID-6850
// TODO re-add total failure count
new ColumnWrapper(TaskType.F_RESULT_STATUS)))
.put(ShadowType.class, Arrays.asList(
new ColumnWrapper(ShadowType.F_NAME),
Expand Down Expand Up @@ -287,9 +285,7 @@ public static boolean isSpecialColumn(ItemPath itemPath, Containerable value) {
if (value instanceof TaskType) {
return itemPath.equivalent(TaskType.F_COMPLETION_TIMESTAMP)
|| itemPath.equivalent(TaskType.F_SCHEDULE)
|| itemPath.equivalent(ItemPath.create(TaskType.F_OPERATION_STATS, OperationStatsType.F_ITERATIVE_TASK_INFORMATION,
IterativeTaskInformationType.F_TOTAL_FAILURE_COUNT)) // TODO MID-6850
|| itemPath.equivalent(TaskType.F_PROGRESS);
|| itemPath.equivalent(TaskType.F_PROGRESS); // TODO also total failure count
} else if (value instanceof AuditEventRecordType) {
for (AuditEventRecordCustomColumnPropertyType customColumn : ((AuditEventRecordType)value).getCustomColumnProperty()) {
if (customColumn.getName().equals(itemPath.toString())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import java.util.*;

import com.evolveum.midpoint.repo.api.RepositoryService;
import com.evolveum.midpoint.schema.statistics.IterationInformation;
import com.evolveum.midpoint.task.quartzimpl.quartz.LocalScheduler;

import com.evolveum.midpoint.prism.xml.XmlTypeConverter;
Expand Down Expand Up @@ -40,10 +39,10 @@ public class TaskThreadsDumper {
private static final Trace LOGGER = TraceManager.getTrace(TaskThreadsDumper.class);

private static final String DOT_CLASS = TaskThreadsDumper.class.getName() + ".";
public static final String OP_GET_RUNNING_TASKS_THREADS_DUMP = DOT_CLASS + "getRunningTasksThreadsDump";
public static final String OP_GET_TASK_THREADS_DUMP = DOT_CLASS + "getTaskThreadsDump";
public static final String OP_RECORD_RUNNING_TASKS_THREADS_DUMP = DOT_CLASS + "recordRunningTasksThreadsDump";
public static final String OP_RECORD_TASK_THREADS_DUMP = DOT_CLASS + "recordTaskThreadsDump";
private static final String OP_GET_RUNNING_TASKS_THREADS_DUMP = DOT_CLASS + "getRunningTasksThreadsDump";
private static final String OP_GET_TASK_THREADS_DUMP = DOT_CLASS + "getTaskThreadsDump";
private static final String OP_RECORD_RUNNING_TASKS_THREADS_DUMP = DOT_CLASS + "recordRunningTasksThreadsDump";
private static final String OP_RECORD_TASK_THREADS_DUMP = DOT_CLASS + "recordTaskThreadsDump";

@Autowired private TaskRetriever taskRetriever;
@Autowired private LocalScheduler localScheduler;
Expand Down Expand Up @@ -162,12 +161,9 @@ private void addTaskInfo(StringBuilder output, RunningTask localTask, Thread thr
output.append(" of ").append(localTask.getExpectedTotal());
}
output.append("\n");
OperationStatsType stats = localTask.getAggregatedLiveOperationStats();
ActivityItemProcessingStatisticsType info = stats != null ? stats.getIterationInformation() : null;
if (info != null) {
output.append(IterationInformation.format(info));
}
output.append("\n");

// TODO include activity iteration information

if (thread != null) {
output.append(MiscUtil.takeThreadDump(thread));
} else {
Expand Down

0 comments on commit 6195d91

Please sign in to comment.