Package com.impetus.kundera

Examples of com.impetus.kundera.KunderaException


        client = (org.apache.cassandra.thrift.Cassandra.Client) getConnection(pooledConnection);
        try {
            client.set_cql_version(getCqlVersion());
        } catch (Exception e) {
            log.error("Error during borrowing a connection , Caused by: {}.", e);
            throw new KunderaException(e);
        } finally {
            releaseConnection(pooledConnection);
        }
        return client;
View Full Code Here


            } else {
                return (latestCount + 1) * descriptor.getAllocationSize();
            }
        } catch (UnavailableException e) {
            log.error("Error while reading counter value from table{}, Caused by: .", descriptor.getTable(), e);
            throw new KunderaException(e);
        } catch (TimedOutException e) {
            log.error("Error while reading counter value from table{}, Caused by: .", descriptor.getTable(), e);
            throw new KunderaException(e);
        } catch (Exception e) {
            log.error("Error while using keyspace. Caused by: .", e);
            throw new KunderaException(e);
        }
    }
View Full Code Here

                    getDataHandler().fromThriftRow(entityClass, metadata, relationNames, isWrapReq,
                        getConsistencyLevel(), rowIds);
            }
        } catch (Exception e) {
            log.error("Error while retrieving records for entity {}, row keys {}", entityClass, rowIds);
            throw new KunderaException(e);
        }
        return entities;
    }
View Full Code Here

            KunderaCoreUtils.printQuery(query, showQuery);
            return (T) conn.execute_cql3_query(ByteBuffer.wrap(query.getBytes(Constants.CHARSET_UTF8)),
                Compression.NONE, getConsistencyLevel());
        } catch (Exception e) {
            log.error("Error while executing query {}", query);
            throw new KunderaException(e);
        }
    }
View Full Code Here

                        String tableName = entity.getClass().getSimpleName();
                        String fieldName = attribute.getName();
                        String msg = "Decomposing failed for `" + tableName + "`.`" + fieldName
                                + "`, did you set the correct type in your entity class?";
                        log.error(msg, e);
                        throw new KunderaException(msg, e);
                    }
                    PropertyAccessorHelper.set(entity, (Field) attribute.getJavaMember(), decomposed);
                }
                else
                {
View Full Code Here

                    thriftSuperColumn.addToColumns(thriftColumn);
                }
                catch (NumberFormatException nfe)
                {
                    log.error("For counter column arguments should be numeric type, Caused by: .", nfe);
                    throw new KunderaException(nfe);
                }
            }
        }
        return thriftCounterSuperColumns;
    }
View Full Code Here

    {
        if (!hostPools.isEmpty())
        {
            return (ConnectionPool) loadBalancingPolicy.getPool(hostPools.values());
        }
        throw new KunderaException("All hosts are down. please check servers manully.");
    }
View Full Code Here

                        pool.getPoolProperties().getPort());
                connectionPool = getNewPool(pool.getPoolProperties().getHost(), pool.getPoolProperties().getPort());
            }
        }

        throw new KunderaException("All hosts are down. please check servers manully.");
    }
View Full Code Here

            result = s.get(clazz, (Serializable) key);
        }
        catch (ClassCastException ccex)
        {
            log.error("Class can not be serializable, Caused by {}.", ccex);
            throw new KunderaException(ccex);
        }
        catch (Exception e)
        {
            log.error("Error while finding, Caused by {}. ", e);
            throw new KunderaException(e);
        }
        return result;

    }
View Full Code Here

        }
        catch (InvalidRequestException e)
        {
            log.error("Error while persisting record, Caused by: .", e);
            throw new KunderaException(e);
        }
        catch (TException e)
        {
            log.error("Error while persisting record, Caused by: .", e);
            throw new KunderaException(e);
        }
        catch (UnsupportedEncodingException e)
        {
            log.error("Error while persisting record, Caused by: .", e);
            throw new KunderaException(e);
        }
        finally
        {
            releaseConnection(conn);
View Full Code Here

TOP

Related Classes of com.impetus.kundera.KunderaException

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.