Package org.apache.stanbol.commons.solr.managed

Examples of org.apache.stanbol.commons.solr.managed.ManagedIndexState


            properties.putAll(tmp);
        }
        Map<String,IndexMetadata> toAdd,toRemove;
        IndexMetadata oldMetadata = null;
        synchronized (inMemoryModelLock ) {
            ManagedIndexState currentState = getState(name);
            if(currentState != null){
                toRemove = managed.get(currentState);
            } else {
                toRemove = null;
            }
            if(properties == null){
                toAdd = null; //remove
            } else {
                ManagedIndexState newState = properties.getState();
                toAdd = managed.get(newState);
            }
            //now update in-memory state
            if(toRemove != null){
                oldMetadata = toRemove.remove(name);
View Full Code Here


            log.info("The following Cores active on the SolrServer are not " +
                "marked as active in the Metadata: {}",activeOnSolrServer);
            log.info("Based on the Metadata (UNKNOWN ... no Index for that name):");
            for(String indexName : activeOnSolrServer){
                IndexMetadata metadata = managedCores.getIndexMetadata(indexName);
                ManagedIndexState state = metadata != null ? metadata.getState() : null;
                log.info("   - {} has state {}",indexName, state != null ? state : "UNKNOWN");
                if(metadata == null){
                    //unknown core ... deactivate
                    deactivateCore(indexName, server);
                    log.info("  ... deactiaved UNKOWN SolrCore {} on managed Solr Server {}",
View Full Code Here

        if (managedSolrServer != null && indexReference.checkServer(managedSolrServer.getServerName())
            && context != null && solrCoreConfig != null) {
            log.info(" > check/init index {} on ManagedSolrServer {}", indexReference, managedSolrServer.getServerName());
            String indexName = indexReference.getIndex();
            final IndexMetadata indexMetadata;
            ManagedIndexState indexState = managedSolrServer.getIndexState(indexName);
            if(indexState == null){
                if(solrCoreConfig.indexOf(".solrindex.") < 0){ //if the suffix is missing
                    solrCoreConfig = solrCoreConfig + ".solrindex.zip"; //append it
                }
                log.info("Create SolrCore {} (config: {}) on ManagedSolrServer {} ...",
View Full Code Here

            log.info("The following Cores active on the SolrServer are not " +
                "marked as active in the Metadata: {}",activeOnSolrServer);
            log.info("Based on the Metadata (UNKNOWN ... no Index for that name):");
            for(String indexName : activeOnSolrServer){
                IndexMetadata metadata = managedCores.getIndexMetadata(indexName);
                ManagedIndexState state = metadata != null ? metadata.getState() : null;
                log.info("   - {} has state {}",indexName, state != null ? state : "UNKNOWN");
                if(metadata == null){
                    //unknown core ... deactivate
                    deactivateCore(indexName, server);
                    log.info("  ... deactiaved UNKOWN SolrCore {} on managed Solr Server {}",
View Full Code Here

            properties.putAll(tmp);
        }
        Map<String,IndexMetadata> toAdd,toRemove;
        IndexMetadata oldMetadata = null;
        synchronized (inMemoryModelLock ) {
            ManagedIndexState currentState = getState(name);
            if(currentState != null){
                toRemove = managed.get(currentState);
            } else {
                toRemove = null;
            }
            if(properties == null){
                toAdd = null; //remove
            } else {
                ManagedIndexState newState = properties.getState();
                toAdd = managed.get(newState);
            }
            //now update in-memory state
            if(toRemove != null){
                oldMetadata = toRemove.remove(name);
View Full Code Here

            log.info("The following Cores active on the SolrServer are not " +
                "marked as active in the Metadata: {}",activeOnSolrServer);
            log.info("Based on the Metadata (UNKNOWN ... no Index for that name):");
            for(String indexName : activeOnSolrServer){
                IndexMetadata metadata = managedCores.getIndexMetadata(indexName);
                ManagedIndexState state = metadata != null ? metadata.getState() : null;
                log.info("   - {} has state {}",indexName, state != null ? state : "UNKNOWN");
                if(metadata == null){
                    //unknown core ... deactivate
                    deactivateCore(indexName, server);
                    log.info("  ... deactiaved UNKOWN SolrCore {} on managed Solr Server {}",
View Full Code Here

TOP

Related Classes of org.apache.stanbol.commons.solr.managed.ManagedIndexState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.