Package com.thinkaurelius.titan.graphdb.database.idassigner

Examples of com.thinkaurelius.titan.graphdb.database.idassigner.IDPoolExhaustedException


            ids.putIfAbsent(p, new AtomicLong(1));
            id = ids.get(p);
        }
        long lowerBound = id.getAndAdd(size);
        if (lowerBound >= blockSizeLimit) {
            throw new IDPoolExhaustedException("Reached partition limit: " + blockSizeLimit);
        }
        return new long[]{lowerBound, Math.min(lowerBound + size, blockSizeLimit)};
    }
View Full Code Here


                    log.info("ID overflow detected. Current id {}, block size {} and upper bound {} for bit width {}",
                            nextStart,blockSize,idBlockUpperBound,uniqueIdBitWidth);
                    if (randomizeUniqueId && (retry+1)<idApplicationRetryCount) {
                        continue;
                    }
                    throw new IDPoolExhaustedException("Exhausted id block for partition ["+partition+"] with upper bound: " + idBlockUpperBound);
                }

                assert idBlockUpperBound - blockSize > nextStart;
                long nextEnd = nextStart + blockSize;
                final StaticBuffer target = getBlockApplication(nextEnd);
View Full Code Here

            StoreTransaction txh = null;
            try {
                txh = manager.beginTransaction(new StoreTxConfig(metricsPrefix));
                long current = getCurrentID(partitionKey, txh);
                if (Long.MAX_VALUE - blockSize <= current) {
                    throw new IDPoolExhaustedException("Exhausted id block for partition ["+partition+"]");
                }

                assert Long.MAX_VALUE - blockSize > current;
                long next = current + blockSize;
                idStore.mutate(partitionKey, ImmutableList.of(StaticBufferEntry.of(DEFAULT_COLUMN, ByteBufferUtil.getLongBuffer(next))), KeyColumnValueStore.NO_DELETIONS, txh);
View Full Code Here

TOP

Related Classes of com.thinkaurelius.titan.graphdb.database.idassigner.IDPoolExhaustedException

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.