[ 
https://issues.apache.org/jira/browse/CASSANDRA-7398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14040680#comment-14040680
 ] 

Marco Tulio Avila Cerón edited comment on CASSANDRA-7398 at 6/23/14 12:31 PM:
------------------------------------------------------------------------------

Description of patch (v8):

1) Re-factored methods to load config file by URI, by file or by resource
2) Handles the path problem in a OS independent way by catching 
URISyntaxException or MalformedURLException

Junit tests:

Tested the following cases:

file:/C://etc/etc [File does not exists]
file://C://etc/etc [Valid URI but file does not exist]
file:///C://etc/etc [Valid URI but file does not exist]
C://etc/etc [Invalid URI and file does not exist]
file:/// [not file defined]
file:///////////////fjdjfjsd [Invalid URI]

Tested but commented in patch
C:\Users\marcoavilac\Documents\cassandra\cassandra\conf\cassandra.yaml [Invalid 
URI (will change backslashes to slashes) and file exists]

file:///C:/Users/marcoavilac/Documents/cassandra/cassandra/conf/cassandra.yaml 
[Valid URI and file exists]


was (Author: totopo_loco):
Description of patch:

1) Re-factored methods to load config file by URI, by file or by resource
2) Handles the path problem in a OS independent way by catching 
URISyntaxException or MalformedURLException

Junit tests:

Tested the following cases:

file:/C://etc/etc [File does not exists]
file://C://etc/etc [Valid URI but file does not exist]
file:///C://etc/etc [Valid URI but file does not exist]
C://etc/etc [Invalid URI and file does not exist]
file:/// [not file defined]
file:///////////////fjdjfjsd [Invalid URI]

Tested but commented in patch
C:\Users\marcoavilac\Documents\cassandra\cassandra\conf\cassandra.yaml [Invalid 
URI (will change backslashes to slashes) and file exists]

file:///C:/Users/marcoavilac/Documents/cassandra/cassandra/conf/cassandra.yaml 
[Valid URI and file exists]

> Using the -Dcassandra.config VM param needs a "file:///" prefix for the 
> supplied URL
> ------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-7398
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7398
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>         Environment:  Cassandra 2.1.0-rc1-SNAPSHOT, Win 7
>            Reporter: Marco Tulio Avila Cerón
>            Assignee: Marco Tulio Avila Cerón
>            Priority: Minor
>              Labels: lhf, patch
>             Fix For: 2.1 rc2
>
>         Attachments: CASSANDRA-7398_prefix_v2.patch, 
> CASSANDRA-7398_prefix_v3.patch, CASSANDRA-7398_prefix_v4.patch, 
> trunk-7398_v5.txt, trunk-7398_v6.txt, trunk-7398_v7.txt, trunk-7398_v8.txt
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> The parameter in the VM options -Dcassandra.config= needs file:///
> Allow the user to have optional "file:///" when loading the config file from 
> the filesystem



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to