Package voldemort

Examples of voldemort.VoldemortException


                        ReadOnlyStorageMetadata metadata;
                        try {
                            metadata = new ReadOnlyStorageMetadata(copyLocation);
                        } catch(IOException e) {
                            logger.error("Error reading metadata file ", e);
                            throw new VoldemortException(e);
                        }

                        // Read checksum
                        String checkSumTypeString = (String) metadata.get(ReadOnlyStorageMetadata.CHECKSUM_TYPE);
                        String checkSumString = (String) metadata.get(ReadOnlyStorageMetadata.CHECKSUM);
View Full Code Here


            case READONLY_V2:
                // 8 (upper 8 bytes of md5) + 4 (position)
                this.indexEntrySize = 12;
                break;
            default:
                throw new VoldemortException("Unsupported storage format type");

        }
        this.routingStrategy = new RoutingStrategyFactory().updateRoutingStrategy(storeDef, cluster);
    }
View Full Code Here

                    }
                }
            }
                break;
            default:
                throw new VoldemortException("Do not support storage type " + storageType);
        }

    }
View Full Code Here

            if(sd.getName() != null && sd.getName().equals(storeName)) {
                storeDef = sd;
            }
        }
        if(storeDef == null) {
            throw new VoldemortException("StoreNotfound: " + storeName);
        }
        RoutingStrategy routingStrategy = new RoutingStrategyFactory().updateRoutingStrategy(storeDef, cluster);

        Properties properties = new Properties();
        properties.put("node.id","0");
View Full Code Here

            mbean.setModelMBeanInfo(info);
            mbean.setManagedResource(o, "ObjectReference");

            return mbean;
        } catch(MBeanException e) {
            throw new VoldemortException(e);
        } catch(InvalidTargetObjectTypeException e) {
            throw new VoldemortException(e);
        } catch(InstanceNotFoundException e) {
            throw new VoldemortException(e);
        }
    }
View Full Code Here

                if(setter != null)
                    descriptor.setField("setMethod", setter.getName());
                info.setDescriptor(descriptor);
                infos.add(info);
            } catch(IntrospectionException e) {
                throw new VoldemortException(e);
            }
        }

        return infos.toArray(new ModelMBeanAttributeInfo[infos.size()]);
    }
View Full Code Here

     */
    public static ObjectName createObjectName(String domain, String type) {
        try {
            return new ObjectName(domain + ":type=" + type);
        } catch(MalformedObjectNameException e) {
            throw new VoldemortException(e);
        }
    }
View Full Code Here

        double deleteProportion = (double) deletePercent / (double) 100;
        double mixedProportion = (double) mixedPercent / (double) 100;

        // Using default read only
        if(Math.abs(writeProportion + readProportion + mixedProportion + deleteProportion) != 1.0) {
            throw new VoldemortException("The sum of all workload percentage is NOT 100% \n"
                                         + " Read=" + (double) readPercent / (double) 100
                                         + " Write=" + (double) writePercent / (double) 100
                                         + " Delete=" + (double) deletePercent / (double) 100
                                         + " Mixed=" + (double) mixedPercent / (double) 100);
        }
View Full Code Here

        if(optCopy.size() > 1) {
            System.err.println("Conflicting options:");
            for(String opt: optCopy) {
                System.err.println("--" + opt);
            }
            throw new VoldemortException("Conflicting options detected.");
        }
    }
View Full Code Here

            throw new IllegalStateException("Expected to find only a single store, but found multiple!");
        this.storeDef = storeDefs.get(0);

        this.numChunks = conf.getInt("num.chunks", -1);
        if(this.numChunks < 1)
            throw new VoldemortException("num.chunks not specified in the job conf.");

        this.saveKeys = conf.getBoolean("save.keys", false);
        this.reducerPerBucket = conf.getBoolean("reducer.per.bucket", false);
    }
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.