Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Won't Fix
-
None
-
Windows development env. Server running on Red Hat Linux.
-
Normal
Description
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.