Fix for ACE-4089 SOLR 4 - sharded - Remove the requirement for shard configuration on the Alfresco One Platform

- vanilla support - currently not enterprise only and does not support slave shards

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@111382 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrew Hind
2015-09-03 10:37:33 +00:00
parent c61295f633
commit d6e7d6be06
12 changed files with 613 additions and 378 deletions

View File

@@ -42,6 +42,9 @@ import org.alfresco.repo.domain.node.NodeDAO.ChildAssocRefQueryCallback;
import org.alfresco.repo.domain.permissions.AclDAO;
import org.alfresco.repo.domain.qname.QNameDAO;
import org.alfresco.repo.domain.solr.SOLRDAO;
import org.alfresco.repo.index.shard.ShardRegistry;
import org.alfresco.repo.index.shard.ShardRegistryImpl;
import org.alfresco.repo.index.shard.ShardState;
import org.alfresco.repo.search.AspectIndexFilter;
import org.alfresco.repo.search.TypeIndexFilter;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
@@ -85,6 +88,7 @@ public class SOLRTrackingComponentImpl implements SOLRTrackingComponent
private boolean cacheAncestors =true;
private TypeIndexFilter typeIndexFilter;
private AspectIndexFilter aspectIndexFilter;
private ShardRegistry shardRegistry;
@Override
@@ -162,6 +166,11 @@ public class SOLRTrackingComponentImpl implements SOLRTrackingComponent
this.aspectIndexFilter = aspectIndexFilter;
}
public void setShardRegistry(ShardRegistry shardRegistry)
{
this.shardRegistry = shardRegistry;
}
/**
* Initialize
*/
@@ -1225,4 +1234,25 @@ public class SOLRTrackingComponentImpl implements SOLRTrackingComponent
long maxCommitTime = System.currentTimeMillis()+1L;
return aclDAO.getMaxChangeSetIdByCommitTime(maxCommitTime);
}
/* (non-Javadoc)
* @see org.alfresco.repo.solr.SOLRTrackingComponent#registerShardState(org.alfresco.repo.index.ShardState)
*/
@Override
public void registerShardState(ShardState shardState)
{
if(shardRegistry != null)
{
shardRegistry.registerShardState(shardState);
}
}
/* (non-Javadoc)
* @see org.alfresco.repo.solr.SOLRTrackingComponent#getShardRegistry()
*/
@Override
public ShardRegistry getShardRegistry()
{
return this.shardRegistry;
}
}