I am trying to execute DataImportExample.java but it gives following error:
(NOTE: I have generated the DataImportExample.class and DataImportExample$CsvEntry.class by compiling :
[root@NJVC-BAO-DEV-DB-1 cassandra]# ./csvtoCassandra.sh test.csv
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Unable to find snitch class 'com.datastax.bdp.snitch.DseDelegateSnitch'
Fatal configuration error; unable to start server. See log for stacktrace.
DEBUG>> I checked cassandra.yaml endpoint_snitch is set to com.datastax.bdp.snitch.DseDelegateSnitch
My csvtoCassandra.sh looks like:
#!/bin/sh
# paths to the cassandra source tree, cassandra jar and java
CASSANDRA_HOME="."
CASSANDRA_JAR="$CASSANDRA_HOME/lib/cassandra-all-1.0.10.jar"
JAVA=which java
# Java classpath. Must include:
# - directory of DataImportExample
# - directory with cassandra/log4j config files
# - cassandra jar
# - cassandra depencies jar
CLASSPATH=".:$CASSANDRA_HOME/conf:$CASSANDRA_JAR"
for jar in $CASSANDRA_HOME/lib/*.jar; do
CLASSPATH=$CLASSPATH:$jar
done
$JAVA -ea -cp $CLASSPATH -Xmx256M \
-Dlog4j.configuration=log4j-tools.properties \
DataImportExample "$@"
