cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vivek Mishra <>
Subject RE: Cassandra.yaml
Date Fri, 17 Jun 2011 08:10:37 GMT
Hi Sasha,
This is what I am trying . I can sense this is happening with JDBCDriver stuff.

        public static void main(String[] args) {
                try {
                        java.sql.Connection con = null;
                        con = DriverManager
//                      con.
                        System.out.println(con !=null);

                } catch (ClassNotFoundException e) {
                } catch (SQLException e) {

Getting following error:
org.apache.cassandra.config.ConfigurationException: Cannot locate cassandra.yaml
        at org.apache.cassandra.config.DatabaseDescriptor.getStorageConfigURL(
at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(
        at org.apache.cassandra.config.CFMetaData.fromThrift(
        at org.apache.cassandra.cql.jdbc.ColumnDecoder.<init>(
        at org.apache.cassandra.cql.jdbc.Connection.execute(
        at org.apache.cassandra.cql.jdbc.Connection.execute(
        at org.apache.cassandra.cql.jdbc.CassandraConnection.<init>(
        at org.apache.cassandra.cql.jdbc.CassandraDriver.connect(
        at java.sql.DriverManager.getConnection(Unknown Source)
        at java.sql.DriverManager.getConnection(Unknown Source)

Ideally it should get it . Not sure what is the issue.


-----Original Message-----
From: Sasha Dolgy []
Sent: Friday, June 17, 2011 1:31 PM
Subject: Re: Cassandra.yaml

Hi Vivek,

When I write client code in Java, using Hector, I don't specify a cassandra.yaml ... I specify
the host(s) and keyspace I want to connect to.  Alternately, I specify the host(s) and create
the keyspace if the one I would like to use doesn't exist (new cluster for example).  At no
point do I use yaml file with my client code....

The conf/cassandra.yaml is there to tell the cassandra server how to behave / operate when
it starts ...


On Fri, Jun 17, 2011 at 9:55 AM, Vivek Mishra <> wrote:
> I have a query:
> I have my Cassandra server running on my local machine and it has
> loaded Cassandra specific settings from
> apache-cassandra-0.8.0-src/apache-cassandra-0.8.0-src/conf/cassandra.y
> aml
> Now If I am writing a java program to connect to this server why do I
> need to provide a new Cassandra.yaml file again?  Even if server is
> already up and running
> Even if I can create keyspaces, columnfamilies programmatically?  Isn’t it some type
of redundancy?
> Might be my query is a bit irrelevant.
> -Vivek


Write to us for a Free Gold Pass to the Cloud Computing Expo, NYC to attend a live session
by Head of Impetus Labs on ‘Secrets of Building a Cloud Vendor Agnostic PetaByte Scale Real-time
Secure Web Application on the Cloud ‘.

Looking to leverage the Cloud for your Big Data Strategy ? Attend Impetus webinar on May 27
by registering at .

NOTE: This message may contain information that is confidential, proprietary, privileged or
otherwise protected by law. The message is intended solely for the named addressee. If received
in error, please destroy and notify the sender. Any use of this email is prohibited when received
in error. Impetus does not represent, warrant and/or guarantee, that the integrity of this
communication has been maintained nor that the communication is free of errors, virus, interception
or interference.
View raw message