Re: Cassandra project set up error

2013-08-23 Thread Nipuni Piyabasi Perera
Hi,

I am trying to run Cassandra configuration I have set up in IDEA and
connect to it. When I run the "CassandraDaemon" and try to connect using
command ./cqlsh, it gives the following error in the terminal:

Traceback (most recent call last):
  File "./cqlsh", line 2027, in 
main(*read_options(sys.argv[1:], os.environ))
  File "./cqlsh", line 2013, in main
display_float_precision=options.float_precision)
  File "./cqlsh", line 486, in __init__
self.get_connection_versions()
  File "./cqlsh", line 580, in get_connection_versions
self.cass_ver_tuple = tuple(map(int, vers['build'].split('-',
1)[0].split('.')[:3]))
ValueError: invalid literal for int() with base 10: 'Unknown'


I have checked the port 127.0.0.1:9160 and it is open. But can not connect.

Thanks,
Nipuni


On Fri, Aug 23, 2013 at 5:44 AM, Nipuni Piyabasi Perera <
nipuni880...@gmail.com> wrote:

> Hi,
>
> This is fixed after deleting files in the system keysapce.
>
> Thanks,
> Nipuni
>
>
> On Fri, Aug 23, 2013 at 5:33 AM, Nipuni Piyabasi Perera <
> nipuni880...@gmail.com> wrote:
>
>> Hi,
>>
>> I could build via generating eclipse files without adding any external
>> jars. But the error was due to class path to cassandra.yaml file. It worked
>> when added "file:" at the beginning of the path name.
>>
>> Now I am getting the following error.
>>
>> ERROR 00:00:09 Fatal exception during initialization
>> org.apache.cassandra.exceptions.ConfigurationException: Saved cluster
>> name MyClusterName != configured name Test Cluster
>>
>> Thanks,
>> Nipuni
>>
>>
>> On Thu, Aug 22, 2013 at 7:39 PM, J.B. Langston 
>> wrote:
>>
>>> I have found the easiest way to get Cassandra to build under IDEA is to
>>> use ant to generate the eclipse project files (see
>>> http://wiki.apache.org/cassandra/RunningCassandraInEclipse) and then
>>> import those into IDEA.  Setting it up in IDEA directly is an error-prone
>>> manual process with way too many steps, and some of the instructions refer
>>> to things that have moved or changed names in the latest version of IDEA.
>>>
>>> On Aug 22, 2013, at 6:00 AM, Nipuni Piyabasi Perera <
>>> nipuni880...@gmail.com> wrote:
>>>
>>> > I can't find "storage-conf.xml" file. If "cassandra.yaml" is used
>>> instead,
>>> > how should I set the configuration?.
>>> >
>>> > Thanks,
>>> > Nipuni
>>> >
>>> >
>>> > On Thu, Aug 22, 2013 at 2:05 PM, Nipuni Piyabasi Perera <
>>> > nipuni880...@gmail.com> wrote:
>>> >
>>> >> Hi,
>>> >>
>>> >> I am trying build Cassandra as an Idea project. following guide [1].
>>> But
>>> >> when creating the RUN configuration. I have to add several
>>> dependencies
>>> >> externally (hadoop, pig).
>>> >> But still there is an error in the class.
>>> >>
>>> >> org.apache.cassandra.hadoop.AbstractColumnFamilyRecordWriter
>>> >>
>>> >> error is :
>>> >>
>>> >> org.apache.hadoop.mapreduce.RecordWriter' clashes with 'write(K, V)'
>>> in
>>> >> 'org.apache.hadoop.mapred.RecordWriter'; overridden method does not
>>> throw
>>> >> 'java.lang.InterruptedException'
>>> >>
>>> >> Even with the error I could run the application, which then it gives a
>>> >> configuration error as follows:
>>> >>
>>> >> ERROR 08:28:04 Fatal configuration error
>>> >> org.apache.cassandra.exceptions.ConfigurationException: Cannot locate
>>> >>
>>> /home/nipuni/Desktop/Cassendra/Cassendra_code/cassandra-trunk/conf/cassandra.yaml
>>> >>
>>> >> Is there any other documentation to set up Cassandra.
>>> >>
>>> >> [1] http://wiki.apache.org/cassandra/RunningCassandraInIDEA
>>> >>
>>> >>
>>> >> Thanks,
>>> >> Nipuni
>>> >> --
>>> >> Nipuni Piyabasi Perera
>>> >> Undergraduate
>>> >> Department of Computer Science And Engineering
>>> >> University of Moratuwa
>>> >> Sri Lanka
>>> >>
>>> >
>>> >
>>> >
>>> > --
>>> > Nipuni Piyabasi Perera
>>> > Undergraduate
>>> > Department of Computer Science And Engineering
>>> > University of Moratuwa
>>> > Sri Lanka
>>>
>>>
>>
>>
>> --
>> Nipuni Piyabasi Perera
>> Undergraduate
>> Department of Computer Science And Engineering
>> University of Moratuwa
>> Sri Lanka
>>
>
>
>
> --
> Nipuni Piyabasi Perera
> Undergraduate
> Department of Computer Science And Engineering
> University of Moratuwa
> Sri Lanka
>



-- 
Nipuni Piyabasi Perera
Undergraduate
Department of Computer Science And Engineering
University of Moratuwa
Sri Lanka


Re: Cassandra project set up error

2013-08-23 Thread Dave Brosius
Yeah, there's a problem when running c* in IDEs, it doesn't find the 
version to send down to the client.


You can edit the cqlsh file to remove the version parsing at

File "./cqlsh", line 580, in get_connection_versions
self.cass_ver_tuple = tuple(map(int, vers['build'].split('-',
1)[0].split('.')[:3]))





On 08/23/2013 03:50 AM, Nipuni Piyabasi Perera wrote:

Hi,

I am trying to run Cassandra configuration I have set up in IDEA and
connect to it. When I run the "CassandraDaemon" and try to connect using
command ./cqlsh, it gives the following error in the terminal:

Traceback (most recent call last):
   File "./cqlsh", line 2027, in 
 main(*read_options(sys.argv[1:], os.environ))
   File "./cqlsh", line 2013, in main
 display_float_precision=options.float_precision)
   File "./cqlsh", line 486, in __init__
 self.get_connection_versions()
   File "./cqlsh", line 580, in get_connection_versions
 self.cass_ver_tuple = tuple(map(int, vers['build'].split('-',
1)[0].split('.')[:3]))
ValueError: invalid literal for int() with base 10: 'Unknown'


I have checked the port 127.0.0.1:9160 and it is open. But can not connect.

Thanks,
Nipuni


On Fri, Aug 23, 2013 at 5:44 AM, Nipuni Piyabasi Perera <
nipuni880...@gmail.com> wrote:


Hi,

This is fixed after deleting files in the system keysapce.

Thanks,
Nipuni


On Fri, Aug 23, 2013 at 5:33 AM, Nipuni Piyabasi Perera <
nipuni880...@gmail.com> wrote:


Hi,

I could build via generating eclipse files without adding any external
jars. But the error was due to class path to cassandra.yaml file. It worked
when added "file:" at the beginning of the path name.

Now I am getting the following error.

ERROR 00:00:09 Fatal exception during initialization
org.apache.cassandra.exceptions.ConfigurationException: Saved cluster
name MyClusterName != configured name Test Cluster

Thanks,
Nipuni


On Thu, Aug 22, 2013 at 7:39 PM, J.B. Langston wrote:


I have found the easiest way to get Cassandra to build under IDEA is to
use ant to generate the eclipse project files (see
http://wiki.apache.org/cassandra/RunningCassandraInEclipse) and then
import those into IDEA.  Setting it up in IDEA directly is an error-prone
manual process with way too many steps, and some of the instructions refer
to things that have moved or changed names in the latest version of IDEA.

On Aug 22, 2013, at 6:00 AM, Nipuni Piyabasi Perera <
nipuni880...@gmail.com> wrote:


I can't find "storage-conf.xml" file. If "cassandra.yaml" is used

instead,

how should I set the configuration?.

Thanks,
Nipuni


On Thu, Aug 22, 2013 at 2:05 PM, Nipuni Piyabasi Perera <
nipuni880...@gmail.com> wrote:


Hi,

I am trying build Cassandra as an Idea project. following guide [1].

But

when creating the RUN configuration. I have to add several

dependencies

externally (hadoop, pig).
But still there is an error in the class.

org.apache.cassandra.hadoop.AbstractColumnFamilyRecordWriter

error is :

org.apache.hadoop.mapreduce.RecordWriter' clashes with 'write(K, V)'

in

'org.apache.hadoop.mapred.RecordWriter'; overridden method does not

throw

'java.lang.InterruptedException'

Even with the error I could run the application, which then it gives a
configuration error as follows:

ERROR 08:28:04 Fatal configuration error
org.apache.cassandra.exceptions.ConfigurationException: Cannot locate


/home/nipuni/Desktop/Cassendra/Cassendra_code/cassandra-trunk/conf/cassandra.yaml

Is there any other documentation to set up Cassandra.

[1] http://wiki.apache.org/cassandra/RunningCassandraInIDEA


Thanks,
Nipuni
--
Nipuni Piyabasi Perera
Undergraduate
Department of Computer Science And Engineering
University of Moratuwa
Sri Lanka




--
Nipuni Piyabasi Perera
Undergraduate
Department of Computer Science And Engineering
University of Moratuwa
Sri Lanka




--
Nipuni Piyabasi Perera
Undergraduate
Department of Computer Science And Engineering
University of Moratuwa
Sri Lanka




--
Nipuni Piyabasi Perera
Undergraduate
Department of Computer Science And Engineering
University of Moratuwa
Sri Lanka








Re: Secondary Index Storage

2013-08-23 Thread Nipuni Piyabasi Perera
Hi,

Ok, so if I want to make it separate and test, where should I refer? From
where the keyspace refer to the location "/var/lib/cassandra/data". I have
debug the code, and could see some variables (e.g jdk location etc) can be
accessed from :

System.getProperty("");

But this does not contain the disk location to keyspace.

Thanks,
Nipuni


On Fri, Aug 23, 2013 at 9:52 AM, Jonathan Ellis  wrote:

> Sorry, Aleksey pointed out that the index directory isn't separate from the
> "parent" table.  Probably so that we can snapshot them both together, which
> is why the separate config in .yaml doesn't make sense either.
>
>
> On Thu, Aug 22, 2013 at 11:07 PM, Jonathan Ellis 
> wrote:
>
> > You can already symlink the index directory anywhere you like.  I'm not
> > convinced that special-casing indexes is a good approach in general vs
> > looking at performance of all tables.
> >
> >
> > On Thu, Aug 22, 2013 at 8:16 PM, Nipuni Piyabasi Perera <
> > nipuni880...@gmail.com> wrote:
> >
> >> Hi,
> >>
> >> I need to do a secondary index access improvement with a little
> >> modification to Cassandra. I could see in [1], that the performance of
> >> secondary index querying can be increased via splitting the column
> family
> >> data and secondary index data.
> >> Currently Cassandra saves keyspace data and secondary indices data in
> >> "var/lib/cassandra/data/".
> >> According to my understanding the data saves in the
> >> "data_file_directories"
> >> location of conf/cassandra.yaml file. If I can enter new variable into
> >> "cassandra.yaml" file and address it in the place where Cassandra stores
> >> secondary indexes, this can be fixed.
> >>
> >> Can anyone give some guidance regarding this improvement.
> >>
> >> [1] https://issues.apache.org/jira/browse/CASSANDRA-5502
> >>
> >> Thanks,
> >> Nipuni
> >>
> >> --
> >> Nipuni Piyabasi Perera
> >> Undergraduate
> >> Department of Computer Science And Engineering
> >> University of Moratuwa
> >> Sri Lanka
> >>
> >
> >
> >
> > --
> > Jonathan Ellis
> > Project Chair, Apache Cassandra
> > co-founder, http://www.datastax.com
> > @spyced
> >
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder, http://www.datastax.com
> @spyced
>



-- 
Nipuni Piyabasi Perera
Undergraduate
Department of Computer Science And Engineering
University of Moratuwa
Sri Lanka


Re: Secondary Index Storage

2013-08-23 Thread Dave Brosius

the location is loaded from the

cassandra.yaml,

specifically the entry

data_file_directories

This is loaded into the class

Config.java

using 3rdparty library snakeyaml


On 08/23/2013 06:34 AM, Nipuni Piyabasi Perera wrote:

Hi,

Ok, so if I want to make it separate and test, where should I refer? From
where the keyspace refer to the location "/var/lib/cassandra/data". I have
debug the code, and could see some variables (e.g jdk location etc) can be
accessed from :

System.getProperty("");

But this does not contain the disk location to keyspace.

Thanks,
Nipuni


On Fri, Aug 23, 2013 at 9:52 AM, Jonathan Ellis  wrote:


Sorry, Aleksey pointed out that the index directory isn't separate from the
"parent" table.  Probably so that we can snapshot them both together, which
is why the separate config in .yaml doesn't make sense either.


On Thu, Aug 22, 2013 at 11:07 PM, Jonathan Ellis 
wrote:


You can already symlink the index directory anywhere you like.  I'm not
convinced that special-casing indexes is a good approach in general vs
looking at performance of all tables.


On Thu, Aug 22, 2013 at 8:16 PM, Nipuni Piyabasi Perera <
nipuni880...@gmail.com> wrote:


Hi,

I need to do a secondary index access improvement with a little
modification to Cassandra. I could see in [1], that the performance of
secondary index querying can be increased via splitting the column

family

data and secondary index data.
Currently Cassandra saves keyspace data and secondary indices data in
"var/lib/cassandra/data/".
According to my understanding the data saves in the
"data_file_directories"
location of conf/cassandra.yaml file. If I can enter new variable into
"cassandra.yaml" file and address it in the place where Cassandra stores
secondary indexes, this can be fixed.

Can anyone give some guidance regarding this improvement.

[1] https://issues.apache.org/jira/browse/CASSANDRA-5502

Thanks,
Nipuni

--
Nipuni Piyabasi Perera
Undergraduate
Department of Computer Science And Engineering
University of Moratuwa
Sri Lanka




--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder, http://www.datastax.com
@spyced




--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder, http://www.datastax.com
@spyced