Package voldemort.versioning

Examples of voldemort.versioning.Version


        }
        return version;
    }

    public Version put(K key, V value, Object transforms) {
        Version version = getVersionForPut(key);
        Versioned<V> versioned = Versioned.value(value, version);
        return put(key, versioned, transforms);

    }
View Full Code Here


        if(this.storeDefinitionsStorageEngine == null) {
            throw new VoldemortException("The store definitions directory is empty");
        }

        String allStoreDefinitions = "<stores>";
        Version finalStoresXmlVersion = null;
        if(storesXmlVersion != null) {
            finalStoresXmlVersion = storesXmlVersion;
        }
        this.storeNames.clear();

        ClosableIterator<Pair<String, Versioned<String>>> storesIterator = this.storeDefinitionsStorageEngine.entries();

        // Some test setups may result in duplicate entries for 'store' element.
        // Do the de-dup here
        Map<String, Versioned<String>> storeNameToDefMap = new HashMap<String, Versioned<String>>();
        Version maxVersion = null;
        while(storesIterator.hasNext()) {
            Pair<String, Versioned<String>> storeDetail = storesIterator.next();
            String storeName = storeDetail.getFirst();
            Versioned<String> versionedStoreDef = storeDetail.getSecond();
            storeNameToDefMap.put(storeName, versionedStoreDef);
            Version curVersion = versionedStoreDef.getVersion();

            // Get the highest version from all the store entries
            if(maxVersion == null) {
                maxVersion = curVersion;
            } else if(maxVersion.compare(curVersion) == Occurred.BEFORE) {
View Full Code Here

    private ClientRegistryRefresher registerClient(int intervalInSecs) {
        ClientRegistryRefresher refresher = null;
        if(this.sysRepository.getClientRegistryStore() != null) {
            try {
                Version version = this.sysRepository.getClientRegistryStore()
                                                    .putSysStore(clientId, clientInfo.toString());
                refresher = new ClientRegistryRefresher(this.sysRepository,
                                                        clientId,
                                                        clientInfo,
                                                        version);
View Full Code Here

                StringBuilder sb = new StringBuilder();
                sb.append(ByteUtils.toHexString(key));
                for(Versioned<byte[]> value: values) {
                    // TODO : This needs to be fixed for RO stores
                    Version version = value.getVersion();
                    sb.append(" : ").append(version.toString());
                }

                if(details) {
                    sb.append(" : ")
                      .append("PartitionId:")
View Full Code Here

                // go over the versions and remove everything before the
                // supplied version
                while(iter.hasNext()) {
                    Versioned<byte[]> curr = iter.next();
                    Version currentVersion = curr.getVersion();
                    if(currentVersion.compare(version) == Occurred.BEFORE) {
                        iter.remove();
                        numDeletedVersions++;
                    }
                }
View Full Code Here

        if (value == null) {
            logger.info("[Voldemort REJECTED] operation: put, store: {}, key: {}, value: NULL", storeName, key);
            return;
        }
        try {
            Version version = storeClient.put(key, (V) SerializationUtils.serialize((Serializable) value));
            logger.info("[Voldemort SUCCESS] operation: put, store: {}, key: {}, version: {}", storeName, key, version);
        } catch (Exception exception) {
            logger.error("[Voldemort ERROR] operation: put, store: {}, key: {}", storeName, key, exception);
        }
    }
View Full Code Here

TOP

Related Classes of voldemort.versioning.Version

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.