You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Mehdi Bada <me...@dbi-services.com> on 2016/09/23 07:58:22 UTC
data file directory path customization
Hi all,
With the new apache cassandra 3.7 version, It is possible to setup a customizable path for data_files, saved_caches and commit_log in the configuration file (cassandra.yaml)?
I ask the question because during some test, I wanted to setup the path for :
- data_files_directories
- commitlog_directory
- saved_caches_directory
After configuring this 3 variables (parameters) in the cassandra-yaml, I had the following issues:
[cassandra@test bin]$ ./cassandra -f
18:54:22.443 [main] INFO o.a.c.config.YamlConfigurationLoader - Configuration location: file:/u00/app/cassandra/admin/CSD1/etc/cassandra.yaml
18:54:22.447 [main] DEBUG o.a.c.config.YamlConfigurationLoader - Loading settings from file:/u00/app/cassandra/admin/CSD1/etc/cassandra.yaml
Exception (org.apache.cassandra.exceptions.ConfigurationException) encountered during startup: Invalid yaml: file:/u00/app/cassandra/admin/CSD1/etc/cassandra.yaml
Error: while parsing a block mapping; expected <block end>, but found BlockMappingStart; in 'reader', line 188, column 2:
data_file_directories:
^
****************************************************************************************************************************************************************************
18:59:30.554 [main] INFO o.a.c.config.YamlConfigurationLoader - Configuration location: file:/u00/app/cassandra/admin/CSD1/etc/cassandra.yaml
18:59:30.558 [main] DEBUG o.a.c.config.YamlConfigurationLoader - Loading settings from file:/u00/app/cassandra/admin/CSD1/etc/cassandra.yaml
Exception (org.apache.cassandra.exceptions.ConfigurationException) encountered during startup: Invalid yaml: file:/u00/app/cassandra/admin/CSD1/etc/cassandra.yaml
Error: while parsing a block mapping; expected <block end>, but found BlockMappingStart; in 'reader', line 194, column 2:
commitlog_directory: /u01/cassan .. .
^
***************************************************************************************************************************************************************************
The first issue was for the data_files_directories, after that I commented it out in the cassandra.yaml, and I had the same issue for the commitlog_directory parameter.
Below the setting of my 2 variables:
***************************************************
data_file_directories:
- /u01/cassandradata/CSD1/data
.....
commitlog_directory: /u01/cassandradata/CSD1/commitlog
***************************************************************************
I also tested the syntax with double quote " " -> Same issue
Many thanks in advance for your feedback
Best Regards
Mehdi Bada
----
Mehdi Bada | Consultant
Phone: +41 32 422 96 00 | Mobile: +41 79 928 75 48 | Fax: +41 32 422 96 15
dbi services, Rue de la Jeunesse 2, CH-2800 Delémont
mehdi.bada@dbi-services.com
www.dbi-services.com
⇒ dbi services is recruiting Oracle & SQL Server experts ! – Join the team
RE: data file directory path customization
Posted by Rajesh Radhakrishnan <Ra...@phe.gov.uk>.
Hi Mehdi,
Did you set it same for all nodes in the cluster?
Please check the space between the key and value and also before the key.
Key (data_files_directories, commitlog_directory, saved_caches_directory).
Check the write permission of the parent directory too.
Hope this helps!
Kind regards,
Rajesh Radhakrishnan
________________________________
From: Mehdi Bada [mehdi.bada@dbi-services.com]
Sent: 23 September 2016 08:58
To: user@cassandra.apache.org
Subject: data file directory path customization
Hi all,
With the new apache cassandra 3.7 version, It is possible to setup a customizable path for data_files, saved_caches and commit_log in the configuration file (cassandra.yaml)?
I ask the question because during some test, I wanted to setup the path for :
- data_files_directories
- commitlog_directory
- saved_caches_directory
After configuring this 3 variables (parameters) in the cassandra-yaml, I had the following issues:
[cassandra@test bin]$ ./cassandra -f
18:54:22.443 [main] INFO o.a.c.config.YamlConfigurationLoader - Configuration location: file:/u00/app/cassandra/admin/CSD1/etc/cassandra.yaml
18:54:22.447 [main] DEBUG o.a.c.config.YamlConfigurationLoader - Loading settings from file:/u00/app/cassandra/admin/CSD1/etc/cassandra.yaml
Exception (org.apache.cassandra.exceptions.ConfigurationException) encountered during startup: Invalid yaml: file:/u00/app/cassandra/admin/CSD1/etc/cassandra.yaml
Error: while parsing a block mapping; expected <block end>, but found BlockMappingStart; in 'reader', line 188, column 2:
data_file_directories:
^
****************************************************************************************************************************************************************************
18:59:30.554 [main] INFO o.a.c.config.YamlConfigurationLoader - Configuration location: file:/u00/app/cassandra/admin/CSD1/etc/cassandra.yaml
18:59:30.558 [main] DEBUG o.a.c.config.YamlConfigurationLoader - Loading settings from file:/u00/app/cassandra/admin/CSD1/etc/cassandra.yaml
Exception (org.apache.cassandra.exceptions.ConfigurationException) encountered during startup: Invalid yaml: file:/u00/app/cassandra/admin/CSD1/etc/cassandra.yaml
Error: while parsing a block mapping; expected <block end>, but found BlockMappingStart; in 'reader', line 194, column 2:
commitlog_directory: /u01/cassan ...
^
***************************************************************************************************************************************************************************
The first issue was for the data_files_directories, after that I commented it out in the cassandra.yaml, and I had the same issue for the commitlog_directory parameter.
Below the setting of my 2 variables:
***************************************************
data_file_directories:
- /u01/cassandradata/CSD1/data
.....
commitlog_directory: /u01/cassandradata/CSD1/commitlog
***************************************************************************
I also tested the syntax with double quote " " -> Same issue
Many thanks in advance for your feedback
Best Regards
Mehdi Bada
----
Mehdi Bada | Consultant
Phone: +41 32 422 96 00 | Mobile: +41 79 928 75 48 | Fax: +41 32 422 96 15
dbi services, Rue de la Jeunesse 2, CH-2800 Delémont
mehdi.bada@dbi-services.com
www.dbi-services.com
[cid:1e02ecf01895aacdb0fd8d778ef9a33cef1c83ad@zimbra]
⇒ dbi services is recruiting Oracle & SQL Server experts ! – Join the team<redir.aspx?REF=h7KQ5hASDru_Hvc17sR-H4FfY-fSJEZjGyHRQA9IMHvp_M8QmePTCAFodHRwOi8vd3d3LmRiaS1zZXJ2aWNlcy5jb20vZnIvZGJpLXNlcnZpY2VzLWV0LXNlcy1jb2xsYWJvcmF0ZXVycy9vZmZyZXMtZW1wbG9pcy1vcHBvcnR1bml0ZXMtY2FycmllcmVzLw..>
**************************************************************************
The information contained in the EMail and any attachments is confidential and intended solely and for the attention and use of the named addressee(s). It may not be disclosed to any other person without the express authority of Public Health England, or the intended recipient, or both. If you are not the intended recipient, you must not disclose, copy, distribute or retain this message or any part of it. This footnote also confirms that this EMail has been swept for computer viruses by Symantec.Cloud, but please re-sweep any attachments before opening or saving. http://www.gov.uk/PHE
**************************************************************************
Re: data file directory path customization
Posted by Mehdi Bada <me...@dbi-services.com>.
Hi Alain,
Thank you for your feedback, the problem was the space character before the data_files_directories parameter. As you said the the YAML is very case sensitive.
Many thanks for your feedback and have a nice day.
Regards
---
Mehdi Bada | Consultant
Phone: +41 32 422 96 00 | Mobile: +41 79 928 75 48 | Fax: +41 32 499 96 15
dbi services, Rue de la Jeunesse 2, CH-2800 Delémont
mehdi.bada@dbi-services.com
www.dbi-services.com
From: "Alain RODRIGUEZ" <ar...@gmail.com>
To: "user" <us...@cassandra.apache.org>
Sent: Friday, September 23, 2016 12:06:09 PM
Subject: Re: data file directory path customization
Hi Mehdi,
After configuring this 3 variables (parameters) in the cassandra-yaml, I had the following issues
BQ_BEGIN
With the new apache cassandra 3.7 version, It is possible to setup a customizable path for data_files, saved_caches and commit_log in the configuration file (cassandra.yaml)?
BQ_END
According to the configuration, parameters you're using are still valid in 3.7: https://github.com/apache/cassandra/blob/cassandra-3.7/conf/cassandra.yaml#L184-L194 .
BQ_BEGIN
Exception (org.apache.cassandra.exceptions.ConfigurationException) encountered during startup: Invalid yaml:
BQ_END
If I had to guess, I would say you have an indentation issue. When you uncommented those properties, did you remove "#" - 1 character - or "# " - 2 characters - including the space? If I remember correctly, YAML is sensitive to this kind of stuff. I would try that or some other similar tool in case of doubts:
http://www.yamllint.com/
C*heers,
-----------------------
Alain Rodriguez - @arodream - alain@thelastpickle.com
France
The Last Pickle - Apache Cassandra Consulting
http://www.thelastpickle.com
2016-09-23 9:58 GMT+02:00 Mehdi Bada < mehdi.bada@dbi-services.com > :
BQ_BEGIN
Hi all,
With the new apache cassandra 3.7 version, It is possible to setup a customizable path for data_files, saved_caches and commit_log in the configuration file (cassandra.yaml)?
I ask the question because during some test, I wanted to setup the path for :
- data_files_directories
- commitlog_directory
- saved_caches_directory
After configuring this 3 variables (parameters) in the cassandra-yaml, I had the following issues:
[cassandra@test bin]$ ./cassandra -f
18:54:22.443 [main] INFO o.a.c.config.YamlConfigurationLoader - Configuration location: file:/u00/app/cassandra/admin/CSD1/etc/cassandra.yaml
18:54:22.447 [main] DEBUG o.a.c.config.YamlConfigurationLoader - Loading settings from file:/u00/app/cassandra/admin/CSD1/etc/cassandra.yaml
Exception (org.apache.cassandra.exceptions.ConfigurationException) encountered during startup: Invalid yaml: file:/u00/app/cassandra/admin/CSD1/etc/cassandra.yaml
Error: while parsing a block mapping; expected <block end>, but found BlockMappingStart; in 'reader', line 188, column 2:
data_file_directories:
^
****************************************************************************************************************************************************************************
18:59:30.554 [main] INFO o.a.c.config.YamlConfigurationLoader - Configuration location: file:/u00/app/cassandra/admin/CSD1/etc/cassandra.yaml
18:59:30.558 [main] DEBUG o.a.c.config.YamlConfigurationLoader - Loading settings from file:/u00/app/cassandra/admin/CSD1/etc/cassandra.yaml
Exception (org.apache.cassandra.exceptions.ConfigurationException) encountered during startup: Invalid yaml: file:/u00/app/cassandra/admin/CSD1/etc/cassandra.yaml
Error: while parsing a block mapping; expected <block end>, but found BlockMappingStart; in 'reader', line 194, column 2:
commitlog_directory: /u01/cassan .. .
^
***************************************************************************************************************************************************************************
The first issue was for the data_files_directories, after that I commented it out in the cassandra.yaml, and I had the same issue for the commitlog_directory parameter.
Below the setting of my 2 variables:
***************************************************
data_file_directories:
- /u01/cassandradata/CSD1/data
.....
commitlog_directory: /u01/cassandradata/CSD1/commitlog
***************************************************************************
I also tested the syntax with double quote " " -> Same issue
Many thanks in advance for your feedback
Best Regards
Mehdi Bada
----
Mehdi Bada | Consultant
Phone: +41 32 422 96 00 | Mobile: +41 79 928 75 48 | Fax: +41 32 422 96 15
dbi services, Rue de la Jeunesse 2, CH-2800 Delémont
mehdi.bada@dbi-services.com
www.dbi-services.com
⇒ dbi services is recruiting Oracle & SQL Server experts ! – Join the team
BQ_END
Re: data file directory path customization
Posted by Alain RODRIGUEZ <ar...@gmail.com>.
Hi Mehdi,
> After configuring this 3 variables (parameters) in the cassandra-yaml, I
> had the following issues
>
With the new apache cassandra 3.7 version, It is possible to setup a
> customizable path for data_files, saved_caches and commit_log in the
> configuration file (cassandra.yaml)?
>
According to the configuration, parameters you're using are still valid in
3.7: https://github.com/apache/cassandra/blob/cassandra-3.7/
conf/cassandra.yaml#L184-L194.
*Exception (org.apache.cassandra.exceptions.ConfigurationException)
> encountered during startup: Invalid yaml: *
If I had to guess, I would say you have an indentation issue. When you
uncommented those properties, did you remove "#" - 1 character - or "# " -
2 characters - including the space? If I remember correctly, YAML is
sensitive to this kind of stuff. I would try that or some other similar
tool in case of doubts:
http://www.yamllint.com/
C*heers,
-----------------------
Alain Rodriguez - @arodream - alain@thelastpickle.com
France
The Last Pickle - Apache Cassandra Consulting
http://www.thelastpickle.com
2016-09-23 9:58 GMT+02:00 Mehdi Bada <me...@dbi-services.com>:
> Hi all,
>
> With the new apache cassandra 3.7 version, It is possible to setup a
> customizable path for data_files, saved_caches and commit_log in the
> configuration file (cassandra.yaml)?
> I ask the question because during some test, I wanted to setup the path
> for :
>
> * - data_files_directories*
> * - commitlog_directory*
> * - saved_caches_directory*
>
> After configuring this 3 variables (parameters) in the cassandra-yaml, I
> had the following issues:
>
> *[cassandra@test bin]$ ./cassandra -f*
> *18:54:22.443 [main] INFO o.a.c.config.YamlConfigurationLoader -
> Configuration location:
> file:/u00/app/cassandra/admin/CSD1/etc/cassandra.yaml*
> *18:54:22.447 [main] DEBUG o.a.c.config.YamlConfigurationLoader - Loading
> settings from file:/u00/app/cassandra/admin/CSD1/etc/cassandra.yaml*
> *Exception (org.apache.cassandra.exceptions.ConfigurationException)
> encountered during startup: Invalid yaml:
> file:/u00/app/cassandra/admin/CSD1/etc/cassandra.yaml*
> * Error: while parsing a block mapping; expected <block end>, but found
> BlockMappingStart; in 'reader', line 188, column 2:*
> * data_file_directories: *
> * ^*
>
> ************************************************************
> ************************************************************
> ****************************************************
> *18:59:30.554 [main] INFO o.a.c.config.YamlConfigurationLoader -
> Configuration location:
> file:/u00/app/cassandra/admin/CSD1/etc/cassandra.yaml*
> *18:59:30.558 [main] DEBUG o.a.c.config.YamlConfigurationLoader - Loading
> settings from file:/u00/app/cassandra/admin/CSD1/etc/cassandra.yaml*
> *Exception (org.apache.cassandra.exceptions.ConfigurationException)
> encountered during startup: Invalid yaml:
> file:/u00/app/cassandra/admin/CSD1/etc/cassandra.yaml*
> * Error: while parsing a block mapping; expected <block end>, but found
> BlockMappingStart; in 'reader', line 194, column 2:*
> * commitlog_directory: /u01/cassan ..*.
> ^
>
> ************************************************************
> ************************************************************
> ***************************************************
>
> The first issue was for the data_files_directories, after that I commented
> it out in the cassandra.yaml, and I had the same issue for the
> commitlog_directory parameter.
>
> Below the setting of my 2 variables:
>
> ***************************************************
> * data_file_directories: *
> * - /u01/cassandradata/CSD1/data*
>
> *.....*
> *commitlog_directory: /u01/cassandradata/CSD1/commitlog*
> ************************************************************
> ***************
>
> I also tested the syntax with double quote " " -> Same issue
>
>
> Many thanks in advance for your feedback
>
> Best Regards
>
> Mehdi Bada
>
>
> ----
> *Mehdi Bada* | Consultant
> Phone: +41 32 422 96 00 | Mobile: +41 79 928 75 48 | Fax: +41 32 422 96 15
> dbi services, Rue de la Jeunesse 2, CH-2800 Delémont
> mehdi.bada@dbi-services.com
> www.dbi-services.com
>
>
>
> *⇒ dbi services is recruiting Oracle & SQL Server experts ! – Join the
> team
> <http://www.dbi-services.com/fr/dbi-services-et-ses-collaborateurs/offres-emplois-opportunites-carrieres/>*
>
>