You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Brandon Williams (JIRA)" <ji...@apache.org> on 2014/01/22 18:59:20 UTC

[jira] [Resolved] (CASSANDRA-6610) sstableLoader from windows to linux fails - due to \ and / in paths

     [ https://issues.apache.org/jira/browse/CASSANDRA-6610?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brandon Williams resolved CASSANDRA-6610.
-----------------------------------------

    Resolution: Won't Fix

This is one of the many reasons why mixing operating systems isn't supported.

> sstableLoader from windows to linux fails - due to \ and / in paths
> -------------------------------------------------------------------
>
>                 Key: CASSANDRA-6610
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6610
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>         Environment: Windows development env.  Server running on Red Hat Linux.
>            Reporter: Gary Stewart
>             Fix For: 1.2.10
>
>
> Currently we want to have a daily batch to upload data from a file.  We are using the bulkloader main class as this code will be running on a machine outside the cluster.
> Setup: I copied all the jars in to my lib folder and am executing:
> org.apache.cassandra.tools.BulkLoader.main(args) from my java code.
> This works when streaming from linux to linux and from windows to windows.  However, fails when running from windows to linux - which is our normal development setup.
> The error: Cannot find keyspace \name\name\  which is what the client sent to the server (cluster).  The \ is from windows and is not being interpreted correctly in the linux server and hence the wrong keyspace is determined.
> In theLoaderOptions methods: org.apache.cassandra.tools.BulkLoader.LoaderOptions.parseArgs(String[] cmdArgs)
> line 312 -  File dir = new File(dirname);
> A File object is created out of the input args and results in the local os file separator.  It appears that I am unable to change \ into / (even using the file.separator vm options, parameter etc - weird!).  
> I suspect the a solution would be to make file separator as an optional option in the arg and used this to 'fix' when streaming over different OS or simply replace \ with / as this works nicely in windows.  I do not have a build environment for cassandra (still new to cassandra) :-) so i cannot test it yet.
> Also, I set it to Major as it makes it difficult for us to develop and test in windows on a linux cluster.  But could be set to minor.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)