Package voldemort

Examples of voldemort.VoldemortException


    public void put(K key, Versioned<V> value, T transforms) throws VoldemortException {
        try {
            Thread.sleep(sleepTimeMs);
            getInnerStore().put(key, value, transforms);
        } catch(InterruptedException e) {
            throw new VoldemortException(e);
        }
    }
View Full Code Here


public class FailingStore<K, V, T> extends AbstractStore<K, V, T> {

    private final VoldemortException exception;

    public FailingStore(String name) {
        this(name, new VoldemortException("Operation failed!"));
    }
View Full Code Here

        return engine.delete(key, version);
    }

    @Override
    public List<Versioned<V>> get(K key, T transforms) throws VoldemortException {
        throw new VoldemortException("Operation failed");
    }
View Full Code Here

        throw new VoldemortException("Operation failed");
    }

    @Override
    public java.util.List<Version> getVersions(K key) {
        throw new VoldemortException("Operation failed");
    }
View Full Code Here

    }

    @Override
    public Map<K, List<Versioned<V>>> getAll(Iterable<K> keys, Map<K, T> transforms)
            throws VoldemortException {
        throw new VoldemortException("Operation failed");
    }
View Full Code Here

                // cleaned and disk usage will bloat.
                backupHelper.endBackup();
                System.out.println("Native backup completed at " + new Date().toString());
            }
        } catch(Exception e) {
            throw new VoldemortException("Error performing native backup", e);
        }
    }
View Full Code Here

                return true;
            }
        });

        if(backupFiles == null) {
            throw new VoldemortException("Failed to read backup directory. Please check"
                                         + "if the directory exists, or permission is granted.");
        }

        if(backupFiles.length == 0) {
            status.setStatus("No backup files found, assuming a full backup is required.");
View Full Code Here

            } catch(IOException e) {
                // If the destination file exists, delete it
                if(dest.exists()) {
                    dest.delete();
                }
                throw new VoldemortException("Error occured while copying "
                                                     + name
                                                     + ". Deleting to ensure we don't have a corrupt backup.",
                                             e);
            }
            total += source.length();
        }

        if(isIncremental) {
            try {
                recordBackupSet(backupDir);
            } catch(IOException e) {
                throw new VoldemortException("Error attempting to write backup records for ", e);
            }
        } else {
            cleanStaleFiles(backupDir, status);
        }
    }
View Full Code Here

                    this.cachedVersion = new VectorClock(Hex.decodeHex(hexCode.toCharArray()));
                }
            }
            return this.cachedVersion;
        } catch(Exception e) {
            throw new VoldemortException("Failed to read Version for file :" + getName(), e);
        }
    }
View Full Code Here

                String hexCode = new String(Hex.encodeHex(newClock.toBytes()));
                FileUtils.writeStringToFile(versionFile, hexCode, "UTF-8");
                this.cachedVersion = newClock;
            }
        } catch(Exception e) {
            throw new VoldemortException("Failed to write Version for the current file :"
                                         + getName(), 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.