Package voldemort

Examples of voldemort.VoldemortException


        return storeDef.getName();
    }

    private final void checkNotNull(Object o) {
        if(o == null)
            throw new VoldemortException("Not configured yet!");
    }
View Full Code Here


    }

    protected VoldemortState getCurrentState(int nodeId) {
        VoldemortServer server = serverMap.get(nodeId);
        if(server == null) {
            throw new VoldemortException("Node id " + nodeId + " does not exist");
        } else {
            return server.getMetadataStore().getServerStateUnlocked();
        }
    }
View Full Code Here

    }

    protected Cluster getCurrentCluster(int nodeId) {
        VoldemortServer server = serverMap.get(nodeId);
        if(server == null) {
            throw new VoldemortException("Node id " + nodeId + " does not exist");
        } else {
            return server.getMetadataStore().getCluster();
        }
    }
View Full Code Here

            // shuffle the partition list so the fetching will equally spread
            // across the source cluster
            Collections.shuffle(this.partitionList);
            if(this.partitionList.size() > srcAdminClient.getAdminClientCluster()
                                                         .getNumberOfPartitions()) {
                throw new VoldemortException("Incorrect partition mapping in source cluster");
            }
        }

        // set up thread pool to parallely forklift partitions
        this.workerPool = Executors.newFixedThreadPool(partitionParallelism);
View Full Code Here

        return fromToMoves.get(fromId).get(toId);
    }

    public void add(MoveMap rhs) {
        if(!idKeySet.containsAll(rhs.idKeySet) || !rhs.idKeySet.containsAll(idKeySet)) {
            throw new VoldemortException("MoveMap objects cannot be added! They have incompatible id sets ("
                                         + idKeySet + " vs. " + rhs.idKeySet + ").");
        }
        for(Integer fromId: idKeySet) {
            for(Integer toId: idKeySet) {
                int moves = get(fromId, toId) + rhs.get(fromId, toId);
View Full Code Here

            if(storeDef.hasRetentionPeriod())
                scheduleCleanupJob(storeDef, engine);
        } catch(Exception e) {
            unregisterSystemEngine(engine);
            throw new VoldemortException(e);
        }
    }
View Full Code Here

            if(storeDef.hasRetentionPeriod())
                scheduleCleanupJob(storeDef, engine);
        } catch(Exception e) {
            removeEngine(engine, isReadOnly, storeDef.getType(), false);
            throw new VoldemortException(e);
        }
        return engine;
    }
View Full Code Here

            this.storeRepository.addRoutedStore(store);
        } catch(Exception e) {
            // Roll back
            for(Node node: cluster.getNodes())
                this.storeRepository.removeNodeStore(def.getName(), node.getId());
            throw new VoldemortException(e);
        }
    }
View Full Code Here

        /* If there is an exception, throw it */
        if(lastException instanceof VoldemortException)
            throw (VoldemortException) lastException;
        else if(lastException != null)
            throw new VoldemortException(lastException);
    }
View Full Code Here

                    logger.error("forceCleanupOldData() No retention policy found for " + storeName);
                }
            }
        } catch(Exception e) {
            logger.error("Error while running forceCleanupOldData()", e);
            throw new VoldemortException(e);
        }
    }
View Full Code Here

TOP

Related Classes of voldemort.VoldemortException

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.