Package org.scale7.cassandra.pelops

Examples of org.scale7.cassandra.pelops.ClusterUnitTest


        final AtomicBoolean suspended = new AtomicBoolean(true);
        CommonsBackedPool pool = new CommonsBackedPool(
                AbstractIntegrationTest.cluster,
                AbstractIntegrationTest.KEYSPACE,
                config,
                new OperandPolicy(),
                new LeastLoadedNodeSelectionStrategy(),
                new CommonsBackedPool.INodeSuspensionStrategy() {
                    @Override
                    public boolean evaluate(CommonsBackedPool pool, PooledNode node) {
                        if (suspended.get()) {
View Full Code Here


        final AtomicBoolean invoked = new AtomicBoolean(false);
        CommonsBackedPool pool = new CommonsBackedPool(
                AbstractIntegrationTest.cluster,
                AbstractIntegrationTest.KEYSPACE,
                config,
                new OperandPolicy(),
                new LeastLoadedNodeSelectionStrategy(),
                new NoOpNodeSuspensionStrategy(),
                new CommonsBackedPool.IConnectionValidator() {
                    @Override
                    public boolean validate(CommonsBackedPool.PooledConnection connection) {
View Full Code Here

        long startMillis = System.currentTimeMillis();
        CommonsBackedPool pool = new CommonsBackedPool(
                cluster,
                AbstractIntegrationTest.KEYSPACE,
                config,
                new OperandPolicy(),
                new LeastLoadedNodeSelectionStrategy(),
                new NoOpNodeSuspensionStrategy(),
                new DescribeVersionConnectionValidator()
        );
View Full Code Here

    private CommonsBackedPool configurePool(CommonsBackedPool.Policy config) {
        return new CommonsBackedPool(
                AbstractIntegrationTest.cluster,
                AbstractIntegrationTest.KEYSPACE,
                config,
                new OperandPolicy(),
                new LeastLoadedNodeSelectionStrategy(),
                new NoOpNodeSuspensionStrategy(),
                new NoOpConnectionValidator()
        );
    }
View Full Code Here

                {
                    deleteRecordFromCounterColumnFamily(pKey, tableName, metadata, getConsistencyLevel());
                }
                else
                {
                    RowDeletor rowDeletor = clientFactory.getRowDeletor(pool);
                    rowDeletor.deleteRow(tableName, Bytes.fromByteBuffer(CassandraUtilities.toBytes(pKey, metadata
                            .getIdAttribute().getJavaType())), getConsistencyLevel());

                }
            }
        }
View Full Code Here

        if (!isOpen())
        {
            throw new PersistenceException("PelopsClient is closed.");
        }

        RowDeletor rowDeletor = clientFactory.getRowDeletor(pool);
        rowDeletor.deleteRow(tableName,
                Bytes.fromByteBuffer(CassandraUtilities.toBytes(columnValue, columnValue.getClass())),
                getConsistencyLevel());

    }
View Full Code Here

     * {@inheritDoc}.
     */
    @Override
    public RowDeletor createRowDeletor() {
        validateKeyspaceSet();
        return new RowDeletor(this);
    }
View Full Code Here

     * {@inheritDoc}.
     */
    @Override
    public RowDeletor createRowDeletor(long timestamp) {
        validateKeyspaceSet();
        return new RowDeletor(this, timestamp);
    }
View Full Code Here

        try
        {
            List<ByteBuffer> keys = new ArrayList<ByteBuffer>();
            keys.add(ByteBufferUtil.bytes(key));
           
            Selector selector = pool.createSelector();/*Pelops.createSelector(getPoolName());*/
            Map<ByteBuffer, List<ColumnOrSuperColumn>> columns = selector.getColumnOrSuperColumnsFromRows(new ColumnParent(column_family), keys,
                    Selector.newColumnsPredicateAll(false, 10000), readConsistencyLevel);

            assert columns != null;
            return Ok;
        }
View Full Code Here

        SliceRange sliceRange = new SliceRange();
        sliceRange.setStart(start);
        sliceRange.setFinish(finish);
        colPredicate.setSlice_range(sliceRange);

        Selector selector = pelopsClient.getSelector();
        List<SuperColumn> allThriftSuperColumns = selector.getSuperColumnsFromRow(columnFamilyName, rowKey,
                colPredicate, consistencyLevel);

        for (SuperColumn superColumn : allThriftSuperColumns)
        {
            if (superColumn == null)
View Full Code Here

TOP

Related Classes of org.scale7.cassandra.pelops.ClusterUnitTest

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.