Skip to content
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
.classpath
.project
.settings/
bin/

### Gradle ###

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package eu.xenit.alfresco.healthprocessor.plugins.api;
package eu.xenit.alfresco.healthprocessor.checker.api;

import eu.xenit.alfresco.healthprocessor.extensibility.BaseExtension;
import eu.xenit.alfresco.healthprocessor.reporter.api.NodeHealthReport;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package eu.xenit.alfresco.healthprocessor.plugins.api;
package eu.xenit.alfresco.healthprocessor.checker.api;

import eu.xenit.alfresco.healthprocessor.reporter.api.NodeHealthReport;
import java.util.HashSet;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package eu.xenit.alfresco.healthprocessor.plugins.api;
package eu.xenit.alfresco.healthprocessor.checker.api;

import eu.xenit.alfresco.healthprocessor.fixer.api.HealthFixerPlugin;
import eu.xenit.alfresco.healthprocessor.reporter.api.NodeHealthReport;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
* API for the Health-Processor health checker extensions
*/
package eu.xenit.alfresco.healthprocessor.plugins.api;
package eu.xenit.alfresco.healthprocessor.checker.api;
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package eu.xenit.alfresco.healthprocessor.extensibility.annotations;

import eu.xenit.alfresco.healthprocessor.checker.api.HealthProcessorPlugin;
import eu.xenit.alfresco.healthprocessor.extensibility.BaseExtension;
import eu.xenit.alfresco.healthprocessor.fixer.api.HealthFixerPlugin;
import eu.xenit.alfresco.healthprocessor.plugins.api.HealthProcessorPlugin;
import eu.xenit.alfresco.healthprocessor.reporter.api.HealthReporter;
import lombok.AllArgsConstructor;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package eu.xenit.alfresco.healthprocessor.fixer.api;

import eu.xenit.alfresco.healthprocessor.checker.api.HealthProcessorPlugin;
import eu.xenit.alfresco.healthprocessor.extensibility.BaseExtension;
import eu.xenit.alfresco.healthprocessor.plugins.api.HealthProcessorPlugin;
import eu.xenit.alfresco.healthprocessor.reporter.api.NodeHealthReport;
import java.util.Set;
import javax.annotation.Nonnull;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package eu.xenit.alfresco.healthprocessor.reporter.api;

import eu.xenit.alfresco.healthprocessor.plugins.api.HealthProcessorPlugin;
import java.util.Set;
import javax.annotation.Nonnull;

import eu.xenit.alfresco.healthprocessor.checker.api.HealthProcessorPlugin;

final class DisabledHealthReporter implements HealthReporter {

private static class DisabledHealthReporterHolder {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package eu.xenit.alfresco.healthprocessor.reporter.api;

import eu.xenit.alfresco.healthprocessor.checker.api.HealthProcessorPlugin;
import eu.xenit.alfresco.healthprocessor.extensibility.BaseExtension;
import eu.xenit.alfresco.healthprocessor.plugins.api.HealthProcessorPlugin;

import java.util.List;
import java.util.Set;
import javax.annotation.Nonnull;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
@AllArgsConstructor(access = AccessLevel.PRIVATE)
public class NodeHealthReport implements Serializable {

private static final long serialVersionUID = -939101152283421058L;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I don't see a problem with doing this at the moment, I don't understand why we are adding this now?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not blocking for this PR, though.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was just fixing a compiler warning. Any serialisable class should have a serial version UID to ensure Java can detect when attempting to de-serialise an object from binary with an incompatible state. I believe when not explicitly set, JVM may dynamically generate a UID. It could be left out, much like other compiler warnings I tried to address so I wasn't cluttered with warnings to a degree I was missing any I might introduce.


NodeHealthStatus status;
NodeRef nodeRef;
Set<String> messages;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package eu.xenit.alfresco.healthprocessor.reporter.api;

import eu.xenit.alfresco.healthprocessor.plugins.api.HealthProcessorPlugin;
import java.util.List;
import java.util.Map;
import javax.annotation.Nonnull;

import eu.xenit.alfresco.healthprocessor.checker.api.HealthProcessorPlugin;
import lombok.Value;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package eu.xenit.alfresco.healthprocessor.reporter.api;

import eu.xenit.alfresco.healthprocessor.plugins.api.HealthProcessorPlugin;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import javax.annotation.Nonnull;

import eu.xenit.alfresco.healthprocessor.checker.api.HealthProcessorPlugin;

/**
* Health reporter that divides a batch into individual calls.
*
Expand Down
4 changes: 3 additions & 1 deletion alfresco-health-processor-platform/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
id 'eu.xenit.amp'
}

description = "Alfresco Repository module for ${rootProject.description}"
description = "Alfresco Health Processor (Repository module)"

java {
withJavadocJar()
Expand Down Expand Up @@ -50,6 +50,8 @@ amp {
libs = jar.outputs.files + configurations.runtimeClasspath - configurations.alfrescoProvided
}

testAmp { enabled = false }

apply from: "${rootDir}/gradle/publish.gradle"

publishing {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ cache.healthProcessorSharedCache.maxIdleSeconds=0
cache.healthProcessorSharedCache.eviction-policy=NONE
cache.healthProcessorSharedCache.cluster.type=fully-distributed
cache.healthProcessorSharedCache.backup-count=1
cache.healthProcessorSharedCache.merge-policy=com.hazelcast.map.merge.LatestUpdateMapMergePolicy
# Alfresco supports policy names with "hz." prefix to bridge API/version differences
cache.healthProcessorSharedCache.merge-policy=hz.LATEST_UPDATE
cache.healthProcessorSharedCache.readBackupData=false
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
log4j.logger.eu.xenit.alfresco.healthprocessor=INFO
log4j.logger.eu.xenit.alfresco.healthprocessor.indexing=INHERITED
log4j.logger.eu.xenit.alfresco.healthprocessor.fixer=INHERITED
log4j.logger.eu.xenit.alfresco.healthprocessor.plugins=INHERITED
log4j.logger.eu.xenit.alfresco.healthprocessor.checker=INHERITED
log4j.logger.eu.xenit.alfresco.healthprocessor.processing=INHERITED
log4j.logger.eu.xenit.alfresco.healthprocessor.reporter=INHERITED
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ logger.eu_xenit_alfresco_healthprocessor.name=eu.xenit.alfresco.healthprocessor
logger.eu_xenit_alfresco_healthprocessor.level=info
logger.eu_xenit_alfresco_healthprocessor_indexing.name=eu.xenit.alfresco.healthprocessor.indexing
logger.eu_xenit_alfresco_healthprocessor_fixer.name=eu.xenit.alfresco.healthprocessor.fixer
logger.eu_xenit_alfresco_healthprocessor_plugins.name=eu.xenit.alfresco.healthprocessor.plugins
logger.eu_xenit_alfresco_healthprocessor_checker.name=eu.xenit.alfresco.healthprocessor.checker
logger.eu_xenit_alfresco_healthprocessor_processing.name=eu.xenit.alfresco.healthprocessor.processing
logger.eu_xenit_alfresco_healthprocessor_reporter.name=eu.xenit.alfresco.healthprocessor.reporter
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,36 @@ eu.xenit.alfresco.healthprocessor.indexing.txn-id.txn-batch-size=5000
eu.xenit.alfresco.healthprocessor.indexing.last-txns.lookback-transactions=10000
eu.xenit.alfresco.healthprocessor.indexing.last-txns.txn-batch-size=5000

eu.xenit.alfresco.healthprocessor.plugin.noop.enabled=false
eu.xenit.alfresco.healthprocessor.plugin.content-validation.enabled=false
eu.xenit.alfresco.healthprocessor.plugin.content-validation.properties=
eu.xenit.alfresco.healthprocessor.checker.noop.enabled=false
eu.xenit.alfresco.healthprocessor.checker.content-validation.enabled=false
eu.xenit.alfresco.healthprocessor.checker.content-validation.properties=

eu.xenit.alfresco.healthprocessor.plugin.solr-index.enabled=false
eu.xenit.alfresco.healthprocessor.plugin.solr-index.check-transaction=false
eu.xenit.alfresco.healthprocessor.plugin.solr-index.endpoints=default,archive
eu.xenit.alfresco.healthprocessor.plugin.solr-index.endpoints.default.type=Always
eu.xenit.alfresco.healthprocessor.plugin.solr-index.endpoints.default.base-uri=https://${solr.host}:${solr.port.ssl}/solr/alfresco
eu.xenit.alfresco.healthprocessor.plugin.solr-index.endpoints.default.indexed-store=workspace://SpacesStore
eu.xenit.alfresco.healthprocessor.checker.solr-index.enabled=false
eu.xenit.alfresco.healthprocessor.checker.solr-index.check-transaction=false
eu.xenit.alfresco.healthprocessor.checker.solr-index.endpoints=default,archive
eu.xenit.alfresco.healthprocessor.checker.solr-index.endpoints.default.type=Always
eu.xenit.alfresco.healthprocessor.checker.solr-index.endpoints.default.base-uri=https://${solr.host}:${solr.port.ssl}/solr/alfresco
eu.xenit.alfresco.healthprocessor.checker.solr-index.endpoints.default.indexed-store=workspace://SpacesStore

eu.xenit.alfresco.healthprocessor.plugin.solr-index.endpoints.archive.type=Always
eu.xenit.alfresco.healthprocessor.plugin.solr-index.endpoints.archive.base-uri=https://${solr.host}:${solr.port.ssl}/solr/archive
eu.xenit.alfresco.healthprocessor.plugin.solr-index.endpoints.archive.indexed-store=archive://SpacesStore
eu.xenit.alfresco.healthprocessor.checker.solr-index.endpoints.archive.type=Always
eu.xenit.alfresco.healthprocessor.checker.solr-index.endpoints.archive.base-uri=https://${solr.host}:${solr.port.ssl}/solr/archive
eu.xenit.alfresco.healthprocessor.checker.solr-index.endpoints.archive.indexed-store=archive://SpacesStore

# not defined in base repository.properties or Enterprise one
elasticsearch.host=localhost
elasticsearch.port=9200
elasticsearch.baseUrl=/
elasticsearch.secureComms=none

# no (default) setup for the archive here
# indexing is dependent on events, events on behaviours, which are disabled for archive store
elasticsearch.indexName=alfresco

eu.xenit.alfresco.healthprocessor.checker.elastic-index.enabled=false
eu.xenit.alfresco.healthprocessor.checker.elastic-index.endpoints=default
eu.xenit.alfresco.healthprocessor.checker.elastic-index.endpoints.default.base-uri=${elasticsearch.host}:${elasticsearch.port}${elasticsearch.baseUrl}${elasticsearch.indexName}
eu.xenit.alfresco.healthprocessor.checker.elastic-index.endpoints.default.secureComms=${elasticsearch.secureComms}
eu.xenit.alfresco.healthprocessor.checker.elastic-index.endpoints.default.expect-paths-indexed=false

eu.xenit.alfresco.healthprocessor.reporter.store.max-stored-reports=3000
eu.xenit.alfresco.healthprocessor.reporter.alfred-telemetry.enabled=false
Expand All @@ -39,3 +55,12 @@ eu.xenit.alfresco.healthprocessor.reporter.log.streaming.enabled=false

eu.xenit.alfresco.healthprocessor.fixer.solr-missing-node.enabled=false
eu.xenit.alfresco.healthprocessor.fixer.solr-duplicate-node.enabled=false

eu.xenit.alfresco.healthprocessor.fixer.elastic-undeleted-node.enabled=false
eu.xenit.alfresco.healthprocessor.fixer.elastic-missing-or-outdated-node.enabled=false
eu.xenit.alfresco.healthprocessor.fixer.elastic-missing-or-outdated-node.waitForIndex=true
eu.xenit.alfresco.healthprocessor.fixer.elastic-missing-or-outdated-node.waitIntervalMillis=1000
eu.xenit.alfresco.healthprocessor.fixer.elastic-missing-or-outdated-node.waitIntervalCount=2

search.solrTrackingSupport.ignorePathsForSpecificTypes=false
search.solrTrackingSupport.ignorePathsForSpecificAspects=false
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,49 @@
</constructor-arg>
</bean>

<!-- need to duplicate search tracking component - elastic does not expose any if active -->
<bean id="search.trackingComponent" class="org.alfresco.repo.solr.SOLRTrackingComponentImpl" init-method="init">
<property name="permissionService" ref="permissionService"/>
<property name="dictionaryService" ref="dictionaryService"/>
<property name="ownableService" ref="ownableService"/>
<property name="tenantService" ref="tenantService"/>
<property name="nodeDAO" ref="nodeDAO"/>
<property name="qnameDAO" ref="qnameDAO"/>
<property name="searchDAO" ref="searchDAO" />
<property name="dictionaryDAO" ref="dictionaryDAO" />
<property name="aclDAO" ref="aclDAO" />
<property name="enabled" value="true" />
<property name="typeIndexFilter" ref="search.TypeIndexFilter" />
<property name="aspectIndexFilter" ref="search.AspectIndexFilter" />
<property name="namespaceService" ref="namespaceService" />
</bean>

<bean id="search.abstractIndexFilter" abstract="true" init-method="init" >
<property name="namespaceService" ref="namespaceService"/>
<property name="dictionaryService" ref="dictionaryService"/>
</bean>

<bean id="search.TypeIndexFilter" class="org.alfresco.repo.search.TypeIndexFilter" parent="search.abstractIndexFilter">
<property name="ignorePathsForSpecificTypes" value="${search.solrTrackingSupport.ignorePathsForSpecificTypes}" />
<property name="typesForIgnoringPaths">
<list>
<value>{http://www.alfresco.org/model/content/1.0}person</value>
<value>{http://www.alfresco.org/model/application/1.0}configurations</value>
<value>{http://www.alfresco.org/model/content/1.0}authorityContainer</value>
</list>
</property>
</bean>

<bean id="search.AspectIndexFilter" class="org.alfresco.repo.search.AspectIndexFilter" parent="search.abstractIndexFilter">
<property name="ignorePathsForSpecificAspects" value="${search.solrTrackingSupport.ignorePathsForSpecificAspects}" />
<property name="aspectsForIgnoringPaths">
<list></list>
</property>
</bean>

<bean id="eu.xenit.alfresco.healthprocessor.indexing.TrackingComponent"
class="eu.xenit.alfresco.healthprocessor.indexing.Alfresco7TrackingComponent">
<constructor-arg name="trackingComponent" ref="searchTrackingComponent" />
<constructor-arg name="trackingComponent" ref="search.trackingComponent" />
</bean>

<bean id="eu.xenit.alfresco.healthprocessor.util.AlfrescoAttributeStore"
Expand Down
Loading
Loading