Examples of PaasException


Examples of com.netflix.paas.exceptions.PaasException

            QueryResult dr = new QueryResult();
            dr.setSrows(builder.build());
            return dr;
        } catch (ConnectionException e) {
            throw new PaasException(
                    String.format("Failed to read row '%s' in column family '%s.%s'" ,
                                  key, this.keyspace.getKeyspaceName(), this.columnFamily.getName()),
                    e);
        }
    }
View Full Code Here

Examples of com.netflix.paas.exceptions.PaasException

        mb.withRow(this.columnFamily, serializers.keyAsByteBuffer(key)).delete();
       
        try {
            mb.execute();
        } catch (ConnectionException e) {
            throw new PaasException(
                    String.format("Failed to update row '%s' in column family '%s.%s'" ,
                                  key, this.keyspace.getKeyspaceName(), this.columnFamily.getName()),
                    e);
        }
    }
View Full Code Here

Examples of com.netflix.paas.exceptions.PaasException

        }
       
        try {
            mb.execute();
        } catch (ConnectionException e) {
            throw new PaasException(
                    String.format("Failed to update row '%s' in column family '%s.%s'" ,
                                  key, this.keyspace.getKeyspaceName(), this.columnFamily.getName()),
                    e);
        }
    }
View Full Code Here

Examples of com.netflix.paas.exceptions.PaasException

        } catch (com.netflix.astyanax.connectionpool.exceptions.NotFoundException e) {
            throw new NotFoundException(
                    "column",
                    String.format("%s.%s.%s.%s", key, column, this.keyspace.getKeyspaceName(), this.columnFamily.getName()));
        } catch (ConnectionException e) {
            throw new PaasException(
                    String.format("Failed to read row '%s' in column family '%s.%s'" ,
                                  key, this.keyspace.getKeyspaceName(), this.columnFamily.getName()),
                    e);
        }
    }
View Full Code Here

Examples of com.netflix.paas.exceptions.PaasException

                        serializers.valueAsByteBuffer(column, value));
       
        try {
            mb.execute();
        } catch (ConnectionException e) {
            throw new PaasException(
                    String.format("Failed to update row '%s' in column family '%s.%s'" ,
                                  key, this.keyspace.getKeyspaceName(), this.columnFamily.getName()),
                    e);
        }
    }
View Full Code Here

Examples of com.netflix.paas.exceptions.PaasException

        ColumnListMutation<ByteBuffer> mbRow = mb.withRow(this.columnFamily, serializers.keyAsByteBuffer(key));
        mbRow.deleteColumn(serializers.columnAsByteBuffer(column));
        try {
            mb.execute();
        } catch (ConnectionException e) {
            throw new PaasException(
                    String.format("Failed to update row '%s' in column family '%s.%s'" ,
                                  key, this.keyspace.getKeyspaceName(), this.columnFamily.getName()),
                    e);
        }
    }
View Full Code Here

Examples of com.netflix.paas.exceptions.PaasException

    private void refreshSerializers() throws PaasException {
        try {
            this.serializers = this.keyspace.getSerializerPackage(this.columnFamily.getName(), true);
        } catch (Exception e) {
            LOG.error("Failed to get serializer package for column family '{}.{}'", new Object[]{keyspace.getKeyspaceName(), this.columnFamily.getName(), e});
            throw new PaasException(
                    String.format("Failed to get serializer package for column family '%s.%s' in keyspace",
                            this.keyspace.getKeyspaceName(), this.columnFamily.getName()),
                    e);
        }
    }
View Full Code Here

Examples of com.netflix.paas.exceptions.PaasException

        try {
            cluster.createKeyspace(props);
            eventBus.post(new KeyspaceUpdateEvent(new KeyspaceKey(clusterKey, keyspace.getName())));
        } catch (ConnectionException e) {
            throw new PaasException(String.format("Error creating keyspace '%s' from cluster '%s'", keyspace.getName(), clusterKey.getClusterName()), e);
        }
    }
View Full Code Here

Examples of com.netflix.paas.exceptions.PaasException

            keyspace.setClusterName(clusterKey.getClusterName());
           
            cluster.updateKeyspace(props);
            eventBus.post(new KeyspaceUpdateEvent(new KeyspaceKey(clusterKey, keyspace.getName())));
        } catch (ConnectionException e) {
            throw new PaasException(String.format("Error creating keyspace '%s' from cluster '%s'", keyspace.getName(), clusterKey.getClusterName()), e);
        }
    }
View Full Code Here

Examples of com.netflix.paas.exceptions.PaasException

    public void deleteKeyspace(String keyspaceName) throws PaasException {
        LOG.info("Dropping keyspace");
        try {
            cluster.dropKeyspace(keyspaceName);
        } catch (ConnectionException e) {
            throw new PaasException(String.format("Error deleting keyspace '%s' from cluster '%s'", keyspaceName, clusterKey.getClusterName()), e);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.