cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yuki Morishita (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-6610) sstableLoader from windows to linux fails - due to \ and / in paths
Date Wed, 22 Jan 2014 19:09:29 GMT

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

Yuki Morishita commented on CASSANDRA-6610:
-------------------------------------------

For C* >= 2,0, streaming from windows to linux *may* work, since the new protocol does
not include file path at all.
I have not tried it myself so I cannot say it works though.

> 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)

Mime
View raw message