ECHO [ERROR] The specified binding '%2' was not found. Exiting.
GOTOexit
:gotBindingLine
@REM Pull out binding name and class
FOR/F"tokens=1-2 delims=:"%%G IN ("%BINDING_LINE%") DO (
SETBINDING_NAME=%%G
SETBINDING_CLASS=%%H
)
@REM Some bindings have multiple versions that are managed in the same
@REM directory.
@REM They are noted with a '-' after the binding name.
@REM (e.g. cassandra-7 & cassandra-8)
FOR/F"tokens=1 delims=-"%%G IN ("%BINDING_NAME%") DO (
SETBINDING_DIR=%%G
)
@REM The 'basic' binding is core functionality
IF NOT "%BINDING_NAME%"=="basic"GOTOnoBasic
SETBINDING_DIR=core
:noBasic
@REM Add Top level conf to classpath
IF"%CLASSPATH%."=="."GOTOemptyClasspath
SETCLASSPATH=%CLASSPATH%;%YCSB_HOME%\conf
GOTOconfAdded
:emptyClasspath
SETCLASSPATH=%YCSB_HOME%\conf
:confAdded
@REM Accumulo deprecation message
IF NOT "%BINDING_DIR%"=="accumulo"GOTOnotAliasAccumulo
echo [WARN] The 'accumulo' client has been deprecated in favor of version specific bindings. This name still maps to the binding for Accumulo 1.6, which is named 'accumulo-1.6'. This alias will be removed in a future YCSB release.
SETBINDING_DIR=accumulo1.6
:notAliasAccumulo
@REM Cassandra2 deprecation message
IF NOT "%BINDING_DIR%"=="cassandra2"GOTOnotAliasCassandra
echo [WARN] The 'cassandra2-cql' client has been deprecated. It has been renamed to simply 'cassandra-cql'. This alias will be removed in the next YCSB release.
SETBINDING_DIR=cassandra
:notAliasCassandra
@REM Build classpath according to source checkout or release distribution
IFEXIST"%YCSB_HOME%\pom.xml"GOTOgotSource
@REM Core libraries
FOR%%F IN (%YCSB_HOME%\lib\*.jar) DO (
SETCLASSPATH=!CLASSPATH!;%%F%
)
@REM Database conf dir
IF NOT EXIST"%YCSB_HOME%\%BINDING_DIR%-binding\conf"GOTOnoBindingConf